From f002a2d2f671c7d177fb3c8eb9fa4aad9d3bca7f Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 17 Oct 2016 13:08:55 +0200 Subject: [PATCH] Allow selecting the root folder Signed-off-by: Robin Appelman --- 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 87d16a1394..00eb0d70a1 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());