Sha256: e41d71b7e1d1a1707c1ce8a4f01515137ce13e5d38cc1382ff30ec66ea4cd3b4

Contents?: true

Size: 641 Bytes

Versions: 6

Compression:

Stored size: 641 Bytes

Contents

jQuery(document).ready(function(){
  /*
   *Add click function on .gray-destroy items
   *Those items are links to remove their parents (i.e. blocks)
   **/
  jQuery('.gray-destroy').live('click', function(){
    jQuery(this).parent().remove();
    return false;
  });
  jQuery('a.destroy').live('click', function(e){
    e.preventDefault();
    line = jQuery(jQuery(this).parent());
    var del = line.find('input.destroy');
    if (del.length > 0) {
      del.val(1);
      line.hide('highlight',{speed: 3000});
    } else {
      line.hide('highlight',{speed: 3000},function(){ jQuery(this).remove(); });
    }
    return false;
  });
})

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
forgeos_core-1.9.5.rc2 app/assets/javascripts/forgeos/admin/inits/forgeos_core/clicks.js
forgeos_core-1.9.5.rc1 app/assets/javascripts/forgeos/admin/inits/forgeos_core/clicks.js
forgeos_core-1.9.4 app/assets/javascripts/forgeos/admin/inits/forgeos_core/clicks.js
forgeos_core-1.9.3 app/assets/javascripts/forgeos/admin/inits/forgeos_core/clicks.js
forgeos_core-1.9.2 app/assets/javascripts/forgeos/admin/inits/forgeos_core/clicks.js
forgeos_core-1.9.1 app/assets/javascripts/forgeos/admin/inits/forgeos_core/clicks.js