Merge pull request #1374 from nextcloud/upstream-26061

Choose button remains disbaled for httpd/unix-directory
This commit is contained in:
Roeland Jago Douma 2016-09-12 22:10:48 +02:00 committed by GitHub
commit 4e3aa89769
1 changed files with 10 additions and 2 deletions

View File

@ -821,7 +821,11 @@ var OCdialogs = {
self._fillFilePicker(dir);
var getOcDialog = this.closest('.oc-dialog');
var buttonEnableDisable = $('.primary', getOcDialog);
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'));
if (this.$filePicker.data('mimetype') === "httpd/unix-directory") {
buttonEnableDisable.prop("disabled", false);
} else {
buttonEnableDisable.prop("disabled", true);
}
}
}
};