# HG changeset patch # User Frank-Rainer Grahl # Parent d93d8c75b5b44f15e13e0a4551ab6872bf41d175 Bug 1474490 - Restore spinbox and number boxes in SeaMonkey. diff --git a/common/bindings/numberbox.xml b/common/bindings/numberbox.xml --- a/common/bindings/numberbox.xml +++ b/common/bindings/numberbox.xml @@ -4,20 +4,25 @@ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> +#ifdef MOZ_SUITE + + + +#else - +#endif diff --git a/mail/base/jar.mn b/mail/base/jar.mn --- a/mail/base/jar.mn +++ b/mail/base/jar.mn @@ -40,17 +40,17 @@ messenger.jar: content/messenger/mailWidgets.xml (content/mailWidgets.xml) content/messenger/customizeToolbar.css (../../common/src/customizeToolbar.css) content/messenger/customizeToolbar.js (../../common/src/customizeToolbar.js) * content/messenger/customizeToolbar.xul (../../common/src/customizeToolbar.xul) content/messenger/viewSource.css (../../common/src/viewSource.css) content/messenger/viewSource.js (../../common/src/viewSource.js) * content/messenger/viewSource.xul (../../common/src/viewSource.xul) * content/messenger/datetimepicker.xml (../../common/bindings/datetimepicker.xml) - content/messenger/numberbox.xml (../../common/bindings/numberbox.xml) +* content/messenger/numberbox.xml (../../common/bindings/numberbox.xml) content/messenger/generalBindings.xml (../../common/bindings/generalBindings.xml) * content/messenger/spinbuttons.xml (../../common/bindings/spinbuttons.xml) * content/messenger/textbox.xml (../../common/bindings/textbox.xml) * content/messenger/toolbar.xml (../../common/bindings/toolbar.xml) content/messenger/attachmentList.css (content/attachmentList.css) * content/messenger/bindings.css (content/bindings.css) content/messenger/nsDragAndDrop.js (content/nsDragAndDrop.js) content/messenger/editContactOverlay.js (content/editContactOverlay.js) diff --git a/suite/base/content/communicator.css b/suite/base/content/communicator.css --- a/suite/base/content/communicator.css +++ b/suite/base/content/communicator.css @@ -308,8 +308,22 @@ datepicker { datepicker[type="popup"] { -moz-binding: url("chrome://communicator/content/bindings/datetimepicker.xml#datepicker-popup"); } datepicker[type="grid"] { -moz-binding: url("chrome://communicator/content/bindings/datetimepicker.xml#datepicker-grid"); } + +/******* numberboxe *******/ +textbox[type="number"] { + -moz-binding: url('chrome://communicator/content/bindings/numberbox.xml#numberbox'); +} + +/******* spinbuttons *******/ +spinbuttons { + -moz-binding: url("chrome://communicator/content/bindings/spinbuttons.xml#spinbuttons"); +} + +.spinbuttons-button { + -moz-user-focus: ignore; +} diff --git a/suite/components/bindings/jar.mn b/suite/components/bindings/jar.mn --- a/suite/components/bindings/jar.mn +++ b/suite/components/bindings/jar.mn @@ -6,12 +6,15 @@ comm.jar: content/communicator/customizeToolbar.css (../../../common/src/customizeToolbar.css) content/communicator/customizeToolbar.js (../../../common/src/customizeToolbar.js) * content/communicator/customizeToolbar.xul (../../../common/src/customizeToolbar.xul) * content/communicator/bindings/datetimepicker.xml (../../../common/bindings/datetimepicker.xml) content/communicator/bindings/findbar.xml (findbar.xml) content/communicator/bindings/general.xml (general.xml) content/communicator/bindings/generalBindings.xml (../../../common/bindings/generalBindings.xml) content/communicator/bindings/notification.xml (notification.xml) +* content/communicator/bindings/numberbox.xml (../../../common/bindings/numberbox.xml) * content/communicator/bindings/preferences.xml (../../../common/bindings/preferences.xml) +* content/communicator/bindings/spinbuttons.xml (../../../common/bindings/spinbuttons.xml) +* content/communicator/bindings/textbox.xml (../../../common/bindings/textbox.xml) * content/communicator/bindings/toolbar.xml (../../../common/bindings/toolbar.xml) content/communicator/bindings/toolbar-xpfe.xml (toolbar-xpfe.xml) * content/communicator/bindings/prefwindow.xml (prefwindow.xml) diff --git a/suite/themes/classic/communicator/numberbox.css b/suite/themes/classic/communicator/numberbox.css new file mode 100644 --- /dev/null +++ b/suite/themes/classic/communicator/numberbox.css @@ -0,0 +1,23 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); +@namespace html url("http://www.w3.org/1999/xhtml"); + +textbox[type="number"] { + padding: 0 !important; + cursor: default; +} + +html|*.numberbox-input { + text-align: right; +} + +.numberbox-input-box { + -moz-box-align: center; +} + +textbox[hidespinbuttons="true"] > .numberbox-input-box { + -moz-appearance: textfield; +} diff --git a/suite/themes/classic/communicator/spinbuttons.css b/suite/themes/classic/communicator/spinbuttons.css new file mode 100644 --- /dev/null +++ b/suite/themes/classic/communicator/spinbuttons.css @@ -0,0 +1,24 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); + +spinbuttons { + -moz-appearance: spinner; + cursor: default; +} + +.spinbuttons-button { + min-width: 13px; + min-height: 11px; + margin: 0 !important; +} + +.spinbuttons-up { + -moz-appearance: spinner-upbutton; +} + +.spinbuttons-down { + -moz-appearance: spinner-downbutton; +} diff --git a/suite/themes/classic/jar.mn b/suite/themes/classic/jar.mn --- a/suite/themes/classic/jar.mn +++ b/suite/themes/classic/jar.mn @@ -16,17 +16,19 @@ classic.jar: #ifdef XP_MACOSX skin/classic/communicator/aboutPrivateBrowsing.css (mac/communicator/aboutPrivateBrowsing.css) skin/classic/communicator/aboutSessionRestore.css (mac/communicator/aboutSessionRestore.css) skin/classic/communicator/button.css (mac/communicator/button.css) skin/classic/communicator/communicator.css (mac/communicator/communicator.css) skin/classic/communicator/customizeToolbar.css (mac/communicator/customizeToolbar.css) skin/classic/communicator/config.css (mac/communicator/config.css) skin/classic/communicator/datetimepicker.css (mac/communicator/datetimepicker.css) + skin/classic/communicator/numberbox.css (mac/communicator/numberbox.css) skin/classic/communicator/preferences.css (mac/communicator/preferences.css) + skin/classic/communicator/spinbuttons.css (mac/communicator/spinbuttons.css) skin/classic/communicator/toolbar.css (mac/communicator/toolbar.css) skin/classic/communicator/viewSourceOverlay.css (mac/communicator/viewSourceOverlay.css) skin/classic/communicator/console/console-error-caret.gif (mac/communicator/console/console-error-caret.gif) skin/classic/communicator/console/console-error-dash.gif (mac/communicator/console/console-error-dash.gif) skin/classic/communicator/console/console.css (mac/communicator/console/console.css) skin/classic/communicator/downloads/downloadButtons.png (mac/communicator/downloads/downloadButtons.png) skin/classic/communicator/downloads/progressBg.png (mac/communicator/downloads/progressBg.png) skin/classic/communicator/downloads/downloadmanager.css (mac/communicator/downloads/downloadmanager.css) @@ -67,21 +69,25 @@ classic.jar: skin/classic/communicator/aboutPrivateBrowsing.css (communicator/aboutPrivateBrowsing.css) skin/classic/communicator/aboutSessionRestore.css (communicator/aboutSessionRestore.css) skin/classic/communicator/button.css (communicator/button.css) skin/classic/communicator/config.css (communicator/config.css) skin/classic/communicator/customizeToolbar.css (communicator/customizeToolbar.css) skin/classic/communicator/datetimepicker.css (communicator/datetimepicker.css) #ifdef MOZ_WIDGET_GTK skin/classic/communicator/communicator.css (linux/communicator/communicator.css) + skin/classic/communicator/numberbox.css (linux/communicator/numberbox.css) skin/classic/communicator/preferences.css (linux/communicator/preferences.css) skin/classic/communicator/scrollbars.css (linux/communicator/scrollbars.css) + skin/classic/communicator/spinbuttons.css (linux/communicator/spinbuttons.css) #else skin/classic/communicator/communicator.css (communicator/communicator.css) + skin/classic/communicator/numberbox.css (communicator/numberbox.css) skin/classic/communicator/preferences.css (communicator/preferences.css) + skin/classic/communicator/spinbuttons.css (communicator/spinbuttons.css) #endif skin/classic/communicator/toolbar.css (communicator/toolbar.css) skin/classic/communicator/viewSourceOverlay.css (communicator/viewSourceOverlay.css) skin/classic/communicator/console/console.css (communicator/console/console.css) skin/classic/communicator/console/console-error-caret.gif (communicator/console/console-error-caret.gif) skin/classic/communicator/console/console-error-dash.gif (communicator/console/console-error-dash.gif) skin/classic/communicator/console/console-toolbar.png (communicator/console/console-toolbar.png) skin/classic/communicator/console/itemSelected.png (communicator/console/itemSelected.png) diff --git a/suite/themes/classic/linux/communicator/numberbox.css b/suite/themes/classic/linux/communicator/numberbox.css new file mode 100644 --- /dev/null +++ b/suite/themes/classic/linux/communicator/numberbox.css @@ -0,0 +1,29 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); +@namespace html url("http://www.w3.org/1999/xhtml"); + +textbox[type="number"] { + -moz-appearance: none; + padding: 0 !important; + border: none; + cursor: default; + background-color: transparent; +} + +html|*.numberbox-input { + text-align: right; +} + +.numberbox-input-box { + -moz-box-align: center; + -moz-appearance: spinner-textfield; + margin-right: -1px; + padding: 3px; +} + +textbox[hidespinbuttons="true"] > .numberbox-input-box { + -moz-appearance: textfield; +} diff --git a/suite/themes/classic/linux/communicator/spinbuttons.css b/suite/themes/classic/linux/communicator/spinbuttons.css new file mode 100644 --- /dev/null +++ b/suite/themes/classic/linux/communicator/spinbuttons.css @@ -0,0 +1,24 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); + +spinbuttons { + -moz-appearance: spinner; + cursor: default; +} + +.spinbuttons-button { + min-width: 13px; + min-height: 11px; + margin: 0 !important; +} + +.spinbuttons-up { + -moz-appearance: spinner-upbutton; +} + +.spinbuttons-down { + -moz-appearance: spinner-downbutton; +} diff --git a/suite/themes/classic/mac/communicator/numberbox.css b/suite/themes/classic/mac/communicator/numberbox.css new file mode 100644 --- /dev/null +++ b/suite/themes/classic/mac/communicator/numberbox.css @@ -0,0 +1,25 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); +@namespace html url("http://www.w3.org/1999/xhtml"); + +textbox[type="number"] { + -moz-appearance: none; + -moz-box-align: center; + padding: 0 !important; + border: none; + background-color: transparent; + cursor: default; +} + +html|*.numberbox-input { + text-align: right; + padding: 0 1px !important; +} + +.numberbox-input-box { + -moz-appearance: textfield; + margin-right: 4px; +} diff --git a/suite/themes/classic/mac/communicator/spinbuttons.css b/suite/themes/classic/mac/communicator/spinbuttons.css new file mode 100644 --- /dev/null +++ b/suite/themes/classic/mac/communicator/spinbuttons.css @@ -0,0 +1,31 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); + +spinbuttons { + height: 24px; + min-height: 24px; + -moz-appearance: spinner; + cursor: default; +} + +.spinbuttons-up { + -moz-appearance: none; + -moz-box-flex: 1; + min-width: 1px; + min-height: 1px; + margin: 0; + padding: 0; +} + +.spinbuttons-down { + -moz-appearance: none; + -moz-box-flex: 1; + min-width: 1px; + min-height: 1px; + margin: 0; + padding: 0; +} + diff --git a/suite/themes/modern/global/numberbox.css b/suite/themes/modern/communicator/numberbox.css rename from suite/themes/modern/global/numberbox.css rename to suite/themes/modern/communicator/numberbox.css diff --git a/suite/themes/modern/global/spinbuttons.css b/suite/themes/modern/communicator/spinbuttons.css rename from suite/themes/modern/global/spinbuttons.css rename to suite/themes/modern/communicator/spinbuttons.css diff --git a/suite/themes/modern/jar.mn b/suite/themes/modern/jar.mn --- a/suite/themes/modern/jar.mn +++ b/suite/themes/modern/jar.mn @@ -17,18 +17,20 @@ modern.jar: % style chrome://communicator/content/customizeToolbar.xul chrome://messenger/skin/messengercompose/messengercompose.css % style chrome://communicator/content/customizeToolbar.xul chrome://messenger/skin/smime/msgCompSMIMEOverlay.css % style chrome://communicator/content/customizeToolbar.xul chrome://messenger/skin/addressbook/addressbook.css skin/modern/communicator/brand.css (communicator/brand.css) skin/modern/communicator/blockedSite.css (communicator/blockedSite.css) skin/modern/communicator/certError.css (communicator/certError.css) skin/modern/communicator/customizeToolbar.css (communicator/customizeToolbar.css) skin/modern/communicator/datetimepicker.css (communicator/datetimepicker.css) + skin/modern/communicator/numberbox.css (communicator/numberbox.css) skin/modern/communicator/prefpanels.css (communicator/prefpanels.css) skin/modern/communicator/preferences.css (communicator/preferences.css) + skin/modern/communicator/spinbuttons.css (communicator/spinbuttons.css) skin/modern/communicator/tasksOverlay.css (communicator/tasksOverlay.css) skin/modern/communicator/button.css (communicator/button.css) skin/modern/communicator/toolbar.css (communicator/toolbar.css) skin/modern/communicator/dialogs.css (communicator/dialogs.css) skin/modern/communicator/smileys.css (communicator/smileys.css) skin/modern/communicator/communicator.css (communicator/communicator.css) skin/modern/communicator/aboutPrivateBrowsing.css (communicator/aboutPrivateBrowsing.css) skin/modern/communicator/aboutSessionRestore.css (communicator/aboutSessionRestore.css) @@ -196,31 +198,29 @@ modern.jar: skin/modern/global/filefield.css (global/filefield.css) skin/modern/global/filepicker.css (global/filepicker.css) skin/modern/global/findBar.css (global/findBar.css) skin/modern/global/global.css (global/global.css) skin/modern/global/groupbox.css (global/groupbox.css) skin/modern/global/listbox.css (global/listbox.css) skin/modern/global/menu.css (global/menu.css) skin/modern/global/menulist.css (global/menulist.css) - skin/modern/global/numberbox.css (global/numberbox.css) skin/modern/global/netError.css (global/netError.css) skin/modern/global/notification.css (global/notification.css) skin/modern/global/plugins.css (global/plugins.css) skin/modern/global/popup.css (global/popup.css) skin/modern/global/preferences.css (global/preferences.css) skin/modern/global/printPreview.css (global/printPreview.css) skin/modern/global/printPageSetup.css (global/printPageSetup.css) skin/modern/global/progressmeter.css (global/progressmeter.css) skin/modern/global/radio.css (global/radio.css) skin/modern/global/resizer.css (global/resizer.css) skin/modern/global/richlistbox.css (global/richlistbox.css) skin/modern/global/scale.css (global/scale.css) skin/modern/global/scrollbox.css (global/scrollbox.css) - skin/modern/global/spinbuttons.css (global/spinbuttons.css) skin/modern/global/splitter.css (global/splitter.css) skin/modern/global/tabbox.css (global/tabbox.css) skin/modern/global/textbox.css (global/textbox.css) skin/modern/global/toolbar.css (global/toolbar.css) skin/modern/global/toolbarbutton.css (global/toolbarbutton.css) skin/modern/global/tree.css (global/tree.css) skin/modern/global/wizard.css (global/wizard.css) * skin/modern/global/scrollbars.css (global/scrollbars.css)