2011-12-18 02:07:42 +00:00
|
|
|
$('.attributes_block a.delete').live('click', function(){
|
|
|
|
$(this).parents('.list_item').remove();
|
|
|
|
});
|
|
|
|
|
2011-12-19 13:22:26 +00:00
|
|
|
$('.action a.remove_existing_record').live('click', function(){
|
2011-12-18 02:07:42 +00:00
|
|
|
$(this).next('.should_destroy').attr('value', 1);
|
|
|
|
$("#attribute_" + $(this).prev().attr('value')).hide();
|
|
|
|
});
|
|
|
|
|
2011-12-19 13:22:26 +00:00
|
|
|
$('.action a.switch').live('click', function(){
|
2011-12-18 02:07:42 +00:00
|
|
|
$(this).parent().toggleClass('disable');
|
|
|
|
var $am = $(this).next('.built_in_state')
|
|
|
|
$am.attr('value', ($am.attr('value') == "false") ? "true" : "false");
|
|
|
|
});
|
|
|
|
|
|
|
|
$('.select_type select').live('change', function(){
|
|
|
|
if(this.value == 'select')
|
|
|
|
{
|
|
|
|
$(this).next().show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$(this).next().hide();
|
|
|
|
}
|
|
|
|
});
|