Skip to content

Commit

Permalink
fixes issue file picker choose button disabled for directory selection
Browse files Browse the repository at this point in the history
  • Loading branch information
greku authored and Vincent Petry committed Feb 8, 2019
1 parent 281066e commit 91c3c05
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 91c3c05

Please sign in to comment.