Authored by 陶雨

运营管理 -> 分类管理

@@ -6,14 +6,21 @@ @@ -6,14 +6,21 @@
6 module.exports=function(app) { 6 module.exports=function(app) {
7 7
8 /*分类管理首页*/ 8 /*分类管理首页*/
9 - app.get("/operations/category/index","operations.category.Index"); 9 + app.get("/operations/category/index","operations.category.Index", function () {
  10 + this.$extend = {
  11 + moduleName: "分类管理",
  12 + pageName: "分类列表管理"
  13 + }
  14 + });
10 15
11 /*分类管理添加页面*/ 16 /*分类管理添加页面*/
12 app.get("/operations/category/add","operations.category.Edit", "resourceManage_getUrlAction", function (response) { 17 app.get("/operations/category/add","operations.category.Edit", "resourceManage_getUrlAction", function (response) {
13 this.$extend = { 18 this.$extend = {
14 data:response.data, 19 data:response.data,
15 action:"/category/addCategory", 20 action:"/category/addCategory",
16 - type:"add" 21 + type:"add",
  22 + moduleName: "分类管理",
  23 + pageName: "添加分类"
17 }; 24 };
18 }); 25 });
19 26
@@ -22,7 +29,9 @@ module.exports=function(app) { @@ -22,7 +29,9 @@ module.exports=function(app) {
22 this.$extend = { 29 this.$extend = {
23 data:response.data, 30 data:response.data,
24 action:"/category/updateCategory", 31 action:"/category/updateCategory",
25 - type:"edit" 32 + type:"edit",
  33 + moduleName: "分类管理",
  34 + pageName: "编辑分类"
26 }; 35 };
27 }); 36 });
28 37
1 <%include '../../../common/views/__ui/header'%> 1 <%include '../../../common/views/__ui/header'%>
2 <%include '../../../common/views/__partail/ListHeader'%> 2 <%include '../../../common/views/__partail/ListHeader'%>
3 3
4 -<div class="pageheader">  
5 - <div class="media">  
6 - <div class="pageicon pull-left">  
7 - <i class="fa fa-th-list"></i>  
8 - </div>  
9 - <div class="media-body">  
10 - <ul class="breadcrumb">  
11 - <li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>  
12 - <li><a href="/guang/article/index">分类管理</a></li>  
13 - <li>添加分类</li>  
14 - </ul>  
15 -  
16 - <div>  
17 - <div style="width: 30%;float: left;">  
18 - <h4>添加分类</h4>  
19 - </div>  
20 - <div style="width: 70%;float: right;">  
21 -  
22 - </div>  
23 - </div>  
24 - </div>  
25 - </div><!-- media -->  
26 -</div>  
27 <div class="contentpanel"> 4 <div class="contentpanel">
28 <div class="row"> 5 <div class="row">
29 <div class="col-md-12"> 6 <div class="col-md-12">
30 <div class="panel panel-default"> 7 <div class="panel panel-default">
31 <div class="panel-heading"> 8 <div class="panel-heading">
32 - <h4 class="panel-title">添加分类</h4> 9 + <h4 class="panel-title"><%pageName%></h4>
33 </div><!-- panel-heading --> 10 </div><!-- panel-heading -->
34 - <div id="info-content" class="panel-body" action="{{action}}" type="{{type}}"> 11 + <div id="info-content" class="panel-body" action="<%action%>" type="<%type%>">
35 12
36 </div><!-- panel-body --> 13 </div><!-- panel-body -->
37 <div class="panel-footer"> 14 <div class="panel-footer">
@@ -53,20 +30,20 @@ @@ -53,20 +30,20 @@
53 <div class="form-group"> 30 <div class="form-group">
54 <label class="col-sm-1 control-label">分类名称</label> 31 <label class="col-sm-1 control-label">分类名称</label>
55 <div class="col-sm-9"> 32 <div class="col-sm-9">
56 - <input type="text" value="<%sortName%>" class="form-control observe" data-field="sortName" placeholder="分类名称" required> 33 + <input type="text" value="[[sortName]]" class="form-control observe" data-field="sortName" placeholder="分类名称" required>
57 <p style="color:#999">注:分类名称必填</p> 34 <p style="color:#999">注:分类名称必填</p>
58 </div> 35 </div>
59 </div><!-- form-group --> 36 </div><!-- form-group -->
60 <div class="form-group"> 37 <div class="form-group">
61 <label class="col-sm-1 control-label">英文名称</label> 38 <label class="col-sm-1 control-label">英文名称</label>
62 <div class="col-sm-9"> 39 <div class="col-sm-9">
63 - <input type="text" value="<%sortNameEn%>" class="form-control observe" data-field="sortNameEn" placeholder="英文名称" required> 40 + <input type="text" value="[[sortNameEn]]" class="form-control observe" data-field="sortNameEn" placeholder="英文名称" required>
64 </div> 41 </div>
65 </div><!-- form-group --> 42 </div><!-- form-group -->
66 <div class="form-group"> 43 <div class="form-group">
67 <label class="col-sm-1 control-label">色值</label> 44 <label class="col-sm-1 control-label">色值</label>
68 <div class="col-sm-2"> 45 <div class="col-sm-2">
69 - <input type="text" value="<%sortNameColor%>" data-field="sortNameColor" class="form-control observe" prompt="色值"> 46 + <input type="text" value="[[sortNameColor]]" data-field="sortNameColor" class="form-control observe" prompt="色值">
70 </div> 47 </div>
71 </div><!-- form-group --> 48 </div><!-- form-group -->
72 <div class="form-group"> 49 <div class="form-group">
@@ -78,14 +55,14 @@ @@ -78,14 +55,14 @@
78 <div class="form-group"> 55 <div class="form-group">
79 <label class="col-sm-1 control-label">分类图标</label> 56 <label class="col-sm-1 control-label">分类图标</label>
80 <div class="col-sm-9"> 57 <div class="col-sm-9">
81 - <input type="file" name="file" prompt="分类图标" value="<%sortIco%>" class="observe" data-field="sortIco"> 58 + <input type="file" name="file" prompt="分类图标" value="[[sortIco]]" class="observe" data-field="sortIco">
82 </div> 59 </div>
83 </div> 60 </div>
84 61
85 <div class="form-group"> 62 <div class="form-group">
86 <label class="col-sm-1 control-label">分类大图标</label> 63 <label class="col-sm-1 control-label">分类大图标</label>
87 <div class="col-sm-9"> 64 <div class="col-sm-9">
88 - <input type="file" name="file" prompt="分类大图标" value="<%sortIcoBig%>" class="observe" data-field="sortIcoBig"> 65 + <input type="file" name="file" prompt="分类大图标" value="[[sortIcoBig]]" class="observe" data-field="sortIcoBig">
89 </div> 66 </div>
90 </div> 67 </div>
91 68
@@ -95,13 +72,13 @@ @@ -95,13 +72,13 @@
95 <input type="radio" name="isNewPage" style="width:18px;height:18px;" value="N"> 当前页面打开 72 <input type="radio" name="isNewPage" style="width:18px;height:18px;" value="N"> 当前页面打开
96 <input type="radio" style="width:18px;height:18px;" name="isNewPage" value="Y" checked> 新页面打开 73 <input type="radio" style="width:18px;height:18px;" name="isNewPage" value="Y" checked> 新页面打开
97 </div> 74 </div>
98 - <input type="hidden" id="isNewPage" for="radio" value="<%isNewPage%>"> 75 + <input type="hidden" id="isNewPage" for="radio" value="[[isNewPage]]">
99 </div> 76 </div>
100 77
101 <div class="form-group"> 78 <div class="form-group">
102 <label class="col-sm-1 control-label">跳转链接</label> 79 <label class="col-sm-1 control-label">跳转链接</label>
103 <div class="col-sm-9"> 80 <div class="col-sm-9">
104 - <input type="text" id="sortUrl" value='<%sortUrl%>' class="form-control" placeholder="跳转链接" required readonly style="cursor: not-allowed;"> 81 + <input type="text" id="sortUrl" value='[[sortUrl]]' class="form-control" placeholder="跳转链接" required readonly style="cursor: not-allowed;">
105 <a class="btn btn-info" id="addUrl">添加链接</a> 82 <a class="btn btn-info" id="addUrl">添加链接</a>
106 <p style="color:#999">注:必填,链接中不能有英文单引号</p> 83 <p style="color:#999">注:必填,链接中不能有英文单引号</p>
107 </div> 84 </div>
@@ -112,7 +89,7 @@ @@ -112,7 +89,7 @@
112 <input type="radio" name="separativeSign" style="width:18px;height:18px;" value="Y"> 89 <input type="radio" name="separativeSign" style="width:18px;height:18px;" value="Y">
113 <input type="radio" style="width:18px;height:18px;" name="separativeSign" value="N" checked> 90 <input type="radio" style="width:18px;height:18px;" name="separativeSign" value="N" checked>
114 </div> 91 </div>
115 - <input type="hidden" id="separativeSign" for="radio" value="<%separativeSign%>"> 92 + <input type="hidden" id="separativeSign" for="radio" value="[[separativeSign]]">
116 </div><!-- form-group --> 93 </div><!-- form-group -->
117 <div class="form-group"> 94 <div class="form-group">
118 <label class="col-sm-1 control-label">是否新品</label> 95 <label class="col-sm-1 control-label">是否新品</label>
@@ -120,7 +97,7 @@ @@ -120,7 +97,7 @@
120 <input type="radio" name="isNew" style="width:18px;height:18px;" value="Y"> 97 <input type="radio" name="isNew" style="width:18px;height:18px;" value="Y">
121 <input type="radio" style="width:18px;height:18px;" name="isNew" value="N" checked> 98 <input type="radio" style="width:18px;height:18px;" name="isNew" value="N" checked>
122 </div> 99 </div>
123 - <input type="hidden" id="isNew" for="radio" value="<%isNew%>"> 100 + <input type="hidden" id="isNew" for="radio" value="[[isNew]]">
124 </div><!-- form-group --> 101 </div><!-- form-group -->
125 <div class="form-group"> 102 <div class="form-group">
126 <label class="col-sm-1 control-label">是否热门</label> 103 <label class="col-sm-1 control-label">是否热门</label>
@@ -128,12 +105,12 @@ @@ -128,12 +105,12 @@
128 <input type="radio" name="isHot" style="width:18px;height:18px;" value="Y"> 105 <input type="radio" name="isHot" style="width:18px;height:18px;" value="Y">
129 <input type="radio" style="width:18px;height:18px;" name="isHot" value="N" checked> 106 <input type="radio" style="width:18px;height:18px;" name="isHot" value="N" checked>
130 </div> 107 </div>
131 - <input type="hidden" id="isHot" for="radio" value="<%isHot%>"> 108 + <input type="hidden" id="isHot" for="radio" value="[[isHot]]">
132 </div><!-- form-group --> 109 </div><!-- form-group -->
133 <div class="form-group"> 110 <div class="form-group">
134 <label class="col-sm-1 control-label">位置码</label> 111 <label class="col-sm-1 control-label">位置码</label>
135 <div class="col-sm-4"> 112 <div class="col-sm-4">
136 - <input type="text" data-field="contentCode" value="<%contentCode%>" class="form-control observe" placeholder="资源位位置码"> 113 + <input type="text" data-field="contentCode" value="[[contentCode]]" class="form-control observe" placeholder="资源位位置码">
137 </div> 114 </div>
138 </div><!-- form-group --> 115 </div><!-- form-group -->
139 <div class="form-group"> 116 <div class="form-group">
@@ -147,12 +124,12 @@ @@ -147,12 +124,12 @@
147 <input type="checkbox" value="web" style="width:18px;height:18px;margin-left:5px;" name="platform"> 网站 124 <input type="checkbox" value="web" style="width:18px;height:18px;margin-left:5px;" name="platform"> 网站
148 <input type="checkbox" value="platform" style="width:18px;height:18px;margin-left:5px;" name="platform"> 平台 125 <input type="checkbox" value="platform" style="width:18px;height:18px;margin-left:5px;" name="platform"> 平台
149 </div> 126 </div>
150 - <input type="hidden" id="platform" for="checkbox" value="<%platform%>"> 127 + <input type="hidden" id="platform" for="checkbox" value="[[platform]]">
151 </div><!-- form-group --> 128 </div><!-- form-group -->
152 <div class="form-group"> 129 <div class="form-group">
153 <label class="col-sm-1 control-label">排序</label> 130 <label class="col-sm-1 control-label">排序</label>
154 <div class="col-sm-9"> 131 <div class="col-sm-9">
155 - <input type="text" value="<%orderBy%>" data-field="orderBy" class="form-control observe" placeholder="排序" required> 132 + <input type="text" value="[[orderBy]]" data-field="orderBy" class="form-control observe" placeholder="排序" required>
156 </div> 133 </div>
157 </div><!-- form-group --> 134 </div><!-- form-group -->
158 </div><!-- row --> 135 </div><!-- row -->
@@ -165,7 +142,7 @@ @@ -165,7 +142,7 @@
165 142
166 <div class="col-sm-8"> 143 <div class="col-sm-8">
167 <select name="goTo" id="goTo" class="form-control"> 144 <select name="goTo" id="goTo" class="form-control">
168 - <%layout action_template%> 145 + [[layout action_template]]
169 </select> 146 </select>
170 147
171 </div> 148 </div>
@@ -183,40 +160,40 @@ @@ -183,40 +160,40 @@
183 </script> 160 </script>
184 161
185 <script type="text/template" id="categories-template"> 162 <script type="text/template" id="categories-template">
186 - <select id="firstSortId" value="<%firstSortId%>" data-field="firstSortId" style="width:150px;" tabindex="-1" title="" class="select2-offscreen observe"> 163 + <select id="firstSortId" value="[[firstSortId]]" data-field="firstSortId" style="width:150px;" tabindex="-1" title="" class="select2-offscreen observe">
187 <option value="">请选择根分类</option> 164 <option value="">请选择根分类</option>
188 - <%each categories as item index%>  
189 - <option value="<%item.id%>"><%item.sort_name%></option>  
190 - <%/each%> 165 + [[each categories as item index]]
  166 + <option value="[[item.id]]">[[item.sort_name]]</option>
  167 + [[/each]]
