diff options
Diffstat (limited to 'core/js/share.js')
-rw-r--r-- | core/js/share.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/core/js/share.js b/core/js/share.js index 5763664c5de..62271a43ceb 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -29,10 +29,13 @@ OC.Share={ * files "Share" icon to "Shared" according to their share status and * share type. * + * If a callback is specified, the update step is skipped. + * * @param itemType item type * @param fileList file list instance, defaults to OCA.Files.App.fileList + * @param callback function to call after the shares were loaded */ - loadIcons:function(itemType, fileList) { + loadIcons:function(itemType, fileList, callback) { // Load all share icons $.get( OC.filePath('core', 'ajax', 'share.php'), @@ -45,7 +48,11 @@ OC.Share={ $.each(result.data, function(item, data) { OC.Share.statuses[item] = data; }); - OC.Share.updateIcons(itemType, fileList); + if (_.isFunction(callback)) { + callback(OC.Share.statuses); + } else { + OC.Share.updateIcons(itemType, fileList); + } } } ); |