diff options
author | Georg Ehrke <georg.stefan.germany@googlemail.com> | 2011-10-15 17:16:00 +0200 |
---|---|---|
committer | Georg Ehrke <georg.stefan.germany@googlemail.com> | 2011-10-15 17:16:00 +0200 |
commit | 323a98adb79b84192085208798525be831b33e81 (patch) | |
tree | 1bbf1ad7769b606c90485edf1f871337b2f9b1e3 /apps/calendar | |
parent | ea8461e83d83e17820518b844f7bb0d71685a88c (diff) | |
parent | c383543ec9d56db12fdf6d796ea95667dd3f1c45 (diff) | |
download | nextcloud-server-323a98adb79b84192085208798525be831b33e81.tar.gz nextcloud-server-323a98adb79b84192085208798525be831b33e81.zip |
Merge branch 'master' of gitorious.org:owncloud/owncloud into calendar
Diffstat (limited to 'apps/calendar')
-rw-r--r-- | apps/calendar/ajax/editcalendar.php | 11 | ||||
-rw-r--r-- | apps/calendar/ajax/newcalendar.php | 2 | ||||
-rw-r--r-- | apps/calendar/export.php | 4 | ||||
-rw-r--r-- | apps/calendar/js/calendar.js | 5 | ||||
-rw-r--r-- | apps/calendar/lib/calendar.php | 12 | ||||
-rw-r--r-- | apps/calendar/lib/connector_sabre.php | 1 |
6 files changed, 20 insertions, 15 deletions
diff --git a/apps/calendar/ajax/editcalendar.php b/apps/calendar/ajax/editcalendar.php index 5f61cf50135..d23e5287868 100644 --- a/apps/calendar/ajax/editcalendar.php +++ b/apps/calendar/ajax/editcalendar.php @@ -11,17 +11,8 @@ $l10n = new OC_L10N('calendar'); if(!OC_USER::isLoggedIn()) { die("<script type=\"text/javascript\">document.location = oc_webroot;</script>"); } -$calendarcolor_options = array( - 'ff0000', // "Red" - '00ff00', // "Green" - 'ffff00', // "Yellow" - '808000', // "Olive" - 'ffa500', // "Orange" - 'ff7f50', // "Coral" - 'ee82ee', // "Violet" - 'ecc255', // dark yellow -); OC_JSON::checkAppEnabled('calendar'); +$calendarcolor_options = OC_Calendar_Calendar::getCalendarColorOptions(); $calendar = OC_Calendar_Calendar::findCalendar($_GET['calendarid']); $tmpl = new OC_Template("calendar", "part.editcalendar"); $tmpl->assign('new', false); diff --git a/apps/calendar/ajax/newcalendar.php b/apps/calendar/ajax/newcalendar.php index f00dd0fb862..a7935c95672 100644 --- a/apps/calendar/ajax/newcalendar.php +++ b/apps/calendar/ajax/newcalendar.php @@ -12,6 +12,7 @@ if(!OC_USER::isLoggedIn()) { die("<script type=\"text/javascript\">document.location = oc_webroot;</script>"); } OC_JSON::checkAppEnabled('calendar'); +$calendarcolor_options = OC_Calendar_Calendar::getCalendarColorOptions(); $calendar = array( 'id' => 'new', 'displayname' => '', @@ -19,6 +20,7 @@ $calendar = array( ); $tmpl = new OC_Template('calendar', 'part.editcalendar'); $tmpl->assign('new', true); +$tmpl->assign('calendarcolor_options', $calendarcolor_options); $tmpl->assign('calendar', $calendar); $tmpl->printPage(); ?> diff --git a/apps/calendar/export.php b/apps/calendar/export.php index b3e5ecd6834..3e93a1ad618 100644 --- a/apps/calendar/export.php +++ b/apps/calendar/export.php @@ -9,8 +9,8 @@ require_once ("../../lib/base.php"); OC_Util::checkLoggedIn(); OC_Util::checkAppEnabled('calendar'); -$cal = $_GET["calid"]; -$event = $_GET["eventid"]; +$cal = isset($_GET["calid"]) ? $_GET["calid"] : NULL; +$event = isset($_GET["eventid"]) ? $_GET["eventid"] : NULL; if(isset($cal)){ $calendar = OC_Calendar_Calendar::findCalendar($cal); if($calendar["userid"] != OC_User::getUser()){ diff --git a/apps/calendar/js/calendar.js b/apps/calendar/js/calendar.js index 512946ad1be..2917d9f9134 100644 --- a/apps/calendar/js/calendar.js +++ b/apps/calendar/js/calendar.js @@ -112,7 +112,7 @@ Calendar={ formatTime:function(date){ return date[3] + ':' + date[4]; }, - updateView:function(task) { + updateView:function() { this.current.removeEvents(); this.current.renderCal(); this.current.showEvents(); @@ -516,7 +516,8 @@ Calendar={ }, newCalendar:function(object){ var tr = $(document.createElement('tr')) - .load(OC.filePath('calendar', 'ajax', 'newcalendar.php')); + .load(OC.filePath('calendar', 'ajax', 'newcalendar.php'), + function(){Calendar.UI.Calendar.colorPicker(this)}); $(object).closest('tr').after(tr).hide(); }, edit:function(object, calendarid){ diff --git a/apps/calendar/lib/calendar.php b/apps/calendar/lib/calendar.php index 959cb14bf8f..c19c0e73c08 100644 --- a/apps/calendar/lib/calendar.php +++ b/apps/calendar/lib/calendar.php @@ -228,4 +228,16 @@ class OC_Calendar_Calendar{ list($prefix,$userid) = Sabre_DAV_URLUtil::splitPath($principaluri); return $userid; } + public static function getCalendarColorOptions(){ + return array( + 'ff0000', // "Red" + '00ff00', // "Green" + 'ffff00', // "Yellow" + '808000', // "Olive" + 'ffa500', // "Orange" + 'ff7f50', // "Coral" + 'ee82ee', // "Violet" + 'ecc255', // dark yellow + ); + } } diff --git a/apps/calendar/lib/connector_sabre.php b/apps/calendar/lib/connector_sabre.php index 13a542fccad..263fb7ffde5 100644 --- a/apps/calendar/lib/connector_sabre.php +++ b/apps/calendar/lib/connector_sabre.php @@ -10,7 +10,6 @@ class OC_Connector_Sabre_CalDAV extends Sabre_CalDAV_Backend_Abstract { */ public $propertyMap = array( '{DAV:}displayname' => 'displayname', - '{urn:ietf:params:xml:ns:caldav}calendar-description' => 'description', '{urn:ietf:params:xml:ns:caldav}calendar-timezone' => 'timezone', '{http://apple.com/ns/ical/}calendar-order' => 'calendarorder', '{http://apple.com/ns/ical/}calendar-color' => 'calendarcolor', |