summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-07-02 14:36:59 +0200
committerMorris Jobke <hey@morrisjobke.de>2014-07-02 14:36:59 +0200
commit59629e688c3cc470279576524eac93041c253147 (patch)
tree7a1f940c174da94384d9b91740c38b1928e070d6 /core
parent5ec3771506bb0afbd3f9e6315a9cc9c352132dcb (diff)
parent025b71d068bf530581693af67a31a56dca24beb1 (diff)
downloadnextcloud-server-59629e688c3cc470279576524eac93041c253147.tar.gz
nextcloud-server-59629e688c3cc470279576524eac93041c253147.zip
Merge pull request #9341 from owncloud/sharing-fileactions-fix
Fix fileActionsReady event after deferred file actions update
Diffstat (limited to 'core')
-rw-r--r--core/js/share.js11
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);
+ }
}
}
);