Edit.html
9.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<%include '../../common/__ui/header'%>
<%include '../../common/__partail/ListHeader'%>
<div class="contentpanel">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title"><%pageName%></h4>
</div><!-- panel-heading -->
<div id="info-content" class="panel-body" action="<%action%>" type="<%type%>">
</div><!-- panel-body -->
<div class="panel-footer">
<div class="row">
<div class="col-sm-9 col-sm-offset-3">
<a id="saveBtn" class="btn btn-primary mr5">添加</a>
<a href="/operations/category/index" class="btn btn-primary mr5">取消</a>
</div>
</div>
</div><!-- panel-footer -->
</div><!-- panel -->
</div>
</div>
</div>
<script type="text/template" id="content-template">
<div class="row form-bordered">
<div class="form-group">
<label class="col-sm-1 control-label">分类名称</label>
<div class="col-sm-9">
<input type="text" value="[[sortName]]" class="form-control observe" data-field="sortName" placeholder="分类名称" required>
<p style="color:#999">注:分类名称必填</p>
</div>
</div><!-- form-group -->
<div class="form-group">
<label class="col-sm-1 control-label">英文名称</label>
<div class="col-sm-9">
<input type="text" value="[[sortNameEn]]" class="form-control observe" data-field="sortNameEn" placeholder="英文名称" required>
</div>
</div><!-- form-group -->
<div class="form-group">
<label class="col-sm-1 control-label">色值</label>
<div class="col-sm-2">
<input type="text" value="[[sortNameColor]]" data-field="sortNameColor" class="form-control observe" prompt="色值">
</div>
</div><!-- form-group -->
<div class="form-group">
<label class="col-sm-1 control-label">上级分类</label>
<div class="col-sm-9" id="categories-content">
</div>
</div><!-- form-group -->
<div class="form-group">
<label class="col-sm-1 control-label">分类图标</label>
<div class="col-sm-9">
<input type="file" name="file" prompt="分类图标" value="[[sortIco]]" class="observe" data-field="sortIco">
</div>
</div>
<div class="form-group">
<label class="col-sm-1 control-label">分类大图标</label>
<div class="col-sm-9">
<input type="file" name="file" prompt="分类大图标" value="[[sortIcoBig]]" class="observe" data-field="sortIcoBig">
</div>
</div>
<div class="form-group">
<label class="col-sm-1 control-label">跳转方式</label>
<div class="col-sm-9">
<input type="radio" name="isNewPage" style="width:18px;height:18px;" value="N"> 当前页面打开
<input type="radio" style="width:18px;height:18px;" name="isNewPage" value="Y" checked> 新页面打开
</div>
<input type="hidden" id="isNewPage" for="radio" value="[[isNewPage]]">
</div>
<div class="form-group">
<label class="col-sm-1 control-label">跳转链接</label>
<div class="col-sm-9">
<input type="text" id="sortUrl" value='[[sortUrl]]' class="form-control" placeholder="跳转链接" required readonly style="cursor: not-allowed;">
<a class="btn btn-info" id="addUrl">添加链接</a>
<p style="color:#999">注:必填,链接中不能有英文单引号</p>
</div>
</div><!-- form-group -->
<div class="form-group">
<label class="col-sm-1 control-label">分隔符</label>
<div class="col-sm-9">
<input type="radio" name="separativeSign" style="width:18px;height:18px;" value="Y"> 是
<input type="radio" style="width:18px;height:18px;" name="separativeSign" value="N" checked> 否
</div>
<input type="hidden" id="separativeSign" for="radio" value="[[separativeSign]]">
</div><!-- form-group -->
<div class="form-group">
<label class="col-sm-1 control-label">是否新品</label>
<div class="col-sm-9">
<input type="radio" name="isNew" style="width:18px;height:18px;" value="Y"> 是
<input type="radio" style="width:18px;height:18px;" name="isNew" value="N" checked> 否
</div>
<input type="hidden" id="isNew" for="radio" value="[[isNew]]">
</div><!-- form-group -->
<div class="form-group">
<label class="col-sm-1 control-label">是否热门</label>
<div class="col-sm-9">
<input type="radio" name="isHot" style="width:18px;height:18px;" value="Y"> 是
<input type="radio" style="width:18px;height:18px;" name="isHot" value="N" checked> 否
</div>
<input type="hidden" id="isHot" for="radio" value="[[isHot]]">
</div><!-- form-group -->
<div class="form-group">
<label class="col-sm-1 control-label">位置码</label>
<div class="col-sm-4">
<input type="text" data-field="contentCode" value="[[contentCode]]" class="form-control observe" placeholder="资源位位置码">
</div>
</div><!-- form-group -->
<div class="form-group">
<label class="col-sm-1 control-label">显示平台</label>
<div class="col-sm-8">
<input type="checkbox" value="iphone" style="width:18px;height:18px;margin-left:5px;" name="platform"> IOS手机
<input type="checkbox" value="ipad" style="width:18px;height:18px;margin-left:5px;" name="platform"> IOS Pad
<input type="checkbox" value="android" style="width:18px;height:18px;margin-left:5px;" name="platform"> 安卓手机
<input type="checkbox" value="androidpad" style="width:18px;height:18px;margin-left:5px;" name="platform"> 安卓Pad
<input type="checkbox" value="h5" style="width:18px;height:18px;margin-left:5px;" name="platform"> 手机网站
<input type="checkbox" value="web" style="width:18px;height:18px;margin-left:5px;" name="platform"> 网站
<input type="checkbox" value="platform" style="width:18px;height:18px;margin-left:5px;" name="platform"> 平台
</div>
<input type="hidden" id="platform" for="checkbox" value="[[platform]]">
</div><!-- form-group -->
<div class="form-group">
<label class="col-sm-1 control-label">排序</label>
<div class="col-sm-9">
<input type="text" value="[[orderBy]]" data-field="orderBy" class="form-control observe" placeholder="排序" required>
</div>
</div><!-- form-group -->
</div><!-- row -->
</script>
<script type="text/template" id="template2">
<div id="action-row" class="rows">
<div class="form-group">
<label class="col-sm-2 control-label">选择跳转目的地:</label>
<div class="col-sm-8">
<select name="goTo" id="goTo" class="form-control" value="[[action]]">
[[layout action_template]]
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">跳转地址:</label>
<div class="col-sm-8">
<textarea rows="2" id="goToUrl" class="form-control" placeholder="跳转地址">[[url]]</textarea>
</div>
</div>
</div>
</script>
<script type="text/template" id="categories-template">
<select id="firstSortId" value="[[firstSortId]]" data-field="firstSortId" style="width:150px;" tabindex="-1" title="" class="select2-offscreen observe">
<option value="">请选择根分类</option>
[[each categories as item index]]
<option value="[[item.id]]">[[item.sort_name]]</option>
[[/each]]
</select>
<select id="secondSortId" value="[[secondSortId]]" data-field="secondSortId" style="width:150px;margin-left:10px;" tabindex="-1" class="select2-offscreen observe">
<option value="">请选择二级分类</option>
[[if firstSortId]]
[[each categories as item index]]
[[if item.id == firstSortId && !!item.sub]]
[[each item.sub as item1 index1]]
<option value="[[item1.id]]">[[item1.sort_name]]</option>
[[/each]]
[[/if]]
[[/each]]
[[/if]]
</select>
<select id="threadSortId" value="[[threadSortId]]" data-field="threadSortId" style="width:150px;margin-left:10px;" tabindex="-1" title="" class="select2-offscreen observe">
<option value="">请选择三级分类</option>
[[if firstSortId]]
[[each categories as item index]]
[[if item.id == firstSortId && !!item.sub]]
[[each item.sub as item1 index1]]
[[if item1.id == secondSortId && !!item1.sub]]
[[each item1.sub as item2 index2]]
<option value="[[item2.id]]">[[item2.sort_name]]</option>
[[/each]]
[[/if]]
[[/each]]
[[/if]]
[[/each]]
[[/if]]
</select>
</script>
<%include '../../resource/__partail/actions'%>