app/assets/javascripts/admin/assets.js in noodall-ui-0.5.0.pre.3 vs app/assets/javascripts/admin/assets.js in noodall-ui-0.5.0.pre.4
- old
+ new
@@ -1,29 +1,24 @@
function setUpAssets() {
- document.write('<link rel="stylesheet" href="/assets/plupload.queue.css" type="text/css" media="screen" charset="utf-8">');
- document.write('<script type="text/javascript" src="/assets/plupload/gears_init.js"></script>');
- document.write('<script type="text/javascript" src="http://bp.yahooapis.com/2.4.21/browserplus-min.js"></script>');
- document.write('<script type="text/javascript" src="/assets/plupload/plupload.full.min.js"></script>');
- document.write('<script type="text/javascript" src="/assets/plupload/jquery.plupload.queue.min.js"></script>');
-
$('#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;
});
ajaxifyForms('form.edit_asset');
}
+setUpAssets();
function setUpPlupload() {
$("#uploader").pluploadQueue({
// General settings
- runtimes : 'html5,flash,gears,silverlight,browserplus,',
+ runtimes : 'html5,flash,gears,silverlight,html4',
url : '/admin/assets/plupload',
// max_file_size : '10mb',
chunk_size : '1mb',
unique_names : false,
@@ -51,11 +46,11 @@
});
var uploader = $('#uploader').pluploadQueue();
uploader.bind('FileUploaded', function(up, file, res) {
- if(this.total.queued == 0) {
+ if(this.total.queued === 0) {
message = $('<div id="flash"><div class="flash notice">Assets were successfully uploaded. <strong>Please enter full information for each asset</strong></div></div>');
message.bind('click', function() {
window.location.href = "/admin/assets/pending";
});
message.css( 'cursor', 'pointer' );
@@ -92,7 +87,5 @@
error_item.delay(8000).fadeOut(2000, function(){ $(this).remove(); if($('#uploader_filelist li').length === 0) $('#uploader_filelist').append('<li class="plupload_droptext">Drag files here.</li>'); });
up.refresh(); // Reposition Flash/Silverlight
});
}
-
-setUpAssets();