summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorSujith Haridasan <Sujith_Haridasan@mentor.com>2016-09-07 18:47:52 +0530
committerMorris Jobke <hey@morrisjobke.de>2016-09-12 16:46:15 +0200
commitc15ba6ccf8fa4f35f26c57b9c2a9432f31914d68 (patch)
tree88521c16e29c93aad60e8f7a6d14f826c0f6d6d9 /core/js
parenta9c243948b41db6f492cfdbb3e16cb8731f38b78 (diff)
downloadnextcloud-server-c15ba6ccf8fa4f35f26c57b9c2a9432f31914d68.tar.gz
nextcloud-server-c15ba6ccf8fa4f35f26c57b9c2a9432f31914d68.zip
Choose button remains disbaled for httpd/unix-directory
This is not correct. Hence in this patch we validate if the mimetype is 'httpd/unix-directory'. If so we don't disable it. This patch addresses solution for issue: 26034 Signed-off-by: Sujith Haridasan <Sujith_Haridasan@mentor.com>
Diffstat (limited to 'core/js')
-rw-r--r--core/js/oc-dialogs.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js
index 75c8ef9020e..bdee8a1bb09 100644
--- a/core/js/oc-dialogs.js
+++ b/core/js/oc-dialogs.js
@@ -821,7 +821,11 @@ var OCdialogs = {
self._fillFilePicker(dir);
var getOcDialog = this.closest('.oc-dialog');
var buttonEnableDisable = $('.primary', getOcDialog);
- buttonEnableDisable.prop("disabled", true);
+ if (this.$filePicker.data('mimetype') === "http/unix-directory") {
+ buttonEnableDisable.prop("disabled", false);
+ } else {
+ buttonEnableDisable.prop("disabled", true);
+ }
},
/**
* handle clicks made in the filepicker
@@ -837,7 +841,11 @@ var OCdialogs = {
buttonEnableDisable.prop("disabled", false);
} else if ( $element.data('type') === 'dir' ) {
this._fillFilePicker(this.$filePicker.data('path') + '/' + $element.data('entryname'));
- buttonEnableDisable.prop("disabled", true);
+ if (this.$filePicker.data('mimetype') === "httpd/unix-directory") {
+ buttonEnableDisable.prop("disabled", false);
+ } else {
+ buttonEnableDisable.prop("disabled", true);
+ }
}
}
};