diff options
author | Morris Jobke <hey@morrisjobke.de> | 2014-07-07 19:51:54 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-07-07 19:51:54 +0200 |
commit | 54a8dce380f926912b8fd00bb2f42a383a8fda08 (patch) | |
tree | 63c526c3d17d92d06f38abea566b33ec5810710a /apps | |
parent | b2377129b6b51685010fc80f1410c6152ee9b7e5 (diff) | |
parent | 130b8018a1193a9a21b359dd5dfb249efe0a16da (diff) | |
download | nextcloud-server-54a8dce380f926912b8fd00bb2f42a383a8fda08.tar.gz nextcloud-server-54a8dce380f926912b8fd00bb2f42a383a8fda08.zip |
Merge pull request #9415 from owncloud/external-sharedialog
Improved external share dialog
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/js/external.js | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/apps/files_sharing/js/external.js b/apps/files_sharing/js/external.js index 969a2b184d4..e743d2e2d32 100644 --- a/apps/files_sharing/js/external.js +++ b/apps/files_sharing/js/external.js @@ -42,13 +42,40 @@ } }; if (!passwordProtected) { - OC.dialogs.confirm(t('files_sharing', 'Add {name} from {owner}@{remote}', {name: name, owner: owner, remote: remoteClean}) - , t('files_sharing','Add Share'), callback, true); + OC.dialogs.confirm( + t( + 'files_sharing', + 'Do you want to add the remote share {name} from {owner}@{remote}?', + {name: name, owner: owner, remote: remoteClean} + ), + t('files_sharing','Remote share'), + callback, + true + ).then(this._adjustDialog); } else { - OC.dialogs.prompt(t('files_sharing', 'Add {name} from {owner}@{remote}', {name: name, owner: owner, remote: remoteClean}) - , t('files_sharing','Add Share'), callback, true, t('files_sharing','Password'), true); + OC.dialogs.prompt( + t( + 'files_sharing', + 'Do you want to add the remote share {name} from {owner}@{remote}?', + {name: name, owner: owner, remote: remoteClean} + ), + t('files_sharing','Remote share'), + callback, + true, + t('files_sharing','Remote share password'), + true + ).then(this._adjustDialog); } }; + + OCA.Sharing._adjustDialog = function() { + var $dialog = $('.oc-dialog:visible'); + var $buttons = $dialog.find('button'); + // hack the buttons + $dialog.find('.ui-icon').remove(); + $buttons.eq(0).text(t('core', 'Cancel')); + $buttons.eq(1).text(t('core', 'Add remote share')); + }; })(); $(document).ready(function () { |