function setUpAssets() { $('#asset-browser ul.choices a, #asset-browser #tags a, #asset-browser .tags a, #asset-browser a.show, #asset-browser .pagination a').live('click', function() { $.get( $(this).attr('href'), { allowed_types: Browser.allowed_types, mode: Browser.mode }, Browser.after_ajax, 'script' ); return false; }); } setUpAssets(); function setUpPlupload() { $("#uploader").pluploadQueue({ // General settings runtimes : 'html5,flash,gears,silverlight,html4', url : '/admin/assets/plupload', // max_file_size : '10mb', // chunk_size : '1mb', unique_names : false, // Use multipart // multipart: true, // multipart_params: { 'var1': 'val1', 'var2': 'val2' }, // Resize images on clientside if we can // resize : {width : 320, height : 240, quality : 90}, // Specify what files to browse for filters : [ {title : "Image files", extensions : "jpg,jpeg,gif,png,tiff,bmp"}, {title : "Zip files", extensions : "zip"}, {title : "Flash files", extensions : "swf"}, {title : "Document files", extensions : "doc,pdf,xls,txt,docx,ppt"}, {title : "Video files", extensions : "flv,f4v"} ], // Flash settings flash_swf_url : '/assets/plupload/plupload.flash.swf', // Silverlight settings silverlight_xap_url : '/assets/plupload/plupload.silverlight.xap' }); var uploader = $('#uploader').pluploadQueue(); uploader.bind('FileUploaded', function(up, file, res) { if(this.total.queued === 0) { message = $('