Showing
1 changed file
with
46 additions
and
32 deletions
@@ -30,38 +30,51 @@ var Bll = { | @@ -30,38 +30,51 @@ var Bll = { | ||
30 | }, | 30 | }, |
31 | //弹框 | 31 | //弹框 |
32 | toast: function (module, hint, url) { | 32 | toast: function (module, hint, url) { |
33 | - var edit = new common.edit("#baseform", {bucket: "yhb-img01"}); | ||
34 | - Bll.module = module; | ||
35 | - var d = new common.dialog({ | ||
36 | - title: hint + "标签", | ||
37 | - content: common.util.__template2($("#template").html(), Bll.module), | ||
38 | - width: '40%', | ||
39 | - button: [ | ||
40 | - { | ||
41 | - value: "保存", | ||
42 | - callback: function () { | ||
43 | - if (edit.validate()) { | ||
44 | - common.util.__ajax({ | ||
45 | - url: url, | ||
46 | - data: Bll.module | ||
47 | - }, function () { | ||
48 | - Bll.getList(); | ||
49 | - g.init(list); | ||
50 | - d.close(); | ||
51 | - }); | ||
52 | - } | ||
53 | - return false; | ||
54 | - }, | ||
55 | - css: "btn-primary" | ||
56 | - }, | ||
57 | - { | ||
58 | - "value": "取消", | ||
59 | - "css": "btn-info" | ||
60 | - } | ||
61 | - ] | ||
62 | - }); | ||
63 | - edit.init(); | ||
64 | - //e.init(); | 33 | + var e = new common.edit("#baseform", {bucket: "yhb-img01"}); |
34 | + //Bll.module = module; | ||
35 | + //var d = new common.dialog({ | ||
36 | + // title: hint + "标签", | ||
37 | + // content: common.util.__template2($("#template").html(), Bll.module), | ||
38 | + // width: '40%', | ||
39 | + // button: [ | ||
40 | + // { | ||
41 | + // value: "保存", | ||
42 | + // callback: function () { | ||
43 | + // if (edit.validate()) { | ||
44 | + // common.util.__ajax({ | ||
45 | + // url: url, | ||
46 | + // data: Bll.module | ||
47 | + // }, function () { | ||
48 | + // Bll.getList(); | ||
49 | + // g.init(list); | ||
50 | + // d.close(); | ||
51 | + // }); | ||
52 | + // } | ||
53 | + // return false; | ||
54 | + // }, | ||
55 | + // css: "btn-primary" | ||
56 | + // }, | ||
57 | + // { | ||
58 | + // "value": "取消", | ||
59 | + // "css": "btn-info" | ||
60 | + // } | ||
61 | + // ] | ||
62 | + //}); | ||
63 | + | ||
64 | + var dialog = common.dialog.confirm(hint, | ||
65 | + common.util.__template($("#template").html(), module), | ||
66 | + function() { | ||
67 | + e.submit(url, function (option) { | ||
68 | + option.success=function() { | ||
69 | + Bll.getList(); | ||
70 | + g.init(list); | ||
71 | + dialog.close(); | ||
72 | + }; | ||
73 | + option.error=function(){}; | ||
74 | + }); | ||
75 | + return false; | ||
76 | + }); | ||
77 | + e.init(); | ||
65 | }, | 78 | }, |
66 | toastConfirm: function (item, hint, url) { | 79 | toastConfirm: function (item, hint, url) { |
67 | common.dialog.confirm("警告", hint, function () { | 80 | common.dialog.confirm("警告", hint, function () { |
@@ -146,6 +159,7 @@ $(document).on("click", "#add-btn", function () { | @@ -146,6 +159,7 @@ $(document).on("click", "#add-btn", function () { | ||
146 | orderBy: 0 | 159 | orderBy: 0 |
147 | }; | 160 | }; |
148 | Bll.toast(item, "添加", "/hotRankTag/addTag"); | 161 | Bll.toast(item, "添加", "/hotRankTag/addTag"); |
162 | + Bll.toast('/operations/notice/addNotice', item, "创建公告"); | ||
149 | }); | 163 | }); |
150 | /** | 164 | /** |
151 | * 编辑 | 165 | * 编辑 |
-
Please register or login to post a comment