diff options
author | kondou <kondou@ts.unde.re> | 2013-09-05 16:54:12 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2013-09-05 16:54:12 +0200 |
commit | 992b59f70bec5dcc6681db14c3a97036b4961403 (patch) | |
tree | f6b4acf1662e16a82419d2771415aacfd0808cdf /core | |
parent | 0527fb05ad4106db199bf3937b753563061c39bf (diff) | |
download | nextcloud-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.js | 15 |
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' ) { |