diff options
author | Bartek Przybylski <bart.p.pl@gmail.com> | 2012-04-05 23:18:44 +0200 |
---|---|---|
committer | Bartek Przybylski <bart.p.pl@gmail.com> | 2012-04-05 23:18:44 +0200 |
commit | 96c99125da5fe74d4a8fa329869cca7f775805cf (patch) | |
tree | 6bfb2ea45d3e0773120a5a31dd388ba3da9ca0f7 /core | |
parent | fe3d3be399f7b64b3f81c4f8fcd932b2d810ee45 (diff) | |
download | nextcloud-server-96c99125da5fe74d4a8fa329869cca7f775805cf.tar.gz nextcloud-server-96c99125da5fe74d4a8fa329869cca7f775805cf.zip |
mimetype filter for filepicker
Diffstat (limited to 'core')
-rw-r--r-- | core/js/oc-dialogs.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index e027ffb5103..a3aa1e8c149 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -107,8 +107,8 @@ OCdialogs = { $(c_id + ' #dirtree').focus(function() { var t = $(this); t.data('oldval', t.val())}) .change({dcid: c_id}, OC.dialogs.handleTreeListSelect); $(c_id).ready(function(){ - $.getJSON(OC.webroot+'/files/ajax/rawlist.php', function(r){OC.dialogs.fillFilePicker(r, c_id, callback)}); - }).data('multiselect', multiselect); + $.getJSON(OC.webroot+'/files/ajax/rawlist.php', {mimetype: mimetype_filter} ,function(r){OC.dialogs.fillFilePicker(r, c_id, callback)}); + }).data('multiselect', multiselect).data('mimetype',mimetype_filter); // build buttons var b = [ {text: t('dialogs', 'Choose'), click: function(){ @@ -222,7 +222,7 @@ OCdialogs = { $(this).children().each(function(i, element) { if (skip_first) {skip_first = false; return; }path += '/'+$(element).text(); }); $(event.data.dcid).data('path', path); $(event.data.dcid + ' .filepicker_loader').css('visibility', 'visible'); - $.getJSON(OC.webroot+'/files/ajax/rawlist.php', {dir: path}, function(r){OC.dialogs.fillFilePicker(r, event.data.dcid)}); + $.getJSON(OC.webroot+'/files/ajax/rawlist.php', {dir: path, mimetype: $(event.data.dcid).data('mimetype')}, function(r){OC.dialogs.fillFilePicker(r, event.data.dcid)}); }, // this function is in early development state, please dont use it unlsess you know what you are doing handlePickerClick:function(element, name, dcid) { @@ -240,6 +240,6 @@ OCdialogs = { var newval = parseInt($(dcid + ' #dirtree option:last').val())+1; $(dcid + ' #dirtree').append('<option selected="selected" value="'+newval+'">'+name+'</option>'); $(dcid + ' .filepicker_loader').css('visibility', 'visible'); - $.getJSON(OC.webroot+'/files/ajax/rawlist.php', {dir: p}, function(r){OC.dialogs.fillFilePicker(r, dcid)}); + $.getJSON(OC.webroot+'/files/ajax/rawlist.php', {dir: p, mimetype: $(dcid).data('mimetype')}, function(r){OC.dialogs.fillFilePicker(r, dcid)}); } }; |