Commit 7d0e40df authored by agping's avatar agping

规则管理

parent 4a172131
......@@ -2,6 +2,7 @@ define (['doT', 'text!temp/auth_rule_index_template_tpl.html', 'css!style/home.c
authRule={
pageNo:1,
pageSize:15,
isAdd:0,//默认编辑
init:function () {
//初始化dot
$("body").append(template);
......@@ -14,6 +15,7 @@ authRule={
});
$ (document).delegate (".edit", "click", function () {//点击编辑
authRule.house_id = $ (this).attr ("data-id");
authRule.isAdd = 0;//编辑
authRule.Edid_add(function(){
authRule.Edit();
});
......@@ -25,6 +27,7 @@ authRule={
$ (document).delegate (".edit_add", "click", function () {//新增
document.getElementById("form-horizontal").reset();
authRule.Edid_add();
authRule.isAdd = 1;//新增
});
$ (document).delegate (".is_show", "click", function () {//点击禁用
if (!confirm('是否继续?')) {
......@@ -102,8 +105,13 @@ authRule={
},
Submit_edit:function(){//提交编辑的信息
var par={}
var par={};
if(authRule.isAdd == 1){
}else{
par.id= authRule.house_id;
}
par.title= $("input[name = title]").val();
par.name= $("input[name = name]").val();
par.sort= $("input[name = sort]").val();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment