var tag={search:function(){ct.ajax("TAG\u641c\u7d22","?app=system&controller=tag&action=search",360,180,null,function(a){tableApp.load(a.find("form"));return true})},add:function(){ct.form("\u6dfb\u52a0TAG","?app=system&controller=tag&action=add",360,180,function(a){if(a.state){tableApp.addRow(a.data);return true}},function(a){var b=a.find("input[name=tag]").maxLength();a=a.find("input[name=style]");a.next("img").titleColorPicker(b,a)})},edit:function(a,b){var d="?app=system&controller=tag&action=edit&tagid="+
a;b.trigger("check");ct.form("\u7f16\u8f91TAG",d,360,180,function(c){tableApp.updateRow(a,c.data);return true},function(c){c=c.find("input[name=style]");c.next("img").titleColorPicker(false,c)})},del:function(a){var b;if(a===undefined){a=tableApp.checkedIds();if(!a.length){ct.warn("\u8bf7\u9009\u4e2d\u8981\u5220\u9664\u9879");return}b='\u786e\u5b9a\u5220\u9664\u9009\u4e2d\u7684<b style="color:red">'+a.length+"</b>\u6761\u8bb0\u5f55\u5417\uff1f"}else b='\u786e\u5b9a\u5220\u9664\u7f16\u53f7\u4e3a<b style="color:red">'+
a+"</b>\u7684\u8bb0\u5f55\u5417\uff1f";ct.confirm(b,function(){$.getJSON("?app=system&controller=tag&action=delete","id="+a,function(d){d.state?(ct.warn("\u5220\u9664\u5b8c\u6bd5"),tableApp.deleteRow(a)):ct.warn(d.error)})})}};
