summaryrefslogtreecommitdiffstats
path: root/core/js/oc-dialogs.js
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2013-09-05 18:40:55 +0200
committerkondou <kondou@ts.unde.re>2013-09-05 18:40:55 +0200
commitf84fe479a5af35cc51b4bee39492093c75ddc64e (patch)
tree0ece552e8fa95d570aad141992144ac634bd10e8 /core/js/oc-dialogs.js
parent992b59f70bec5dcc6681db14c3a97036b4961403 (diff)
downloadnextcloud-server-f84fe479a5af35cc51b4bee39492093c75ddc64e.tar.gz
nextcloud-server-f84fe479a5af35cc51b4bee39492093c75ddc64e.zip
Only use mimetype_list and clean up a bit
Diffstat (limited to 'core/js/oc-dialogs.js')
-rw-r--r--core/js/oc-dialogs.js22
1 files changed, 12 insertions, 10 deletions
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js
index f4c339702e1..ed4d7c678e1 100644
--- a/core/js/oc-dialogs.js
+++ b/core/js/oc-dialogs.js
@@ -244,17 +244,19 @@ var OCdialogs = {
return defer.promise();
},
_getFileList: function(dir, 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}
- );
+ if (typeof(mimeType) === "string") {
+ var tmp = mimeType;
+ mimeType = new Array();
+ mimeType[0] = tmp;
}
+
+ return $.getJSON(
+ OC.filePath('files', 'ajax', 'rawlist.php'),
+ {
+ dir: dir,
+ mimetypes: JSON.stringify(mimeType)
+ }
+ );
},
_determineValue: function(element) {
if ( $(element).attr('type') === 'checkbox' ) {