191 </select> 168 </select>
192 - <select id="secondSortId" value="<%secondSortId%>" data-field="secondSortId" style="width:150px;margin-left:10px;" tabindex="-1" class="select2-offscreen observe"> 169 + <select id="secondSortId" value="[[secondSortId]]" data-field="secondSortId" style="width:150px;margin-left:10px;" tabindex="-1" class="select2-offscreen observe">
193 <option value="">请选择二级分类</option> 170 <option value="">请选择二级分类</option>
194 - <%if firstSortId%>  
195 - <%each categories as item index%>  
196 - <%if item.id == firstSortId && !!item.sub%>  
197 - <%each item.sub as item1 index1%>  
198 - <option value="<%item1.id%>"><%item1.sort_name%></option>  
199 - <%/each%>  
200 - <%/if%>  
201 - <%/each%>  
202 - <%/if%> 171 + [[if firstSortId]]
  172 + [[each categories as item index]]
  173 + [[if item.id == firstSortId && !!item.sub]]
  174 + [[each item.sub as item1 index1]]
  175 + <option value="[[item1.id]]">[[item1.sort_name]]</option>
  176 + [[/each]]
  177 + [[/if]]
  178 + [[/each]]
  179 + [[/if]]
203 </select> 180 </select>
204 - <select id="threadSortId" value="<%threadSortId%>" data-field="threadSortId" style="width:150px;margin-left:10px;" tabindex="-1" title="" class="select2-offscreen observe"> 181 + <select id="threadSortId" value="[[threadSortId]]" data-field="threadSortId" style="width:150px;margin-left:10px;" tabindex="-1" title="" class="select2-offscreen observe">
205 <option value="">请选择三级分类</option> 182 <option value="">请选择三级分类</option>
206 - <%if firstSortId%>  
207 - <%each categories as item index%>  
208 - <%if item.id == firstSortId && !!item.sub%>  
209 - <%each item.sub as item1 index1%>  
210 - <%if item1.id == secondSortId && !!item1.sub%>  
211 - <%each item1.sub as item2 index2%>  
212 - <option value="<%item2.id%>"><%item2.sort_name%></option>  
213 - <%/each%>  
214 - <%/if%>  
215 - <%/each%>  
216 - <%/if%>  
217 - <%/each%>  
218 - <%/if%> 183 + [[if firstSortId]]
  184 + [[each categories as item index]]
  185 + [[if item.id == firstSortId && !!item.sub]]
  186 + [[each item.sub as item1 index1]]
  187 + [[if item1.id == secondSortId && !!item1.sub]]
  188 + [[each item1.sub as item2 index2]]
  189 + <option value="[[item2.id]]">[[item2.sort_name]]</option>
  190 + [[/each]]
  191 + [[/if]]
  192 + [[/each]]
  193 + [[/if]]
  194 + [[/each]]
  195 + [[/if]]
