Sha256: 9c47e7c1939bc3cbb43bb6279f7ab08ab959480c2a6962a14594361e2a2061ae

Contents?: true

Size: 1.32 KB

Versions: 2

Compression:

Stored size: 1.32 KB

Contents

function add_picture_to_product(data){
  var object_name = jQuery('form#wrap').data('object_name');
  jQuery('#product-images ul.sortable li.clear').before('<li><a href="#" onclick="jQuery(this).parents(\'li\').remove(); check_product_first_image(); return false;" class="big-icons trash"></a><a href="/admin/pictures/' + data.id + '/edit" onclick ="window.open(this.href); return false;" class="big-icons edit" href="#"></a><input type="hidden" name="' + object_name + '[attachment_ids][]" value="' + data.id + '"/><img src="' + data.path + '" alt="' + data.name + '"/><div class="handler"><div class="inner"></div></div></li>');
  check_product_first_image();
}

function add_attachment_to_product(data){
  var object_name = jQuery('form#wrap').data('object_name');
  jQuery('#product-files').append('<div class="block-container"><input type="hidden" name="' + object_name + '[attachment_ids][]" value="' + data.id + '" /><span class="block-type"><span class="handler"><span class="inner">&nbsp;</span></span>' + data.type + '</span><span class="block-name">' + data.name + '<span class="file-size"> - ' + data.size + '</span></span><a href="/admin/' + data.type.toLowerCase() + 's/' + data.id + '/edit" onclick ="window.open(this.href); return false;" class="small-icons edit-link"></a><a href="#" class="big-icons gray-destroy"></a></div>');
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
forgeos_commerce-1.9.1.rc1 app/assets/javascripts/forgeos/admin/functions/forgeos_commerce/uploads.js
forgeos_commerce-1.9.0 app/assets/javascripts/forgeos/admin/functions/forgeos_commerce/uploads.js