diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-14 12:39:37 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-14 12:39:37 +0200 |
commit | a83e003ae3ac8eba78ebfaa4d185a674f502feea (patch) | |
tree | 14597419d799a81c7780916a211bdcc65f07f05d /core | |
parent | f34b97bc9815bbc91a104d19fef98c332b85f2df (diff) | |
parent | 3c005bc0206d88a31a10ca342dcfbf2b2a247d54 (diff) | |
download | nextcloud-server-a83e003ae3ac8eba78ebfaa4d185a674f502feea.tar.gz nextcloud-server-a83e003ae3ac8eba78ebfaa4d185a674f502feea.zip |
Merge pull request #19645 from owncloud/file-conflict-disablecontinue
Disable "Continue" button in conflict dialog when no selection
Diffstat (limited to 'core')
-rw-r--r-- | core/js/oc-dialogs.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index 7af50c4ddfc..67860c0c7a4 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -601,6 +601,14 @@ var OCdialogs = { $(dialogId).css('height','auto'); + var $primaryButton = $dlg.closest('.oc-dialog').find('button.continue'); + $primaryButton.prop('disabled', true); + + function updatePrimaryButton() { + var checkedCount = $dlg.find('.conflicts .checkbox:checked').length; + $primaryButton.prop('disabled', checkedCount === 0); + } + //add checkbox toggling actions $(dialogId).find('.allnewfiles').on('click', function() { var $checkboxes = $(dialogId).find('.conflict .replacement input[type="checkbox"]'); @@ -632,6 +640,7 @@ var OCdialogs = { $(dialogId).find('.allnewfiles').prop('checked', false); $(dialogId).find('.allnewfiles + .count').text(''); } + updatePrimaryButton(); }); $(dialogId).on('click', '.original,.allexistingfiles', function(){ var count = $(dialogId).find('.conflict .original input[type="checkbox"]:checked').length; @@ -646,7 +655,9 @@ var OCdialogs = { $(dialogId).find('.allexistingfiles').prop('checked', false); $(dialogId).find('.allexistingfiles + .count').text(''); } + updatePrimaryButton(); }); + dialogDeferred.resolve(); }) .fail(function() { |