From 5e13d83f37aa397c3d818bcac4ef0948e2135549 Mon Sep 17 00:00:00 2001 From: "vladimir%pobox.com" Date: Fri, 6 May 2005 21:29:54 +0000 Subject: [PATCH] b=260120, improvements to datepicker and timepicker, patch from andrew@progressivex.com, r=vladimir --- calendar/lightning/jar.mn | 16 +- .../content/datetimepickers/datepicker.css | 43 - .../content/datetimepickers/datepicker.xbl | 269 ----- .../datetimepickers/datetimepicker.css | 12 - .../datetimepickers/datetimepicker.xbl | 198 --- .../content/datetimepickers/minimonth.css | 6 +- .../content/datetimepickers/minimonth.xbl | 574 --------- .../content/datetimepickers/timepicker.css | 44 - .../content/datetimepickers/timepicker.xbl | 1074 ----------------- calendar/resources/content/eventDialog.xul | 2 +- calendar/resources/jar.mn | 16 +- 11 files changed, 18 insertions(+), 2236 deletions(-) delete mode 100755 calendar/resources/content/datetimepickers/datepicker.css delete mode 100755 calendar/resources/content/datetimepickers/datepicker.xbl delete mode 100755 calendar/resources/content/datetimepickers/datetimepicker.css delete mode 100755 calendar/resources/content/datetimepickers/datetimepicker.xbl delete mode 100755 calendar/resources/content/datetimepickers/minimonth.xbl delete mode 100755 calendar/resources/content/datetimepickers/timepicker.css delete mode 100755 calendar/resources/content/datetimepickers/timepicker.xbl diff --git a/calendar/lightning/jar.mn b/calendar/lightning/jar.mn index 5d47c2199777..5901a97ca317 100644 --- a/calendar/lightning/jar.mn +++ b/calendar/lightning/jar.mn @@ -21,14 +21,10 @@ calendar.jar: content/calendar/dateUtils.js (/calendar/resources/content/dateUtils.js) content/calendar/selectAddressesDialog.js (/calendar/resources/content/selectAddressesDialog.js) content/calendar/attachFile.js (/calendar/resources/content/attachFile.js) - content/calendar/datetimepickers/datepicker.css (/calendar/resources/content/datetimepickers/datepicker.css) - content/calendar/datetimepickers/datepicker.xbl (/calendar/resources/content/datetimepickers/datepicker.xbl) - content/calendar/datetimepickers/datetimepicker.css (/calendar/resources/content/datetimepickers/datetimepicker.css) - content/calendar/datetimepickers/datetimepicker.xbl (/calendar/resources/content/datetimepickers/datetimepicker.xbl) - content/calendar/datetimepickers/timepicker.css (/calendar/resources/content/datetimepickers/timepicker.css) - content/calendar/datetimepickers/timepicker.xbl (/calendar/resources/content/datetimepickers/timepicker.xbl) + content/calendar/datetimepickers/datetimepickers.css (/calendar/resources/content/datetimepickers/datetimepickers.css) + content/calendar/datetimepickers/datetimepickers.xml (/calendar/resources/content/datetimepickers/datetimepickers.xml) content/calendar/datetimepickers/minimonth.css (/calendar/resources/content/datetimepickers/minimonth.css) - content/calendar/datetimepickers/minimonth.xbl (/calendar/resources/content/datetimepickers/minimonth.xbl) + content/calendar/datetimepickers/minimonth.xml (/calendar/resources/content/datetimepickers/minimonth.xml) content/calendar/calendar-multiday-view.css (/calendar/base/content/calendar-multiday-view.css) content/calendar/calendar-multiday-view.xml (/calendar/base/content/calendar-multiday-view.xml) content/calendar/calendar-item-editing.js (/calendar/base/content/calendar-item-editing.js) @@ -56,3 +52,9 @@ classic.jar: #expand skin/classic/calendar/all_day_event_hover.png (/calendar/resources/skin/classic/all_day_event_hover.png) #expand skin/classic/calendar/all_day_event_down.png (/calendar/resources/skin/classic/all_day_event_down.png) #expand skin/classic/calendar/week-view-corner.png (/calendar/resources/skin/classic/week-view-corner.png) +#expand skin/classic/calendar/datetimepickers/datetimepickers.css (/calendar/resources/skin/classic/datetimepickers/datetimepickers.css) +#expand skin/classic/calendar/datetimepickers/minimonth.css (/calendar/resources/skin/classic/datetimepickers/minimonth.css) +#expand skin/classic/calendar/datetimepickers/left-arrow-hover.gif (/calendar/resources/skin/classic/datetimepickers/left-arrow-hover.gif) +#expand skin/classic/calendar/datetimepickers/left-arrow.gif (/calendar/resources/skin/classic/datetimepickers/left-arrow.gif) +#expand skin/classic/calendar/datetimepickers/right-arrow-hover.gif (/calendar/resources/skin/classic/datetimepickers/right-arrow-hover.gif) +#expand skin/classic/calendar/datetimepickers/right-arrow.gif (/calendar/resources/skin/classic/datetimepickers/right-arrow.gif) diff --git a/calendar/resources/content/datetimepickers/datepicker.css b/calendar/resources/content/datetimepickers/datepicker.css deleted file mode 100755 index c3338efaf30e..000000000000 --- a/calendar/resources/content/datetimepickers/datepicker.css +++ /dev/null @@ -1,43 +0,0 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is OEone Calendar Code, released October 31st, 2001. - * - * The Initial Developer of the Original Code is OEone Corporation. - * Portions created by the Initial Developer are Copyright (C) 2001 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -@import url("chrome://calendar/content/datetimepickers/minimonth.css"); - -@import url("chrome://calendar/skin/datetimepickers/datepicker.css"); - -datepicker { - -moz-binding: url("chrome://calendar/content/datetimepickers/datepicker.xbl#datepicker"); -} - diff --git a/calendar/resources/content/datetimepickers/datepicker.xbl b/calendar/resources/content/datetimepickers/datepicker.xbl deleted file mode 100755 index 2f735623381d..000000000000 --- a/calendar/resources/content/datetimepickers/datepicker.xbl +++ /dev/null @@ -1,269 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/calendar/resources/content/datetimepickers/datetimepicker.css b/calendar/resources/content/datetimepickers/datetimepicker.css deleted file mode 100755 index 593dd76cc5c8..000000000000 --- a/calendar/resources/content/datetimepickers/datetimepicker.css +++ /dev/null @@ -1,12 +0,0 @@ -@import url("chrome://calendar/content/datetimepickers/datepicker.css"); -@import url("chrome://calendar/content/datetimepickers/timepicker.css"); - -datetimepicker { - -moz-binding: url("chrome://calendar/content/datetimepickers/datetimepicker.xbl#datetimepicker"); -} - -.menu-right -{ - visibility : hidden; -} - diff --git a/calendar/resources/content/datetimepickers/datetimepicker.xbl b/calendar/resources/content/datetimepickers/datetimepicker.xbl deleted file mode 100755 index 7b8bb340539b..000000000000 --- a/calendar/resources/content/datetimepickers/datetimepicker.xbl +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >datetime()"); - this.kDatePicker = - document.getAnonymousElementByAttribute(this, "id", "date-picker"); - this.kTimePicker = - document.getAnonymousElementByAttribute(this, "id", "time-picker"); - - // init this.mValue: - var val = this.getAttribute("value"); - this.mValue = (val ? new Date(val) - : new Date()); - - // Make the function a member of the picker - // so that 'this' will be the picker - val = this.getAttribute("onchange"); - if (val) this.kCallback = function(){ eval( val ) }; - //java.lang.System.err.println("< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/calendar/resources/content/datetimepickers/minimonth.css b/calendar/resources/content/datetimepickers/minimonth.css index fee193e1e828..b973c1863e4c 100755 --- a/calendar/resources/content/datetimepickers/minimonth.css +++ b/calendar/resources/content/datetimepickers/minimonth.css @@ -1,14 +1,14 @@ @import url("chrome://calendar/skin/datetimepickers/minimonth.css"); minimonth { - -moz-binding: url("chrome://calendar/content/datetimepickers/minimonth.xbl#minimonth"); + -moz-binding: url("chrome://calendar/content/datetimepickers/minimonth.xml#minimonth"); } .minimonth-navbtn { - -moz-binding: url("chrome://calendar/content/datetimepickers/minimonth.xbl#minimonth-navbtn"); + -moz-binding: url("chrome://calendar/content/datetimepickers/minimonth.xml#minimonth-navbtn"); } .minimonth-day { - -moz-binding: url("chrome://calendar/content/datetimepickers/minimonth.xbl#minimonth-day"); + -moz-binding: url("chrome://calendar/content/datetimepickers/minimonth.xml#minimonth-day"); } diff --git a/calendar/resources/content/datetimepickers/minimonth.xbl b/calendar/resources/content/datetimepickers/minimonth.xbl deleted file mode 100755 index a1da519c76f7..000000000000 --- a/calendar/resources/content/datetimepickers/minimonth.xbl +++ /dev/null @@ -1,574 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - see bug 63370 for details - - var localeService = Components.classes[ - "@mozilla.org/intl/nslocaleservice;1" - ].getService(Components.interfaces.nsILocaleService); - - var stringBundleService = Components.classes[ - "@mozilla.org/intl/stringbundle;1" - ].getService(Components.interfaces.nsIStringBundleService); - - var bundleURL = "chrome://calendar/locale/dateFormat.properties"; - var dateBundle = stringBundleService.createBundle( - bundleURL, localeService.getApplicationLocale() - ); - - // Reset the headers - var header = document.getAnonymousNodes(this)[0]. - childNodes[1].childNodes[0] - ; - - for (var column = 0; column < header.childNodes.length; column++) { - - header.childNodes[column].setAttribute( "value", - dateBundle.GetStringFromName( - "day."+ - ((this.weekStart + column) % 7 + 1) + - ".short" - ) - ); - } - ]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/calendar/resources/content/datetimepickers/timepicker.css b/calendar/resources/content/datetimepickers/timepicker.css deleted file mode 100755 index 177ea486bf4a..000000000000 --- a/calendar/resources/content/datetimepickers/timepicker.css +++ /dev/null @@ -1,44 +0,0 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is OEone Calendar Code, released October 31st, 2001. - * - * The Initial Developer of the Original Code is OEone Corporation. - * Portions created by the Initial Developer are Copyright (C) 2001 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -@import url("chrome://calendar/skin/datetimepickers/timepicker.css"); - -timepicker { - -moz-binding: url("chrome://calendar/content/datetimepickers/timepicker.xbl#timepicker"); -} -timepicker-grids { - -moz-binding: url("chrome://calendar/content/datetimepickers/timepicker.xbl#timepicker-grids"); -} - diff --git a/calendar/resources/content/datetimepickers/timepicker.xbl b/calendar/resources/content/datetimepickers/timepicker.xbl deleted file mode 100755 index de28421b945b..000000000000 --- a/calendar/resources/content/datetimepickers/timepicker.xbl +++ /dev/null @@ -1,1074 +0,0 @@ - - - - - - - - - %dtd1; - %dtd2; -]> - - - - - -