[prev in list] [next in list] [prev in thread] [next in thread]
List: kolab-commits
Subject: Branch 'roundcubemail-plugins-kolab-3.1' - 2 commits - plugins/kolab_files
From: Aleksander Machniak <machniak () kolabsys ! com>
Date: 2013-12-02 13:58:46
Message-ID: 20131202135846.D6B6C3EF1C1 () app01 ! kolabsys ! com
[Download RAW message or body]
plugins/kolab_files/kolab_files.js | 30 ++++++++++---
plugins/kolab_files/skins/larry/style.css | 1
plugins/kolab_files/skins/larry/templates/filepreview.html | 1
plugins/kolab_files/skins/larry/templates/files.html | 1
4 files changed, 25 insertions(+), 8 deletions(-)
New commits:
commit 5e74c4ca26c9feeebed9e21c36e65d9425e1ac3e
Author: Aleksander Machniak <machniak@kolabsys.com>
Date: Mon Dec 2 14:57:55 2013 +0100
Remove deprecated #message elements
diff --git a/plugins/kolab_files/skins/larry/style.css \
b/plugins/kolab_files/skins/larry/style.css index e5f56b4..2aa2735 100644
--- a/plugins/kolab_files/skins/larry/style.css
+++ b/plugins/kolab_files/skins/larry/style.css
@@ -86,7 +86,6 @@
}
#filelistbox {
- bottom: 28px;
overflow: auto;
top: 0;
left: 0;
diff --git a/plugins/kolab_files/skins/larry/templates/filepreview.html \
b/plugins/kolab_files/skins/larry/templates/filepreview.html index bc35752..1ab6190 \
100644
--- a/plugins/kolab_files/skins/larry/templates/filepreview.html
+++ b/plugins/kolab_files/skins/larry/templates/filepreview.html
@@ -28,7 +28,6 @@
<div class="iframebox">
<roundcube:object name="filepreviewframe" id="fileframe" frameborder="0" />
</div>
- <roundcube:object name="message" id="message" class="statusbar" />
</div>
</div>
diff --git a/plugins/kolab_files/skins/larry/templates/files.html \
b/plugins/kolab_files/skins/larry/templates/files.html index dd0bc16..e3af092 100644
--- a/plugins/kolab_files/skins/larry/templates/files.html
+++ b/plugins/kolab_files/skins/larry/templates/files.html
@@ -41,7 +41,6 @@
<div id="filelistbox" class="boxlistcontent">
<roundcube:object name="filelist" id="filelist" class="records-table \
filelist sortheader fixedheader" optionsmenuIcon="true" /> </div>
- <roundcube:object name="message" id="message" class="statusbar" />
</div>
</div>
commit 7522080517ffd7b56a1624d87618237ec5f70f39
Author: Aleksander Machniak <machniak@kolabsys.com>
Date: Mon Dec 2 14:55:59 2013 +0100
Fixed smart upload button issues (Bug #2615)
diff --git a/plugins/kolab_files/kolab_files.js b/plugins/kolab_files/kolab_files.js
index dba947f..a70fb73 100644
--- a/plugins/kolab_files/kolab_files.js
+++ b/plugins/kolab_files/kolab_files.js
@@ -383,10 +383,15 @@ function kolab_files_upload_input(button)
file = $('<input>'),
offset = link.offset();
+ function move_file_input(e) {
+ file.css({top: (e.pageY - offset.top - 10) + 'px', left: (e.pageX - offset.left \
- 10) + 'px'}); + }
+
file.attr({name: 'file[]', type: 'file', multiple: 'multiple', size: 5})
.change(function() { rcmail.files_upload('#filesuploadform'); })
+ .click(function() { setTimeout(function() { link.mouseleave(); }, 20); })
// opacity:0 does the trick, display/visibility doesn't work
- .css({opacity: 0, cursor: 'pointer', outline: 'none', position: 'absolute', top: \
'10000px', left: '10000px'}); + .css({opacity: 0, cursor: 'pointer', outline: \
'none', position: 'absolute'});
// In FF and IE we need to move the browser file-input's button under the cursor
// Thanks to the size attribute above we know the length of the input field
@@ -394,17 +399,32 @@ function kolab_files_upload_input(button)
file.css({marginLeft: '-80px'});
// Note: now, I observe problem with cursor style on FF < 4 only
- link.css({overflow: 'hidden', cursor: 'pointer'})
+ // Need position: relative (Bug #2615)
+ link.css({overflow: 'hidden', cursor: 'pointer', position: 'relative'})
+ .mouseenter(function() { this.__isactive = true; })
// place button under the cursor
.mousemove(function(e) {
- if (rcmail.commands['files-upload'])
- file.css({top: (e.pageY - offset.top - 10) + 'px', left: (e.pageX - \
offset.left - 10) + 'px'}); + if (rcmail.commands['files-upload'] && \
this.__isactive) + move_file_input(e);
// move the input away if button is disabled
else
$(this).mouseleave();
})
- .mouseleave(function() { file.css({top: '10000px', left: '10000px'}); })
+ .mouseleave(function() {
+ file.css({top: '-10000px', left: '-10000px'});
+ this.__isactive = 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);
+ })
+ .mouseleave() // initially disable/hide input
.append(file);
};
_______________________________________________
commits mailing list
commits@lists.kolab.org
https://lists.kolab.org/mailman/listinfo/commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic