diff --git a/calendar/resources/content/calendar.js b/calendar/resources/content/calendar.js index 0737710e0451..5abd91cc6a3c 100644 --- a/calendar/resources/content/calendar.js +++ b/calendar/resources/content/calendar.js @@ -249,6 +249,9 @@ function calendarInit() //All is settled, enable feedbacks to observers gICalLib.batchMode = false; + + var toolbox = document.getElementById("calendar-toolbox"); + toolbox.customizeDone = CalendarToolboxCustomizeDone; } // Set the date and time on the clock and set up a timeout to refresh the clock when the @@ -1599,3 +1602,30 @@ function srGetStrBundle(path) } return strBundle; } + +function CalendarCustomizeToolbar() +{ + // Disable the toolbar context menu items + var menubar = document.getElementById("main-menubar"); + for (var i = 0; i < menubar.childNodes.length; ++i) + menubar.childNodes[i].setAttribute("disabled", true); + + var cmd = document.getElementById("cmd_CustomizeToolbars"); + cmd.setAttribute("disabled", "true"); + + window.openDialog("chrome://calendar/content/customizeToolbar.xul", "CustomizeToolbar", + "chrome,all,dependent", document.getElementById("calendar-toolbox")); +} + +function CalendarToolboxCustomizeDone(aToolboxChanged) +{ + // 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"); + + // XXX Shouldn't have to do this, but I do + window.focus(); +} diff --git a/calendar/resources/locale/en-US/calendar.dtd b/calendar/resources/locale/en-US/calendar.dtd index 8e4bd0779a24..933383fbb524 100644 --- a/calendar/resources/locale/en-US/calendar.dtd +++ b/calendar/resources/locale/en-US/calendar.dtd @@ -294,6 +294,12 @@ + + + + + + diff --git a/calendar/resources/skin/classic/calendar.css b/calendar/resources/skin/classic/calendar.css index 2db4a6718123..bf06ffc52306 100644 --- a/calendar/resources/skin/classic/calendar.css +++ b/calendar/resources/skin/classic/calendar.css @@ -64,6 +64,7 @@ .toolbarbutton-1 { list-style-image: url("chrome://calendar/skin/btn1.png"); + -moz-box-orient: vertical; } diff --git a/calendar/sunbird/app/profile/sunbird.js b/calendar/sunbird/app/profile/sunbird.js index df113664fe55..84a2f64f1e59 100644 --- a/calendar/sunbird/app/profile/sunbird.js +++ b/calendar/sunbird/app/profile/sunbird.js @@ -41,7 +41,7 @@ // pref("startup.homepage_override_url","chrome://browser-region/locale/region.properties"); pref("general.startup.calendar", true); -pref("browser.chromeURL","chrome://browser/content/"); +pref("browser.chromeURL","chrome://calendar/content/"); pref("browser.hiddenWindowChromeURL", "chrome://browser/content/hiddenWindow.xul"); pref("xpinstall.dialog.confirm", "chrome://mozapps/content/xpinstall/xpinstallConfirm.xul"); pref("xpinstall.dialog.progress", "chrome://mozapps/content/downloads/downloads.xul"); diff --git a/calendar/sunbird/base/content/calendar.xul b/calendar/sunbird/base/content/calendar.xul index cdec9b5d1374..8dd19c0a825c 100644 --- a/calendar/sunbird/base/content/calendar.xul +++ b/calendar/sunbird/base/content/calendar.xul @@ -47,7 +47,6 @@ - @@ -132,6 +131,8 @@ + + @@ -403,14 +404,23 @@ observes="publish_calendar"/> + + + + - + - + + + - - + - - -