summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2013-09-05 16:54:12 +0200
committerkondou <kondou@ts.unde.re>2013-09-05 16:54:12 +0200
commit992b59f70bec5dcc6681db14c3a97036b4961403 (patch)
treef6b4acf1662e16a82419d2771415aacfd0808cdf /core
parent0527fb05ad4106db199bf3937b753563061c39bf (diff)
downloadnextcloud-server-992b59f70bec5dcc6681db14c3a97036b4961403.tar.gz
nextcloud-server-992b59f70bec5dcc6681db14c3a97036b4961403.zip
Make it possible to pass rawlist.php an JSON array, to filter by more than one mimetype
Diffstat (limited to 'core')
-rw-r--r--core/js/oc-dialogs.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js
index f184a1022bc..f4c339702e1 100644
--- a/core/js/oc-dialogs.js
+++ b/core/js/oc-dialogs.js
@@ -244,10 +244,17 @@ var OCdialogs = {
return defer.promise();
},
_getFileList: function(dir, mimeType) {
- return $.getJSON(
- OC.filePath('files', 'ajax', 'rawlist.php'),
- {dir: dir, mimetype: mimeType}
- );
+ if (typeof(mimeType) === "object") {
+ return $.getJSON(
+ OC.filePath('files', 'ajax', 'rawlist.php'),
+ {dir: dir, "mimetype_list": JSON.stringify(mimeType)}
+ );
+ } else {
+ return $.getJSON(
+ OC.filePath('files', 'ajax', 'rawlist.php'),
+ {dir: dir, mimetype: mimeType}
+ );
+ }
},
_determineValue: function(element) {
if ( $(element).attr('type') === 'checkbox' ) {