diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/js/share.js | 24 | ||||
-rw-r--r-- | core/l10n/fr.js | 1 | ||||
-rw-r--r-- | core/l10n/fr.json | 1 |
3 files changed, 20 insertions, 6 deletions
diff --git a/core/js/share.js b/core/js/share.js index 9baa34d9bb7..9539e92e09b 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -50,17 +50,29 @@ OC.Share = _.extend(OC.Share || {}, { * @param callback function to call after the shares were loaded */ loadIcons:function(itemType, fileList, callback) { + var path = fileList.dirInfo.path; + if (path === '/') { + path = ''; + } + path += '/' + fileList.dirInfo.name; + // Load all share icons $.get( - OC.filePath('core', 'ajax', 'share.php'), + OC.linkToOCS('apps/files_sharing/api/v1', 2) + 'shares', { - fetch: 'getItemsSharedStatuses', - itemType: itemType + subfiles: 'true', + path: path, + format: 'json' }, function(result) { - if (result && result.status === 'success') { + if (result && result.ocs.meta.statuscode === 200) { OC.Share.statuses = {}; - $.each(result.data, function(item, data) { - OC.Share.statuses[item] = data; + $.each(result.ocs.data, function(it, share) { + if (!(share.item_source in OC.Share.statuses)) { + OC.Share.statuses[share.item_source] = {link: false}; + } + if (share.share_type === OC.Share.SHARE_TYPE_LINK) { + OC.Share.statuses[share.item_source] = {link: true}; + } }); if (_.isFunction(callback)) { callback(OC.Share.statuses); diff --git a/core/l10n/fr.js b/core/l10n/fr.js index 670f7561468..aa7146dfd89 100644 --- a/core/l10n/fr.js +++ b/core/l10n/fr.js @@ -197,6 +197,7 @@ OC.L10N.register( "Updating {productName} to version {version}, this may take a while." : "La mise à jour de {productName} vers la version {version} est en cours. Cela peut prendre un certain temps.", "An error occurred." : "Une erreur est survenue.", "Please reload the page." : "Veuillez recharger la page.", + "The update was unsuccessful. For more information <a href=\"{url}\">check our forum post</a> covering this issue." : "La mise à jour a échoué. Pour plus d'informations <a href=\"{url}\">consultez notre publication sur le forum</a> à propos de ce problème.", "The update was unsuccessful. " : "La mise à jour a échoué.", "The update was successful. There were warnings." : "La mise à jour a réussi, mais il y a eu des avertissements", "The update was successful. Redirecting you to ownCloud now." : "La mise à jour a réussi. Vous êtes maintenant redirigé vers ownCloud.", diff --git a/core/l10n/fr.json b/core/l10n/fr.json index bf3b40a7fe9..dfe5926469f 100644 --- a/core/l10n/fr.json +++ b/core/l10n/fr.json @@ -195,6 +195,7 @@ "Updating {productName} to version {version}, this may take a while." : "La mise à jour de {productName} vers la version {version} est en cours. Cela peut prendre un certain temps.", "An error occurred." : "Une erreur est survenue.", "Please reload the page." : "Veuillez recharger la page.", + "The update was unsuccessful. For more information <a href=\"{url}\">check our forum post</a> covering this issue." : "La mise à jour a échoué. Pour plus d'informations <a href=\"{url}\">consultez notre publication sur le forum</a> à propos de ce problème.", "The update was unsuccessful. " : "La mise à jour a échoué.", "The update was successful. There were warnings." : "La mise à jour a réussi, mais il y a eu des avertissements", "The update was successful. Redirecting you to ownCloud now." : "La mise à jour a réussi. Vous êtes maintenant redirigé vers ownCloud.", |