From 688fd769400984f99c4727b0283b227df7a2121b Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Wed, 2 Apr 2014 16:25:28 +0200 Subject: [PATCH 1/2] Don't trigger 'select' event twice when selecting a list item --- program/js/list.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/program/js/list.js b/program/js/list.js index d54b59d24..476edae4b 100644 --- a/program/js/list.js +++ b/program/js/list.js @@ -1035,7 +1035,7 @@ invert_selection: function() /** * Unselect selected row(s) */ -clear_selection: function(id) +clear_selection: function(id, no_event) { var n, num_select = this.selection.length; @@ -1057,7 +1057,7 @@ clear_selection: function(id) this.selection = []; } - if (num_select && !this.selection.length) + if (num_select && !this.selection.length && !no_event) this.triggerEvent('select'); }, @@ -1110,7 +1110,7 @@ highlight_row: function(id, multiple, norecur) if (!multiple) { if (this.selection.length > 1 || !this.in_selection(id)) { - this.clear_selection(); + this.clear_selection(null, true); this.selection[0] = id; $(this.rows[id].obj).addClass('selected'); } From 509a6bc36882a9ed176ccc67ad0fc414093a44d9 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Wed, 2 Apr 2014 16:26:59 +0200 Subject: [PATCH 2/2] Allow to force-load plugins which have been loaded but not initialized before --- program/lib/Roundcube/rcube_plugin_api.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/program/lib/Roundcube/rcube_plugin_api.php b/program/lib/Roundcube/rcube_plugin_api.php index 461c3cc07..feeeb192e 100644 --- a/program/lib/Roundcube/rcube_plugin_api.php +++ b/program/lib/Roundcube/rcube_plugin_api.php @@ -182,7 +182,7 @@ class rcube_plugin_api } // plugin already loaded - if ($this->plugins[$plugin_name] || class_exists($plugin_name, false)) { + if ($this->plugins[$plugin_name]) { return true; } @@ -190,7 +190,9 @@ class rcube_plugin_api . DIRECTORY_SEPARATOR . $plugin_name . '.php'; if (file_exists($fn)) { - include $fn; + if (!class_exists($plugin_name, false)) { + include $fn; + } // instantiate class if exists if (class_exists($plugin_name, false)) {