219 </select> 196 </select>
220 </script> 197 </script>
221 198
222 -<%include '../__partail/actions'%>  
  199 +<%include '../../../resource/views/__partail/actions'%>
1 <%include '../../../common/views/__ui/header'%> 1 <%include '../../../common/views/__ui/header'%>
2 <%include '../../../common/views/__partail/ListHeader'%> 2 <%include '../../../common/views/__partail/ListHeader'%>
3 3
4 -<div class="pageheader">  
5 - <div class="media">  
6 - <div class="pageicon pull-left">  
7 - <i class="fa fa-th-list"></i>  
8 - </div>  
9 - <div class="media-body">  
10 - <ul class="breadcrumb">  
11 - <li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>  
12 - <li><a href="">分类管理</a></li>  
13 - <li>分类列表管理</li>  
14 - </ul>  
15 -  
16 - <div>  
17 - <div style="width: 30%;float: left;">  
18 - <h4>分类列表管理</h4>  
19 - </div>  
20 - </div>  
21 - </div>  
22 - </div>  
23 -</div>  
24 -  
25 <div class="panel panel-default" style="margin-bottom:10px;"> 4 <div class="panel panel-default" style="margin-bottom:10px;">
26 <div class="panel-heading"> 5 <div class="panel-heading">
27 <a href="/operations/category/add" class="btn btn-info btn-xs">添加分类</a> 6 <a href="/operations/category/add" class="btn btn-info btn-xs">添加分类</a>
@@ -59,114 +38,114 @@ @@ -59,114 +38,114 @@
59 <script type="text/template" id="grid-template"> 38 <script type="text/template" id="grid-template">
60 <div class="dd" id="nestable" style="width:100%;"> 39 <div class="dd" id="nestable" style="width:100%;">
61 <ol class="dd-list"> 40 <ol class="dd-list">
62 - <%each data as item index%>  
63 - <li class="dd-item dd3-item" data-id="<%item.id%>"> 41 + [[each data as item index]]
  42 + <li class="dd-item dd3-item" data-id="[[item.id]]">
