From 75bef53af57a70dd7e0b79600a048c42076743ba Mon Sep 17 00:00:00 2001 From: "mikep%oeone.com" Date: Tue, 10 Sep 2002 18:26:37 +0000 Subject: [PATCH] Adding in publishing, small fixes for wording and look and feel. --- calendar/resources/content/calendar.js | 17 +- .../resources/content/calendarImportExport.js | 2 +- .../content/calendarPublishDialog.js | 125 +++++++++++++++ .../content/calendarPublishDialog.xul | 148 ++++++++++++++++++ .../resources/content/calendarServerDialog.js | 4 +- .../content/calendarServerDialog.xul | 58 ++++--- calendar/resources/content/importExport.js | 2 +- calendar/resources/content/publishDialog.js | 125 +++++++++++++++ calendar/resources/content/publishDialog.xul | 148 ++++++++++++++++++ calendar/resources/content/serverDialog.js | 4 +- calendar/resources/content/serverDialog.xul | 58 ++++--- calendar/resources/jar.mn | 2 + calendar/resources/locale/en-US/calendar.dtd | 22 ++- 13 files changed, 667 insertions(+), 48 deletions(-) create mode 100644 calendar/resources/content/calendarPublishDialog.js create mode 100644 calendar/resources/content/calendarPublishDialog.xul create mode 100644 calendar/resources/content/publishDialog.js create mode 100644 calendar/resources/content/publishDialog.xul diff --git a/calendar/resources/content/calendar.js b/calendar/resources/content/calendar.js index 84b81181f0a0..6db4c9da696e 100644 --- a/calendar/resources/content/calendar.js +++ b/calendar/resources/content/calendar.js @@ -770,19 +770,26 @@ function print() { // print sample monthcalendar if in month-view, and june is selected if( gCalendarWindow.currentView == gCalendarWindow.monthView && gCalendarWindow.getSelectedDate().getMonth() == 5) - printEventArray( - gCalendarWindow.EventSelection.selectedEvents, "chrome://calendar/content/converters/ecsJune.xsl" ); + printEventArray( gCalendarWindow.EventSelection.selectedEvents, "chrome://calendar/content/converters/ecsJune.xsl" ); else - printEventArray( - gCalendarWindow.EventSelection.selectedEvents, "chrome://calendar/content/converters/sortEvents.xsl" ); + printEventArray( gCalendarWindow.EventSelection.selectedEvents, "chrome://calendar/content/converters/sortEvents.xsl" ); } function publishCalendarData() +{ + var args = new Object(); + + args.onOk = self.publishCalendarDataDialogResponse; + + openDialog("chrome://calendar/content/calendarPublishDialog.xul", "caPublishEvents", "chrome,modal", args ); +} + +function publishCalendarDataDialogResponse( CalendarPublishObject ) { var calendarString = eventArrayToICalString( gCalendarWindow.EventSelection.selectedEvents ); - calendarPublish(calendarString, "http://localhost/webdav/", "TestCalendar.ics", "", "", "text/calendar"); + calendarPublish(calendarString, CalendarPublishObject.url, CalendarPublishObject.remotePath, CalendarPublishObject.username, CalendarPublishObject.password, "text/calendar"); } /* diff --git a/calendar/resources/content/calendarImportExport.js b/calendar/resources/content/calendarImportExport.js index 3cdd6a91cbfb..0e8f293d5061 100644 --- a/calendar/resources/content/calendarImportExport.js +++ b/calendar/resources/content/calendarImportExport.js @@ -124,7 +124,7 @@ function loadEventsFromFile() var buttonPressed = promptService.confirmEx(window, - "Import", "About to import " + calendarEventArray.length + " event(s). Do you want to open all events to import before importing?", + "Import", "About to import " + calendarEventArray.length + " event(s).\nDo you want to open all events to import before importing?", (promptService.BUTTON_TITLE_YES * promptService.BUTTON_POS_0) + (promptService.BUTTON_TITLE_NO * promptService.BUTTON_POS_1) + (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_2), diff --git a/calendar/resources/content/calendarPublishDialog.js b/calendar/resources/content/calendarPublishDialog.js new file mode 100644 index 000000000000..50060785fb22 --- /dev/null +++ b/calendar/resources/content/calendarPublishDialog.js @@ -0,0 +1,125 @@ +/* ***** 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): Garth Smedley + * Mike Potter + * Colin Phillips + * Chris Charabaruk + * ArentJan Banck + * + * 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 ***** */ + + + +/***** calendar/calendarEventDialog.js +* AUTHOR +* Garth Smedley +* REQUIRED INCLUDES +*