From 91c3c05b6a29198d7c102c3b8660837938b48674 Mon Sep 17 00:00:00 2001 From: Gregory Baudet Date: Sat, 13 Oct 2018 21:40:32 +0200 Subject: [PATCH] fixes issue file picker choose button disabled for directory selection #30691 --- core/js/oc-dialogs.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index 588cfe2fae40..91fb525bf45b 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -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());