Skip to content

Commit

Permalink
Merge pull request #34426 from owncloud/stable10-filepicker-button
Browse files Browse the repository at this point in the history
[stable10] fixes issue file picker choose button disabled for directory selectiom
  • Loading branch information
Vincent Petry authored Feb 20, 2019
2 parents 508169a + 91c3c05 commit ae460dc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/js/oc-dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,11 @@ var OCdialogs = {
// Hence this is one of the approach to get the choose button.
var getOcDialog = self.$filePicker.closest('.oc-dialog');
var buttonEnableDisable = getOcDialog.find('.primary');
buttonEnableDisable.prop("disabled", "true");
if (self.$filePicker.data('mimetype') === "httpd/unix-directory") {
buttonEnableDisable.prop("disabled", false);
} else {
buttonEnableDisable.prop("disabled", true);
}

if (!OC.Util.hasSVGSupport()) {
OC.Util.replaceSVG(self.$filePicker.parent());
Expand Down

0 comments on commit ae460dc

Please sign in to comment.