From 31df4c00eca8ac3de3f72ae01252147a289f15cd Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Fri, 13 Apr 2012 17:22:23 +0200 Subject: [PATCH 01/14] adding tipsy tooltips for file actions --- core/css/styles.css | 2 +- core/js/js.js | 4 +++- files/js/fileactions.js | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/core/css/styles.css b/core/css/styles.css index 9d9f6d98303..5c970191d62 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -106,7 +106,7 @@ label.infield { cursor: text !important; } #notification { z-index:101; cursor:pointer; background-color:#fc4; border:0; padding:0 .7em .3em; display:none; position:fixed; left:50%; top:0; -moz-border-radius-bottomleft:1em; -webkit-border-bottom-left-radius:1em; border-bottom-left-radius:1em; -moz-border-radius-bottomright:1em; -webkit-border-bottom-right-radius:1em; border-bottom-right-radius:1em; } -.action, .selectedActions a, #logout { opacity:.3; -webkit-transition:opacity 500ms; -moz-transition:opacity 500ms; -o-transition:opacity 500ms; transition:opacity 500ms; } +.action, .selectedActions a, #logout { opacity:.5; -webkit-transition:opacity 500ms; -moz-transition:opacity 500ms; -o-transition:opacity 500ms; transition:opacity 500ms; } .action { width: 16px; height: 16px; } .action:hover, .selectedActions a:hover, #logout:hover { opacity:1; } diff --git a/core/js/js.js b/core/js/js.js index 44b4f503b8c..2927299b03f 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -413,8 +413,10 @@ $(document).ready(function(){ $('.jp-controls .jp-previous').tipsy({gravity:'nw', fade:true, live:true}); $('.jp-controls .jp-next').tipsy({gravity:'n', fade:true, live:true}); $('.password .action').tipsy({gravity:'se', fade:true, live:true}); - $('.file_upload_button_wrapper').tipsy({gravity:'w', fade:true}); + $('.file_upload_button_wrapper').tipsy({gravity:'w', fade:true}); $('.selectedActions a.delete').tipsy({gravity: 'se', fade:true, live:true}); + $('a.action').tipsy({gravity:'s', fade:true, live:true}); + $('a.delete').tipsy({gravity: 'se', fade:true, live:true}); $('.selectedActions a').tipsy({gravity:'s', fade:true, live:true}); $('#headerSize').tipsy({gravity:'s', fade:true, live:true}); $('td.filesize').tipsy({gravity:'s', fade:true, live:true}); diff --git a/files/js/fileactions.js b/files/js/fileactions.js index b33be280ad5..60c4fadedd0 100644 --- a/files/js/fileactions.js +++ b/files/js/fileactions.js @@ -66,7 +66,7 @@ FileActions={ if(img.call){ img=img(file); } - var html='<?php echo $l->t('Edit categories'); ?> 1) { ?> From 7cf7d5c3dd1733fc936bdf51e8ab8af4ffd77836 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 13 Apr 2012 16:53:38 +0200 Subject: [PATCH 11/14] Calendar: Also set repeat options when editing a non repeating event --- apps/calendar/ajax/event/edit.form.php | 11 +++++++++-- apps/calendar/ajax/event/new.form.php | 1 - 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/calendar/ajax/event/edit.form.php b/apps/calendar/ajax/event/edit.form.php index a979836755b..98c22eb0206 100644 --- a/apps/calendar/ajax/event/edit.form.php +++ b/apps/calendar/ajax/event/edit.form.php @@ -235,7 +235,14 @@ if($repeat['repeat'] != 'doesnotrepeat'){ $tmpl->assign('repeat_bymonthday', $repeat['bymonthday']); $tmpl->assign('repeat_bymonth', $repeat['bymonth']); $tmpl->assign('repeat_byweekno', $repeat['byweekno']); +} else { + $tmpl->assign('repeat_month', 'monthday'); + $tmpl->assign('repeat_weekdays', array()); + $tmpl->assign('repeat_interval', 1); + $tmpl->assign('repeat_end', 'never'); + $tmpl->assign('repeat_count', '10'); + $tmpl->assign('repeat_weekofmonth', 'auto'); + $tmpl->assign('repeat_date', ''); + $tmpl->assign('repeat_year', 'bydate'); } $tmpl->printpage(); - -?> \ No newline at end of file diff --git a/apps/calendar/ajax/event/new.form.php b/apps/calendar/ajax/event/new.form.php index e7d52c675de..838002a3a09 100644 --- a/apps/calendar/ajax/event/new.form.php +++ b/apps/calendar/ajax/event/new.form.php @@ -71,4 +71,3 @@ $tmpl->assign('repeat_weekofmonth', 'auto'); $tmpl->assign('repeat_date', ''); $tmpl->assign('repeat_year', 'bydate'); $tmpl->printpage(); -?> From 471e735b0c26a4f845e8341a98fdc04067ee4cfa Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 13 Apr 2012 16:54:09 +0200 Subject: [PATCH 12/14] Calendar: Document active parameter in allCalendars --- apps/calendar/lib/calendar.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/calendar/lib/calendar.php b/apps/calendar/lib/calendar.php index 7eeb004d181..321f4c73ba0 100644 --- a/apps/calendar/lib/calendar.php +++ b/apps/calendar/lib/calendar.php @@ -44,10 +44,8 @@ class OC_Calendar_Calendar{ /** * @brief Returns the list of calendars for a specific user. * @param string $uid User ID - * @param boolean $active + * @param boolean $active Only return calendars with this $active state, default(=null) is don't care * @return array - * - * TODO: what is active for? */ public static function allCalendars($uid, $active=null){ $values = array($uid); From 4c520079964b8b3ecacb9ff6e74d60ac07f130fe Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 13 Apr 2012 18:36:20 +0200 Subject: [PATCH 13/14] Calendar: Update category list when updating/adding event --- apps/calendar/lib/app.php | 8 ++++++++ apps/calendar/lib/object.php | 2 ++ 2 files changed, 10 insertions(+) diff --git a/apps/calendar/lib/app.php b/apps/calendar/lib/app.php index 5e803ebf7bf..22c1133e006 100644 --- a/apps/calendar/lib/app.php +++ b/apps/calendar/lib/app.php @@ -116,6 +116,14 @@ class OC_Calendar_App{ } } + /** + * check VEvent for new categories. + * @see OC_VCategories::loadFromVObject + */ + public static function loadCategoriesFromVCalendar(OC_VObject $calendar) { + self::getVCategories()->loadFromVObject($calendar->VEVENT, true); + } + public static function getRepeatOptions(){ return OC_Calendar_Object::getRepeatOptions(self::$l10n); } diff --git a/apps/calendar/lib/object.php b/apps/calendar/lib/object.php index dbec61c67ec..d5622f6251f 100644 --- a/apps/calendar/lib/object.php +++ b/apps/calendar/lib/object.php @@ -93,6 +93,7 @@ class OC_Calendar_Object{ */ public static function add($id,$data){ $object = OC_VObject::parse($data); + OC_Calendar_App::loadCategoriesFromVCalendar($object); list($type,$startdate,$enddate,$summary,$repeating,$uid) = self::extractData($object); if(is_null($uid)){ @@ -139,6 +140,7 @@ class OC_Calendar_Object{ $oldobject = self::find($id); $object = OC_VObject::parse($data); + OC_Calendar_App::loadCategoriesFromVCalendar($object); list($type,$startdate,$enddate,$summary,$repeating,$uid) = self::extractData($object); $stmt = OC_DB::prepare( 'UPDATE *PREFIX*calendar_objects SET objecttype=?,startdate=?,enddate=?,repeating=?,summary=?,calendardata=?, lastmodified = ? WHERE id = ?' ); From b9f9228a22944184803a8835282862e468812c1d Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 13 Apr 2012 18:38:50 +0200 Subject: [PATCH 14/14] Contacts: Save the category list update when updating/adding contact --- apps/contacts/lib/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/contacts/lib/app.php b/apps/contacts/lib/app.php index 211e459e56f..78fdfe6a10a 100644 --- a/apps/contacts/lib/app.php +++ b/apps/contacts/lib/app.php @@ -195,7 +195,7 @@ class OC_Contacts_App { * @see OC_VCategories::loadFromVObject */ public static function loadCategoriesFromVCard(OC_VObject $contact) { - self::$categories->loadFromVObject($contact); + self::$categories->loadFromVObject($contact, true); } public static function setLastModifiedHeader($contact) {