summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2013-12-02 14:40:51 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2013-12-02 14:40:51 (GMT)
commite250cb4101551ebe4af432d54c67cd73b044fad7 (patch)
tree47724782e7a5c6663885047cadc2ffcce73174b7 /plugins
parent8b2c1e0cbde96a74e35b348c6476a84a2fa5e42b (diff)
downloadroundcubemail-plugins-kolab-e250cb4101551ebe4af432d54c67cd73b044fad7.tar.gz
Fix infinite recurrsion and fix button state of smart upload button
Diffstat (limited to 'plugins')
-rw-r--r--plugins/kolab_files/kolab_files.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/plugins/kolab_files/kolab_files.js b/plugins/kolab_files/kolab_files.js
index 4e81c0f..3b8a58e 100644
--- a/plugins/kolab_files/kolab_files.js
+++ b/plugins/kolab_files/kolab_files.js
@@ -401,10 +401,10 @@ function kolab_files_upload_input(button)
// Note: now, I observe problem with cursor style on FF < 4 only
// Need position: relative (Bug #2615)
link.css({overflow: 'hidden', cursor: 'pointer', position: 'relative'})
- .mouseenter(function() { this.__isactive = true; })
+ .mouseenter(function() { this.__active = true; })
// place button under the cursor
.mousemove(function(e) {
- if (rcmail.commands['files-upload'] && this.__isactive)
+ if (rcmail.commands['files-upload'] && this.__active)
move_file_input(e);
// move the input away if button is disabled
else
@@ -412,17 +412,16 @@ function kolab_files_upload_input(button)
})
.mouseleave(function() {
file.css({top: '-10000px', left: '-10000px'});
- this.__isactive = false;
+ this.__active = false;
})
.attr('onclick', '') // remove default button action
.click(function(e) {
// forward click if mouse-enter event was missed
- if (this.__isactive)
- return;
-
- this.__isactive = true;
- move_file_input(e);
- file.trigger(e);
+ if (rcmail.commands['files-upload'] && !this.__active) {
+ this.__active = true;
+ move_file_input(e);
+ file.trigger(e);
+ }
})
.mouseleave() // initially disable/hide input
.append(file);