aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2011-08-02 15:23:17 -0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2011-08-02 15:23:17 -0400
commit96ab35a3310b876f74c45458f9b3d36613e303cd (patch)
tree4c67ea6e2e059fc8fb143e5c34c5b2c5e72944a1 /apps/files_sharing/js
parentd0b2a3b1acb9ebbbb486e5878abb2c452c35ec2b (diff)
downloadnextcloud-server-96ab35a3310b876f74c45458f9b3d36613e303cd.tar.gz
nextcloud-server-96ab35a3310b876f74c45458f9b3d36613e303cd.zip
Animate appearance of share drop down
Diffstat (limited to 'apps/files_sharing/js')
-rw-r--r--apps/files_sharing/js/share.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index 3ce0a1a61cf..a8fa94107ee 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -1,4 +1,11 @@
$(document).ready(function() {
+ $('#dialog').live('mouseleave', function(event) {
+ if ($(this).is(':visible')) {
+ $(this).hide('blind', function() {
+ $(this).remove();
+ });
+ }
+ });
FileActions.register('all', 'Share', OC.imagePath('core', 'actions/share'), function(filename) {
createShareDialog(filename, $('#dir').val()+'/'+filename);
});
@@ -31,7 +38,7 @@ $(document).ready(function() {
});
function createShareDialog(filenames, files) {
- var html = "<div id='dialog'>";
+ var html = "<div id='dialog' style='display: none'>";
html += "<div id='private'>";
html += "<label for='uid_shared_with'><strong>Share with</strong></label><input placeholder='User or Group' id='uid_shared_with' />";
html += "<input type='checkbox' name='permissions' id='permissions' value='1' /><label for='permissions'>allow editing</label><br />";
@@ -49,11 +56,15 @@ function createShareDialog(filenames, files) {
$(list).appendTo('#shared_list');
});
html += "</div>";
+ html += "<hr />";
html += "<div id='public'>";
html += "<input type='checkbox' name='public_link' id='public_link' value='1' /><label for='public_link'>make public</label>";
html += "<input type='checkbox' name='public_link_write' id='public_link_write' value='1' /><label for='public_link_write'>allow upload</label>";
html += "<div id='link'>";
html += "</div>";
html += "</div>";
+ $('tr[data-file="'+filenames+'"]').addClass('mouseOver');
$(html).appendTo($('tr[data-file="'+filenames+'"] td.filename'));
+ $('#dialog').show('blind');
+
}