From 90fc17aa1869e5e3a25462dcf40a00512724ad2c Mon Sep 17 00:00:00 2001 From: "mikep%oeone.com" Date: Thu, 12 Sep 2002 13:16:31 +0000 Subject: [PATCH] Fixing if statement for imap URLs. git-svn-id: svn://10.0.0.236/trunk@129337 18797224-902f-48f8-a5cc-f745e15eee43 --- .../resources/content/calendarManager.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/mozilla/calendar/resources/content/calendarManager.js b/mozilla/calendar/resources/content/calendarManager.js index fc1017db82f..e553f82934e 100644 --- a/mozilla/calendar/resources/content/calendarManager.js +++ b/mozilla/calendar/resources/content/calendarManager.js @@ -442,17 +442,24 @@ calendarManager.prototype.checkCalendarURL = function calMan_checkCalendarURL( C if( calendarSubscribed === false ) { - //not subscribed, prompt the user to do so. - var arrayForNames = CalendarURL.split( "/" ); - var CalendarNameWithExtension = arrayForNames[ arrayForNames.length - 1 ]; - var CalendarName = CalendarNameWithExtension.replace( ".ics", "" ); + if( CalendarURL.indexOf( "imap://" ) != -1 ) + { + //this is an imap email message, download it to a file and show it. + alert( "We don't yet support email messages" ); + } + else + { + //not subscribed, prompt the user to do so. + var arrayForNames = CalendarURL.split( "/" ); + var CalendarNameWithExtension = arrayForNames[ arrayForNames.length - 1 ]; + var CalendarName = CalendarNameWithExtension.replace( ".ics", "" ); - this.launchAddCalendarDialog( CalendarName, CalendarURL ); + this.launchAddCalendarDialog( CalendarName, CalendarURL ); + } } else { //calendarSubscribed is the subscribed calendar object. - }