64 <div class="dd3-content"> 43 <div class="dd3-content">
65 <table class="table table-striped table-bordered" style="width:95%;padding:0px;margin:0px;"> 44 <table class="table table-striped table-bordered" style="width:95%;padding:0px;margin:0px;">
66 <tr> 45 <tr>
67 - <td><b><%item.sort_name%></b></td>  
68 - <td><%item.sort_name_en ? item.sort_name_en : " "%></td> 46 + <td><b>[[item.sort_name]]</b></td>
  47 + <td>[[item.sort_name_en ? item.sort_name_en : " "]]</td>
69 <td width="100px"> 48 <td width="100px">
70 - <%if !!item.sort_ico%>  
71 - <img src="<%item.sort_ico.replace('{mode}', '1').replace('{width}', '32').replace('{height}', '32')%>" width="32px"/>  
72 - <%/if%> 49 + [[if !!item.sort_ico]]
  50 + <img src="[[item.sort_ico.replace('{mode}', '1').replace('{width}', '32').replace('{height}', '32')]]" width="32px"/>
  51 + [[/if]]
73 </td> 52 </td>
74 - <td><%item.platform%></td>  
75 - <td><%!!!item.sort_level ? '' : item.sort_level%></td>  
76 - <td class="sorting_1"><%item.status == 1 ? '已开启' : '已关闭'%></td> 53 + <td>[[item.platform]]</td>
  54 + <td>[[!!!item.sort_level ? '' : item.sort_level]]</td>
  55 + <td class="sorting_1">[[item.status == 1 ? '已开启' : '已关闭']]</td>
