rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
EditorInsertOrEditNamedAnchor(); }
function EditorInitFormatMenu(){ var propertiesMenu = document.getElementById("objectProperties"); if (propertiesMenu) { var element = GetSelectedElementOrParentCell(); if (element) { dump("TagName="+element.nodeName+"\n"); if (element.nodeName) { propertiesMenu.removeAttribute("hidden...
if (element)
var menuStr = editorShell.GetString("ObjectProperties"); if (element && element.nodeName)
function EditorInitFormatMenu(){ // Set the string for the background color menu item SetBackColorString("backgroundColorMenu"); var menuItem = document.getElementById("objectProperties"); if (menuItem) { var element = GetSelectedElementOrParentCell(); if (element) { dump("TagName="+element.nodeName...
dump("TagName="+element.nodeName+"\n"); if (element.nodeName)
var objStr = ""; menuItem.removeAttribute("disabled"); switch (element.nodeName)
function EditorInitFormatMenu(){ // Set the string for the background color menu item SetBackColorString("backgroundColorMenu"); var menuItem = document.getElementById("objectProperties"); if (menuItem) { var element = GetSelectedElementOrParentCell(); if (element) { dump("TagName="+element.nodeName...
menuItem.removeAttribute("hidden"); menuItem.removeAttribute("disabled"); var objStr; var menuStr = editorShell.GetString("ObjectProperties"); switch (element.nodeName) { case 'IMG': objStr = editorShell.GetString("Image"); break; case 'HR': objStr = editorShell.GetString("HLine"); break; case 'TABLE': objStr = editor...
case 'IMG': objStr = editorShell.GetString("Image"); break; case 'HR': objStr = editorShell.GetString("HLine"); break; case 'TABLE': objStr = editorShell.GetString("Table"); break; case 'TD': objStr = editorShell.GetString("TableCell"); break; case 'A': if(element.href) objStr = editorShell.GetString("Link"); else if (...
function EditorInitFormatMenu(){ // Set the string for the background color menu item SetBackColorString("backgroundColorMenu"); var menuItem = document.getElementById("objectProperties"); if (menuItem) { var element = GetSelectedElementOrParentCell(); if (element) { dump("TagName="+element.nodeName...
} else { menuItem.setAttribute("hidden","true");
menuStr = menuStr.replace(/%obj%/,objStr); } else { menuItem.setAttribute("disabled","true"); menuStr = menuStr.replace(/%obj%/,"").replace(/^\s+/, "");
function EditorInitFormatMenu(){ // Set the string for the background color menu item SetBackColorString("backgroundColorMenu"); var menuItem = document.getElementById("objectProperties"); if (menuItem) { var element = GetSelectedElementOrParentCell(); if (element) { dump("TagName="+element.nodeName...
menuItem.setAttribute("value", menuStr)
function EditorInitFormatMenu(){ // Set the string for the background color menu item SetBackColorString("backgroundColorMenu"); var menuItem = document.getElementById("objectProperties"); if (menuItem) { var element = GetSelectedElementOrParentCell(); if (element) { dump("TagName="+element.nodeName...
var menuItem = document.getElementById("objectProperties"); if (menuItem) { var element = GetSelectedElementOrParentCellOrLink(); var menuStr = GetString("ObjectProperties"); if (element && element.nodeName) { var objStr = ""; menuItem.setAttribute("disabled", ""); var name = element.nodeName.toLowerCase(); switch (nam...
InitObjectPropertiesMenuitem("objectProperties");
function EditorInitFormatMenu(){ // Set strings and enable for the [Object] Properties item // Note that we directly do the enabling instead of // using goSetCommandEnabled since we already have the menuitem var menuItem = document.getElementById("objectProperties"); if (menuItem) { var element = GetSelectedE...
SetBackColorString("menu_TableOrCellColor", false);
function EditorInitTableMenu(){ // Change text on the "Join..." item depending if we // are joining selected cells or just cell to right // TODO: What to do about normal selection that crosses // table border? Try to figure out all cells // included in the selection? var menuText; // Use "Join sele...
DisableItem("cmd_viewFormatToolbar", true); DisableItem("cmd_viewEditModeToolbar", true);
SetElementEnabledById("cmd_viewFormatToolbar", false); SetElementEnabledById("cmd_viewEditModeToolbar", false);
function EditorInitToolbars(){ // Nothing to do now, but we might want some state updating here if (!IsEditorContentHTML()) { //Hide the formating toolbar gFormatToolbar.setAttribute("hidden", "true"); //Hide the edit mode toolbar gEditModeBar.setAttribute("hidden", "true"); DisableItem("cmd_viewF...
window.openDialog("chrome:
if (IsInTableCell()) window.openDialog("chrome: else window.openDialog("chrome:
function EditorInsertOrEditTable(insertAllowed){ if (IsInTable()) { // Edit properties of existing table window.openDialog("chrome://editor/content/EdTableProps.xul", "_blank", "chrome,close,titlebar,modal", "","TablePanel"); window._content.focus(); } else if(insertAllowed) { EditorInsertTable(); }}
dump("EditorInsertTable\n");
function EditorInsertTable(){dump("EditorInsertTable\n"); // Insert a new table window.openDialog("chrome://editor/content/EdInsertTable.xul", "_blank", "chrome,close,titlebar,modal", ""); window._content.focus();}
dump("Toggling list " + listType + "\n");
function EditorMakeOrChangeList(listType){ // check the observer node, // which is the appropriate button var theButton = document.getElementById(listType + "Button"); dump("Toggling list " + listType + "\n"); if (theButton) { var isOn = theButton.getAttribute("toggled"); if (isOn == 1) { dump("Remo...
var isOn = theButton.getAttribute("toggled");
var buttonFormat = theButton.getAttribute("format"); var isOn = (listType == buttonFormat);
function EditorMakeOrChangeList(listType){ // check the observer node, // which is the appropriate button var theButton = document.getElementById(listType + "Button"); dump("Toggling list " + listType + "\n"); if (theButton) { var isOn = theButton.getAttribute("toggled"); if (isOn == 1) { dump("Remo...
dump("Removing list \n");
function EditorMakeOrChangeList(listType){ // check the observer node, // which is the appropriate button var theButton = document.getElementById(listType + "Button"); dump("Toggling list " + listType + "\n"); if (theButton) { var isOn = theButton.getAttribute("toggled"); if (isOn == 1) { dump("Remo...
}
function EditorMakeOrChangeList(listType){ // check the observer node, // which is the appropriate button var theButton = document.getElementById(listType + "Button"); dump("Toggling list " + listType + "\n"); if (theButton) { var isOn = theButton.getAttribute("toggled"); if (isOn == 1) { dump("Remo...
core = XPAppCoresManager.Find("toolkitCore"); if ( !core ) { core = new ToolkitCore(); if ( core ) { core.Init("toolkitCore"); } } if ( core ) { core.ShowWindowWithArgs( "chrome: } else { dump("Error; can't create toolkitCore\n"); }
window.open( "chrome:
function EditorNewBrowser(){ dump("In EditorNewBrowser..\n"); core = XPAppCoresManager.Find("toolkitCore"); if ( !core ) { core = new ToolkitCore(); if ( core ) { core.Init("toolkitCore"); } } if ( core ) { core.ShowWindowWithArgs( "chrome://navigator/content/navigator.xul", window, "" ); } else...
core = XPAppCoresManager.Find("toolkitCore"); if ( !core ) { core = new ToolkitCore(); if ( core ) { core.Init("toolkitCore"); } } if ( core ) { core.ShowWindowWithArgs( "chrome: } else { dump("Error; can't create toolkitCore\n"); }
window.openDialog( "chrome: "_blank", "chrome,dialog=no,all", "chrome:
function EditorNewPlaintext(){ dump("In EditorNewPlaintext..\n"); core = XPAppCoresManager.Find("toolkitCore"); if ( !core ) { core = new ToolkitCore(); if ( core ) { core.Init("toolkitCore"); } } if ( core ) { core.ShowWindowWithArgs( "chrome://editor/content/TextEditorAppShell.xul", window, "ch...
if (window.InsertCharWindow) return;
if ("InsertCharWindow" in window && window.InsertCharWindow) return;
function EditorOnFocus(){ if (window.InsertCharWindow) return; // Find window with an InsertCharsWindow and switch association to this one var windowWithDialog = FindEditorWithInsertCharDialog(); if (windowWithDialog) { // Switch the dialog to current window // this sets focus to dialog, so bring focus back ...
if ("arguments" in window && window.arguments.length > 1 && window.arguments[1]) { if (window.arguments[1].indexOf("charset=") != -1) { var arrayArgComponents = window.arguments[1].split("="); if (arrayArgComponents) { document.getElementById( "args" ).setAttribute("charset", arrayArgComponents[1]); } } }
function EditorOnLoad(){ // See if argument was passed. if ( window.arguments && window.arguments[0] ) { // Opened via window.openDialog with URL as argument. // Put argument where EditorStartup expects it. document.getElementById( "args" ).setAttribute( "value", window.arguments[0] ); } ...
WebCompose = true;
function EditorOnLoad(){ // See if argument was passed. if ( window.arguments && window.arguments[0] ) { // Opened via window.openDialog with URL as argument. // Put argument where EditorStartup expects it. document.getElementById( "args" ).setAttribute( "value", window.arguments[0] ); } ...
EditorStartup( 'html' ); return; } else { return;
function EditorOnLoad() { // See if argument was passed. if ( window.arguments && window.arguments[0] ) { // Opened via window.openDialog with URL as argument. // Put argument where EditorStartup expects it. document.getElementById( "args" ).setAttribute( "value", window.arguments[0] ); ...
EditorStartup( 'html' ); return;
function EditorOnLoad() { // See if argument was passed. if ( window.arguments && window.arguments[0] ) { // Opened via window.openDialog with URL as argument. // Put argument where EditorStartup expects it. document.getElementById( "args" ).setAttribute( "value", window.arguments[0] ); ...
document.getElementById( "args" ).setAttribute( "value", window.arguments[0] );
var url = window.arguments[0]; document.getElementById( "args" ).setAttribute( "value", url ); SetSaveAndPublishUI(url);
function EditorOnLoad(){ // See if argument was passed. if ( window.arguments && window.arguments[0] ) { // Opened via window.openDialog with URL as argument. // Put argument where EditorStartup expects it. document.getElementById( "args" ).setAttribute( "value", window.arguments[0] ); } ...
if (!url || url.length == 0)
if (!url)
function EditorOpenUrl(url){ if (!url || url.length == 0) return; // if the existing window is untouched, just load there if (!FindAndSelectEditorWindowWithURL(url)) { if (PageIsEmptyAndUntouched()) { window.editorShell.LoadUrl(url); } else { // open new window window.openDialog("ch...
EditorRemoveTextProperty("font", "color"); EditorRemoveTextProperty("font", "bgcolor"); EditorRemoveTextProperty("font", "size"); EditorRemoveTextProperty("small", ""); EditorRemoveTextProperty("big", ""); var bodyelement = GetBodyElement(); if (bodyelement) { var editor = GetCurrentEditor(); editor.cloneAttributes(...
function EditorResetFontAndColorAttributes(){ try { document.getElementById("cmd_fontFace").setAttribute("state", ""); EditorRemoveTextProperty("font", "color"); EditorRemoveTextProperty("font", "bgcolor"); EditorRemoveTextProperty("font", "size"); EditorRemoveTextProperty("small", ""); EditorRemov...
editor.removeAttributeOrEquivalent(bodyelement, "text", true); editor.removeAttributeOrEquivalent(bodyelement, "bgcolor", true); bodyelement.removeAttribute("link"); bodyelement.removeAttribute("alink"); bodyelement.removeAttribute("vlink"); editor.removeAttributeOrEquivalent(bodyelement, "background", true);
editor.cloneAttributes(bodyelement, editor.document.createElement("body"));
function EditorResetFontAndColorAttributes(){ try { document.getElementById("cmd_fontFace").setAttribute("state", ""); EditorRemoveTextProperty("font", "color"); EditorRemoveTextProperty("font", "bgcolor"); EditorRemoveTextProperty("font", "size"); EditorRemoveTextProperty("small", ""); EditorRemov...
window._content.focus();
window.content.focus();
function EditorRunLog(){ var fs; fs = EditorGetScriptFileSpec(); EditorExecuteScript(fs); window._content.focus();}
editorShell.SelectAllTableCells();
function EditorSelectAllTableCells(){ editorShell.SelectAllTableCells(); contentWindow.focus();}
dump("EditorSelectBackColor: "+color+"\n");
function EditorSelectBackColor(ColorPickerID, ColorWellID){ var color = getColorAndSetColorWell(ColorPickerID, ColorWellID);dump("EditorSelectBackColor: "+color+"\n"); // Close appropriate menupopup var menupopup; if (ColorPickerID == "menuBackCP") menupopup = document.getElementById("formatMenuPopup"); else ...
window.editorShell.SetTextProperty("font", "color", gColorObj.TextColor);
if (gColorObj.TextColor) window.editorShell.SetTextProperty("font", "color", gColorObj.TextColor); else window.editorShell.RemoveTextProperty("font", "color");
function EditorSelectColor(colorType, mouseEvent){ if (!gColorObj) return; // Shift + mouse click automatically applies last color, if available var useLastColor = mouseEvent ? ( mouseEvent.button == 0 && mouseEvent.shiftKey ) : false; var element; var table; var currentColor = ""; var commandNode; if (!colo...
if (gColorObj.Type == "Page" && gColorObj.BackgroundColor) { var bodyelement = GetBodyElement(); if (bodyelement) { var defColors = GetDefaultBrowserColors(); if (defColors) { if (!bodyelement.getAttribute("text")) window.editorShell.SetAttribute(bodyelement, "text", defColors.TextColor); if (!bodyelement.getAttrib...
function EditorSelectColor(colorType, mouseEvent){ if (!gColorObj) return; // Shift + mouse click automatically applies last color, if available var useLastColor = mouseEvent ? ( mouseEvent.button == 0 && mouseEvent.shiftKey ) : false; var element; var table; var currentColor = ""; var commandNode; if (!colo...
var broadcaster;
var commandNode;
function EditorSelectColor(colorType){ if (!gColorObj) gColorObj = new Object; var element; var table; var currentColor = ""; if (!colorType) colorType = ""; if (colorType == "Text") { gColorObj.Type = colorType; // Get color from command node state var commandNode = document.getElementById("cmd_fo...
broadcaster = document.getElementById("cmd_fontColor"); if (broadcaster) broadcaster.setAttribute("state",gColorObj.TextColor);
goUpdateCommand("cmd_fontColor");
function EditorSelectColor(colorType){ if (!gColorObj) gColorObj = new Object; var element; var table; var currentColor = ""; if (!colorType) colorType = ""; if (colorType == "Text") { gColorObj.Type = colorType; // Get color from command node state var commandNode = document.getElementById("cmd_fo...
if (gColorObj.BackgroundColor.length > 0)
if (gColorObj.BackgroundColor)
function EditorSelectColor(colorType){ if (!gColorObj) gColorObj = new Object; var element; var table; var currentColor = ""; if (!colorType) colorType = ""; if (colorType == "Text") { gColorObj.Type = colorType; // Get color from command node state var commandNode = document.getElementById("cmd_fo...
broadcaster = document.getElementById("cmd_backgroundColor"); if (broadcaster) broadcaster.setAttribute("state",gColorObj.BackgroundColor);
goUpdateCommand("cmd_backgroundColor");
function EditorSelectColor(colorType){ if (!gColorObj) gColorObj = new Object; var element; var table; var currentColor = ""; if (!colorType) colorType = ""; if (colorType == "Text") { gColorObj.Type = colorType; // Get color from command node state var commandNode = document.getElementById("cmd_fo...
gColorObj.NoDefault = false;
if (!useLastColor) { gColorObj.NoDefault = false;
function EditorSelectColor(colorType, mouseEvent){ if (!gColorObj) return; // Shift + mouse click automatically applies last color, if available var useLastColor = mouseEvent ? ( mouseEvent.button == 0 && mouseEvent.shiftKey ) : false; var element; var table; var currentColor = ""; var commandNode; if (!colo...
if (gColorObj.Cancel) return;
if (gColorObj.Cancel) return; }
function EditorSelectColor(colorType, mouseEvent){ if (!gColorObj) return; // Shift + mouse click automatically applies last color, if available var useLastColor = mouseEvent ? ( mouseEvent.button == 0 && mouseEvent.shiftKey ) : false; var element; var table; var currentColor = ""; var commandNode; if (!colo...
}
function EditorSelectColor(colorType, mouseEvent){ if (!gColorObj) return; // Shift + mouse click automatically applies last color, if available var useLastColor = mouseEvent ? ( mouseEvent.button == 0 && mouseEvent.shiftKey ) : false; var element; var table; var currentColor = ""; var commandNode; if (!colo...
dump("EditorSelectFontFace: "+gFontFaceNames[select.selectedIndex]+"\n");
function EditorSelectFontFace() { var select = document.getElementById("FontFaceSelect");dump("EditorSelectFontFace: "+gFontFaceNames[select.selectedIndex]+"\n"); if (select) { if (select.selectedIndex == -1) return; EditorSetFontFace(gFontFaceNames[select.selectedIndex]); }}
var selection = editorShell.editorSelection; if (selection) { var tableNode = editorShell.GetElementOrParentByTagName("table",selection.anchorNode); if (tableNode) { selection.clearSelection(); AppendNodeToSelection(selection, tableNode); } }
function EditorSelectTable(){ //TODO: FINISH THIS! contentWindow.focus();}
editorShell.SelectTableCell();
function EditorSelectTable(){ editorShell.SelectTableCell(); contentWindow.focus();}
var selection = editorShell.editorSelection; if (selection) { var cellNode = editorShell.GetElementOrParentByTagName("td",selection.anchorNode); if (cellNode) { selection.clearSelection(); AppendNodeToSelection(selection, cellNode); } }
function EditorSelectTableCell(){ //TODO: FINISH THIS! contentWindow.focus();}
editorShell.SelectTableCell();
function EditorSelectTableCell(){ editorShell.SelectTableCell(); contentWindow.focus();}
editorShell.SelectTableColumn();
function EditorSelectTableColumn(){ editorShell.SelectTableColumn(); contentWindow.focus();}
var tagNameObj = new Object(); var isSelectedObj = new Object(); var tagName; var isSelected; var tableElement = editorShell.GetSelectedOrParentTableElement(tagNameObj,isSelectedObj); tagName = tagNameObj.value; isSelected = isSelectedObj.value; dump("Table element="+tableElement+" Tagname="+tagName+" IsSelected="+isSe...
function EditorSelectTableRow(){ //TODO: FINISH THIS! contentWindow.focus();}
editorShell.SelectTableRow();
function EditorSelectTableRow(){ editorShell.SelectTableRow(); contentWindow.focus();}
} else { sendPageMustSave(); }
} else if (CheckAndSaveDocument(GetString("SendPageReason"))) editorSendPage();
function editorSendPage(){ var docModified = editorShell.documentModified; var pageUrl = window.editorShell.editorDocument.location; if (pageUrl != "about:blank" && !docModified) { var pageTitle = window.editorShell.editorDocument.title; window.openDialog("chrome://messenger/content/messengercompose/messenger...
"chrome,all,dialog=no", "attachment='" + pageUrl + "',body='" + pageUrl +
"chrome,all,dialog=no", "attachment='" + pageUrl.replace(/\,/g, "%2C") + "',body='" + pageUrl +
function editorSendPage(){ var docModified = editorShell.documentModified; var pageUrl = window.editorShell.editorDocument.location; if (pageUrl != "about:blank" && !docModified) { var pageTitle = window.editorShell.editorDocument.title; window.openDialog("chrome://messenger/content/messengercompose/messenger...
var showMenu = document.getElementById("ShowExtraMarkup"); var hideMenu = document.getElementById("HideExtraMarkup"); switch (mode ) { case 0: showMenu.setAttribute("hidden","true"); hideMenu.removeAttribute("hidden"); break; default: showMenu.removeAttribute("hidden"); hideMenu.setAttribute("hidden","true"); break; }
function EditorSetDisplayMode(mode){ EditorDisplayMode = mode; // Editor does the style sheet loading/unloading editorShell.SetDisplayMode(mode); // Set the UI states // TODO: Should we NOT have the menu items and eliminate this? var showMenu = document.getElementById("ShowExtraMarkup"); var hideMenu = documen...
gEditor.AddDocumentStateListener( DocumentReloadListener );
gEditor.addDocumentStateListener( DocumentReloadListener );
function EditorSetDocumentCharacterSet(aCharset){ if (gEditor) { gEditor.documentCharacterSet = aCharset; var docUrl = GetDocumentUrl(); if( !IsUrlAboutBlank(docUrl)) { // reloading the document will reverse any changes to the META charset, // we need to put them back in, which is achieved by a...
dump("Removing font size\n");
function EditorSetFontSize(size){ if( size == "0" || size == "normal" || size == "medium" ) { editorShell.RemoveTextProperty("font", "size"); dump("Removing font size\n"); } else { dump("Setting font size\n"); // Temp: convert from new CSS size strings to old HTML size strings switch (size) {...
dump("Set text property -- calling focus()\n");
function EditorSetTextProperty(property, attribute, value){ editorShell.SetTextProperty(property, attribute, value); dump("Set text property -- calling focus()\n"); contentWindow.focus();}
editorShell.RegisterDocumentStateListener( DocumentStateListener );
if (editorShell.editorType == "htmlmail" || editorShell.editorType == "textmail") editorShell.RegisterDocumentStateListener( MessageComposeDocumentStateListener ); else editorShell.RegisterDocumentStateListener( DocumentStateListener );
function EditorSharedStartup(){ // Just for convenience gContentWindow = window._content; switch (editorShell.editorType) { case "html": case "htmlmail": gIsHTMLEditor = true; break; case "text": case "textmail": gIsHTMLEditor = false; break; default: dump...
SetupControllerCommands();
SetupHTMLEditorCommands();
function EditorSharedStartup(){ // set up JS-implemented commands SetupControllerCommands(); // Just for convenience gContentWindow = window._content; gIsWin = navigator.appVersion.indexOf("Win") != -1; gIsUNIX = (navigator.appVersion.indexOf("X11") || navigator.appVersion.indexOf("nux")) != -1; gIs...
gIsWin = navigator.appVersion.indexOf("Win") != -1;
gIsWindows = navigator.appVersion.indexOf("Win") != -1;
function EditorSharedStartup(){ // set up JS-implemented commands SetupControllerCommands(); // Just for convenience gContentWindow = window._content; gIsWin = navigator.appVersion.indexOf("Win") != -1; gIsUNIX = (navigator.appVersion.indexOf("X11") || navigator.appVersion.indexOf("nux")) != -1; gIs...
gIsMac = !gIsWin && !gIsUNIX;
gIsMac = !gIsWindows && !gIsUNIX;
function EditorSharedStartup(){ // set up JS-implemented commands SetupControllerCommands(); // Just for convenience gContentWindow = window._content; gIsWin = navigator.appVersion.indexOf("Win") != -1; gIsUNIX = (navigator.appVersion.indexOf("X11") || navigator.appVersion.indexOf("nux")) != -1; gIs...
dump("IsWin="+gIsWin+", IsUNIX="+gIsUNIX+", IsMac="+gIsMac+"\n");
function EditorSharedStartup(){ // set up JS-implemented commands SetupControllerCommands(); // Just for convenience gContentWindow = window.content; gIsWin = navigator.appVersion.indexOf("Win") != -1; gIsUNIX = (navigator.appVersion.indexOf("X11") || navigator.appVersion.indexOf("nux")) != -1; gIsM...
case "html": case "htmlmail": SetupHTMLEditorCommands(); break; default: dump("INVALID EDITOR TYPE: "+editorShell.editorType+"\n"); case "text": case "textmail": SetupTextEditorCommands(); break;
case "html": case "htmlmail": SetupHTMLEditorCommands(); window.gDefaultSaveMimeType = "text/html"; break; case "text": case "textmail": SetupTextEditorCommands(); window.gDefaultSaveMimeType = "text/plain"; break; default: dump("INVALID EDITOR TYPE: "+editorShell.editorType+"\n"); SetupTextEditorCommands(); window.gDe...
function EditorSharedStartup(){ // set up JS-implemented commands for Text or HTML editing switch (editorShell.editorType) { case "html": case "htmlmail": SetupHTMLEditorCommands(); break; default: dump("INVALID EDITOR TYPE: "+editorShell.editorType+"\n"); // Fall throught to implement j...
var DragStr = tableKey+GetString("Drag"); var ClickStr = tableKey+GetString("Click");
var dragStr = tableKey+GetString("Drag"); var clickStr = tableKey+GetString("Click");
function EditorSharedStartup(){ // set up JS-implemented commands SetupControllerCommands(); // Just for convenience gContentWindow = window._content; gIsWin = navigator.appVersion.indexOf("Win") != -1; gIsUNIX = (navigator.appVersion.indexOf("X11") || navigator.appVersion.indexOf("nux")) != -1; gIs...
var DelStr = GetString(gIsMac ? "Clear" : "Del");
var delStr = GetString(gIsMac ? "Clear" : "Del");
function EditorSharedStartup(){ // set up JS-implemented commands SetupControllerCommands(); // Just for convenience gContentWindow = window._content; gIsWin = navigator.appVersion.indexOf("Win") != -1; gIsUNIX = (navigator.appVersion.indexOf("X11") || navigator.appVersion.indexOf("nux")) != -1; gIs...
document.getElementById("menu_SelectCell").setAttribute("acceltext", ClickStr); document.getElementById("menu_SelectRow").setAttribute("acceltext", DragStr); document.getElementById("menu_SelectColumn").setAttribute("acceltext", DragStr); document.getElementById("menu_SelectAllCells").setAttribute("acceltext", DragStr)...
SafeSetAttribute("menu_SelectCell", "acceltext", clickStr); SafeSetAttribute("menu_SelectRow", "acceltext", dragStr); SafeSetAttribute("menu_SelectColumn", "acceltext", dragStr); SafeSetAttribute("menu_SelectAllCells", "acceltext", dragStr);
function EditorSharedStartup(){ // set up JS-implemented commands SetupControllerCommands(); // Just for convenience gContentWindow = window._content; gIsWin = navigator.appVersion.indexOf("Win") != -1; gIsUNIX = (navigator.appVersion.indexOf("X11") || navigator.appVersion.indexOf("nux")) != -1; gIs...
document.getElementById("menu_DeleteCellContents").setAttribute("acceltext",DelStr);
SafeSetAttribute("menu_DeleteCellContents", "acceltext", delStr);
function EditorSharedStartup(){ // set up JS-implemented commands SetupControllerCommands(); // Just for convenience gContentWindow = window._content; gIsWin = navigator.appVersion.indexOf("Win") != -1; gIsUNIX = (navigator.appVersion.indexOf("X11") || navigator.appVersion.indexOf("nux")) != -1; gIs...
window._content.focus();
window.content.focus();
function EditorStartLog(){ try { var edlog = GetCurrentEditor().QueryInterface(Components.interfaces.nsIEditorLogging); var fs = EditorGetScriptFileSpec(); edlog.startLogging(fs); window._content.focus(); fs = null; } catch(ex) { dump("Can't start logging!:\n" + ex + "\n"); }}
dump("Doing Editor Startup...\n");
function EditorStartup(editorType, editorElement){ dump("Doing Editor Startup...\n"); contentWindow = window.content; dump("Trying to make an Editor Shell through the component manager...\n"); // store the editor shell in the window, so that child windows can get to it. var editorShell = window.editorShell = edi...
dump("Trying to make an Editor Shell through the component manager...\n");
function EditorStartup(editorType, editorElement){ dump("Doing Editor Startup...\n"); contentWindow = window.content; dump("Trying to make an Editor Shell through the component manager...\n"); // store the editor shell in the window, so that child windows can get to it. var editorShell = window.editorShell = edi...
var editorShell = window.editorShell = editorElement.editorShell;
editorShell = editorElement.editorShell;
function EditorStartup(editorType, editorElement){ dump("Doing Editor Startup...\n"); contentWindow = window.content; dump("Trying to make an Editor Shell through the component manager...\n"); // store the editor shell in the window, so that child windows can get to it. var editorShell = window.editorShell = edi...
dump("EditorAppCore windows have been set.\n");
function EditorStartup(editorType, editorElement){ dump("Doing Editor Startup...\n"); contentWindow = window.content; dump("Trying to make an Editor Shell through the component manager...\n"); // store the editor shell in the window, so that child windows can get to it. var editorShell = window.editorShell = edi...
var charset = document.getElementById("args").getAttribute("charset"); if (charset) editorShell.SetDocumentCharacterSet(charset);
function EditorStartup(editorType, editorElement){ gIsHTMLEditor = (editorType == "html"); if (gIsHTMLEditor) { gSourceContentWindow = document.getElementById("content-source"); gEditModeBar = document.getElementById("EditModeToolbar"); gNormalModeButton = document.getElementById("NormalModeButton");...
dump("Doing Startup...\n");
dump("Doing Editor Startup...\n");
function EditorStartup(editorType){ dump("Doing Startup...\n"); contentWindow = window.content; // set up event listeners window.addEventListener("load", EditorDocumentLoaded, true, false); dump("Trying to make an Editor Shell through the component manager...\n"); var editorShell = Components.classes["compone...
editorShell.SetEditorType(editorType);
editorShell.editorType = editorType;
function EditorStartup(editorType, editorElement){ gIsHTMLEditor = (editorType == "html"); if (gIsHTMLEditor) { gSourceContentWindow = document.getElementById("content-source"); gEditModeBar = document.getElementById("EditModeToolbar"); gEditModeLabel = document.getElementById("EditModeLabel"); ...
SetupHTMLSourceController();
SetupComposerWindowCommands();
function EditorStartup(editorType, editorElement){ gIsHTMLEditor = (editorType == "html"); if (gIsHTMLEditor) { gSourceContentWindow = document.getElementById("content-source"); gEditModeBar = document.getElementById("EditModeToolbar"); gEditModeLabel = document.getElementById("EditModeLabel"); ...
/* var editorShell = Components.classes["component: if (editorShell) editorShell = editorShell.QueryInterface(Components.interfaces.nsIEditorShell);
function EditorStartup(editorType, editorElement){ dump("Doing Editor Startup...\n"); contentWindow = window.content; // set up event listeners window.addEventListener("load", EditorDocumentLoaded, true, false); dump("Trying to make an Editor Shell through the component manager...\n");/* var editorShell = Com...
if (!editorShell) { dump("Failed to create editor shell\n"); window.close(); return; } */
function EditorStartup(editorType, editorElement){ dump("Doing Editor Startup...\n"); contentWindow = window.content; // set up event listeners window.addEventListener("load", EditorDocumentLoaded, true, false); dump("Trying to make an Editor Shell through the component manager...\n");/* var editorShell = Com...
document.getElementById("EditModeTabbox").selectedTab = gNormalModeButton;
document.getElementById("EditModeTabs").selectedTab = gNormalModeButton;
function EditorStartup(editorType, editorElement){ gIsHTMLEditor = (editorType == "html"); if (gIsHTMLEditor) { gSourceContentWindow = document.getElementById("content-source"); gEditModeBar = document.getElementById("EditModeToolbar"); gNormalModeButton = document.getElementById("NormalModeButton");...
window._content.focus();
window.content.focus();
function EditorStopLog(){ try { var edlog = GetCurrentEditor().QueryInterface(Components.interfaces.nsIEditorLogging); edlog.stopLogging(); window._content.focus(); } catch(ex) { dump("Can't stop logging!:\n" + ex + "\n"); }}
dump("Selection as text\n"); dump(window.editorShell.selectionAsText + "\n\n"); dump("Selection as HTML\n"); dump(window.editorShell.selectionAsHTML + "\n\n");
function EditorTestSelection(){ if (window.editorShell) { dump("Testing selection\n"); var selection = window.editorShell.editorSelection; if (selection) { dump("Got selection\n"); var firstRange = selection.getRangeAt(0); if (firstRange) { dump("Range contains \""); dum...
dump(selection.toStringWithFormat("text/plain",
dump(selection.QueryInterface(Components.interfaces.nsISelectionPrivate).toStringWithFormat("text/plain",
function EditorTestSelection(){ dump("Testing selection\n"); var selection = editorShell.editorSelection; if (!selection) { dump("No selection!\n"); return; } dump("Selection contains:\n"); // 3rd param = column to wrap dump(selection.toStringWithFormat("text/plain", 3, ...
dump("====== Selection as node and offsets==========\n"); dump("rangeCount = " + selection.rangeCount + "\n"); for (i = 0; i < selection.rangeCount; i++) { var range = selection.getRangeAt(i); if (range) { dump("Range "+i+": StartParent="+range.startContainer.nodeName+", offset="+range.startOffset+"\n"); dump("Range "+...
function EditorTestSelection(){ dump("Testing selection\n"); var selection = editorShell.editorSelection; if (!selection) { dump("No selection!\n"); return; } dump("Selection contains:\n"); // 3rd param = column to wrap dump(selection.toStringWithFormat("text/plain", 3, ...
editorShell.DisplayParagraphMarks(checked == "true");
if (checked == "true") GetCurrentEditor().addOverrideStyleSheet(gParagraphMarksStyleSheet); else GetCurrentEditor().enableStyleSheet(gParagraphMarksStyleSheet, false);
function EditorToggleParagraphMarks(){ var menuItem = document.getElementById("viewParagraphMarks"); if (menuItem) { // Note that the 'type="checbox"' mechanism automatically // toggles the "checked" state before the oncommand is called, // so if "checked" is true now, it was just switched to that mode ...
window.openDialog( "chrome:
window.openDialog( "chrome: "_blank", "chrome,menubar,status,dialog=no,resizable", window.content.location, "view-source" );
function EditorViewSource(){ window.openDialog( "chrome://editor/content/viewsource.xul", "_blank", "all,dialog=no", window.content.location );}
launchWindow = window;
{ if (window) { launchWindow = window; } else { dump("No window to launch an editor from!\n"); return; } }
function editPage(url, launchWindow, delay){ // User may not have supplied a window if (!launchWindow) launchWindow = window; var windowManager = Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator'].getService(); if (!windowManager) return; var windowManagerInterface = windowManager.QueryInt...
if (launchWindow && (wintype == "navigator:browser") && launchWindow._content.document) charsetArg = "charset=" + launchWindow._content.document.characterSet;
if (launchWindow && (wintype == "navigator:browser") && launchWindow.content.document) charsetArg = "charset=" + launchWindow.content.document.characterSet;
function editPage(url, launchWindow, delay){ // Always strip off "view-source:" and #anchors url = url.replace(/^view-source:/, "").replace(/#.*/, ""); // User may not have supplied a window if (!launchWindow) { if (window) { launchWindow = window; } else { dump("No window to launch an edi...
var kDefaultTimezone = calendarDefaultTimezone(); if (isEvent(window.calendarItem)) { var startDate = jsDateToDateTime(getElementValue("event-starttime")).getInTimezone(kDefaultTimezone); if (getElementValue("event-all-day", "checked")) { startDate.isDate = true; startDate.normalize(); } args.startDate = startDate; } e...
function editRecurrence(){ var args = new Object(); args.calendarEvent = window.calendarItem; args.recurrenceInfo = window.recurrenceInfo || args.calendarEvent.recurrenceInfo; var savedWindow = window; args.onOk = function(recurrenceInfo) { savedWindow.recurrenceInfo = recurrenceInfo; }; // ...
args.recurrenceInfo = window.calendarEvent.recurrenceInfo;
args.recurrenceInfo = (window.recurrenceInfo) ? window.recurrenceInfo : window.calendarEvent.recurrenceInfo;
function editRecurrence(){ var args = new Object(); args.calendarEvent = window.calendarEvent; args.recurrenceInfo = window.calendarEvent.recurrenceInfo; var savedWindow = window; args.onOk = function(recurrenceInfo) { savedWindow.recurrenceInfo = recurrenceInfo; }; // wait cursor will rever...
modifyEventWithDialog(task);
modifyEventWithDialog(getOccurrenceOrParent(task));
function editToDo(task) { if (!task) return; modifyEventWithDialog(task);}
var args = new Object(); args.mode = "edit"; args.onOk = self.modifyToDoDialogResponse; args.calendarEvent = calendarToDo; window.setCursor( "wait" ); openDialog("chrome:
openToDoDialog(calendarToDo, "edit", self.modifyToDoDialogResponse, null);
function editToDo( calendarToDo ){ // set up a bunch of args to pass to the dialog var args = new Object(); args.mode = "edit"; args.onOk = self.modifyToDoDialogResponse; args.calendarEvent = calendarToDo; window.setCursor( "wait" ); // open the dialog modally openDialog("chrome://calen...
var items = emailOutlinerView.selection;
var items = emailTreeView.selection;
function email_enableButtons(){ var items = emailOutlinerView.selection; var toggle="false"; if (items.getRangeCount() == 0) { toggle="true"; } var enableViewButton=document.getElementById('email_viewButton'); enableViewButton.setAttribute("disabled",toggle); var enableDeleteButton=document.getElementById('em...
var numSelected = tree.selectedItems.length;
var numSelected = tree.treeBoxObject.selection ? tree.treeBoxObject.selection.count : 0;
function enable_buttons_for_current_panels() { var up = document.getElementById('up'); var down = document.getElementById('down'); var tree = document.getElementById('current-panels'); var customize = document.getElementById('customize-button'); var remove = document.getElementById('remove-butt...
selectedNode = tree.selectedItems[0]
selectedNode = tree.contentView.getItemAtIndex(tree.currentIndex);
function enable_buttons_for_current_panels() { var up = document.getElementById('up'); var down = document.getElementById('down'); var tree = document.getElementById('current-panels'); var customize = document.getElementById('customize-button'); var remove = document.getElementById('remove-butt...
var num_selected = 0; for (var ii=0; ii<all_panels.selectedItems.length; ii++) { debug("counting selected items..."); var node = all_panels.selectedItems[ii]; if (node.getAttribute('container') != 'true') { num_selected++;
var sel = all_panels.treeBoxObject.selection; var num_selected = sel ? sel.count : 0; if (sel) { var ranges = sel.getRangeCount(); for (var range = 0; range < ranges; ++range) { var min = {}, max = {}; sel.getRangeAt(range, min, max); for (var index = min; index <= max; ++index) { var node = all_panels.contentView.getI...
function enable_buttons_for_other_panels(){ var add_button = document.getElementById('add_button'); var preview_button = document.getElementById('preview_button'); var all_panels = document.getElementById('other-panels'); var num_selected = 0; // Only count non-folders as selected for button enabling for (var ii=...
debug("num_selected="+num_selected);
function enable_buttons_for_other_panels(){ var add_button = document.getElementById('add_button'); var preview_button = document.getElementById('preview_button'); var all_panels = document.getElementById('other-panels'); var num_selected = 0; // Only count non-folders as selected for button enabling for (var ii=...
var columns = document.getElementsByTagName('outlinercol');
var columns = document.getElementsByTagName('treecol');
function enable_sort_menuitems(){ var columns = document.getElementsByTagName('outlinercol'); var menuitem = document.getElementById('fill_after_this_node'); menuitem = menuitem.nextSibling for (var i = 0; (i < columns.length) && menuitem; ++i) { var column_node = columns[i]; if (column_node.getAttribute("hid...
var tree = document.getElementById("moduleList");
var listbox = document.getElementById("moduleList");
function enableAdvance(){ var tree = document.getElementById("moduleList"); var nextButton = document.getElementById("forward"); if (tree.selectedItems.length) nextButton.removeAttribute("disabled"); else nextButton.setAttribute("disabled", "true");}
if (tree.selectedItems.length)
if (listbox.selectedItems.length)
function enableAdvance(){ var tree = document.getElementById("moduleList"); var nextButton = document.getElementById("forward"); if (tree.selectedItems.length) nextButton.removeAttribute("disabled"); else nextButton.setAttribute("disabled", "true");}
window.setCursor("spinning");
setCursor("spinning");
function EnableBusyCursor(doEnable){ if (doEnable) { // set the spinning cursor everywhere but mac, we have our own way to // do this thankyouverymuch. if (navigator.platform.indexOf("Mac") > 0) { window.setCursor("spinning"); _content.setCursor("spinning"); } } else { window.setCursor("auto"...
window.setCursor("auto");
setCursor("auto");
function EnableBusyCursor(doEnable){ if (doEnable) { // set the spinning cursor everywhere but mac, we have our own way to // do this thankyouverymuch. if (navigator.platform.indexOf("Mac") > 0) { window.setCursor("spinning"); _content.setCursor("spinning"); } } else { window.setCursor("auto"...
function enableControls(node, enabled)
function enableControls(container, enabled)
function enableControls(node, enabled){ var localName = node.localName.toLowerCase(); if (localName == "input" || localName == "label") { if (enabled) node.setAttribute("disabled", "true"); else node.removeAttribute("disabled"); } var child = node.firstChild(); while (...
var localName = node.localName.toLowerCase(); if (localName == "input" || localName == "label") { if (enabled) node.setAttribute("disabled", "true"); else node.removeAttribute("disabled"); } var child = node.firstChild();
if (!container) return; var child = container.firstChild;
function enableControls(node, enabled){ var localName = node.localName.toLowerCase(); if (localName == "input" || localName == "label") { if (enabled) node.setAttribute("disabled", "true"); else node.removeAttribute("disabled"); } var child = node.firstChild(); while (...
var otherIspRadio = document.getElementById("otherIspRadio"); enableIspButtons(otherIspRadio, enabled);
function enableControls(node, enabled){ var localName = node.localName.toLowerCase(); if (localName == "input" || localName == "label") { if (enabled) node.setAttribute("disabled", "true"); else node.removeAttribute("disabled"); } var child = node.firstChild(); while (...
var tagName = node.tagName.toLowerCase(); if (tagName == "input" || tagName == "label") {
var localName = node.localName.toLowerCase(); if (localName == "input" || localName == "label") {
function enableControls(node, enabled){ var tagName = node.tagName.toLowerCase(); if (tagName == "input" || tagName == "label") { if (enabled) node.setAttribute("disabled", "true"); else node.removeAttribute("disabled"); } var child = node.firstChild(); while (child) {...