asset_textarea.js and asset_textfield.js both contain code that is already taken care of by asset.js :

$("#edit-cancel").click(cancelAction);
$("#edit-aid").change(function(){
$(".asset-preview").load(''/index.php?q=asset/js/preview/'+$(this).val());
});

initLoader();

This causes the cancelAction() to be performed twice on 'cancel' (no big deal)
the load performed twice on 'change'
and initLoader executed twice.

AFAICT, that code could be removed from asset_textarea.js and asset_textfield.js

Comments

wmostrey’s picture

Status: Active » Fixed

Thanks for pointing this out. I removed it from both files, did some testing with both TinyMCE, CCK and normal "Insert assets" and functionality remains.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.