77 <td> 56 <td>
78 - <a href="/operations/category/edit/<%item.id%>" class="btn btn-primary btn-xs">编辑</a>  
79 - <a href="JavaScript:;" data-status="<%1-item.status%>" data-id="<%item.id%>" class="btn <%item.status == 1 ? 'btn-danger' : 'btn-info'%> btn-xs updateStatus"><%item.status == 1 ? '关闭分类' : '开启分类'%></a> 57 + <a href="/operations/category/edit/[[item.id]]" class="btn btn-primary btn-xs">编辑</a>
  58 + <a href="JavaScript:;" data-status="[[1-item.status]]" data-id="[[item.id]]" class="btn [[item.status == 1 ? 'btn-danger' : 'btn-info']] btn-xs updateStatus">[[item.status == 1 ? '关闭分类' : '开启分类']]</a>
80 </td> 59 </td>
81 </tr> 60 </tr>
82 </table> 61 </table>
83 </div> 62 </div>
84 - <%if item.sub%> 63 + [[if item.sub]]
85 <ol class="dd-list"> 64 <ol class="dd-list">
86 - <%each item.sub as item1 index%>  
87 - <li class="dd-item dd3-item" data-id="<%item1.id%>"> 65 + [[each item.sub as item1 index]]
  66 + <li class="dd-item dd3-item" data-id="[[item1.id]]">
