You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If using multiple instances of uploadify within silverstripe cms, the import list is not populated.
If the uploadify field was loaded with ajax the import list also did not work.
I changed uploadify_init to fix this.
Now on tabchange the list is updated. I also added 'var' to all variables defined within functions (line 129).
If using multiple instances of uploadify within silverstripe cms, the import list is not populated.
If the uploadify field was loaded with ajax the import list also did not work.
I changed uploadify_init to fix this.
Now on tabchange the list is updated. I also added 'var' to all variables defined within functions (line 129).
For us this works better.
if( $(this).parent().attr('class')=='first' ){
$t.find('.import_dropdown select').trigger("change");
}
Altered code for uploadify_init.js:
jQuery.noConflict();$t = $ (this);$input = $ ('input.uploadify',$t);$uploader = $ ('');
$uploader = $ ('input.uploadify', $t);$e = $ (event.currentTarget);
$e = $ (event.currentTarget);$preview = $ ('#upload_preview_'+$e.attr('id'));$inputs = $ ('.inputs input', $preview);
(function($) {
$(function() {
$('.UploadifyField').livequery(function() {
$(this).each(function() {
var
if(!$t.hasClass('backend')) {
var
var name = $input.attr('name');
var id = $input.attr('id');
var klass = $input.attr('class');
var
$input.replaceWith($uploader);
}
else {
}
/**
Build a set of options to pass to the uploadify object
**/
var opts = $uploader.metadata();
$.extend(opts, {
onComplete: function(event, queueID, fileObj, response, data) {
var
var $container = $e.parents('.UploadifyField:first');
if(isNaN(response)) {
alert(response);
}
if($e.metadata().refreshlink) {
var
var
if($preview.length) {
var ids = new Array();
$inputs.each(function() {
if($(this).val().length) {
ids.push($(this).val());
}
});
ids.push(response);
});
})(jQuery);
The text was updated successfully, but these errors were encountered: