From 130b8018a1193a9a21b359dd5dfb249efe0a16da Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 7 Jul 2014 15:57:26 +0200 Subject: [PATCH] Improved external share dialog Changed title, label and buttons. Removed icon. --- apps/files_sharing/js/external.js | 35 +++++++++++++++++++++++++++---- 1 file 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 () { -- 2.39.5