From 89ece32c78ad5c813b7c8966257585640d02e276 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Thu, 19 Jun 2014 17:45:39 +0200 Subject: [PATCH] Fix calendar edit form labels and item selection --- plugins/calendar/calendar_ui.js | 7 +++++++ plugins/calendar/drivers/kolab/kolab_driver.php | 6 +++--- plugins/calendar/skins/larry/calendar.css | 8 ++++++-- plugins/calendar/skins/larry/templates/calendar.html | 2 +- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/plugins/calendar/calendar_ui.js b/plugins/calendar/calendar_ui.js index ff9e5b4d..3558d915 100644 --- a/plugins/calendar/calendar_ui.js +++ b/plugins/calendar/calendar_ui.js @@ -2832,6 +2832,13 @@ function rcube_calendar_ui(settings) e.stopPropagation(); } + }) + .on('keypress', 'input[type=checkbox]', function(e) { + // select calendar on + if (e.keyCode == 13) { + calendars_list.select(this.value); + return rcube_event.cancel(e); + } }); // register dbl-click handler to open calendar edit dialog diff --git a/plugins/calendar/drivers/kolab/kolab_driver.php b/plugins/calendar/drivers/kolab/kolab_driver.php index 457b83ee..ca14d89c 100644 --- a/plugins/calendar/drivers/kolab/kolab_driver.php +++ b/plugins/calendar/drivers/kolab/kolab_driver.php @@ -1282,8 +1282,9 @@ class kolab_driver extends calendar_driver $hidden_fields[] = array('name' => 'parent', 'value' => $path_imap); } else { - $select = kolab_storage::folder_selector('event', array('name' => 'parent'), $folder); + $select = kolab_storage::folder_selector('event', array('name' => 'parent', 'id' => 'calendar-parent'), $folder); $form['props']['fieldsets']['location']['content']['path'] = array( + 'id' => 'calendar-parent', 'label' => $this->cal->gettext('parentcalendar'), 'value' => $select->show(strlen($folder) ? $path_imap : ''), ); @@ -1363,10 +1364,9 @@ class kolab_driver extends calendar_driver if (is_array($form['content']) && !empty($form['content'])) { $table = new html_table(array('cols' => 2)); foreach ($form['content'] as $col => $colprop) { - $colprop['id'] = '_'.$col; $label = !empty($colprop['label']) ? $colprop['label'] : rcube_label($col); - $table->add('title', sprintf('', $colprop['id'], Q($label))); + $table->add('title', html::label($colprop['id'], Q($label))); $table->add(null, $colprop['value']); } $content = $table->show(); diff --git a/plugins/calendar/skins/larry/calendar.css b/plugins/calendar/skins/larry/calendar.css index 84169fd7..c2741748 100644 --- a/plugins/calendar/skins/larry/calendar.css +++ b/plugins/calendar/skins/larry/calendar.css @@ -1174,10 +1174,14 @@ a.dropdown-link:after { padding-right: 10px; } -#calendar-kolabform fieldset.tab { +#calendar-kolabform .tabsbar.ui-tabs-nav { + margin-bottom: 0; +} + +#calendar-kolabform fieldset.ui-tabs-panel { background: #efefef; display: block; - margin-top: 0.5em; + margin-top: 2px; padding: 0.5em 1em; } diff --git a/plugins/calendar/skins/larry/templates/calendar.html b/plugins/calendar/skins/larry/templates/calendar.html index 6fce4ca4..6e7ed499 100644 --- a/plugins/calendar/skins/larry/templates/calendar.html +++ b/plugins/calendar/skins/larry/templates/calendar.html @@ -42,7 +42,7 @@
-