rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
bt.controllers.appendController(BookmarksMenuController);
function BrowserToolboxCustomizeDone(aToolboxChanged){ // Update global UI elements that may have been added or removed if (aToolboxChanged) { gURLBar = document.getElementById("urlbar"); gProxyButton = document.getElementById("page-proxy-button"); gProxyFavIcon = document.getElementById("page-proxy-favicon"); gProxyDeck = document.getElementById("page-proxy-deck"); gHomeButton.updateTooltip(); window.XULBrowserWindow.init(); } // Update the urlbar var url = getWebNavigation().currentURI.spec; if (gURLBar) { gURLBar.value = url; SetPageProxyState("valid"); } // Re-enable parts of the UI we disabled during the dialog var menubar = document.getElementById("main-menubar"); for (var i = 0; i < menubar.childNodes.length; ++i) menubar.childNodes[i].setAttribute("disabled", false); var cmd = document.getElementById("cmd_CustomizeToolbars"); cmd.removeAttribute("disabled"); // fix up the personal toolbar folder var bt = document.getElementById("bookmarks-ptf"); if (bt) { var btf = BMSVC.getBookmarksToolbarFolder().Value; var btchevron = document.getElementById("bookmarks-chevron"); bt.ref = btf; btchevron.ref = btf; // no uniqueness is guaranteed, so we have to remove first try { bt.database.RemoveObserver(BookmarksToolbarRDFObserver); bt.controllers.removeController(BookmarksMenuController); } catch (ex) { // ignore } bt.database.AddObserver(BookmarksToolbarRDFObserver); bt.controllers.appendController(BookmarksMenuController); bt.builder.rebuild(); btchevron.builder.rebuild(); // fake a resize; this function takes care of flowing bookmarks // from the bar to the overflow item BookmarksToolbar.resizeFunc(null); } // fix bug 291781 - controller has been lost while removeChild and appendChild var bm = document.getElementById("bookmarks-menu"); if (bm) bm.controllers.appendController(BookmarksMenuController); // XXX Shouldn't have to do this, but I do window.focus();}
#ifndef MOZ_PLACES
#ifndef MOZ_PLACES_BOOKMARKS
function BrowserToolboxCustomizeDone(aToolboxChanged){#ifdef TOOLBAR_CUSTOMIZATION_SHEET document.getElementById("customizeToolbarSheetBox").hidden = true;#endif // Update global UI elements that may have been added or removed if (aToolboxChanged) { gURLBar = document.getElementById("urlbar"); if (gURLBar) gURLBar.clickSelectsAll = gClickSelectsAll; gProxyButton = document.getElementById("page-proxy-button"); gProxyFavIcon = document.getElementById("page-proxy-favicon"); gProxyDeck = document.getElementById("page-proxy-deck"); gHomeButton.updateTooltip(); window.XULBrowserWindow.init(); } // Update the urlbar var url = getWebNavigation().currentURI.spec; if (gURLBar) { gURLBar.value = url == "about:blank" ? "" : url; SetPageProxyState("valid"); XULBrowserWindow.asyncUpdateUI(); } // Re-enable parts of the UI we disabled during the dialog var menubar = document.getElementById("main-menubar"); for (var i = 0; i < menubar.childNodes.length; ++i) menubar.childNodes[i].setAttribute("disabled", false); var cmd = document.getElementById("cmd_CustomizeToolbars"); cmd.removeAttribute("disabled"); // XXXmano bug 287105: wallpaper to bug 309953, // the reload button isn't in sync with the reload command. var reloadButton = document.getElementById("reload-button"); if (reloadButton) { reloadButton.disabled = document.getElementById("Browser:Reload").getAttribute("disabled") == "true"; }#ifdef XP_MACOSX // make sure to re-enable click-and-hold if (!getBoolPref("ui.click_hold_context_menus", false)) SetClickAndHoldHandlers();#endif#ifndef MOZ_PLACES // fix up the personal toolbar folder var bt = document.getElementById("bookmarks-ptf"); if (bt) { var btf = BMSVC.getBookmarksToolbarFolder().Value; var btchevron = document.getElementById("bookmarks-chevron"); bt.ref = btf; btchevron.ref = btf; // no uniqueness is guaranteed, so we have to remove first try { bt.database.RemoveObserver(BookmarksToolbarRDFObserver); } catch (ex) { // ignore } bt.database.AddObserver(BookmarksToolbarRDFObserver); bt.builder.rebuild(); btchevron.builder.rebuild(); // fake a resize; this function takes care of flowing bookmarks // from the bar to the overflow item BookmarksToolbar.resizeFunc(null); }#else var bookmarksBar = document.getElementById("bookmarksBarContent"); if (bookmarksBar) bookmarksBar._init();#endif#ifndef TOOLBAR_CUSTOMIZATION_SHEET // XXX Shouldn't have to do this, but I do window.focus();#endif}
bookmarksBar._init();
if (bookmarksBar) bookmarksBar._init();
function BrowserToolboxCustomizeDone(aToolboxChanged){#ifdef TOOLBAR_CUSTOMIZATION_SHEET document.getElementById("customizeToolbarSheetBox").hidden = true;#endif // Update global UI elements that may have been added or removed if (aToolboxChanged) { gURLBar = document.getElementById("urlbar"); if (gURLBar) gURLBar.clickSelectsAll = gClickSelectsAll; gProxyButton = document.getElementById("page-proxy-button"); gProxyFavIcon = document.getElementById("page-proxy-favicon"); gProxyDeck = document.getElementById("page-proxy-deck"); gHomeButton.updateTooltip(); window.XULBrowserWindow.init(); } // Update the urlbar var url = getWebNavigation().currentURI.spec; if (gURLBar) { gURLBar.value = url == "about:blank" ? "" : url; SetPageProxyState("valid"); XULBrowserWindow.asyncUpdateUI(); } // Re-enable parts of the UI we disabled during the dialog var menubar = document.getElementById("main-menubar"); for (var i = 0; i < menubar.childNodes.length; ++i) menubar.childNodes[i].setAttribute("disabled", false); var cmd = document.getElementById("cmd_CustomizeToolbars"); cmd.removeAttribute("disabled"); // XXXmano bug 287105: wallpaper to bug 309953, // the reload button isn't in sync with the reload command. var reloadButton = document.getElementById("reload-button"); if (reloadButton) { reloadButton.disabled = document.getElementById("Browser:Reload").getAttribute("disabled") == "true"; }#ifdef XP_MACOSX // make sure to re-enable click-and-hold if (!getBoolPref("ui.click_hold_context_menus", false)) SetClickAndHoldHandlers();#endif#ifndef MOZ_PLACES // fix up the personal toolbar folder var bt = document.getElementById("bookmarks-ptf"); if (bt) { var btf = BMSVC.getBookmarksToolbarFolder().Value; var btchevron = document.getElementById("bookmarks-chevron"); bt.ref = btf; btchevron.ref = btf; // no uniqueness is guaranteed, so we have to remove first try { bt.database.RemoveObserver(BookmarksToolbarRDFObserver); } catch (ex) { // ignore } bt.database.AddObserver(BookmarksToolbarRDFObserver); bt.builder.rebuild(); btchevron.builder.rebuild(); // fake a resize; this function takes care of flowing bookmarks // from the bar to the overflow item BookmarksToolbar.resizeFunc(null); }#else var bookmarksBar = document.getElementById("bookmarksBarContent"); bookmarksBar._init();#endif#ifndef TOOLBAR_CUSTOMIZATION_SHEET // XXX Shouldn't have to do this, but I do window.focus();#endif}
var bm = document.getElementById("bookmarks-menu"); if (bm) bm.controllers.appendController(BookmarksMenuController);
function BrowserToolboxCustomizeDone(aToolboxChanged){ // Update global UI elements that may have been added or removed if (aToolboxChanged) { gURLBar = document.getElementById("urlbar"); gProxyButton = document.getElementById("page-proxy-button"); gProxyFavIcon = document.getElementById("page-proxy-favicon"); gProxyDeck = document.getElementById("page-proxy-deck"); gHomeButton.updateTooltip(); window.XULBrowserWindow.init(); } // Update the urlbar var url = getWebNavigation().currentURI.spec; if (gURLBar) { gURLBar.value = url; SetPageProxyState("valid"); } // Re-enable parts of the UI we disabled during the dialog var menubar = document.getElementById("main-menubar"); for (var i = 0; i < menubar.childNodes.length; ++i) menubar.childNodes[i].setAttribute("disabled", false); var cmd = document.getElementById("cmd_CustomizeToolbars"); cmd.removeAttribute("disabled"); // fix up the personal toolbar folder var bt = document.getElementById("bookmarks-ptf"); if (bt) { var btf = BMSVC.getBookmarksToolbarFolder().Value; var btchevron = document.getElementById("bookmarks-chevron"); bt.ref = btf; btchevron.ref = btf; // no uniqueness is guaranteed, so we have to remove first try { bt.database.RemoveObserver(BookmarksToolbarRDFObserver); } catch (ex) { // ignore } bt.database.AddObserver(BookmarksToolbarRDFObserver); bt.builder.rebuild(); btchevron.builder.rebuild(); // fake a resize; this function takes care of flowing bookmarks // from the bar to the overflow item BookmarksToolbar.resizeFunc(null); } // fix bug 291781 - controller has been lost while removeChild and appendChild var bm = document.getElementById("bookmarks-menu"); if (bm) bm.controllers.appendController(BookmarksMenuController); // XXX Shouldn't have to do this, but I do window.focus();}
#else var bookmarksBar = document.getElementById("bookmarksBarContent"); if (bookmarksBar) bookmarksBar._init();
function BrowserToolboxCustomizeDone(aToolboxChanged){#ifdef TOOLBAR_CUSTOMIZATION_SHEET document.getElementById("customizeToolbarSheetBox").hidden = true;#endif // Update global UI elements that may have been added or removed if (aToolboxChanged) { gURLBar = document.getElementById("urlbar"); if (gURLBar) gURLBar.clickSelectsAll = gClickSelectsAll; gProxyButton = document.getElementById("page-proxy-button"); gProxyFavIcon = document.getElementById("page-proxy-favicon"); gProxyDeck = document.getElementById("page-proxy-deck"); gHomeButton.updateTooltip(); window.XULBrowserWindow.init(); } // Update the urlbar var url = getWebNavigation().currentURI.spec; if (gURLBar) { gURLBar.value = url == "about:blank" ? "" : url; SetPageProxyState("valid"); XULBrowserWindow.asyncUpdateUI(); } // Re-enable parts of the UI we disabled during the dialog var menubar = document.getElementById("main-menubar"); for (var i = 0; i < menubar.childNodes.length; ++i) menubar.childNodes[i].setAttribute("disabled", false); var cmd = document.getElementById("cmd_CustomizeToolbars"); cmd.removeAttribute("disabled"); // XXXmano bug 287105: wallpaper to bug 309953, // the reload button isn't in sync with the reload command. var reloadButton = document.getElementById("reload-button"); if (reloadButton) { reloadButton.disabled = document.getElementById("Browser:Reload").getAttribute("disabled") == "true"; }#ifdef XP_MACOSX // make sure to re-enable click-and-hold if (!getBoolPref("ui.click_hold_context_menus", false)) SetClickAndHoldHandlers();#endif#ifndef MOZ_PLACES_BOOKMARKS // fix up the personal toolbar folder var bt = document.getElementById("bookmarks-ptf"); if (bt) { var btf = BMSVC.getBookmarksToolbarFolder().Value; var btchevron = document.getElementById("bookmarks-chevron"); bt.ref = btf; btchevron.ref = btf; // no uniqueness is guaranteed, so we have to remove first try { bt.database.RemoveObserver(BookmarksToolbarRDFObserver); } catch (ex) { // ignore } bt.database.AddObserver(BookmarksToolbarRDFObserver); bt.builder.rebuild(); btchevron.builder.rebuild(); // fake a resize; this function takes care of flowing bookmarks // from the bar to the overflow item BookmarksToolbar.resizeFunc(null); }#else var bookmarksBar = document.getElementById("bookmarksBarContent"); if (bookmarksBar) bookmarksBar._init();#endif#ifndef TOOLBAR_CUSTOMIZATION_SHEET // XXX Shouldn't have to do this, but I do window.focus();#endif}
"chrome,dialog=no",
"scrollbars,chrome,dialog=no",
function BrowserViewSource() { dump("BrowserViewSource(); \n "); var docCharset = null; try { var wnd = document.commandDispatcher.focusedWindow; if (window == wnd) wnd = window._content; docCharset = "charset="+ wnd.document.characterSet; dump("*** Current document charset: " + docCharset + "\n"); } catch(ex) { docCharset = null; dump("*** Failed to determine current document charset \n"); } if (docCharset != null) { try { //now try to open a view-source window while inheriting the charset window.openDialog( "chrome://navigator/content/viewSource.xul", "_blank", "chrome,dialog=no", window._content.location, docCharset); } catch(ex) { dump("*** Failed to open view-source window with preset charset menu.\n"); } } else { //default: forcing the view-source widow dump("*** Failed to preset charset menu for the view-source window\n"); window.openDialog( "chrome://navigator/content/viewSource.xul", "_blank", "chrome,dialog=no", window._content.location); } }
if (window == wnd) wnd = window.content;
if (window == wnd) wnd = window._content;
function BrowserViewSource() { dump("BrowserViewSource(); \n "); var docCharset = null; try { var wnd = document.commandDispatcher.focusedWindow; if (window == wnd) wnd = window.content; docCharset = "charset="+ wnd.document.characterSet; dump("*** Current document charset: " + docCharset + "\n"); } catch(ex) { docCharset = null; dump("*** Failed to determine current document charset \n"); } if (docCharset != null) { try { //now try to open a view-source window while inheriting the charset window.openDialog( "chrome://navigator/content/viewSource.xul", "_blank", "chrome,dialog=no", window.content.location, docCharset); } catch(ex) { dump("*** Failed to open view-source window with preset charset menu.\n"); } } else { //default: forcing the view-source widow dump("*** Failed to preset charset menu for the view-source window\n"); window.openDialog( "chrome://navigator/content/viewSource.xul", "_blank", "chrome,dialog=no", window.content.location); } }
window.content.location, docCharset);
window._content.location, docCharset);
function BrowserViewSource() { dump("BrowserViewSource(); \n "); var docCharset = null; try { var wnd = document.commandDispatcher.focusedWindow; if (window == wnd) wnd = window.content; docCharset = "charset="+ wnd.document.characterSet; dump("*** Current document charset: " + docCharset + "\n"); } catch(ex) { docCharset = null; dump("*** Failed to determine current document charset \n"); } if (docCharset != null) { try { //now try to open a view-source window while inheriting the charset window.openDialog( "chrome://navigator/content/viewSource.xul", "_blank", "chrome,dialog=no", window.content.location, docCharset); } catch(ex) { dump("*** Failed to open view-source window with preset charset menu.\n"); } } else { //default: forcing the view-source widow dump("*** Failed to preset charset menu for the view-source window\n"); window.openDialog( "chrome://navigator/content/viewSource.xul", "_blank", "chrome,dialog=no", window.content.location); } }
window.content.location);
window._content.location);
function BrowserViewSource() { dump("BrowserViewSource(); \n "); var docCharset = null; try { var wnd = document.commandDispatcher.focusedWindow; if (window == wnd) wnd = window.content; docCharset = "charset="+ wnd.document.characterSet; dump("*** Current document charset: " + docCharset + "\n"); } catch(ex) { docCharset = null; dump("*** Failed to determine current document charset \n"); } if (docCharset != null) { try { //now try to open a view-source window while inheriting the charset window.openDialog( "chrome://navigator/content/viewSource.xul", "_blank", "chrome,dialog=no", window.content.location, docCharset); } catch(ex) { dump("*** Failed to open view-source window with preset charset menu.\n"); } } else { //default: forcing the view-source widow dump("*** Failed to preset charset menu for the view-source window\n"); window.openDialog( "chrome://navigator/content/viewSource.xul", "_blank", "chrome,dialog=no", window.content.location); } }
BrowserViewSourceOfURL(_content.location, docCharset);
BrowserViewSourceOfURL(getWebNavigation().currentURI.spec, docCharset);
function BrowserViewSource(){ var focusedWindow = document.commandDispatcher.focusedWindow; if (focusedWindow == window) focusedWindow = _content; if (focusedWindow) var docCharset = "charset=" + focusedWindow.document.characterSet; BrowserViewSourceOfURL(_content.location, docCharset);}
dump("*** Failed to determine current document charset \n");
debug("*** Failed to determine current document charset \n");
function BrowserViewSource() { var docCharset = null; try { var wnd = document.commandDispatcher.focusedWindow; if (window == wnd) wnd = window._content; docCharset = "charset="+ wnd.document.characterSet; // dump("*** Current document charset: " + docCharset + "\n"); } catch(ex) { docCharset = null; dump("*** Failed to determine current document charset \n"); } if (docCharset != null) { try { //now try to open a view-source window while inheriting the charset window.openDialog( "chrome://navigator/content/viewSource.xul", "_blank", "scrollbars,resizable,chrome,dialog=no", window._content.location, docCharset); } catch(ex) { dump("*** Failed to open view-source window with preset charset menu.\n"); } } else { //default: forcing the view-source widow dump("*** Failed to preset charset menu for the view-source window\n"); window.openDialog( "chrome://navigator/content/viewSource.xul", "_blank", "scrollbars,resizable,chrome,dialog=no", window._content.location); } }
dump("*** Failed to open view-source window with preset charset menu.\n");
debug("*** Failed to open view-source window with preset charset menu.\n");
function BrowserViewSource() { var docCharset = null; try { var wnd = document.commandDispatcher.focusedWindow; if (window == wnd) wnd = window._content; docCharset = "charset="+ wnd.document.characterSet; // dump("*** Current document charset: " + docCharset + "\n"); } catch(ex) { docCharset = null; dump("*** Failed to determine current document charset \n"); } if (docCharset != null) { try { //now try to open a view-source window while inheriting the charset window.openDialog( "chrome://navigator/content/viewSource.xul", "_blank", "scrollbars,resizable,chrome,dialog=no", window._content.location, docCharset); } catch(ex) { dump("*** Failed to open view-source window with preset charset menu.\n"); } } else { //default: forcing the view-source widow dump("*** Failed to preset charset menu for the view-source window\n"); window.openDialog( "chrome://navigator/content/viewSource.xul", "_blank", "scrollbars,resizable,chrome,dialog=no", window._content.location); } }
dump("*** Failed to preset charset menu for the view-source window\n");
debug("*** Failed to preset charset menu for the view-source window\n");
function BrowserViewSource() { var docCharset = null; try { var wnd = document.commandDispatcher.focusedWindow; if (window == wnd) wnd = window._content; docCharset = "charset="+ wnd.document.characterSet; // dump("*** Current document charset: " + docCharset + "\n"); } catch(ex) { docCharset = null; dump("*** Failed to determine current document charset \n"); } if (docCharset != null) { try { //now try to open a view-source window while inheriting the charset window.openDialog( "chrome://navigator/content/viewSource.xul", "_blank", "scrollbars,resizable,chrome,dialog=no", window._content.location, docCharset); } catch(ex) { dump("*** Failed to open view-source window with preset charset menu.\n"); } } else { //default: forcing the view-source widow dump("*** Failed to preset charset menu for the view-source window\n"); window.openDialog( "chrome://navigator/content/viewSource.xul", "_blank", "scrollbars,resizable,chrome,dialog=no", window._content.location); } }
var docCharset;
function BrowserViewSourceOfDocument(aDocument){ var docCharset; var pageCookie; var webNav; // Get the document charset docCharset = "charset=" + aDocument.characterSet; // Get the nsIWebNavigation associated with the document try { var win; var ifRequestor; // Get the DOMWindow for the requested document. If the DOMWindow // cannot be found, then just use the content window... // // XXX: This is a bit of a hack... win = aDocument.defaultView; if (win == window) { win = content; } ifRequestor = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor); webNav = ifRequestor.getInterface(nsIWebNavigation); } catch(err) { // If nsIWebNavigation cannot be found, just get the one for the whole // window... webNav = getWebNavigation(); } // // Get the 'PageDescriptor' for the current document. This allows the // view-source to access the cached copy of the content rather than // refetching it from the network... // try{ var PageLoader = webNav.QueryInterface(Components.interfaces.nsIWebPageDescriptor); pageCookie = PageLoader.currentDescriptor; } catch(err) { // If no page descriptor is available, just use the view-source URL... } BrowserViewSourceOfURL(webNav.currentURI.spec, docCharset, pageCookie);}
docCharset = "charset=" + aDocument.characterSet;
var docCharset = "charset=" + aDocument.characterSet;
function BrowserViewSourceOfDocument(aDocument){ var docCharset; var pageCookie; var webNav; // Get the document charset docCharset = "charset=" + aDocument.characterSet; // Get the nsIWebNavigation associated with the document try { var win; var ifRequestor; // Get the DOMWindow for the requested document. If the DOMWindow // cannot be found, then just use the content window... // // XXX: This is a bit of a hack... win = aDocument.defaultView; if (win == window) { win = content; } ifRequestor = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor); webNav = ifRequestor.getInterface(nsIWebNavigation); } catch(err) { // If nsIWebNavigation cannot be found, just get the one for the whole // window... webNav = getWebNavigation(); } // // Get the 'PageDescriptor' for the current document. This allows the // view-source to access the cached copy of the content rather than // refetching it from the network... // try{ var PageLoader = webNav.QueryInterface(Components.interfaces.nsIWebPageDescriptor); pageCookie = PageLoader.currentDescriptor; } catch(err) { // If no page descriptor is available, just use the view-source URL... } BrowserViewSourceOfURL(webNav.currentURI.spec, docCharset, pageCookie);}
BrowserViewSourceOfURL(webNav.currentURI.spec, docCharset, pageCookie);
ViewSourceOfURL(webNav.currentURI.spec, pageCookie, aDocument);
function BrowserViewSourceOfDocument(aDocument){ var docCharset; var pageCookie; var webNav; // Get the document charset docCharset = "charset=" + aDocument.characterSet; // Get the nsIWebNavigation associated with the document try { var win; var ifRequestor; // Get the DOMWindow for the requested document. If the DOMWindow // cannot be found, then just use the content window... // // XXX: This is a bit of a hack... win = aDocument.defaultView; if (win == window) { win = content; } ifRequestor = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor); webNav = ifRequestor.getInterface(nsIWebNavigation); } catch(err) { // If nsIWebNavigation cannot be found, just get the one for the whole // window... webNav = getWebNavigation(); } // // Get the 'PageDescriptor' for the current document. This allows the // view-source to access the cached copy of the content rather than // refetching it from the network... // try{ var PageLoader = webNav.QueryInterface(Components.interfaces.nsIWebPageDescriptor); pageCookie = PageLoader.currentDescriptor; } catch(err) { // If no page descriptor is available, just use the view-source URL... } BrowserViewSourceOfURL(webNav.currentURI.spec, docCharset, pageCookie);}
function BrowserViewSourceOfURL(url, charset)
function BrowserViewSourceOfURL(url, charset, pageCookie)
function BrowserViewSourceOfURL(url, charset){ // try to open a view-source window while inheriting the charset (if any) openDialog("chrome://navigator/content/viewSource.xul", "_blank", "scrollbars,resizable,chrome,dialog=no", url, charset);}
url, charset);
url, charset, pageCookie);
function BrowserViewSourceOfURL(url, charset){ // try to open a view-source window while inheriting the charset (if any) openDialog("chrome://navigator/content/viewSource.xul", "_blank", "scrollbars,resizable,chrome,dialog=no", url, charset);}
"scrollbars,resizable,chrome,dialog=no",
"all,dialog=no",
function BrowserViewSourceOfURL(url, charset, pageCookie){ // try to open a view-source window while inheriting the charset (if any) openDialog("chrome://navigator/content/viewSource.xul", "_blank", "scrollbars,resizable,chrome,dialog=no", url, charset, pageCookie);}
dumpln (" * ProgID: '" + cls.name + "'");
dumpln (" * ContractID: '" + cls.name + "'");
function bruteForceEnumeration(ignore){ var interfaceInfo = new Object();loop: for (var c in Components.classes) { var cls = Components.classes[c]; dumpln ("**"); dumpln (" * ProgID: '" + cls.name + "'"); dumpln (" * CLSID: " + cls.number); if(ignore) { for(var i = 0; i < ignore.length; i++) { if(0 == cls.name.indexOf(ignore[i])) { dumpln (" * This one might cause a crash - SKIPPING"); continue loop; } } } try { var ins = cls.createInstance(); for (var i in Components.interfaces) { try { qi = ins.QueryInterface (Components.interfaces[i]); dumpln (" * Supports Interface: " + i); if (typeof interfaceInfo[i] == "undefined") { interfaceInfo[i] = dumpObject (qi, " ** "); } dumpln (interfaceInfo[i]); } catch (e) { /* nada */ } } } catch (e) { dumpln (" * createInstance FAILED:"); dumpln (dumpObject (e)); } dumpln (""); } dumpln ("**"); dumpln (" * Interface Information :"); dumpln (""); // dump of giant string does not always work, split it up. var bulk = dumpObject (interfaceInfo, (void 0), "::\n") var lines = bulk.split("\n"); for(var i = 0; i < lines.length; i++) dumpln (lines[i]); }
if (ListType == "ul")
if (gListType == "ul")
function BuildBulletStyleList(){ ClearMenulist(gDialog.BulletStyleList); var label; if (ListType == "ul") { gDialog.BulletStyleList.removeAttribute("disabled"); gDialog.BulletStyleLabel.removeAttribute("disabled"); gDialog.StartingNumberInput.setAttribute("disabled", "true"); gDialog.StartingNumberLabel.setAttribute("disabled", "true"); label = GetString("BulletStyle"); AppendStringToMenulistById(gDialog.BulletStyleList,"Automatic"); AppendStringToMenulistById(gDialog.BulletStyleList,"SolidCircle"); AppendStringToMenulistById(gDialog.BulletStyleList,"OpenCircle"); AppendStringToMenulistById(gDialog.BulletStyleList,"SolidSquare"); gDialog.BulletStyleList.selectedIndex = BulletStyleIndex; gDialog.ListTypeList.selectedIndex = 1; } else if (ListType == "ol") { gDialog.BulletStyleList.removeAttribute("disabled"); gDialog.BulletStyleLabel.removeAttribute("disabled"); gDialog.StartingNumberInput.removeAttribute("disabled"); gDialog.StartingNumberLabel.removeAttribute("disabled"); label = GetString("NumberStyle"); AppendStringToMenulistById(gDialog.BulletStyleList,"Automatic"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_1"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_I"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_i"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_A"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_a"); gDialog.BulletStyleList.selectedIndex = NumberStyleIndex; gDialog.ListTypeList.selectedIndex = 2; } else { gDialog.BulletStyleList.setAttribute("disabled", "true"); gDialog.BulletStyleLabel.setAttribute("disabled", "true"); gDialog.StartingNumberInput.setAttribute("disabled", "true"); gDialog.StartingNumberLabel.setAttribute("disabled", "true"); if (ListType == "dl") gDialog.ListTypeList.selectedIndex = 3; else { // No list or mixed selection that starts outside a list // ??? Setting index to 0 fails to draw menulist correctly! gDialog.ListTypeList.selectedIndex = 1; gDialog.ListTypeList.selectedIndex = 0; } } // Disable advanced edit button if changing to "normal" if (ListType) gDialog.AdvancedEditButton.removeAttribute("disabled"); else gDialog.AdvancedEditButton.setAttribute("disabled","true"); if (label) gDialog.BulletStyleLabel.setAttribute("label",label);}
gDialog.BulletStyleList.selectedIndex = BulletStyleIndex;
gDialog.BulletStyleList.selectedIndex = gBulletStyleIndex;
function BuildBulletStyleList(){ ClearMenulist(gDialog.BulletStyleList); var label; if (ListType == "ul") { gDialog.BulletStyleList.removeAttribute("disabled"); gDialog.BulletStyleLabel.removeAttribute("disabled"); gDialog.StartingNumberInput.setAttribute("disabled", "true"); gDialog.StartingNumberLabel.setAttribute("disabled", "true"); label = GetString("BulletStyle"); AppendStringToMenulistById(gDialog.BulletStyleList,"Automatic"); AppendStringToMenulistById(gDialog.BulletStyleList,"SolidCircle"); AppendStringToMenulistById(gDialog.BulletStyleList,"OpenCircle"); AppendStringToMenulistById(gDialog.BulletStyleList,"SolidSquare"); gDialog.BulletStyleList.selectedIndex = BulletStyleIndex; gDialog.ListTypeList.selectedIndex = 1; } else if (ListType == "ol") { gDialog.BulletStyleList.removeAttribute("disabled"); gDialog.BulletStyleLabel.removeAttribute("disabled"); gDialog.StartingNumberInput.removeAttribute("disabled"); gDialog.StartingNumberLabel.removeAttribute("disabled"); label = GetString("NumberStyle"); AppendStringToMenulistById(gDialog.BulletStyleList,"Automatic"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_1"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_I"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_i"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_A"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_a"); gDialog.BulletStyleList.selectedIndex = NumberStyleIndex; gDialog.ListTypeList.selectedIndex = 2; } else { gDialog.BulletStyleList.setAttribute("disabled", "true"); gDialog.BulletStyleLabel.setAttribute("disabled", "true"); gDialog.StartingNumberInput.setAttribute("disabled", "true"); gDialog.StartingNumberLabel.setAttribute("disabled", "true"); if (ListType == "dl") gDialog.ListTypeList.selectedIndex = 3; else { // No list or mixed selection that starts outside a list // ??? Setting index to 0 fails to draw menulist correctly! gDialog.ListTypeList.selectedIndex = 1; gDialog.ListTypeList.selectedIndex = 0; } } // Disable advanced edit button if changing to "normal" if (ListType) gDialog.AdvancedEditButton.removeAttribute("disabled"); else gDialog.AdvancedEditButton.setAttribute("disabled","true"); if (label) gDialog.BulletStyleLabel.setAttribute("label",label);}
else if (ListType == "ol")
else if (gListType == "ol")
function BuildBulletStyleList(){ ClearMenulist(gDialog.BulletStyleList); var label; if (ListType == "ul") { gDialog.BulletStyleList.removeAttribute("disabled"); gDialog.BulletStyleLabel.removeAttribute("disabled"); gDialog.StartingNumberInput.setAttribute("disabled", "true"); gDialog.StartingNumberLabel.setAttribute("disabled", "true"); label = GetString("BulletStyle"); AppendStringToMenulistById(gDialog.BulletStyleList,"Automatic"); AppendStringToMenulistById(gDialog.BulletStyleList,"SolidCircle"); AppendStringToMenulistById(gDialog.BulletStyleList,"OpenCircle"); AppendStringToMenulistById(gDialog.BulletStyleList,"SolidSquare"); gDialog.BulletStyleList.selectedIndex = BulletStyleIndex; gDialog.ListTypeList.selectedIndex = 1; } else if (ListType == "ol") { gDialog.BulletStyleList.removeAttribute("disabled"); gDialog.BulletStyleLabel.removeAttribute("disabled"); gDialog.StartingNumberInput.removeAttribute("disabled"); gDialog.StartingNumberLabel.removeAttribute("disabled"); label = GetString("NumberStyle"); AppendStringToMenulistById(gDialog.BulletStyleList,"Automatic"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_1"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_I"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_i"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_A"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_a"); gDialog.BulletStyleList.selectedIndex = NumberStyleIndex; gDialog.ListTypeList.selectedIndex = 2; } else { gDialog.BulletStyleList.setAttribute("disabled", "true"); gDialog.BulletStyleLabel.setAttribute("disabled", "true"); gDialog.StartingNumberInput.setAttribute("disabled", "true"); gDialog.StartingNumberLabel.setAttribute("disabled", "true"); if (ListType == "dl") gDialog.ListTypeList.selectedIndex = 3; else { // No list or mixed selection that starts outside a list // ??? Setting index to 0 fails to draw menulist correctly! gDialog.ListTypeList.selectedIndex = 1; gDialog.ListTypeList.selectedIndex = 0; } } // Disable advanced edit button if changing to "normal" if (ListType) gDialog.AdvancedEditButton.removeAttribute("disabled"); else gDialog.AdvancedEditButton.setAttribute("disabled","true"); if (label) gDialog.BulletStyleLabel.setAttribute("label",label);}
gDialog.BulletStyleList.selectedIndex = NumberStyleIndex;
gDialog.BulletStyleList.selectedIndex = gNumberStyleIndex;
function BuildBulletStyleList(){ ClearMenulist(gDialog.BulletStyleList); var label; if (ListType == "ul") { gDialog.BulletStyleList.removeAttribute("disabled"); gDialog.BulletStyleLabel.removeAttribute("disabled"); gDialog.StartingNumberInput.setAttribute("disabled", "true"); gDialog.StartingNumberLabel.setAttribute("disabled", "true"); label = GetString("BulletStyle"); AppendStringToMenulistById(gDialog.BulletStyleList,"Automatic"); AppendStringToMenulistById(gDialog.BulletStyleList,"SolidCircle"); AppendStringToMenulistById(gDialog.BulletStyleList,"OpenCircle"); AppendStringToMenulistById(gDialog.BulletStyleList,"SolidSquare"); gDialog.BulletStyleList.selectedIndex = BulletStyleIndex; gDialog.ListTypeList.selectedIndex = 1; } else if (ListType == "ol") { gDialog.BulletStyleList.removeAttribute("disabled"); gDialog.BulletStyleLabel.removeAttribute("disabled"); gDialog.StartingNumberInput.removeAttribute("disabled"); gDialog.StartingNumberLabel.removeAttribute("disabled"); label = GetString("NumberStyle"); AppendStringToMenulistById(gDialog.BulletStyleList,"Automatic"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_1"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_I"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_i"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_A"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_a"); gDialog.BulletStyleList.selectedIndex = NumberStyleIndex; gDialog.ListTypeList.selectedIndex = 2; } else { gDialog.BulletStyleList.setAttribute("disabled", "true"); gDialog.BulletStyleLabel.setAttribute("disabled", "true"); gDialog.StartingNumberInput.setAttribute("disabled", "true"); gDialog.StartingNumberLabel.setAttribute("disabled", "true"); if (ListType == "dl") gDialog.ListTypeList.selectedIndex = 3; else { // No list or mixed selection that starts outside a list // ??? Setting index to 0 fails to draw menulist correctly! gDialog.ListTypeList.selectedIndex = 1; gDialog.ListTypeList.selectedIndex = 0; } } // Disable advanced edit button if changing to "normal" if (ListType) gDialog.AdvancedEditButton.removeAttribute("disabled"); else gDialog.AdvancedEditButton.setAttribute("disabled","true"); if (label) gDialog.BulletStyleLabel.setAttribute("label",label);}
if (ListType == "dl")
if (gListType == "dl")
function BuildBulletStyleList(){ ClearMenulist(gDialog.BulletStyleList); var label; if (ListType == "ul") { gDialog.BulletStyleList.removeAttribute("disabled"); gDialog.BulletStyleLabel.removeAttribute("disabled"); gDialog.StartingNumberInput.setAttribute("disabled", "true"); gDialog.StartingNumberLabel.setAttribute("disabled", "true"); label = GetString("BulletStyle"); AppendStringToMenulistById(gDialog.BulletStyleList,"Automatic"); AppendStringToMenulistById(gDialog.BulletStyleList,"SolidCircle"); AppendStringToMenulistById(gDialog.BulletStyleList,"OpenCircle"); AppendStringToMenulistById(gDialog.BulletStyleList,"SolidSquare"); gDialog.BulletStyleList.selectedIndex = BulletStyleIndex; gDialog.ListTypeList.selectedIndex = 1; } else if (ListType == "ol") { gDialog.BulletStyleList.removeAttribute("disabled"); gDialog.BulletStyleLabel.removeAttribute("disabled"); gDialog.StartingNumberInput.removeAttribute("disabled"); gDialog.StartingNumberLabel.removeAttribute("disabled"); label = GetString("NumberStyle"); AppendStringToMenulistById(gDialog.BulletStyleList,"Automatic"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_1"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_I"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_i"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_A"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_a"); gDialog.BulletStyleList.selectedIndex = NumberStyleIndex; gDialog.ListTypeList.selectedIndex = 2; } else { gDialog.BulletStyleList.setAttribute("disabled", "true"); gDialog.BulletStyleLabel.setAttribute("disabled", "true"); gDialog.StartingNumberInput.setAttribute("disabled", "true"); gDialog.StartingNumberLabel.setAttribute("disabled", "true"); if (ListType == "dl") gDialog.ListTypeList.selectedIndex = 3; else { // No list or mixed selection that starts outside a list // ??? Setting index to 0 fails to draw menulist correctly! gDialog.ListTypeList.selectedIndex = 1; gDialog.ListTypeList.selectedIndex = 0; } } // Disable advanced edit button if changing to "normal" if (ListType) gDialog.AdvancedEditButton.removeAttribute("disabled"); else gDialog.AdvancedEditButton.setAttribute("disabled","true"); if (label) gDialog.BulletStyleLabel.setAttribute("label",label);}
if (ListType)
if (gListType)
function BuildBulletStyleList(){ ClearMenulist(gDialog.BulletStyleList); var label; if (ListType == "ul") { gDialog.BulletStyleList.removeAttribute("disabled"); gDialog.BulletStyleLabel.removeAttribute("disabled"); gDialog.StartingNumberInput.setAttribute("disabled", "true"); gDialog.StartingNumberLabel.setAttribute("disabled", "true"); label = GetString("BulletStyle"); AppendStringToMenulistById(gDialog.BulletStyleList,"Automatic"); AppendStringToMenulistById(gDialog.BulletStyleList,"SolidCircle"); AppendStringToMenulistById(gDialog.BulletStyleList,"OpenCircle"); AppendStringToMenulistById(gDialog.BulletStyleList,"SolidSquare"); gDialog.BulletStyleList.selectedIndex = BulletStyleIndex; gDialog.ListTypeList.selectedIndex = 1; } else if (ListType == "ol") { gDialog.BulletStyleList.removeAttribute("disabled"); gDialog.BulletStyleLabel.removeAttribute("disabled"); gDialog.StartingNumberInput.removeAttribute("disabled"); gDialog.StartingNumberLabel.removeAttribute("disabled"); label = GetString("NumberStyle"); AppendStringToMenulistById(gDialog.BulletStyleList,"Automatic"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_1"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_I"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_i"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_A"); AppendStringToMenulistById(gDialog.BulletStyleList,"Style_a"); gDialog.BulletStyleList.selectedIndex = NumberStyleIndex; gDialog.ListTypeList.selectedIndex = 2; } else { gDialog.BulletStyleList.setAttribute("disabled", "true"); gDialog.BulletStyleLabel.setAttribute("disabled", "true"); gDialog.StartingNumberInput.setAttribute("disabled", "true"); gDialog.StartingNumberLabel.setAttribute("disabled", "true"); if (ListType == "dl") gDialog.ListTypeList.selectedIndex = 3; else { // No list or mixed selection that starts outside a list // ??? Setting index to 0 fails to draw menulist correctly! gDialog.ListTypeList.selectedIndex = 1; gDialog.ListTypeList.selectedIndex = 0; } } // Disable advanced edit button if changing to "normal" if (ListType) gDialog.AdvancedEditButton.removeAttribute("disabled"); else gDialog.AdvancedEditButton.setAttribute("disabled","true"); if (label) gDialog.BulletStyleLabel.setAttribute("label",label);}
function buildCalendar(m,y,ff){
function buildCalendar(m,y){ m = parseFloat(m); y = parseFloat(y);
function buildCalendar(m,y,ff){ var dayNo = figureDOTW(m,1,y); var monthNo = Calendar_get_daysofmonth(m,y); var dayCount = 1; var calTB = document.getElementById('calTbl').getElementsByTagName('tbody')[0]; var calNav = document.getElementById('calNav'); scramKids(calTB); for (i=0;i<6;i++){ // row loop var calTR = document.createElement('tr'); var calTDtext; for (j=0; j < 7; j++){ // cells in row loop var calTD = document.createElement('td'); if (j == 0 || j == 6 ) calTD.style.backgroundColor = '#fff'; if ((i==0 && j < dayNo) || dayCount > monthNo) // if this is the first row.... calTDtext = document.createElement('br'); else { calTDtext = document.createTextNode(dayCount.toString()); if (dayCount == curr_dy && m == curr_mn && y == curr_yr) calTD.style.color = '#ff6600'; dayCount++; } calTD.appendChild(calTDtext); calTD.setAttribute('width','14%'); calTR.appendChild(calTD); } calTB.appendChild(calTR); } var nMonth = getNextMonth(m,y,+1); var pMonth = getNextMonth(m,y,-1); document.getElementById('pyNav').innerHTML = '<a href="javascript:void(0)" title="Previous Year" onclick="buildCalendar('+m+','+(y-1)+',\''+ff+'\')"><<</a>'; document.getElementById('pmNav').innerHTML = '<a href="javascript:void(0)" title="Previous Month" onclick="buildCalendar('+pMonth[0]+','+pMonth[1]+')"><</a>'; document.getElementById('myNav').innerHTML = moty[m] +' '+y; document.getElementById('nyNav').innerHTML = '<a href="javascript:void(0)" title="Next Year" onclick="buildCalendar('+m+','+(y+1)+')">>></a>'; document.getElementById('nmNav').innerHTML = '<a href="javascript:void(0)" title="Next Month" onclick="buildCalendar('+nMonth[0]+','+nMonth[1]+')">></a>';}
var rowNum = Math.ceil((monthNo+dayNo)/7);
function buildCalendar(m,y,ff){ var dayNo = figureDOTW(m,1,y); var monthNo = Calendar_get_daysofmonth(m,y); var dayCount = 1; var calTB = document.getElementById('calTbl').getElementsByTagName('tbody')[0]; var calNav = document.getElementById('calNav'); scramKids(calTB); for (i=0;i<6;i++){ // row loop var calTR = document.createElement('tr'); var calTDtext; for (j=0; j < 7; j++){ // cells in row loop var calTD = document.createElement('td'); if (j == 0 || j == 6 ) calTD.style.backgroundColor = '#fff'; if ((i==0 && j < dayNo) || dayCount > monthNo) // if this is the first row.... calTDtext = document.createElement('br'); else { calTDtext = document.createTextNode(dayCount.toString()); if (dayCount == curr_dy && m == curr_mn && y == curr_yr) calTD.style.color = '#ff6600'; dayCount++; } calTD.appendChild(calTDtext); calTD.setAttribute('width','14%'); calTR.appendChild(calTD); } calTB.appendChild(calTR); } var nMonth = getNextMonth(m,y,+1); var pMonth = getNextMonth(m,y,-1); document.getElementById('pyNav').innerHTML = '<a href="javascript:void(0)" title="Previous Year" onclick="buildCalendar('+m+','+(y-1)+',\''+ff+'\')"><<</a>'; document.getElementById('pmNav').innerHTML = '<a href="javascript:void(0)" title="Previous Month" onclick="buildCalendar('+pMonth[0]+','+pMonth[1]+')"><</a>'; document.getElementById('myNav').innerHTML = moty[m] +' '+y; document.getElementById('nyNav').innerHTML = '<a href="javascript:void(0)" title="Next Year" onclick="buildCalendar('+m+','+(y+1)+')">>></a>'; document.getElementById('nmNav').innerHTML = '<a href="javascript:void(0)" title="Next Month" onclick="buildCalendar('+nMonth[0]+','+nMonth[1]+')">></a>';}
for (j=0; j < 7; j++){
var cellContent; for (j=0; j < 7; j++){
function buildCalendar(m,y,ff){ var dayNo = figureDOTW(m,1,y); var monthNo = Calendar_get_daysofmonth(m,y); var dayCount = 1; var calTB = document.getElementById('calTbl').getElementsByTagName('tbody')[0]; var calNav = document.getElementById('calNav'); scramKids(calTB); for (i=0;i<6;i++){ // row loop var calTR = document.createElement('tr'); var calTDtext; for (j=0; j < 7; j++){ // cells in row loop var calTD = document.createElement('td'); if (j == 0 || j == 6 ) calTD.style.backgroundColor = '#fff'; if ((i==0 && j < dayNo) || dayCount > monthNo) // if this is the first row.... calTDtext = document.createElement('br'); else { calTDtext = document.createTextNode(dayCount.toString()); if (dayCount == curr_dy && m == curr_mn && y == curr_yr) calTD.style.color = '#ff6600'; dayCount++; } calTD.appendChild(calTDtext); calTD.setAttribute('width','14%'); calTR.appendChild(calTD); } calTB.appendChild(calTR); } var nMonth = getNextMonth(m,y,+1); var pMonth = getNextMonth(m,y,-1); document.getElementById('pyNav').innerHTML = '<a href="javascript:void(0)" title="Previous Year" onclick="buildCalendar('+m+','+(y-1)+',\''+ff+'\')"><<</a>'; document.getElementById('pmNav').innerHTML = '<a href="javascript:void(0)" title="Previous Month" onclick="buildCalendar('+pMonth[0]+','+pMonth[1]+')"><</a>'; document.getElementById('myNav').innerHTML = moty[m] +' '+y; document.getElementById('nyNav').innerHTML = '<a href="javascript:void(0)" title="Next Year" onclick="buildCalendar('+m+','+(y+1)+')">>></a>'; document.getElementById('nmNav').innerHTML = '<a href="javascript:void(0)" title="Next Month" onclick="buildCalendar('+nMonth[0]+','+nMonth[1]+')">></a>';}
if (j == 0 || j == 6 ) calTD.style.backgroundColor = '#fff'; if ((i==0 && j < dayNo) || dayCount > monthNo) calTDtext = document.createElement('br');
if (j == 0 || j == 6 ) calTD.style.backgroundColor = '#EDF0FF'; if ((i==0 && j < dayNo) || dayCount > monthNo) cellContent = document.createElement('br');
function buildCalendar(m,y,ff){ var dayNo = figureDOTW(m,1,y); var monthNo = Calendar_get_daysofmonth(m,y); var dayCount = 1; var calTB = document.getElementById('calTbl').getElementsByTagName('tbody')[0]; var calNav = document.getElementById('calNav'); scramKids(calTB); for (i=0;i<6;i++){ // row loop var calTR = document.createElement('tr'); var calTDtext; for (j=0; j < 7; j++){ // cells in row loop var calTD = document.createElement('td'); if (j == 0 || j == 6 ) calTD.style.backgroundColor = '#fff'; if ((i==0 && j < dayNo) || dayCount > monthNo) // if this is the first row.... calTDtext = document.createElement('br'); else { calTDtext = document.createTextNode(dayCount.toString()); if (dayCount == curr_dy && m == curr_mn && y == curr_yr) calTD.style.color = '#ff6600'; dayCount++; } calTD.appendChild(calTDtext); calTD.setAttribute('width','14%'); calTR.appendChild(calTD); } calTB.appendChild(calTR); } var nMonth = getNextMonth(m,y,+1); var pMonth = getNextMonth(m,y,-1); document.getElementById('pyNav').innerHTML = '<a href="javascript:void(0)" title="Previous Year" onclick="buildCalendar('+m+','+(y-1)+',\''+ff+'\')"><<</a>'; document.getElementById('pmNav').innerHTML = '<a href="javascript:void(0)" title="Previous Month" onclick="buildCalendar('+pMonth[0]+','+pMonth[1]+')"><</a>'; document.getElementById('myNav').innerHTML = moty[m] +' '+y; document.getElementById('nyNav').innerHTML = '<a href="javascript:void(0)" title="Next Year" onclick="buildCalendar('+m+','+(y+1)+')">>></a>'; document.getElementById('nmNav').innerHTML = '<a href="javascript:void(0)" title="Next Month" onclick="buildCalendar('+nMonth[0]+','+nMonth[1]+')">></a>';}
cellContent = calTDtext;
function buildCalendar(m,y,ff){ var dayNo = figureDOTW(m,1,y); var monthNo = Calendar_get_daysofmonth(m,y); var dayCount = 1; var calTB = document.getElementById('calTbl').getElementsByTagName('tbody')[0]; var calNav = document.getElementById('calNav'); scramKids(calTB); for (i=0;i<6;i++){ // row loop var calTR = document.createElement('tr'); var calTDtext; for (j=0; j < 7; j++){ // cells in row loop var calTD = document.createElement('td'); if (j == 0 || j == 6 ) calTD.style.backgroundColor = '#fff'; if ((i==0 && j < dayNo) || dayCount > monthNo) // if this is the first row.... calTDtext = document.createElement('br'); else { calTDtext = document.createTextNode(dayCount.toString()); if (dayCount == curr_dy && m == curr_mn && y == curr_yr) calTD.style.color = '#ff6600'; dayCount++; } calTD.appendChild(calTDtext); calTD.setAttribute('width','14%'); calTR.appendChild(calTD); } calTB.appendChild(calTR); } var nMonth = getNextMonth(m,y,+1); var pMonth = getNextMonth(m,y,-1); document.getElementById('pyNav').innerHTML = '<a href="javascript:void(0)" title="Previous Year" onclick="buildCalendar('+m+','+(y-1)+',\''+ff+'\')"><<</a>'; document.getElementById('pmNav').innerHTML = '<a href="javascript:void(0)" title="Previous Month" onclick="buildCalendar('+pMonth[0]+','+pMonth[1]+')"><</a>'; document.getElementById('myNav').innerHTML = moty[m] +' '+y; document.getElementById('nyNav').innerHTML = '<a href="javascript:void(0)" title="Next Year" onclick="buildCalendar('+m+','+(y+1)+')">>></a>'; document.getElementById('nmNav').innerHTML = '<a href="javascript:void(0)" title="Next Month" onclick="buildCalendar('+nMonth[0]+','+nMonth[1]+')">></a>';}
calTD.style.color = '#ff6600';
calTD.style.backgroundColor = '#FFFF99'; if ((j!=0 && j!=6) || calWknd == true){ if (dayCount == curr_dy && m == curr_mn && y == curr_yr && calSpan != 3 && calSpan != 0 && calSpan != 4){ dyA.appendChild(calTDtext); cellContent = dyA; } if (calSpan == 1 || calSpan == 4){ if (y < curr_yr || (m < curr_mn && y == curr_yr) || (m == curr_mn && y == curr_yr && dayCount < curr_dy)) { dyA.appendChild(calTDtext); cellContent = dyA; } } if (calSpan == 2 || calSpan == 3){ if (y > curr_yr || (m > curr_mn && y == curr_yr) || (m == curr_mn && y == curr_yr && dayCount > curr_dy)) {dyA.appendChild(calTDtext); cellContent = dyA;} } if (calSpan == 5){ dyA.appendChild(calTDtext); cellContent = dyA; } } else { }
function buildCalendar(m,y,ff){ var dayNo = figureDOTW(m,1,y); var monthNo = Calendar_get_daysofmonth(m,y); var dayCount = 1; var calTB = document.getElementById('calTbl').getElementsByTagName('tbody')[0]; var calNav = document.getElementById('calNav'); scramKids(calTB); for (i=0;i<6;i++){ // row loop var calTR = document.createElement('tr'); var calTDtext; for (j=0; j < 7; j++){ // cells in row loop var calTD = document.createElement('td'); if (j == 0 || j == 6 ) calTD.style.backgroundColor = '#fff'; if ((i==0 && j < dayNo) || dayCount > monthNo) // if this is the first row.... calTDtext = document.createElement('br'); else { calTDtext = document.createTextNode(dayCount.toString()); if (dayCount == curr_dy && m == curr_mn && y == curr_yr) calTD.style.color = '#ff6600'; dayCount++; } calTD.appendChild(calTDtext); calTD.setAttribute('width','14%'); calTR.appendChild(calTD); } calTB.appendChild(calTR); } var nMonth = getNextMonth(m,y,+1); var pMonth = getNextMonth(m,y,-1); document.getElementById('pyNav').innerHTML = '<a href="javascript:void(0)" title="Previous Year" onclick="buildCalendar('+m+','+(y-1)+',\''+ff+'\')"><<</a>'; document.getElementById('pmNav').innerHTML = '<a href="javascript:void(0)" title="Previous Month" onclick="buildCalendar('+pMonth[0]+','+pMonth[1]+')"><</a>'; document.getElementById('myNav').innerHTML = moty[m] +' '+y; document.getElementById('nyNav').innerHTML = '<a href="javascript:void(0)" title="Next Year" onclick="buildCalendar('+m+','+(y+1)+')">>></a>'; document.getElementById('nmNav').innerHTML = '<a href="javascript:void(0)" title="Next Month" onclick="buildCalendar('+nMonth[0]+','+nMonth[1]+')">></a>';}
calTD.appendChild(calTDtext);
calTD.appendChild(cellContent);
function buildCalendar(m,y,ff){ var dayNo = figureDOTW(m,1,y); var monthNo = Calendar_get_daysofmonth(m,y); var dayCount = 1; var calTB = document.getElementById('calTbl').getElementsByTagName('tbody')[0]; var calNav = document.getElementById('calNav'); scramKids(calTB); for (i=0;i<6;i++){ // row loop var calTR = document.createElement('tr'); var calTDtext; for (j=0; j < 7; j++){ // cells in row loop var calTD = document.createElement('td'); if (j == 0 || j == 6 ) calTD.style.backgroundColor = '#fff'; if ((i==0 && j < dayNo) || dayCount > monthNo) // if this is the first row.... calTDtext = document.createElement('br'); else { calTDtext = document.createTextNode(dayCount.toString()); if (dayCount == curr_dy && m == curr_mn && y == curr_yr) calTD.style.color = '#ff6600'; dayCount++; } calTD.appendChild(calTDtext); calTD.setAttribute('width','14%'); calTR.appendChild(calTD); } calTB.appendChild(calTR); } var nMonth = getNextMonth(m,y,+1); var pMonth = getNextMonth(m,y,-1); document.getElementById('pyNav').innerHTML = '<a href="javascript:void(0)" title="Previous Year" onclick="buildCalendar('+m+','+(y-1)+',\''+ff+'\')"><<</a>'; document.getElementById('pmNav').innerHTML = '<a href="javascript:void(0)" title="Previous Month" onclick="buildCalendar('+pMonth[0]+','+pMonth[1]+')"><</a>'; document.getElementById('myNav').innerHTML = moty[m] +' '+y; document.getElementById('nyNav').innerHTML = '<a href="javascript:void(0)" title="Next Year" onclick="buildCalendar('+m+','+(y+1)+')">>></a>'; document.getElementById('nmNav').innerHTML = '<a href="javascript:void(0)" title="Next Month" onclick="buildCalendar('+nMonth[0]+','+nMonth[1]+')">></a>';}
document.getElementById('pyNav').innerHTML = '<a href="javascript:void(0)" title="Previous Year" onclick="buildCalendar('+m+','+(y-1)+',\''+ff+'\')"><<</a>'; document.getElementById('pmNav').innerHTML = '<a href="javascript:void(0)" title="Previous Month" onclick="buildCalendar('+pMonth[0]+','+pMonth[1]+')"><</a>'; document.getElementById('myNav').innerHTML = moty[m] +' '+y; document.getElementById('nyNav').innerHTML = '<a href="javascript:void(0)" title="Next Year" onclick="buildCalendar('+m+','+(y+1)+')">>></a>'; document.getElementById('nmNav').innerHTML = '<a href="javascript:void(0)" title="Next Month" onclick="buildCalendar('+nMonth[0]+','+nMonth[1]+')">></a>';
document.getElementById('calNavPY').innerHTML = '<a href="javascript:void(0)" onclick="buildCalendar('+m+','+(y-1)+')"><<</a>'; document.getElementById('calNavPM').innerHTML = '<a href="javascript:void(0)" onclick="buildCalendar('+pMonth[0]+','+pMonth[1]+')"><</a>'; document.getElementById('calNavMY').innerHTML = moty[m] +' '+y; document.getElementById('calNavNY').innerHTML = '<a href="javascript:void(0)" onclick="buildCalendar('+m+','+(y+1)+')">>></a>'; document.getElementById('calNavNM').innerHTML = '<a href="javascript:void(0)" onclick="buildCalendar('+nMonth[0]+','+nMonth[1]+')">></a>';
function buildCalendar(m,y,ff){ var dayNo = figureDOTW(m,1,y); var monthNo = Calendar_get_daysofmonth(m,y); var dayCount = 1; var calTB = document.getElementById('calTbl').getElementsByTagName('tbody')[0]; var calNav = document.getElementById('calNav'); scramKids(calTB); for (i=0;i<6;i++){ // row loop var calTR = document.createElement('tr'); var calTDtext; for (j=0; j < 7; j++){ // cells in row loop var calTD = document.createElement('td'); if (j == 0 || j == 6 ) calTD.style.backgroundColor = '#fff'; if ((i==0 && j < dayNo) || dayCount > monthNo) // if this is the first row.... calTDtext = document.createElement('br'); else { calTDtext = document.createTextNode(dayCount.toString()); if (dayCount == curr_dy && m == curr_mn && y == curr_yr) calTD.style.color = '#ff6600'; dayCount++; } calTD.appendChild(calTDtext); calTD.setAttribute('width','14%'); calTR.appendChild(calTD); } calTB.appendChild(calTR); } var nMonth = getNextMonth(m,y,+1); var pMonth = getNextMonth(m,y,-1); document.getElementById('pyNav').innerHTML = '<a href="javascript:void(0)" title="Previous Year" onclick="buildCalendar('+m+','+(y-1)+',\''+ff+'\')"><<</a>'; document.getElementById('pmNav').innerHTML = '<a href="javascript:void(0)" title="Previous Month" onclick="buildCalendar('+pMonth[0]+','+pMonth[1]+')"><</a>'; document.getElementById('myNav').innerHTML = moty[m] +' '+y; document.getElementById('nyNav').innerHTML = '<a href="javascript:void(0)" title="Next Year" onclick="buildCalendar('+m+','+(y+1)+')">>></a>'; document.getElementById('nmNav').innerHTML = '<a href="javascript:void(0)" title="Next Month" onclick="buildCalendar('+nMonth[0]+','+nMonth[1]+')">></a>';}
for( var i = 0; i < opener.gCalendarWindow.calendarManager.calendars.length; i++ ) { addCalendarToListBox( opener.gCalendarWindow.calendarManager.calendars[i], ListBoxId ); }
document.getElementById( ListBoxId ).database.AddDataSource( opener.gCalendarWindow.calendarManager.rdf.getDatasource() ); document.getElementById( ListBoxId ).builder.rebuild();
function buildCalendarsListbox( ListBoxId ){ for( var i = 0; i < opener.gCalendarWindow.calendarManager.calendars.length; i++ ) { addCalendarToListBox( opener.gCalendarWindow.calendarManager.calendars[i], ListBoxId ); }}
var cols = this.mColumns;
var cols = document.createElementNS(kXULNSURI, "outlinercols");
buildColumns: function() { var cols = this.mColumns; var col, val, split; for (var i = 0; i < cols.length; i++) { col = document.createElementNS(kXULNSURI, "outlinercol"); col.setAttribute("id", "outlinercol-"+cols[i].name); col.setAttribute("persist", "width"); col.setAttribute("label", cols[i].title); // mark first node as primary, if necessary if (i == 0 && this.mIsContainer) col.setAttribute("primary", "true"); val = cols[i].className; if (val) col.setAttribute("class", val); val = cols[i].flex; if (val) col.setAttribute("flex", val); this.mOutliner.appendChild(col); if (this.mSplitters && i < cols.length-1) { split = document.createElementNS(kXULNSURI, "splitter"); split.setAttribute("class", "tree-splitter"); this.mOutliner.appendChild(split); } } },
for (var i = 0; i < cols.length; i++) {
for (var i = 0; i < this.mColumns.length; i++) {
buildColumns: function() { var cols = this.mColumns; var col, val, split; for (var i = 0; i < cols.length; i++) { col = document.createElementNS(kXULNSURI, "outlinercol"); col.setAttribute("id", "outlinercol-"+cols[i].name); col.setAttribute("persist", "width"); col.setAttribute("label", cols[i].title); // mark first node as primary, if necessary if (i == 0 && this.mIsContainer) col.setAttribute("primary", "true"); val = cols[i].className; if (val) col.setAttribute("class", val); val = cols[i].flex; if (val) col.setAttribute("flex", val); this.mOutliner.appendChild(col); if (this.mSplitters && i < cols.length-1) { split = document.createElementNS(kXULNSURI, "splitter"); split.setAttribute("class", "tree-splitter"); this.mOutliner.appendChild(split); } } },
col.setAttribute("id", "outlinercol-"+cols[i].name);
col.setAttribute("id", "outlinercol-"+this.mColumns[i].name);
buildColumns: function() { var cols = this.mColumns; var col, val, split; for (var i = 0; i < cols.length; i++) { col = document.createElementNS(kXULNSURI, "outlinercol"); col.setAttribute("id", "outlinercol-"+cols[i].name); col.setAttribute("persist", "width"); col.setAttribute("label", cols[i].title); // mark first node as primary, if necessary if (i == 0 && this.mIsContainer) col.setAttribute("primary", "true"); val = cols[i].className; if (val) col.setAttribute("class", val); val = cols[i].flex; if (val) col.setAttribute("flex", val); this.mOutliner.appendChild(col); if (this.mSplitters && i < cols.length-1) { split = document.createElementNS(kXULNSURI, "splitter"); split.setAttribute("class", "tree-splitter"); this.mOutliner.appendChild(split); } } },
col.setAttribute("label", cols[i].title);
col.setAttribute("label", this.mColumns[i].title);
buildColumns: function() { var cols = this.mColumns; var col, val, split; for (var i = 0; i < cols.length; i++) { col = document.createElementNS(kXULNSURI, "outlinercol"); col.setAttribute("id", "outlinercol-"+cols[i].name); col.setAttribute("persist", "width"); col.setAttribute("label", cols[i].title); // mark first node as primary, if necessary if (i == 0 && this.mIsContainer) col.setAttribute("primary", "true"); val = cols[i].className; if (val) col.setAttribute("class", val); val = cols[i].flex; if (val) col.setAttribute("flex", val); this.mOutliner.appendChild(col); if (this.mSplitters && i < cols.length-1) { split = document.createElementNS(kXULNSURI, "splitter"); split.setAttribute("class", "tree-splitter"); this.mOutliner.appendChild(split); } } },
this.mOutliner.appendChild(col);
cols.appendChild(col);
buildColumns: function() { var cols = this.mColumns; var col, val, split; for (var i = 0; i < cols.length; i++) { col = document.createElementNS(kXULNSURI, "outlinercol"); col.setAttribute("id", "outlinercol-"+cols[i].name); col.setAttribute("persist", "width"); col.setAttribute("label", cols[i].title); // mark first node as primary, if necessary if (i == 0 && this.mIsContainer) col.setAttribute("primary", "true"); val = cols[i].className; if (val) col.setAttribute("class", val); val = cols[i].flex; if (val) col.setAttribute("flex", val); this.mOutliner.appendChild(col); if (this.mSplitters && i < cols.length-1) { split = document.createElementNS(kXULNSURI, "splitter"); split.setAttribute("class", "tree-splitter"); this.mOutliner.appendChild(split); } } },
if (this.mSplitters && i < cols.length-1) {
if (this.mSplitters && i < this.mColumns.length-1) {
buildColumns: function() { var cols = this.mColumns; var col, val, split; for (var i = 0; i < cols.length; i++) { col = document.createElementNS(kXULNSURI, "outlinercol"); col.setAttribute("id", "outlinercol-"+cols[i].name); col.setAttribute("persist", "width"); col.setAttribute("label", cols[i].title); // mark first node as primary, if necessary if (i == 0 && this.mIsContainer) col.setAttribute("primary", "true"); val = cols[i].className; if (val) col.setAttribute("class", val); val = cols[i].flex; if (val) col.setAttribute("flex", val); this.mOutliner.appendChild(col); if (this.mSplitters && i < cols.length-1) { split = document.createElementNS(kXULNSURI, "splitter"); split.setAttribute("class", "tree-splitter"); this.mOutliner.appendChild(split); } } },
this.mOutliner.appendChild(split);
cols.appendChild(split);
buildColumns: function() { var cols = this.mColumns; var col, val, split; for (var i = 0; i < cols.length; i++) { col = document.createElementNS(kXULNSURI, "outlinercol"); col.setAttribute("id", "outlinercol-"+cols[i].name); col.setAttribute("persist", "width"); col.setAttribute("label", cols[i].title); // mark first node as primary, if necessary if (i == 0 && this.mIsContainer) col.setAttribute("primary", "true"); val = cols[i].className; if (val) col.setAttribute("class", val); val = cols[i].flex; if (val) col.setAttribute("flex", val); this.mOutliner.appendChild(col); if (this.mSplitters && i < cols.length-1) { split = document.createElementNS(kXULNSURI, "splitter"); split.setAttribute("class", "tree-splitter"); this.mOutliner.appendChild(split); } } },
this.mOutliner.appendChild(cols);
buildColumns: function() { var cols = this.mColumns; var col, val, split; for (var i = 0; i < cols.length; i++) { col = document.createElementNS(kXULNSURI, "outlinercol"); col.setAttribute("id", "outlinercol-"+cols[i].name); col.setAttribute("persist", "width"); col.setAttribute("label", cols[i].title); // mark first node as primary, if necessary if (i == 0 && this.mIsContainer) col.setAttribute("primary", "true"); val = cols[i].className; if (val) col.setAttribute("class", val); val = cols[i].flex; if (val) col.setAttribute("flex", val); this.mOutliner.appendChild(col); if (this.mSplitters && i < cols.length-1) { split = document.createElementNS(kXULNSURI, "splitter"); split.setAttribute("class", "tree-splitter"); this.mOutliner.appendChild(split); } } },
newToolbar.setAttribute("mode", modeList.value);
function buildDialog(){ var toolbar = window.opener.document.getElementById("nav-bar"); var useSmallIcons = document.getElementById("smallicons"); var iconSize = toolbar.getAttribute("iconsize"); useSmallIcons.checked = (iconSize == "small"); var modeList = document.getElementById("modelist"); var modeValue = toolbar.getAttribute("mode"); if (!modeValue) modeValue = "full"; modeList.value = modeValue; var cloneToolbarBox = document.getElementById("cloned-bar-container"); var paletteBox = document.getElementById("palette-box"); var currentSet = toolbar.getAttribute("currentset"); if (!currentSet) currentSet = toolbar.getAttribute("defaultset"); currentSet = currentSet.split(","); // Create a new toolbar that will model the one the user is trying to customize. // We won't just cloneNode() because we want to wrap each element on the toolbar in a // <toolbarpaletteitem/>, to prevent them from getting events (so they aren't styled on // hover, etc.) and to allow us to style them in the new nsITheme world. var newToolbar = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "toolbar"); newToolbar.id = "cloneToolbar"; if (useSmallIcons.checked) newToolbar.setAttribute("iconsize", "small"); // Walk through and manually clone the children of the to-be-customized toolbar. // Make sure all buttons look enabled (and that textboxes are disabled). var toolbarItem = toolbar.firstChild; while (toolbarItem) { var newItem = toolbarItem.cloneNode(true); addItemToToolbar(newItem, newToolbar); toolbarItem = toolbarItem.nextSibling; } cloneToolbarBox.appendChild(newToolbar); // Now build up a palette of items. buildPalette(paletteBox, toolbar, currentSet); // Set a min height on the new toolbar so it doesn't shrink if all the buttons are removed. newToolbar.setAttribute("minheight", newToolbar.boxObject.height);}
if (modeValue == "text")
if (modeValue == "text") {
function buildDialog(){ var toolbar = window.opener.document.getElementById("nav-bar"); var useSmallIcons = document.getElementById("smallicons"); var iconSize = toolbar.getAttribute("iconsize"); useSmallIcons.checked = (iconSize == "small"); var modeList = document.getElementById("modelist"); var modeValue = toolbar.getAttribute("mode"); if (!modeValue) modeValue = "full"; modeList.value = modeValue; if (modeValue == "text") useSmallIcons.disabled = true; var cloneToolbarBox = document.getElementById("cloned-bar-container"); var paletteBox = document.getElementById("palette-box"); var currentSet = toolbar.getAttribute("currentset"); if (!currentSet) currentSet = toolbar.getAttribute("defaultset"); currentSet = currentSet.split(","); // Create a new toolbar that will model the one the user is trying to customize. // We won't just cloneNode() because we want to wrap each element on the toolbar in a // <toolbarpaletteitem/>, to prevent them from getting events (so they aren't styled on // hover, etc.) and to allow us to style them in the new nsITheme world. var newToolbar = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "toolbar"); newToolbar.id = "cloneToolbar"; if (useSmallIcons.checked) newToolbar.setAttribute("iconsize", "small"); newToolbar.setAttribute("mode", modeValue); // Walk through and manually clone the children of the to-be-customized toolbar. // Make sure all buttons look enabled (and that textboxes are disabled). var toolbarItem = toolbar.firstChild; while (toolbarItem) { var newItem = toolbarItem.cloneNode(true); addItemToToolbar(newItem, newToolbar); toolbarItem = toolbarItem.nextSibling; } cloneToolbarBox.appendChild(newToolbar); // Now build up a palette of items. buildPalette(paletteBox, toolbar, currentSet); // Set a min height on the new toolbar so it doesn't shrink if all the buttons are removed. newToolbar.setAttribute("minheight", newToolbar.boxObject.height);}
useSmallIcons.checked = false; }
function buildDialog(){ var toolbar = window.opener.document.getElementById("nav-bar"); var useSmallIcons = document.getElementById("smallicons"); var iconSize = toolbar.getAttribute("iconsize"); useSmallIcons.checked = (iconSize == "small"); var modeList = document.getElementById("modelist"); var modeValue = toolbar.getAttribute("mode"); if (!modeValue) modeValue = "full"; modeList.value = modeValue; if (modeValue == "text") useSmallIcons.disabled = true; var cloneToolbarBox = document.getElementById("cloned-bar-container"); var paletteBox = document.getElementById("palette-box"); var currentSet = toolbar.getAttribute("currentset"); if (!currentSet) currentSet = toolbar.getAttribute("defaultset"); currentSet = currentSet.split(","); // Create a new toolbar that will model the one the user is trying to customize. // We won't just cloneNode() because we want to wrap each element on the toolbar in a // <toolbarpaletteitem/>, to prevent them from getting events (so they aren't styled on // hover, etc.) and to allow us to style them in the new nsITheme world. var newToolbar = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "toolbar"); newToolbar.id = "cloneToolbar"; if (useSmallIcons.checked) newToolbar.setAttribute("iconsize", "small"); newToolbar.setAttribute("mode", modeValue); // Walk through and manually clone the children of the to-be-customized toolbar. // Make sure all buttons look enabled (and that textboxes are disabled). var toolbarItem = toolbar.firstChild; while (toolbarItem) { var newItem = toolbarItem.cloneNode(true); addItemToToolbar(newItem, newToolbar); toolbarItem = toolbarItem.nextSibling; } cloneToolbarBox.appendChild(newToolbar); // Now build up a palette of items. buildPalette(paletteBox, toolbar, currentSet); // Set a min height on the new toolbar so it doesn't shrink if all the buttons are removed. newToolbar.setAttribute("minheight", newToolbar.boxObject.height);}
buildFeedList: function(event) { var menuPopup = event.target;
buildFeedList: function(menuPopup) {
buildFeedList: function(event) { var menuPopup = event.target; var feeds = gBrowser.selectedBrowser.feeds; if (feeds == null) { // XXX hack -- menu opening depends on setting of an "open" // attribute, and the menu refuses to open if that attribute is // set (because it thinks it's already open). onpopupshowing gets // called after the attribute is unset, and it doesn't get unset // if we return false. so we unset it here; otherwise, the menu // refuses to work past this point. menuPopup.parentNode.removeAttribute("open"); return false; } while (menuPopup.firstChild) menuPopup.removeChild(menuPopup.firstChild); // Get the list of unique feeds, and if there's only one unique entry, // show the feed in the browser rather than displaying a menu. var feeds = this.harvestFeeds(feeds); if (feeds.length == 1) { this.subscribeToFeed(feeds[0].href); return false; } // Build the menu showing the available feed choices for viewing. for (var i = 0; i < feeds.length; ++i) { var feedInfo = feeds[i]; var menuItem = document.createElement("menuitem"); var baseTitle = feedInfo.title || feedInfo.href;#ifdef MOZ_FEEDS var labelStr = gNavigatorBundle.getFormattedString("feedShowFeedNew", [baseTitle]);#else var labelStr = gNavigatorBundle.getFormattedString("feedShowFeed", [baseTitle]);#endif menuItem.setAttribute("label", labelStr); menuItem.setAttribute("feed", feedInfo.href); menuItem.setAttribute("tooltiptext", feedInfo.href); menuPopup.appendChild(menuItem); } return true; },
if (feeds.length == 1) { this.subscribeToFeed(feeds[0].href);
if (feeds.length == 1)
buildFeedList: function(event) { var menuPopup = event.target; var feeds = gBrowser.selectedBrowser.feeds; if (feeds == null) { // XXX hack -- menu opening depends on setting of an "open" // attribute, and the menu refuses to open if that attribute is // set (because it thinks it's already open). onpopupshowing gets // called after the attribute is unset, and it doesn't get unset // if we return false. so we unset it here; otherwise, the menu // refuses to work past this point. menuPopup.parentNode.removeAttribute("open"); return false; } while (menuPopup.firstChild) menuPopup.removeChild(menuPopup.firstChild); // Get the list of unique feeds, and if there's only one unique entry, // show the feed in the browser rather than displaying a menu. var feeds = this.harvestFeeds(feeds); if (feeds.length == 1) { this.subscribeToFeed(feeds[0].href); return false; } // Build the menu showing the available feed choices for viewing. for (var i = 0; i < feeds.length; ++i) { var feedInfo = feeds[i]; var menuItem = document.createElement("menuitem"); var baseTitle = feedInfo.title || feedInfo.href;#ifdef MOZ_FEEDS var labelStr = gNavigatorBundle.getFormattedString("feedShowFeedNew", [baseTitle]);#else var labelStr = gNavigatorBundle.getFormattedString("feedShowFeed", [baseTitle]);#endif menuItem.setAttribute("label", labelStr); menuItem.setAttribute("feed", feedInfo.href); menuItem.setAttribute("tooltiptext", feedInfo.href); menuPopup.appendChild(menuItem); } return true; },
}
buildFeedList: function(event) { var menuPopup = event.target; var feeds = gBrowser.selectedBrowser.feeds; if (feeds == null) { // XXX hack -- menu opening depends on setting of an "open" // attribute, and the menu refuses to open if that attribute is // set (because it thinks it's already open). onpopupshowing gets // called after the attribute is unset, and it doesn't get unset // if we return false. so we unset it here; otherwise, the menu // refuses to work past this point. menuPopup.parentNode.removeAttribute("open"); return false; } while (menuPopup.firstChild) menuPopup.removeChild(menuPopup.firstChild); // Get the list of unique feeds, and if there's only one unique entry, // show the feed in the browser rather than displaying a menu. var feeds = this.harvestFeeds(feeds); if (feeds.length == 1) { this.subscribeToFeed(feeds[0].href); return false; } // Build the menu showing the available feed choices for viewing. for (var i = 0; i < feeds.length; ++i) { var feedInfo = feeds[i]; var menuItem = document.createElement("menuitem"); var baseTitle = feedInfo.title || feedInfo.href;#ifdef MOZ_FEEDS var labelStr = gNavigatorBundle.getFormattedString("feedShowFeedNew", [baseTitle]);#else var labelStr = gNavigatorBundle.getFormattedString("feedShowFeed", [baseTitle]);#endif menuItem.setAttribute("label", labelStr); menuItem.setAttribute("feed", feedInfo.href); menuItem.setAttribute("tooltiptext", feedInfo.href); menuPopup.appendChild(menuItem); } return true; },
if (feeds.length == 1)
if (feeds.length == 1) { var feedButton = document.getElementById("feed-button"); if (feedButton) feedButton.setAttribute("feed", feeds[0].href);
buildFeedList: function(menuPopup) { var feeds = gBrowser.selectedBrowser.feeds; if (feeds == null) { // XXX hack -- menu opening depends on setting of an "open" // attribute, and the menu refuses to open if that attribute is // set (because it thinks it's already open). onpopupshowing gets // called after the attribute is unset, and it doesn't get unset // if we return false. so we unset it here; otherwise, the menu // refuses to work past this point. menuPopup.parentNode.removeAttribute("open"); return false; } while (menuPopup.firstChild) menuPopup.removeChild(menuPopup.firstChild); // Get the list of unique feeds, and if there's only one unique entry, // show the feed in the browser rather than displaying a menu. var feeds = this.harvestFeeds(feeds); if (feeds.length == 1) return false; // Build the menu showing the available feed choices for viewing. for (var i = 0; i < feeds.length; ++i) { var feedInfo = feeds[i]; var menuItem = document.createElement("menuitem"); var baseTitle = feedInfo.title || feedInfo.href;#ifdef MOZ_FEEDS var labelStr = gNavigatorBundle.getFormattedString("feedShowFeedNew", [baseTitle]);#else var labelStr = gNavigatorBundle.getFormattedString("feedShowFeed", [baseTitle]);#endif menuItem.setAttribute("label", labelStr); menuItem.setAttribute("feed", feedInfo.href); menuItem.setAttribute("tooltiptext", feedInfo.href); menuPopup.appendChild(menuItem); } return true; },
}
buildFeedList: function(menuPopup) { var feeds = gBrowser.selectedBrowser.feeds; if (feeds == null) { // XXX hack -- menu opening depends on setting of an "open" // attribute, and the menu refuses to open if that attribute is // set (because it thinks it's already open). onpopupshowing gets // called after the attribute is unset, and it doesn't get unset // if we return false. so we unset it here; otherwise, the menu // refuses to work past this point. menuPopup.parentNode.removeAttribute("open"); return false; } while (menuPopup.firstChild) menuPopup.removeChild(menuPopup.firstChild); // Get the list of unique feeds, and if there's only one unique entry, // show the feed in the browser rather than displaying a menu. var feeds = this.harvestFeeds(feeds); if (feeds.length == 1) return false; // Build the menu showing the available feed choices for viewing. for (var i = 0; i < feeds.length; ++i) { var feedInfo = feeds[i]; var menuItem = document.createElement("menuitem"); var baseTitle = feedInfo.title || feedInfo.href;#ifdef MOZ_FEEDS var labelStr = gNavigatorBundle.getFormattedString("feedShowFeedNew", [baseTitle]);#else var labelStr = gNavigatorBundle.getFormattedString("feedShowFeed", [baseTitle]);#endif menuItem.setAttribute("label", labelStr); menuItem.setAttribute("feed", feedInfo.href); menuItem.setAttribute("tooltiptext", feedInfo.href); menuPopup.appendChild(menuItem); } return true; },
checkForUpdates.disabled = gPrefBranch.prefIsLocked("app.update.enabled");
function buildHelpMenu(){ var updates = Components.classes["@mozilla.org/updates/update-service;1"]. getService(Components.interfaces.nsIApplicationUpdateService); var um = Components.classes["@mozilla.org/updates/update-manager;1"]. getService(Components.interfaces.nsIUpdateManager); var activeUpdate = um.activeUpdate; if (!gMessengerBundle) gMessengerBundle = document.getElementById("bundle_messenger"); var label = gMessengerBundle.getString("updates_checkForUpdates"); if (activeUpdate) { if (updates.isDownloading) { if (activeUpdate.name) label = gMessengerBundle.getFormattedString("updates_downloadingUpdates", [activeUpdate.name]); else label = gMessengerBundle.getString("updates_downloadingUpdatesFallback"); } else { if (activeUpdate.name) label = gMessengerBundle.getFormattedString("updates_resumeDownloading", [activeUpdate.name]); else label = gMessengerBundle.getString("updates_resumeDownloadingFallback"); } } var checkForUpdates = document.getElementById("checkForUpdates"); checkForUpdates.label = label; if (um.activeUpdate && updates.isDownloading) checkForUpdates.setAttribute("loading", "true"); else checkForUpdates.removeAttribute("loading");}
var mimeSource = gRDF.GetResource(MIME_URI(this.mimeType)); var handlerProperty = gRDF.GetResource(NC_RDF("handlerProp")); var handlerResource = gRDF.GetResource(HANDLER_URI(this.mimeType));
var mimeSource = gRDF.GetUnicodeResource(MIME_URI(this.mimeType)); var handlerProperty = gRDF.GetUnicodeResource(NC_RDF("handlerProp")); var handlerResource = gRDF.GetUnicodeResource(HANDLER_URI(this.mimeType));
buildLinks: function() { // assert the handler resource var mimeSource = gRDF.GetResource(MIME_URI(this.mimeType)); var handlerProperty = gRDF.GetResource(NC_RDF("handlerProp")); var handlerResource = gRDF.GetResource(HANDLER_URI(this.mimeType)); gDS.Assert(mimeSource, handlerProperty, handlerResource, true); // assert the helper app resource var helperAppProperty = gRDF.GetResource(NC_RDF("externalApplication")); var helperAppResource = gRDF.GetResource(APP_URI(this.mimeType)); gDS.Assert(handlerResource, helperAppProperty, helperAppResource, true); // add the mime type to the MIME types seq var container = Components.classes["@mozilla.org/rdf/container;1"].createInstance(); if (container) { container = container.QueryInterface(Components.interfaces.nsIRDFContainer); if (container) { var containerRes = gRDF.GetResource("urn:mimetypes:root"); container.Init(gDS, containerRes); var element = gRDF.GetResource(MIME_URI(this.mimeType)); if (container.IndexOf(element) == -1) container.AppendElement(element); } } }
var helperAppProperty = gRDF.GetResource(NC_RDF("externalApplication")); var helperAppResource = gRDF.GetResource(APP_URI(this.mimeType));
var helperAppProperty = gRDF.GetUnicodeResource(NC_RDF("externalApplication")); var helperAppResource = gRDF.GetUnicodeResource(APP_URI(this.mimeType));
buildLinks: function() { // assert the handler resource var mimeSource = gRDF.GetResource(MIME_URI(this.mimeType)); var handlerProperty = gRDF.GetResource(NC_RDF("handlerProp")); var handlerResource = gRDF.GetResource(HANDLER_URI(this.mimeType)); gDS.Assert(mimeSource, handlerProperty, handlerResource, true); // assert the helper app resource var helperAppProperty = gRDF.GetResource(NC_RDF("externalApplication")); var helperAppResource = gRDF.GetResource(APP_URI(this.mimeType)); gDS.Assert(handlerResource, helperAppProperty, helperAppResource, true); // add the mime type to the MIME types seq var container = Components.classes["@mozilla.org/rdf/container;1"].createInstance(); if (container) { container = container.QueryInterface(Components.interfaces.nsIRDFContainer); if (container) { var containerRes = gRDF.GetResource("urn:mimetypes:root"); container.Init(gDS, containerRes); var element = gRDF.GetResource(MIME_URI(this.mimeType)); if (container.IndexOf(element) == -1) container.AppendElement(element); } } }
var containerRes = gRDF.GetResource("urn:mimetypes:root");
var containerRes = gRDF.GetUnicodeResource("urn:mimetypes:root");
buildLinks: function() { // assert the handler resource var mimeSource = gRDF.GetResource(MIME_URI(this.mimeType)); var handlerProperty = gRDF.GetResource(NC_RDF("handlerProp")); var handlerResource = gRDF.GetResource(HANDLER_URI(this.mimeType)); gDS.Assert(mimeSource, handlerProperty, handlerResource, true); // assert the helper app resource var helperAppProperty = gRDF.GetResource(NC_RDF("externalApplication")); var helperAppResource = gRDF.GetResource(APP_URI(this.mimeType)); gDS.Assert(handlerResource, helperAppProperty, helperAppResource, true); // add the mime type to the MIME types seq var container = Components.classes["@mozilla.org/rdf/container;1"].createInstance(); if (container) { container = container.QueryInterface(Components.interfaces.nsIRDFContainer); if (container) { var containerRes = gRDF.GetResource("urn:mimetypes:root"); container.Init(gDS, containerRes); var element = gRDF.GetResource(MIME_URI(this.mimeType)); if (container.IndexOf(element) == -1) container.AppendElement(element); } } }
var element = gRDF.GetResource(MIME_URI(this.mimeType));
var element = gRDF.GetUnicodeResource(MIME_URI(this.mimeType));
buildLinks: function() { // assert the handler resource var mimeSource = gRDF.GetResource(MIME_URI(this.mimeType)); var handlerProperty = gRDF.GetResource(NC_RDF("handlerProp")); var handlerResource = gRDF.GetResource(HANDLER_URI(this.mimeType)); gDS.Assert(mimeSource, handlerProperty, handlerResource, true); // assert the helper app resource var helperAppProperty = gRDF.GetResource(NC_RDF("externalApplication")); var helperAppResource = gRDF.GetResource(APP_URI(this.mimeType)); gDS.Assert(handlerResource, helperAppProperty, helperAppResource, true); // add the mime type to the MIME types seq var container = Components.classes["@mozilla.org/rdf/container;1"].createInstance(); if (container) { container = container.QueryInterface(Components.interfaces.nsIRDFContainer); if (container) { var containerRes = gRDF.GetResource("urn:mimetypes:root"); container.Init(gDS, containerRes); var element = gRDF.GetResource(MIME_URI(this.mimeType)); if (container.IndexOf(element) == -1) container.AppendElement(element); } } }
var container = Components.classes["component:
var container = Components.classes["@mozilla.org/rdf/container;1"].createInstance();
buildLinks: function() { // assert the handler resource var mimeSource = gRDF.GetResource(MIME_URI(this.mimeType)); var handlerProperty = gRDF.GetResource(NC_RDF("handlerProp")); var handlerResource = gRDF.GetResource(HANDLER_URI(this.mimeType)); gDS.Assert(mimeSource, handlerProperty, handlerResource, true); // assert the helper app resource var helperAppProperty = gRDF.GetResource(NC_RDF("externalApplication")); var helperAppResource = gRDF.GetResource(APP_URI(this.mimeType)); gDS.Assert(handlerResource, helperAppProperty, helperAppResource, true); // add the mime type to the MIME types seq var container = Components.classes["component://netscape/rdf/container"].createInstance(); if (container) { container = container.QueryInterface(Components.interfaces.nsIRDFContainer); if (container) { var containerRes = gRDF.GetResource("urn:mimetypes:root"); container.Init(gDS, containerRes); var element = gRDF.GetResource(MIME_URI(this.mimeType)); if (container.IndexOf(element) == -1) container.AppendElement(element); } } },
var sidebar = document.getElementById('sidebar-box'); var width = sidebar.getAttribute('width'); sidebar.setAttribute('width', parseInt(width) + delta);
var sidebarBox = document.getElementById('sidebar-box'); var width = sidebarBox.getAttribute('width'); sidebarBox.setAttribute('width', parseInt(width) + delta);
function bump_width(delta) { var sidebar = document.getElementById('sidebar-box'); var width = sidebar.getAttribute('width'); sidebar.setAttribute('width', parseInt(width) + delta);}
if (dialogType == cookieType) session.disabled = !site;
function buttonEnabling(textfield) { // trim any leading space var site = textfield.value.replace(/^\s*([-\w]*:\/+)?/, ""); var block = document.getElementById("btnBlock"); var allow = document.getElementById("btnAllow"); block.disabled = !site; allow.disabled = !site;}
function c(a,b,d){return (!a||a==c||b==d);}
function c(a,b,d){return (!a||a==d||b==d);}
function c(a,b,d){return (!a||a==c||b==d);}
dump( "Fire alarm "+ calendarEvent );
dump( "Fire alarm "+ calendarEvent + "\n" );
CalendarAlarmObserver.prototype.fireAlarm = function calAlarm_fireAlarm( calendarEvent ){ dump( "Fire alarm "+ calendarEvent ); if( typeof( gCalendarWindow ) == "undefined" ) { return; } var categoriesStringBundle = srGetStrBundle("chrome://calendar/locale/calendar.properties"); if( getBoolPref(gCalendarWindow.calendarPreferences.calendarPref, "alarms.playsound", categoriesStringBundle.GetStringFromName("playAlarmSound" ) ) ) { playSound(); } addEventToDialog( calendarEvent ); if ( calendarEvent.alarmEmailAddress ) { var EmailBody = "Calendar Event Alarm Went Off!\n----------------------------\n"; EmailBody += "Title: "+calendarEvent.title + " at " + calendarEvent.start.toString() + "\n"; EmailBody += "This message sent to you from the Mozilla Calendar.\nhttp://www.mozilla.org/projects/calendar/"; //send an email for the event sendEmail( "Mozilla Calendar Alarm: "+calendarEvent.title, EmailBody, calendarEvent.alarmEmailAddress, null, null, null, null ); }}
observer.onAlarm( this.pendingAlarmList[ i ] );
CalendarAlarmObserver.prototype.firePendingAlarms = function calAlarm_firePendingAlarms( observer ){ this.addToPending = false; if( this.pendingAlarmList ) { for( var i in this.pendingAlarmList ) { this.fireAlarm( this.pendingAlarmList[ i ] ); observer.onAlarm( this.pendingAlarmList[ i ] ); } } this.pendingAlarmList = null; }
dump( "caEvent.alarmWentOff is "+ calendarEvent );
dump( "caEvent.alarmWentOff is "+ calendarEvent + "\n" );
CalendarAlarmObserver.prototype.onAlarm = function calAlarm_onAlarm( calendarEvent ){ dump( "caEvent.alarmWentOff is "+ calendarEvent ); if( this.addToPending ) { dump( "defering alarm "+ calendarEvent ); this.pendingAlarmList.push( calendarEvent ); } else { this.fireAlarm( calendarEvent ) }}
dump( "defering alarm "+ calendarEvent );
dump( "defering alarm "+ calendarEvent + "\n" );
CalendarAlarmObserver.prototype.onAlarm = function calAlarm_onAlarm( calendarEvent ){ dump( "caEvent.alarmWentOff is "+ calendarEvent ); if( this.addToPending ) { dump( "defering alarm "+ calendarEvent ); this.pendingAlarmList.push( calendarEvent ); } else { this.fireAlarm( calendarEvent ) }}
this.mCalendars = new Array(); this.mCompositeObservers = new Array(); this.mObservers = new Array(); this.mDefaultCalendar = null;
function calCompositeCalendar () { this.mObserverHelper = new calCompositeCalendarObserverHelper(this); this.wrappedJSObject = this;}
this.mUriParams = null;
function calDavCalendar() { this.wrappedJSObject = this; this.mObservers = Array(); this.unmappedProperties = [];}
var calcColor = ThisCalendarObject.color.replace( /#/g, "" ); var red = calcColor.substring( 0, 2 ); var green = calcColor.substring( 2, 4 ); var blue = calcColor.substring( 4, 6 ); var sum = parseInt( red, 16 ) + parseInt( green, 16 ) + parseInt( blue, 16 ); if ( sum < 256 ) tempStyleSheets[j].insertRule( "." + containerName + " { color:" + " white" + "!important;}", 1 );
function calendarColorStyleRuleUpdate( ThisCalendarObject ){ var j = -1; var i; // obtain calendar name from the Id var containerName = ThisCalendarObject.Id.split(':')[2]; var tempStyleSheets = document.styleSheets; for (i=0; i<tempStyleSheets.length; i++) { if (tempStyleSheets[i].href.match(/chrome.*\/skin.*\/calendar.css$/)) { j = i; break; } } // check that the calendar.css stylesheet was found if( j != -1 ) { var ruleList = tempStyleSheets[j].cssRules; var ruleName; for (i=0; i < ruleList.length; i++) { ruleName = ruleList[i].cssText.split(' '); // find the existing rule so that it can be deleted if (ruleName[0] == "." + containerName) { tempStyleSheets[j].deleteRule(i); break; } } // insert the new calendar color rule tempStyleSheets[j].insertRule("." + containerName + " { background-color:" +ThisCalendarObject.color + " !important;}",1); }}
var tabbox = document.getElementById("tablist"); tabbox.setAttribute("selectedIndex", tabbox.selectedIndex);
function calendarFinish(){ finishCalendarUnifinder(); finishCalendarToDoUnifinder(); finishCalendarManager();}
gCalendarWindow.close(); gICalLib.removeObserver( gEventSource.alarmObserver );
function calendarFinish(){ finishCalendarUnifinder(); finishCalendarToDoUnifinder(); finishCalendarManager(); gCalendarWindow.close(); gICalLib.removeObserver( gEventSource.alarmObserver );}
document.getElementById( 'event-filter-menulist' ).setAttribute( "label", document.getElementById( 'event-filter-menulist' ).selectedItem.getAttribute( 'label' ) );
function calendarInit() { // get the calendar event data source gEventSource = new CalendarEventDataSource(); // get the Ical Library gICalLib = gEventSource.getICalLib(); // set up the CalendarWindow instance gCalendarWindow = new CalendarWindow( gEventSource ); //when you switch to a view, it takes care of refreshing the events, so that call is not needed. gCalendarWindow.currentView.switchTo( gCalendarWindow.currentView ); // set up the unifinder prepareCalendarUnifinder(); prepareCalendarToDoUnifinder(); update_date(); checkForMailNews(); if( window.arguments && window.arguments[0].url ) { gCalendarWindow.calendarManager.checkCalendarURL( window.arguments[0].url ); }}
gICalLib = new Object();
function calendarInit() { // XXX remove this eventually gICalLib = new Object(); // set up the CalendarWindow instance gCalendarWindow = new CalendarWindow(); //when you switch to a view, it takes care of refreshing the events, so that call is not needed. gCalendarWindow.currentView.switchTo( gCalendarWindow.currentView ); // set up the checkboxes variables gOnlyWorkdayChecked = document.getElementById( "only-workday-checkbox-1" ).getAttribute("checked") ; gDisplayToDoInViewChecked = document.getElementById( "display-todo-inview-checkbox-1" ).getAttribute("checked") ; // set up the unifinder prepareCalendarUnifinder(); prepareCalendarToDoUnifinder(); update_date(); checkForMailNews(); initCalendarManager(); if (("arguments" in window) && (window.arguments.length) && (typeof(window.arguments[0]) == "object") && ("channel" in window.arguments[0]) ) { gCalendarWindow.calendarManager.checkCalendarURL( window.arguments[0].channel ); } // a bit of a hack since the menulist doesn't remember the selected value var value = document.getElementById( 'event-filter-menulist' ).value; document.getElementById( 'event-filter-menulist' ).selectedItem = document.getElementById( 'event-filter-'+value ); var toolbox = document.getElementById("calendar-toolbox"); toolbox.customizeDone = CalendarToolboxCustomizeDone;}
document.getElementById("view-deck") .addEventListener("dayselect", observeViewDaySelect, false);
function calendarInit() { // set up the CalendarWindow instance gCalendarWindow = new CalendarWindow(); // Set up the checkbox variables. Do not use the typical change*() functions // because those will actually toggle the current value. if (document.getElementById("toggle_workdays_only").getAttribute("checked") == 'true') { var deck = document.getElementById("view-deck") for each (view in deck.childNodes) { view.workdaysOnly = true; } deck.selectedPanel.goToDay(deck.selectedPanel.selectedDay); } // tasksInView is true by default if (document.getElementById("toggle_tasks_in_view").getAttribute("checked") != 'true') { var deck = document.getElementById("view-deck") for each (view in deck.childNodes) { view.tasksInView = false; } deck.selectedPanel.goToDay(deck.selectedPanel.selectedDay); } // set up the unifinder prepareCalendarUnifinder(); prepareCalendarToDoUnifinder(); update_date(); checkForMailNews(); initCalendarManager(); // fire up the alarm service var alarmSvc = Components.classes["@mozilla.org/calendar/alarm-service;1"] .getService(Components.interfaces.calIAlarmService); alarmSvc.timezone = calendarDefaultTimezone(); alarmSvc.startup(); if (("arguments" in window) && (window.arguments.length) && (typeof(window.arguments[0]) == "object") && ("channel" in window.arguments[0]) ) { gCalendarWindow.calendarManager.checkCalendarURL( window.arguments[0].channel ); } // a bit of a hack since the menulist doesn't remember the selected value var value = document.getElementById( 'event-filter-menulist' ).value; document.getElementById( 'event-filter-menulist' ).selectedItem = document.getElementById( 'event-filter-'+value ); var toolbox = document.getElementById("calendar-toolbox"); toolbox.customizeDone = CalendarToolboxCustomizeDone;}
if( window.arguments && window.arguments[0].channel )
if( ("arguments" in window.arguments) && ("channel" in window.arguments[0]) )
function calendarInit() { // get the calendar event data source gEventSource = new CalendarEventDataSource(); // get the Ical Library gICalLib = gEventSource.getICalLib(); // this suspends feedbacks to observers until all is settled gICalLib.batchMode = true; // set up the CalendarWindow instance gCalendarWindow = new CalendarWindow(); //when you switch to a view, it takes care of refreshing the events, so that call is not needed. gCalendarWindow.currentView.switchTo( gCalendarWindow.currentView ); // set up the checkboxes variables gOnlyWorkdayChecked = document.getElementById( "only-workday-checkbox-1" ).getAttribute("checked") ; gDisplayToDoInViewChecked = document.getElementById( "display-todo-inview-checkbox-1" ).getAttribute("checked") ; // set up the unifinder prepareCalendarUnifinder(); prepareCalendarToDoUnifinder(); update_date(); checkForMailNews(); // Change made by CofC for Calendar Coloring // initialize calendar color style rules in the calendar's styleSheet // find calendar's style sheet index var i; for (i=0; i<document.styleSheets.length; i++) { if (document.styleSheets[i].href.match(/chrome.*\/skin.*\/calendar.css$/)) { gCalendarStyleSheet = document.styleSheets[i]; break; } } var calendarNode; var containerName; var calendarColor; // loop through the calendars via the rootSequence of the RDF datasource var seq = gCalendarWindow.calendarManager.rdf.getRootSeq("urn:calendarcontainer"); var list = seq.getSubNodes(); for(i=0; i<list.length;i++) { calendarNode = gCalendarWindow.calendarManager.rdf.getNode( list[i].subject ); // grab the container name and use it for the name of the style rule containerName = list[i].subject.split(":")[2]; // obtain calendar color from the rdf datasource calendarColor = calendarNode.getAttribute("http://home.netscape.com/NC-rdf#color"); // if the calendar had a color attribute create a style sheet for it if (calendarColor != null) gCalendarStyleSheet.insertRule("." + containerName + " { background-color:" + calendarColor + "!important;}", 1); } // CofC Calendar Coloring Change if( window.arguments && window.arguments[0].channel ) { gCalendarWindow.calendarManager.checkCalendarURL( window.arguments[0].channel ); } //a bit of a hack since the menulist doesn't remember the selected value var value = document.getElementById( 'event-filter-menulist' ).value; document.getElementById( 'event-filter-menulist' ).selectedItem = document.getElementById( 'event-filter-'+value ); gEventSource.alarmObserver.firePendingAlarms(); //All is settled, enable feedbacks to observers gICalLib.batchMode = false;}
gEventSource.alarmObserver.firePendingAlarms();
function calendarInit() { // get the calendar event data source gEventSource = new CalendarEventDataSource(); // get the Ical Library gICalLib = gEventSource.getICalLib(); // set up the CalendarWindow instance gCalendarWindow = new CalendarWindow(); //when you switch to a view, it takes care of refreshing the events, so that call is not needed. gCalendarWindow.currentView.switchTo( gCalendarWindow.currentView ); // set up the checkboxes variables gOnlyWorkdayChecked = document.getElementById( "only-workday-checkbox-1" ).getAttribute("checked") ; gDisplayToDoInViewChecked = document.getElementById( "display-todo-inview-checkbox-1" ).getAttribute("checked") ; // set up the unifinder prepareCalendarUnifinder(); prepareCalendarToDoUnifinder(); update_date(); checkForMailNews(); // Change made by CofC for Calendar Coloring // initialize calendar color style rules in the calendar's styleSheet // find calendar's style sheet index for (var i=0; i<document.styleSheets.length; i++) { if (document.styleSheets[i].href == "chrome://calendar/skin/calendar.css") { gCalendarStyleSheet = document.styleSheets[i]; break; } } var calendarNode; var calendarColor; // loop through the calendars via the rootSequence of the RDF datasource var seq = gCalendarWindow.calendarManager.rdf.getRootSeq("urn:calendarcontainer"); var list = seq.getSubNodes(); for(var i=0; i<list.length;i++) { calendarNode = gCalendarWindow.calendarManager.rdf.getNode( list[i].subject ); // grab the container name and use it for the name of the style rule containerName = list[i].subject.split(":")[2]; // obtain calendar color from the rdf datasource calendarColor = calendarNode.getAttribute("http://home.netscape.com/NC-rdf#color"); // if the calendar had a color attribute create a style sheet for it if (calendarColor != null) gCalendarStyleSheet.insertRule("." + containerName + " { background-color:" + calendarColor + "!important;}", 1); } // CofC Calendar Coloring Change if( window.arguments && window.arguments[0].channel ) { gCalendarWindow.calendarManager.checkCalendarURL( window.arguments[0].channel ); } //a bit of a hack since the menulist doesn't remember the selected value var value = document.getElementById( 'event-filter-menulist' ).value; document.getElementById( 'event-filter-menulist' ).selectedItem = document.getElementById( 'event-filter-'+value );}
var calcColor = calendarColor.replace(/#/g, ""); var red = calcColor.substring(0, 2); var green = calcColor.substring(2, 4); var blue = calcColor.substring(4, 6); var sum = parseInt(red, 16) + parseInt(green, 16) + parseInt(blue, 16); if (sum < 256) gCalendarStyleSheet.insertRule("." + containerName + " { color:" + " white" + "!important;}", 1);
function calendarInit() { // get the calendar event data source gEventSource = new CalendarEventDataSource(); // get the Ical Library gICalLib = gEventSource.getICalLib(); // this suspends feedbacks to observers until all is settled gICalLib.batchMode = true; // set up the CalendarWindow instance gCalendarWindow = new CalendarWindow(); //when you switch to a view, it takes care of refreshing the events, so that call is not needed. gCalendarWindow.currentView.switchTo( gCalendarWindow.currentView ); // set up the checkboxes variables gOnlyWorkdayChecked = document.getElementById( "only-workday-checkbox-1" ).getAttribute("checked") ; gDisplayToDoInViewChecked = document.getElementById( "display-todo-inview-checkbox-1" ).getAttribute("checked") ; // set up the unifinder prepareCalendarUnifinder(); prepareCalendarToDoUnifinder(); update_date(); checkForMailNews(); // Change made by CofC for Calendar Coloring // initialize calendar color style rules in the calendar's styleSheet // find calendar's style sheet index var i; for (i=0; i<document.styleSheets.length; i++) { if (document.styleSheets[i].href.match(/chrome.*\/skin.*\/calendar.css$/)) { gCalendarStyleSheet = document.styleSheets[i]; break; } } var calendarNode; var containerName; var calendarColor; // loop through the calendars via the rootSequence of the RDF datasource var seq = gCalendarWindow.calendarManager.rdf.getRootSeq("urn:calendarcontainer"); var list = seq.getSubNodes(); var calListItems = document.getElementById( "list-calendars-listbox" ).getElementsByTagName("listitem"); for(i=0; i<list.length;i++) { calendarNode = gCalendarWindow.calendarManager.rdf.getNode( list[i].subject ); // grab the container name and use it for the name of the style rule containerName = list[i].subject.split(":")[2]; // obtain calendar color from the rdf datasource calendarColor = calendarNode.getAttribute("http://home.netscape.com/NC-rdf#color"); // if the calendar had a color attribute create a style sheet for it if (calendarColor != null) { gCalendarStyleSheet.insertRule("." + containerName + " { background-color:" + calendarColor + "!important;}", 1); var calListItem = calListItems[i+1]; if (calListItem && calListItem.childNodes[0]) { calListItem.childNodes[0].setAttribute("class", "calendar-list-item-class " + containerName); } } } // CofC Calendar Coloring Change if( ("arguments" in window) && (window.arguments.length) && (typeof(window.arguments[0]) == "object") && ("channel" in window.arguments[0]) ) { gCalendarWindow.calendarManager.checkCalendarURL( window.arguments[0].channel ); } //a bit of a hack since the menulist doesn't remember the selected value var value = document.getElementById( 'event-filter-menulist' ).value; document.getElementById( 'event-filter-menulist' ).selectedItem = document.getElementById( 'event-filter-'+value ); gEventSource.alarmObserver.firePendingAlarms(); //All is settled, enable feedbacks to observers gICalLib.batchMode = false;}
var profileFile = this.getProfileDirectory();
profileFile = this.getProfileDirectory();
function calendarManager( CalendarWindow ){ this.CalendarWindow = CalendarWindow; /* We need a Calendar directory in our profile directory */ var CalendarDirectory = new File( this.getProfileDirectory().path ); CalendarDirectory.append( "Calendar" ); /* make sure the calendar directory exists, create it if it doesn't */ if( !CalendarDirectory.exists() ) { var thisDir = new Dir( CalendarDirectory.path ); thisDir.create( 0755 ); } var profileFile = this.getProfileDirectory(); profileFile.append("Calendar"); profileFile.append("CalendarManager.rdf"); this.rdf = new RDFFile( profileFile.path, null); /* make sure we have a root node, if not we probably have an empty file */ if( this.rdf.getRootContainers().length == 0 ) { this.rootContainer = this.rdf.addRootSeq( "urn:calendarcontainer" ); //add the default calendar var profileFile = this.getProfileDirectory(); profileFile.append("Calendar"); profileFile.append("CalendarDataFile.ics"); var node = this.rootContainer.addNode( "calendar0" ); node.setAttribute( "http://home.netscape.com/NC-rdf#name", "My Calendar" ); node.setAttribute( "http://home.netscape.com/NC-rdf#path", profileFile.path ); node.setAttribute( "http://home.netscape.com/NC-rdf#active", "true" ); node.setAttribute( "http://home.netscape.com/NC-rdf#remote", "false" ); node.setAttribute( "http://home.netscape.com/NC-rdf#remotePath", "" ); } else { this.rootContainer = this.rdf.getRootContainers("seq")[0]; } this.rdf.flush(); this.getAndConvertAllOldCalendars(); document.getElementById( "list-calendars-listbox" ).database.AddDataSource( this.rdf.getDatasource() ); document.getElementById( "list-calendars-listbox" ).builder.rebuild(); /* add active calendars */ for( var i = 0; i < this.rootContainer.getSubNodes().length; i++ ) { if( this.rootContainer.getSubNodes()[i].getAttribute( "http://home.netscape.com/NC-rdf#active" ) == "true" ) { this.addCalendar( this.rootContainer.getSubNodes()[i] ); } } /* Refresh remote calendars */ /* var RefreshServers = getBoolPref(this.CalendarWindow.calendarPreferences.calendarPref, "servers.reloadonlaunch", false ); if( RefreshServers == true ) this.refreshAllRemoteCalendars( ); */}
this.nextCalendarNumber = 1;
function calendarManager( CalendarWindow ){ this.nextCalendarNumber = 1; this.CalendarWindow = CalendarWindow; this.calendars = new Array(); this.getAllCalendars(); for( var i = 0; i < this.calendars.length; i++ ) { this.addCalendarToListBox( this.calendars[i] ); } //if the calendars are being used, add them. this.addActiveCalendars();}
this.calendars = new Array();
var CalendarDirectory = new File( this.getProfileDirectory().path );
function calendarManager( CalendarWindow ){ this.nextCalendarNumber = 1; this.CalendarWindow = CalendarWindow; this.calendars = new Array(); this.getAllCalendars(); for( var i = 0; i < this.calendars.length; i++ ) { this.addCalendarToListBox( this.calendars[i] ); } //if the calendars are being used, add them. this.addActiveCalendars();}
this.getAllCalendars(); for( var i = 0; i < this.calendars.length; i++ )
CalendarDirectory.append( "Calendar" ); if( !CalendarDirectory.exists() )
function calendarManager( CalendarWindow ){ this.nextCalendarNumber = 1; this.CalendarWindow = CalendarWindow; this.calendars = new Array(); this.getAllCalendars(); for( var i = 0; i < this.calendars.length; i++ ) { this.addCalendarToListBox( this.calendars[i] ); } //if the calendars are being used, add them. this.addActiveCalendars();}
this.addCalendarToListBox( this.calendars[i] );
var thisDir = new Dir( CalendarDirectory.path ); thisDir.create( 0755 );
function calendarManager( CalendarWindow ){ this.nextCalendarNumber = 1; this.CalendarWindow = CalendarWindow; this.calendars = new Array(); this.getAllCalendars(); for( var i = 0; i < this.calendars.length; i++ ) { this.addCalendarToListBox( this.calendars[i] ); } //if the calendars are being used, add them. this.addActiveCalendars();}
this.addActiveCalendars();
var profileFile = this.getProfileDirectory(); profileFile.append("Calendar"); profileFile.append("CalendarManager.rdf"); this.rdf = new RDFFile( profileFile.path, null); if( this.rdf.getRootContainers().length == 0 ) { this.rootContainer = this.rdf.addRootSeq( "urn:calendarcontainer" ); var profileFile = this.getProfileDirectory(); profileFile.append("Calendar"); profileFile.append("CalendarDataFile.ics"); var node = this.rootContainer.addNode( "calendar0" ); node.setAttribute( "http: node.setAttribute( "http: node.setAttribute( "http: node.setAttribute( "http: node.setAttribute( "http: } else { this.rootContainer = this.rdf.getRootContainers("seq")[0]; } this.rdf.flush(); this.getAndConvertAllOldCalendars(); document.getElementById( "list-calendars-listbox" ).database.AddDataSource( this.rdf.getDatasource() ); document.getElementById( "list-calendars-listbox" ).builder.rebuild(); /* add active calendars */ for( var i = 0; i < this.rootContainer.getSubNodes().length; i++ ) { if( this.rootContainer.getSubNodes()[i].getAttribute( "http: { this.addCalendar( this.rootContainer.getSubNodes()[i] ); } }
function calendarManager( CalendarWindow ){ this.nextCalendarNumber = 1; this.CalendarWindow = CalendarWindow; this.calendars = new Array(); this.getAllCalendars(); for( var i = 0; i < this.calendars.length; i++ ) { this.addCalendarToListBox( this.calendars[i] ); } //if the calendars are being used, add them. this.addActiveCalendars();}
autoreload = Calendar.getAttribute( "http:
var autoreload = Calendar.getAttribute( "http:
function calendarManager( CalendarWindow ){ this.CalendarWindow = CalendarWindow; /* We need a Calendar directory in our profile directory */ var CalendarDirectory = new File( this.getProfileDirectory().path ); CalendarDirectory.append( "Calendar" ); /* make sure the calendar directory exists, create it if it doesn't */ if( !CalendarDirectory.exists() ) { var thisDir = new Dir( CalendarDirectory.path ); thisDir.create(); } var profileFile = this.getProfileDirectory(); profileFile.append("Calendar"); profileFile.append("CalendarManager.rdf"); this.rdf = new RDFFile( profileFile.path, null); /* make sure we have a root node, if not we probably have an empty file */ if( this.rdf.getRootContainers().length == 0 ) { this.rootContainer = this.rdf.addRootSeq( "urn:calendarcontainer" ); //add the default calendar profileFile = this.getProfileDirectory(); profileFile.append("Calendar"); profileFile.append("CalendarDataFile.ics"); var node = this.rootContainer.addNode( "calendar0" ); node.setAttribute( "http://home.netscape.com/NC-rdf#name", defaultCalendarFileName ); node.setAttribute( "http://home.netscape.com/NC-rdf#path", profileFile.path ); node.setAttribute( "http://home.netscape.com/NC-rdf#active", "true" ); node.setAttribute( "http://home.netscape.com/NC-rdf#remote", "false" ); node.setAttribute( "http://home.netscape.com/NC-rdf#remotePath", "" ); node.setAttribute( "http://home.netscape.com/NC-rdf#color", "#F9F4FF"); //default color node.setAttribute( "http://home.netscape.com/NC-rdf#shared", "false" ); node.setAttribute( "http://home.netscape.com/NC-rdf#autoreload", "0" ); } else { this.rootContainer = this.rdf.getRootContainers("seq")[0]; } this.rdf.flush(); this.getAndConvertAllOldCalendars(); document.getElementById( "list-calendars-listbox" ).database.AddDataSource( this.rdf.getDatasource() ); document.getElementById( "list-calendars-listbox" ).builder.rebuild(); /* add active calendars */ for( var i = 0; i < this.rootContainer.getSubNodes().length; i++ ) { var Calendar = this.rootContainer.getSubNodes()[i]; if( Calendar.getAttribute( "http://home.netscape.com/NC-rdf#active" ) == "true" ) { this.addCalendar( Calendar ); } // Add autoreload timers for all calendars autoreload = Calendar.getAttribute( "http://home.netscape.com/NC-rdf#autoreload" ); if ( autoreload > 0 ) { function closure( ThisObject,ThisCalendar ) { function autoreloadCmd(){ if( ThisCalendar.getAttribute( "http://home.netscape.com/NC-rdf#active" ) == "true" ) ThisObject.reloadCalendar( ThisCalendar ); } return autoreloadCmd; } var X = closure( this, Calendar ); var serverNumber = Calendar.getAttribute( "http://home.netscape.com/NC-rdf#serverNumber" ); gAutoreloadTimerId[serverNumber] = setInterval( X, autoreload ); } } /* Refresh remote calendars */ var RefreshServers = getBoolPref(this.CalendarWindow.calendarPreferences.calendarPref, "servers.reloadonlaunch", gCalendarBundle.getString("reloadServersOnLaunch" ) ); if( RefreshServers == true ) this.refreshAllRemoteCalendars( );}
getBoolPref( this.calendarPref, "week.d0sundaysoff", "true"==calendarStringBundle.GetStringFromName("defaultWeekSundaysOff" ) ); getBoolPref( this.calendarPref, "week.d1mondaysoff", "true"==calendarStringBundle.GetStringFromName("defaultWeekMondaysOff" ) ); getBoolPref( this.calendarPref, "week.d2tuesdaysoff", "true"==calendarStringBundle.GetStringFromName("defaultWeekTuesdaysOff" ) ); getBoolPref( this.calendarPref, "week.d3wednesdaysoff", "true"==calendarStringBundle.GetStringFromName("defaultWeekWednesdaysOff" ) ); getBoolPref( this.calendarPref, "week.d4thursdaysoff", "true"==calendarStringBundle.GetStringFromName("defaultWeekThursdaysOff" ) ); getBoolPref( this.calendarPref, "week.d5fridaysoff", "true"==calendarStringBundle.GetStringFromName("defaultWeekFridaysOff" ) ); getBoolPref( this.calendarPref, "week.d6saturdaysoff", "true"==calendarStringBundle.GetStringFromName("defaultWeekSaturdaysOff" ) );
function calendarPreferences( CalendarWindow ){ window.calendarPrefObserver = new calendarPrefObserver( this ); this.calendarWindow = CalendarWindow; this.calendarPref = prefService.getBranch("calendar."); // preferences calendar node var calendarStringBundle = srGetStrBundle("chrome://calendar/locale/calendar.properties"); //go through all the preferences and set default values? getBoolPref( this.calendarPref, "servers.reloadonlaunch", calendarStringBundle.GetStringFromName("reloadServersOnLaunch" ) ); getBoolPref( this.calendarPref, "alarms.show", calendarStringBundle.GetStringFromName("showAlarms" ) ); getBoolPref( this.calendarPref, "alarms.showmissed", calendarStringBundle.GetStringFromName("showMissed" ) ); getBoolPref( this.calendarPref, "alarms.playsound", calendarStringBundle.GetStringFromName("playAlarmSound" ) ); GetUnicharPref( this.calendarPref, "categories.names", getDefaultCategories() ); getCharPref( this.calendarPref, "timezone.default", calendarStringBundle.GetStringFromName("defaultzone")); getIntPref( this.calendarPref, "event.defaultlength", calendarStringBundle.GetStringFromName("defaultEventLength" ) ); getIntPref( this.calendarPref, "alarms.defaultsnoozelength", calendarStringBundle.GetStringFromName("defaultSnoozeAlarmLength" ) ); getIntPref( this.calendarPref, "date.format", calendarStringBundle.GetStringFromName("dateFormat" ) ); getBoolPref( this.calendarPref, "dateformat.storeingmt", calendarStringBundle.GetStringFromName("storeInGmt") ); getIntPref( this.calendarPref, "event.defaultstarthour", calendarStringBundle.GetStringFromName("defaultStartHour" ) ); getIntPref( this.calendarPref, "event.defaultendhour", calendarStringBundle.GetStringFromName("defaultEndHour" ) ); getIntPref( this.calendarPref, "week.start", calendarStringBundle.GetStringFromName("defaultWeekStart" ) ); getIntPref( this.calendarPref, "weeks.inview", calendarStringBundle.GetStringFromName("defaultWeeksInView" ) ); getIntPref( this.calendarPref, "previousweeks.inview", calendarStringBundle.GetStringFromName("defaultPreviousWeeksInView" ) ); getIntPref( this.calendarPref, "alarms.onforevents", 0 ); getIntPref( this.calendarPref, "alarms.onfortodos", 0 ); getCharPref( this.calendarPref, "alarms.eventalarmunit", calendarStringBundle.GetStringFromName("defaulteventalarmunit")); getCharPref( this.calendarPref, "alarms.todoalarmunit", calendarStringBundle.GetStringFromName("defaulttodoalarmunit"));}
window.addEventListener("unload", this, false);
function calendarPrefObserver( CalendarPreferences ){ this.CalendarPreferences = CalendarPreferences; try { var pbi = rootPrefNode.QueryInterface(Components.interfaces.nsIPrefBranchInternal); pbi.addObserver("calendar", this, false); } catch(ex) { dump("Calendar: Failed to observe prefs: " + ex + "\n"); }}
SearchTree.treeBoxObject.selection.select( -1 );
SearchTree.treeBoxObject.selection.clearSelection();
function calendarUnifinderInit( ){ var unifinderEventSelectionObserver = { onSelectionChanged : function( EventSelectionArray ) { /* This no longer works since we moved to a tree */ var SearchTree = document.getElementById( "unifinder-search-results-listbox" ); SearchTree.setAttribute( "suppressonselect", "true" ); SearchTree.treeBoxObject.selection.select( -1 ); if( EventSelectionArray.length > 0 ) { for( i = 0; i < EventSelectionArray.length; i++ ) { var SearchTreeItem = document.getElementById( "search-unifinder-treeitem-"+EventSelectionArray[i].id ); if( SearchTreeItem ) { var Index = SearchTree.contentView.getIndexOfItem( SearchTreeItem ); SearchTree.treeBoxObject.ensureRowIsVisible( Index ); SearchTree.treeBoxObject.selection.select( Index ); } } } /*SearchTree.clearSelection(); if( EventSelectionArray.length > 0 ) { for( i = 0; i < EventSelectionArray.length; i++ ) { var SearchTreeItem = document.getElementById( "search-unifinder-treeitem-"+EventSelectionArray[i].id ); //you need this for when an event is added. It doesn't yet exist. if( SearchTreeItem ) SearchTree.addItemToSelection( SearchTreeItem ); } } dump( "\nAllow on select now!" ); SearchTree.removeAttribute( "suppressonselect" ); */ } } gCalendarWindow.EventSelection.addObserver( unifinderEventSelectionObserver );}
SearchTree.treeBoxObject.selection.select( Index );
SearchTree.treeBoxObject.selection.toggleSelect( Index );
function calendarUnifinderInit( ){ var unifinderEventSelectionObserver = { onSelectionChanged : function( EventSelectionArray ) { /* This no longer works since we moved to a tree */ var SearchTree = document.getElementById( "unifinder-search-results-listbox" ); SearchTree.setAttribute( "suppressonselect", "true" ); SearchTree.treeBoxObject.selection.select( -1 ); if( EventSelectionArray.length > 0 ) { for( i = 0; i < EventSelectionArray.length; i++ ) { var SearchTreeItem = document.getElementById( "search-unifinder-treeitem-"+EventSelectionArray[i].id ); if( SearchTreeItem ) { var Index = SearchTree.contentView.getIndexOfItem( SearchTreeItem ); SearchTree.treeBoxObject.ensureRowIsVisible( Index ); SearchTree.treeBoxObject.selection.select( Index ); } } } /*SearchTree.clearSelection(); if( EventSelectionArray.length > 0 ) { for( i = 0; i < EventSelectionArray.length; i++ ) { var SearchTreeItem = document.getElementById( "search-unifinder-treeitem-"+EventSelectionArray[i].id ); //you need this for when an event is added. It doesn't yet exist. if( SearchTreeItem ) SearchTree.addItemToSelection( SearchTreeItem ); } } dump( "\nAllow on select now!" ); SearchTree.removeAttribute( "suppressonselect" ); */ } } gCalendarWindow.EventSelection.addObserver( unifinderEventSelectionObserver );}
var SearchTree = document.getElementById( UnifinderTreeName );
function calendarUnifinderInit( ){ var unifinderEventSelectionObserver = { onSelectionChanged : function( EventSelectionArray ) { // XXX This selection observer needs to be re written. // Problems: When selecting everything, if( gCalendarEventTreeClicked === false ) { var SearchTree = document.getElementById( UnifinderTreeName ); if( EventSelectionArray.length > 1 ) { //get all the rows for the events for( i = 0; i < EventSelectionArray.length; i++ ) { var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[i] ); } //select all the rows in the tree. } else if( EventSelectionArray.length == 1 ) { SearchTree.treeBoxObject.selection.clearSelection( ); var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[0] ); SearchTree.treeBoxObject.ensureRowIsVisible( RowToScrollTo ); SearchTree.treeBoxObject.selection.timedSelect( RowToScrollTo, 1 ); } } gCalendarEventTreeClicked = false; } } gCalendarWindow.EventSelection.addObserver( unifinderEventSelectionObserver );}
SearchTree.treeBoxObject.selection.selectEventsSuppressed = true; SearchTree.onselect = null; SearchTree.removeEventListener( "select", unifinderOnSelect, true );
function calendarUnifinderInit( ){ var unifinderEventSelectionObserver = { onSelectionChanged : function( EventSelectionArray ) { // XXX This selection observer needs to be re written. // Problems: When selecting everything, if( gCalendarEventTreeClicked === false ) { var SearchTree = document.getElementById( UnifinderTreeName ); if( EventSelectionArray.length > 1 ) { //get all the rows for the events for( i = 0; i < EventSelectionArray.length; i++ ) { var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[i] ); } //select all the rows in the tree. } else if( EventSelectionArray.length == 1 ) { SearchTree.treeBoxObject.selection.clearSelection( ); var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[0] ); SearchTree.treeBoxObject.ensureRowIsVisible( RowToScrollTo ); SearchTree.treeBoxObject.selection.timedSelect( RowToScrollTo, 1 ); } } gCalendarEventTreeClicked = false; } } gCalendarWindow.EventSelection.addObserver( unifinderEventSelectionObserver );}
if( gCalendarEventTreeClicked === false )
if( EventSelectionArray.length > 1 )
function calendarUnifinderInit( ){ var unifinderEventSelectionObserver = { onSelectionChanged : function( EventSelectionArray ) { // XXX This selection observer needs to be re written. // Problems: When selecting everything, if( gCalendarEventTreeClicked === false ) { var SearchTree = document.getElementById( UnifinderTreeName ); if( EventSelectionArray.length > 1 ) { //get all the rows for the events for( i = 0; i < EventSelectionArray.length; i++ ) { var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[i] ); } //select all the rows in the tree. } else if( EventSelectionArray.length == 1 ) { SearchTree.treeBoxObject.selection.clearSelection( ); var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[0] ); SearchTree.treeBoxObject.ensureRowIsVisible( RowToScrollTo ); SearchTree.treeBoxObject.selection.timedSelect( RowToScrollTo, 1 ); } } gCalendarEventTreeClicked = false; } } gCalendarWindow.EventSelection.addObserver( unifinderEventSelectionObserver );}
var SearchTree = document.getElementById( UnifinderTreeName ); if( EventSelectionArray.length > 1 ) { for( i = 0; i < EventSelectionArray.length; i++ ) { var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[i] ); }
} else if( EventSelectionArray.length == 1 ) { var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[0] );
function calendarUnifinderInit( ){ var unifinderEventSelectionObserver = { onSelectionChanged : function( EventSelectionArray ) { // XXX This selection observer needs to be re written. // Problems: When selecting everything, if( gCalendarEventTreeClicked === false ) { var SearchTree = document.getElementById( UnifinderTreeName ); if( EventSelectionArray.length > 1 ) { //get all the rows for the events for( i = 0; i < EventSelectionArray.length; i++ ) { var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[i] ); } //select all the rows in the tree. } else if( EventSelectionArray.length == 1 ) { SearchTree.treeBoxObject.selection.clearSelection( ); var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[0] ); SearchTree.treeBoxObject.ensureRowIsVisible( RowToScrollTo ); SearchTree.treeBoxObject.selection.timedSelect( RowToScrollTo, 1 ); } } gCalendarEventTreeClicked = false; } } gCalendarWindow.EventSelection.addObserver( unifinderEventSelectionObserver );}
} else if( EventSelectionArray.length == 1 )
if( RowToScrollTo != "null" )
function calendarUnifinderInit( ){ var unifinderEventSelectionObserver = { onSelectionChanged : function( EventSelectionArray ) { // XXX This selection observer needs to be re written. // Problems: When selecting everything, if( gCalendarEventTreeClicked === false ) { var SearchTree = document.getElementById( UnifinderTreeName ); if( EventSelectionArray.length > 1 ) { //get all the rows for the events for( i = 0; i < EventSelectionArray.length; i++ ) { var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[i] ); } //select all the rows in the tree. } else if( EventSelectionArray.length == 1 ) { SearchTree.treeBoxObject.selection.clearSelection( ); var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[0] ); SearchTree.treeBoxObject.ensureRowIsVisible( RowToScrollTo ); SearchTree.treeBoxObject.selection.timedSelect( RowToScrollTo, 1 ); } } gCalendarEventTreeClicked = false; } } gCalendarWindow.EventSelection.addObserver( unifinderEventSelectionObserver );}
var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[0] );
function calendarUnifinderInit( ){ var unifinderEventSelectionObserver = { onSelectionChanged : function( EventSelectionArray ) { // XXX This selection observer needs to be re written. // Problems: When selecting everything, if( gCalendarEventTreeClicked === false ) { var SearchTree = document.getElementById( UnifinderTreeName ); if( EventSelectionArray.length > 1 ) { //get all the rows for the events for( i = 0; i < EventSelectionArray.length; i++ ) { var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[i] ); } //select all the rows in the tree. } else if( EventSelectionArray.length == 1 ) { SearchTree.treeBoxObject.selection.clearSelection( ); var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[0] ); SearchTree.treeBoxObject.ensureRowIsVisible( RowToScrollTo ); SearchTree.treeBoxObject.selection.timedSelect( RowToScrollTo, 1 ); } } gCalendarEventTreeClicked = false; } } gCalendarWindow.EventSelection.addObserver( unifinderEventSelectionObserver );}
gCalendarEventTreeClicked = false;
setTimeout( "resetSelection()", 1 );
function calendarUnifinderInit( ){ var unifinderEventSelectionObserver = { onSelectionChanged : function( EventSelectionArray ) { // XXX This selection observer needs to be re written. // Problems: When selecting everything, if( gCalendarEventTreeClicked === false ) { var SearchTree = document.getElementById( UnifinderTreeName ); if( EventSelectionArray.length > 1 ) { //get all the rows for the events for( i = 0; i < EventSelectionArray.length; i++ ) { var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[i] ); } //select all the rows in the tree. } else if( EventSelectionArray.length == 1 ) { SearchTree.treeBoxObject.selection.clearSelection( ); var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[0] ); SearchTree.treeBoxObject.ensureRowIsVisible( RowToScrollTo ); SearchTree.treeBoxObject.selection.timedSelect( RowToScrollTo, 1 ); } } gCalendarEventTreeClicked = false; } } gCalendarWindow.EventSelection.addObserver( unifinderEventSelectionObserver );}
SearchTree.treeBoxObject.selection.select( -1 );
SearchTree.treeBoxObject.selection.clearSelection( );
function calendarUnifinderInit( ){ var unifinderEventSelectionObserver = { onSelectionChanged : function( EventSelectionArray ) { if( gCalendarEventTreeClicked === false ) { var SearchTree = document.getElementById( UnifinderTreeName ); SearchTree.treeBoxObject.selection.select( -1 ); if( EventSelectionArray.length > 0 ) { for( i = 0; i < EventSelectionArray.length; i++ ) { var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[i] ); SearchTree.treeBoxObject.ensureRowIsVisible( RowToScrollTo ); SearchTree.treeBoxObject.selection.select( RowToScrollTo ); } } } gCalendarEventTreeClicked = false; SearchTree.focus(); } } gCalendarWindow.EventSelection.addObserver( unifinderEventSelectionObserver );}
SearchTree.treeBoxObject.selection.select( RowToScrollTo );
SearchTree.treeBoxObject.selection.timedSelect( RowToScrollTo, 1 );
function calendarUnifinderInit( ){ var unifinderEventSelectionObserver = { onSelectionChanged : function( EventSelectionArray ) { if( gCalendarEventTreeClicked === false ) { var SearchTree = document.getElementById( UnifinderTreeName ); SearchTree.treeBoxObject.selection.select( -1 ); if( EventSelectionArray.length > 0 ) { for( i = 0; i < EventSelectionArray.length; i++ ) { var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[i] ); SearchTree.treeBoxObject.ensureRowIsVisible( RowToScrollTo ); SearchTree.treeBoxObject.selection.select( RowToScrollTo ); } } } gCalendarEventTreeClicked = false; SearchTree.focus(); } } gCalendarWindow.EventSelection.addObserver( unifinderEventSelectionObserver );}
SearchTree.focus();
function calendarUnifinderInit( ){ var unifinderEventSelectionObserver = { onSelectionChanged : function( EventSelectionArray ) { if( gCalendarEventTreeClicked === false ) { var SearchTree = document.getElementById( UnifinderTreeName ); SearchTree.treeBoxObject.selection.select( -1 ); if( EventSelectionArray.length > 0 ) { for( i = 0; i < EventSelectionArray.length; i++ ) { var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[i] ); SearchTree.treeBoxObject.ensureRowIsVisible( RowToScrollTo ); SearchTree.treeBoxObject.selection.select( RowToScrollTo ); } } } gCalendarEventTreeClicked = false; SearchTree.focus(); } } gCalendarWindow.EventSelection.addObserver( unifinderEventSelectionObserver );}
this.localeDefaultsStringBundle = srGetStrBundle("chrome:
function CalendarView( calendarWindow ){ this.calendarWindow = calendarWindow;}
onError: function(aMessage) {}
onError: function(aMessage) {}, onCalendarAdded: function(aDeletedItem) { if (!this.mInBatch) calendarWindow.currentView.refreshEvents(); }, onCalendarRemoved: function(aDeletedItem) { if (!this.mInBatch) calendarWindow.currentView.refreshEvents(); }, onDefaultCalendarChanged: function(aNewDefaultCalendar) {}
function CalendarWindow( ){ //setup the preferences this.calendarPreferences = new calendarPreferences( this ); // miniMonth used by preferences this.miniMonth = document.getElementById( "lefthandcalendar" ); //setup the calendars this.calendarManager = new Object(); //this.calendarManager = new calendarManager( this ); //setup the calendar event selection this.EventSelection = new CalendarEventSelection( this ); //global date formater this.dateFormater = new DateFormater( this ); //the different views for the calendar this.monthView = new MonthView( this ); this.weekView = new WeekView( this ); this.dayView = new DayView( this ); this.multiweekView = new MultiweekView( this ); // we keep track of the selected date and the selected // event, start with selecting today. this.selectedEvent = null; this.selectedDate = new Date(); // set up the current view - we assume that this.currentView is NEVER null // after this this.currentView = null; //depending on the selected index, change views to that view. var SelectedIndex = document.getElementById( "calendar-deck" ).selectedIndex; switch( SelectedIndex ) { case "1": this.currentView = this.weekView; document.getElementById( "week-tree-hour-0" ).focus(); break; case "2": this.currentView = this.dayView; document.getElementById( "day-tree-item-0" ).focus(); break; case "3": this.currentView = this.multiweekView; break; default: this.currentView = this.monthView; break; } // now that everything is set up, we can start to observe the data source // make the observer, the calendarEventDataSource calls into the // observer when things change in the data source. var calendarWindow = this; var savedThis = this; var calendarObserver = { mInBatch: false, onStartBatch: function() { this.mInBatch = true; }, onEndBatch: function() { this.mInBatch = false; calendarWindow.currentView.refreshEvents(); }, onLoad: function() { if (!this.mInBatch) refreshEventTree(); }, onAddItem: function(aItem) { if (!this.mInBatch) calendarWindow.currentView.refreshEvents(); }, onModifyItem: function(aNewItem, aOldItem) { if (!this.mInBatch) calendarWindow.currentView.refreshEvents(); }, onDeleteItem: function(aDeletedItem) { if (!this.mInBatch) calendarWindow.currentView.refreshEvents(); }, onAlarm: function(aAlarmItem) {}, onError: function(aMessage) {} } var ccalendar = getDisplayComposite(); ccalendar.addObserver(calendarObserver);}
gViewController.selectionManager = this.EventSelection;
calendarViewController.selectionManager = this.EventSelection; this.availableViews = ["day", "week", "multiweek", "month"];
function CalendarWindow( ){ //setup the calendar event selection this.EventSelection = new CalendarEventSelection( this ); gViewController.selectionManager = this.EventSelection; /** This object only exists to keep too many things from breaking during the * switch to the new views **/ this.currentView = { hiliteTodaysDate: function() { document.getElementById("view-deck").selectedPanel.goToDay(now()); }, // This will get converted again to a calDateTime, which is silly, but let's // not change too much right now. getNewEventDate: function() { var d = document.getElementById("view-deck").selectedPanel.selectedDay; if (!d) d = now(); d = d.getInTimezone("floating"); d.hour = now().hour; return d.jsDate; }, get eventList() { return new Array(); }, goToNext: function() { document.getElementById("view-deck").selectedPanel.moveView(1); }, goToPrevious: function() { document.getElementById("view-deck").selectedPanel.moveView(-1); }, changeNumberOfWeeks: function(menuitem) { var mwView = document.getElementById("view-deck").selectedPanel; mwView.weeksInView = menuitem.value; }, get selectedDate() { return this.getNewEventDate(); }, get displayStartDate() { return document.getElementById("view-deck").selectedPanel.startDay; }, get displayEndDate() { return document.getElementById("view-deck").selectedPanel.endDay; }, getVisibleEvent: function(event) { var view = document.getElementById("view-deck").selectedPanel if ((event.startDate.compare(view.endDay) != 1) && (event.endDate.compare(view.startDay) != -1)) { return true; } return false; }, goToDay: function(newDate) { document.getElementById("view-deck").selectedPanel.goToDay(jsDateToDateTime(newDate)); }, refresh: function() { this.goToDay(this.getNewEventDate()); } }; // Get the last view that was shown before shutdown, and switch to it var SelectedIndex = document.getElementById("view-deck").selectedIndex; switch( SelectedIndex ) { case "1": this.switchToWeekView(); break; case "2": this.switchToMultiweekView(); break; case "3": this.switchToMonthView(); break; case "0": default: this.switchToDayView(); break; }}
this.switchToWeekView();
this.switchToView('week');
function CalendarWindow( ){ //setup the calendar event selection this.EventSelection = new CalendarEventSelection( this ); gViewController.selectionManager = this.EventSelection; /** This object only exists to keep too many things from breaking during the * switch to the new views **/ this.currentView = { hiliteTodaysDate: function() { document.getElementById("view-deck").selectedPanel.goToDay(now()); }, // This will get converted again to a calDateTime, which is silly, but let's // not change too much right now. getNewEventDate: function() { var d = document.getElementById("view-deck").selectedPanel.selectedDay; if (!d) d = now(); d = d.getInTimezone("floating"); d.hour = now().hour; return d.jsDate; }, get eventList() { return new Array(); }, goToNext: function() { document.getElementById("view-deck").selectedPanel.moveView(1); }, goToPrevious: function() { document.getElementById("view-deck").selectedPanel.moveView(-1); }, changeNumberOfWeeks: function(menuitem) { var mwView = document.getElementById("view-deck").selectedPanel; mwView.weeksInView = menuitem.value; }, get selectedDate() { return this.getNewEventDate(); }, get displayStartDate() { return document.getElementById("view-deck").selectedPanel.startDay; }, get displayEndDate() { return document.getElementById("view-deck").selectedPanel.endDay; }, getVisibleEvent: function(event) { var view = document.getElementById("view-deck").selectedPanel if ((event.startDate.compare(view.endDay) != 1) && (event.endDate.compare(view.startDay) != -1)) { return true; } return false; }, goToDay: function(newDate) { document.getElementById("view-deck").selectedPanel.goToDay(jsDateToDateTime(newDate)); }, refresh: function() { this.goToDay(this.getNewEventDate()); } }; // Get the last view that was shown before shutdown, and switch to it var SelectedIndex = document.getElementById("view-deck").selectedIndex; switch( SelectedIndex ) { case "1": this.switchToWeekView(); break; case "2": this.switchToMultiweekView(); break; case "3": this.switchToMonthView(); break; case "0": default: this.switchToDayView(); break; }}