88 <div class="dd3-content" data-toggle="category"> 67 <div class="dd3-content" data-toggle="category">
89 <table class="table table-striped table-bordered" style="width:95%;padding:0px;margin:0px;"> 68 <table class="table table-striped table-bordered" style="width:95%;padding:0px;margin:0px;">
90 <tr> 69 <tr>
91 - <td><b><%item1.sort_name%></b></td>  
92 - <td><%item1.sort_name_en ? item1.sort_name_en : " "%></td> 70 + <td><b>[[item1.sort_name]]</b></td>
  71 + <td>[[item1.sort_name_en ? item1.sort_name_en : " "]]</td>
93 <td width="100"> 72 <td width="100">
94 - <%if !!item1.sort_ico%>  
95 - <img src="<%item1.sort_ico.replace('{mode}', '1').replace('{width}', '32').replace('{height}', '32')%>" width="32px"/>  
96 - <%/if%> 73 + [[if !!item1.sort_ico]]
  74 + <img src="[[item1.sort_ico.replace('{mode}', '1').replace('{width}', '32').replace('{height}', '32')]]" width="32px"/>
  75 + [[/if]]
97 </td> 76 </td>
98 - <td><%item1.platform%></td>  
99 - <td><%!!!item1.sort_level ? '' : item1.sort_level%></td>  
100 - <td class="sorting_1"><%item1.status == 1 ? '已开启' : '已关闭'%></td> 77 + <td>[[item1.platform]]</td>
  78 + <td>[[!!!item1.sort_level ? '' : item1.sort_level]]</td>
  79 + <td class="sorting_1">[[item1.status == 1 ? '已开启' : '已关闭']]</td>
101 <td> 80 <td>
102 - <a href="/operations/category/edit/<%item1.id%>" class="btn btn-primary btn-xs">编辑</a>  
103 - <a href="JavaScript:;" data-status="<%1-item1.status%>" data-id="<%item1.id%>" class="btn <%item1.status == 1 ? 'btn-danger' : 'btn-info'%> btn-xs updateStatus"><%item1.status == 1 ? '关闭分类' : '开启分类'%></a> 81 + <a href="/operations/category/edit/[[item1.id]]" class="btn btn-primary btn-xs">编辑</a>
  82 + <a href="JavaScript:;" data-status="[[1-item1.status]]" data-id="[[item1.id]]" class="btn [[item1.status == 1 ? 'btn-danger' : 'btn-info']] btn-xs updateStatus">[[item1.status == 1 ? '关闭分类' : '开启分类']]</a>
