aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-08-15 14:08:01 -0700
committerThomas Müller <thomas.mueller@tmit.eu>2013-08-15 14:08:01 -0700
commitbd1895bdf8dff07bf9dc9803ce991e39daa52acc (patch)
tree4418b1f79395a95a020cb2c24cd2373710f18af4 /apps
parentb3241402b922876bfbc71851985b7331bcea87c9 (diff)
parentff67f115d403d13dedf77457c539963f50a80eec (diff)
downloadnextcloud-server-bd1895bdf8dff07bf9dc9803ce991e39daa52acc.tar.gz
nextcloud-server-bd1895bdf8dff07bf9dc9803ce991e39daa52acc.zip
Merge pull request #4354 from owncloud/fix_2711_shared_icon_disappears_on_firefox
fix #2711 using a custom event, also use css selectors over filterAttr
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/fileactions.js5
-rw-r--r--apps/files_sharing/js/share.js7
2 files changed, 8 insertions, 4 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js
index aa66a57a7b5..de67d13559e 100644
--- a/apps/files/js/fileactions.js
+++ b/apps/files/js/fileactions.js
@@ -65,7 +65,7 @@ var FileActions = {
FileActions.currentFile = parent;
var actions = FileActions.get(FileActions.getCurrentMimeType(), FileActions.getCurrentType(), FileActions.getCurrentPermissions());
var file = FileActions.getCurrentFile();
- if ($('tr').filterAttr('data-file', file).data('renaming')) {
+ if ($('tr[data-file="'+file+'"]').data('renaming')) {
return;
}
parent.children('a.name').append('<span class="fileactions" />');
@@ -164,10 +164,11 @@ $(document).ready(function () {
window.location = OC.filePath('files', 'ajax', 'download.php') + '?files=' + encodeURIComponent(filename) + '&dir=' + encodeURIComponent($('#dir').val());
});
}
-
$('#fileList tr').each(function () {
FileActions.display($(this).children('td.filename'));
});
+
+ $('#fileList').trigger(jQuery.Event("fileActionsReady"));
});
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index eb5a6e8cb7f..b2efafde4e7 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -4,6 +4,10 @@ $(document).ready(function() {
if (typeof OC.Share !== 'undefined' && typeof FileActions !== 'undefined' && !disableSharing) {
+ $('#fileList').one('fileActionsReady',function(){
+ OC.Share.loadIcons('file');
+ });
+
FileActions.register('all', 'Share', OC.PERMISSION_READ, OC.imagePath('core', 'actions/share'), function(filename) {
if ($('#dir').val() == '/') {
var item = $('#dir').val() + filename;
@@ -33,6 +37,5 @@ $(document).ready(function() {
OC.Share.showDropDown(itemType, $(tr).data('id'), appendTo, true, possiblePermissions);
}
});
- OC.Share.loadIcons('file');
}
-});
+}); \ No newline at end of file