104 </td> 83 </td>
105 </tr> 84 </tr>
106 </table> 85 </table>
107 </div> 86 </div>
108 - <%if item1.sub%> 87 + [[if item1.sub]]
109 <ol class="dd-list"> 88 <ol class="dd-list">
110 - <%each item1.sub as item2 index%>  
111 - <li class="dd-item dd3-item" data-id="<%item2.id%>"> 89 + [[each item1.sub as item2 index]]
  90 + <li class="dd-item dd3-item" data-id="[[item2.id]]">
112 <div class="dd3-content" data-toggle="category"> 91 <div class="dd3-content" data-toggle="category">
113 <table class="table table-striped table-bordered" style="width:95%;padding:0px;margin:0px;"> 92 <table class="table table-striped table-bordered" style="width:95%;padding:0px;margin:0px;">
114 <tr> 93 <tr>
115 - <td><b><%item2.sort_name%></b></td>  
116 - <td><%item2.sort_name_en ? item2.sort_name_en : " "%></td> 94 + <td><b>[[item2.sort_name]]</b></td>
  95 + <td>[[item2.sort_name_en ? item2.sort_name_en : " "]]</td>
117 <td width="100"> 96 <td width="100">
118 - <%if !!item2.sort_ico%>  
119 - <img src="<%item2.sort_ico.replace('{mode}', '1').replace('{width}', '32').replace('{height}', '32')%>" width="32px"/>  
120 - <%/if%> 97 + [[if !!item2.sort_ico]]
  98 + <img src="[[item2.sort_ico.replace('{mode}', '1').replace('{width}', '32').replace('{height}', '32')]]" width="32px"/>
  99 + [[/if]]
121 </td> 100 </td>
122 - <td><%item2.platform%></td>  
123 - <td><%!!!item2.sort_level ? '' : item2.sort_level%></td>  
124 - <td class="sorting_1"><%item2.status == 1 ? '已开启' : '已关闭'%></td> 101 + <td>[[item2.platform]]</td>
  102 + <td>[[!!!item2.sort_level ? '' : item2.sort_level]]</td>
  103 + <td class="sorting_1">[[item2.status == 1 ? '已开启' : '已关闭']]</td>
125 <td> 104 <td>
126 - <a href="/operations/category/edit/<%item2.id%>" class="btn btn-primary btn-xs">编辑</a>  
127 - <a href="JavaScript:;" data-status="<%1-item2.status%>" data-id="<%item2.id%>" class="btn <%item2.status == 1 ? 'btn-danger' : 'btn-info'%> btn-xs updateStatus"><%item2.status == 1 ? '关闭分类' : '开启分类'%></a> 105 + <a href="/operations/category/edit/[[item2.id]]" class="btn btn-primary btn-xs">编辑</a>
  106 + <a href="JavaScript:;" data-status="[[1-item2.status]]" data-id="[[item2.id]]" class="btn [[item2.status == 1 ? 'btn-danger' : 'btn-info']] btn-xs updateStatus">[[item2.status == 1 ? '关闭分类' : '开启分类']]</a>
128 </td> 107 </td>
129 </tr> 108 </tr>
130 </table> 109 </table>
131 </div> 110 </div>
132 - <%if item2.sub%> 111 + [[if item2.sub]]
133 <ol class="dd-list"> 112 <ol class="dd-list">
134 - <%each item2.sub as item3 index%>  
135 - <li class="dd-item dd3-item" data-id="<%item3.id%>"> 113 + [[each item2.sub as item3 index]]
  114 + <li class="dd-item dd3-item" data-id="[[item3.id]]">
136 <div class="dd3-content" data-toggle="category"> 115 <div class="dd3-content" data-toggle="category">
137 <table class="table table-striped table-bordered" style="width:95%;padding:0px;margin:0px;"> 116 <table class="table table-striped table-bordered" style="width:95%;padding:0px;margin:0px;">
138 <tr> 117 <tr>
139 - <td><b><%item3.sort_name%></b></td>  
140 - <td><%item3.sort_name_en ? item3.sort_name_en : " "%></td> 118 + <td><b>[[item3.sort_name]]</b></td>
  119 + <td>[[item3.sort_name_en ? item3.sort_name_en : " "]]</td>
141 <td width="100"> 120 <td width="100">
142 - <%if !!item3.sort_ico%>  
143 - <img src="<%item3.sort_ico.replace('{mode}', '1').replace('{width}', '32').replace('{height}', '32')%>" width="32px"/>  
144 - <%/if%> 121 + [[if !!item3.sort_ico]]
  122 + <img src="[[item3.sort_ico.replace('{mode}', '1').replace('{width}', '32').replace('{height}', '32')]]" width="32px"/>
  123 + [[/if]]
145 </td> 124 </td>
146 - <td><%item3.platform%></td>  
147 - <td><%!!!item3.sort_level ? '' : item3.sort_level%></td>  
148 - <td class="sorting_1"><%item3.status == 1 ? '已开启' : '已关闭'%></td> 125 + <td>[[item3.platform]]</td>
  126 + <td>[[!!!item3.sort_level ? '' : item3.sort_level]]</td>
  127 + <td class="sorting_1">[[item3.status == 1 ? '已开启' : '已关闭']]</td>
149 <td> 128 <td>
150 - <a href="/operations/category/edit/<%item3.id%>" class="btn btn-primary btn-xs">编辑</a>  
151 - <a href="JavaScript:;" data-status="<%1-item3.status%>" data-id="<%item3.id%>" class="btn <%item3.status == 1 ? 'btn-danger' : 'btn-info'%> btn-xs updateStatus"><%item3.status == 1 ? '关闭分类' : '开启分类'%></a> 129 + <a href="/operations/category/edit/[[item3.id]]" class="btn btn-primary btn-xs">编辑</a>
  130 + <a href="JavaScript:;" data-status="[[1-item3.status]]" data-id="[[item3.id]]" class="btn [[item3.status == 1 ? 'btn-danger' : 'btn-info']] btn-xs updateStatus">[[item3.status == 1 ? '关闭分类' : '开启分类']]</a>
152 </td> 131 </td>
153 </tr> 132 </tr>
154 </table> 133 </table>
155 </div> 134 </div>
156 </li> 135 </li>
157 - <%/each%> 136 + [[/each]]
158 </ol> 137 </ol>
159 - <%/if%> 138 + [[/if]]
160 </li> 139 </li>
161 - <%/each%> 140 + [[/each]]
162 </ol> 141 </ol>
163 - <%/if%> 142 + [[/if]]
164 </li> 143 </li>
165 - <%/each%> 144 + [[/each]]
166 </ol> 145 </ol>
167 - <%/if%> 146 + [[/if]]
168 </li> 147 </li>
169 - <%/each%> 148 + [[/each]]
170 </ol> 149 </ol>
171 </div> 150 </div>
172 </script> 151 </script>
@@ -54,7 +54,6 @@ var util = { @@ -54,7 +54,6 @@ var util = {
54 dataType: 'json', 54 dataType: 'json',
55 data: options.data || {}, 55 data: options.data || {},
56 success: function(res) { 56 success: function(res) {
57 - res = res.data;  
58 if (res.code != 200) { 57 if (res.code != 200) {
59 util.__tip(res.message, "warning"); 58 util.__tip(res.message, "warning");
60 return false; 59 return false;
@@ -3,8 +3,8 @@ @@ -3,8 +3,8 @@
3 */ 3 */
4 4
5 var $ = require('jquery'), 5 var $ = require('jquery'),
6 - common = require('../common/common'),  
7 - Category = require('./partials/Category'); 6 + common = require('../../../common/common'),
  7 + Category = require('./../partials/Category');
8 8
9 var edit = new common.edit2(".row", {bucket:"yhb-img01"}); 9 var edit = new common.edit2(".row", {bucket:"yhb-img01"});
10 10
@@ -3,8 +3,8 @@ @@ -3,8 +3,8 @@
3 */ 3 */
4 4
5 var $ = require('jquery'), 5 var $ = require('jquery'),
6 - common = require('../common/common');  
7 -require('../util/jquery.nestable.js'); 6 + common = require('../../../common/common');
  7 +require('../../../common/util/jquery.nestable.js');
8 8
9 new common.dropDown({el: "#status"}); 9 new common.dropDown({el: "#status"});
10 new common.dropDown({el: "#platform"}); 10 new common.dropDown({el: "#platform"});