Authored by wangwei

分隔楼层

@@ -8,6 +8,10 @@ @@ -8,6 +8,10 @@
8 <div class="col-sm-12"> 8 <div class="col-sm-12">
9 <img src="[[module.contentData.data[0].src]]" title="[[module.contentData.data[0].title]]"> 9 <img src="[[module.contentData.data[0].src]]" title="[[module.contentData.data[0].title]]">
10 </div> 10 </div>
  11 + [[else if module.contentData.template_name=='divideImage']]
  12 + <div class="col-sm-12">
  13 + <img src="[[module.contentData.data[0].src]]" title="[[module.contentData.data[0].title]]">
  14 + </div>
11 [[else if module.contentData.template_name=='smallPic']] 15 [[else if module.contentData.template_name=='smallPic']]
12 [[each module.contentData.data as item i]] 16 [[each module.contentData.data as item i]]
13 <div class="col-sm-6"> 17 <div class="col-sm-6">
@@ -178,6 +182,52 @@ @@ -178,6 +182,52 @@
178 </div> 182 </div>
179 </div> 183 </div>
180 </script> 184 </script>
  185 +<script type="text/template" id="divideImage-template">
  186 + <div class="rows">
  187 + <div id="baseForm">
  188 + <ul class="draggable" data-array="data">
  189 + [[each contentData.data as item index]]
  190 + <li>
  191 + <table class="table table-hover table-bordered responsive dataTable no-footer">
  192 + <tbody>
  193 + <tr>
  194 + <td align="center">[[index+1]]</td>
  195 + <td align="center">
  196 + <input type="file" name="file" id="src-[[index]]" value="[[item.src]]"
  197 + data-field="[[index]].src" data-index="[[index]]" required/>
  198 + </td>
  199 + <td>
  200 + <div class="form-group">
  201 + <div class="col-sm-10">
  202 + <select class="form-control observe" data-field="[[index]].url.action"
  203 + value='[[item.url?item.url.action:""]]'>
  204 + [[layout action_template]]
  205 + </select>
  206 + </div>
  207 + </div>
  208 +
  209 + <div class="form-group">
  210 + <div class="col-sm-10">
  211 + <input class="form-control observe" placeholder="跳转地址" data-field="[[index]].url.url"
  212 + value="[[item.url?item.url.url:'']]"/>
  213 + </div>
  214 + </div>
  215 + <div class="form-group">
  216 + <div class="col-sm-10">
  217 + <input class="form-control observe" value="[[item.alt?item.alt:'']]" placeholder="图片描述"
  218 + data-field='[[index]].alt'/>
  219 + </div>
  220 + </div>
  221 + </td>
  222 + </tr>
  223 + </tbody>
  224 + </table>
  225 + </li>
  226 + [[/each]]
  227 + </ul>
  228 + </div>
  229 + </div>
  230 + </script>
181 <!--多张小图--> 231 <!--多张小图-->
182 <script type="text/template" id="smallPic-template"> 232 <script type="text/template" id="smallPic-template">
183 [[if contentData.data.length]] 233 [[if contentData.data.length]]
@@ -278,6 +278,20 @@ var Button = [ @@ -278,6 +278,20 @@ var Button = [
278 }] 278 }]
279 }, 279 },
280 { 280 {
  281 + template_intro: "分隔图",
  282 + dialog: "template_dialog_grid",
  283 + template_name: "deviceImage",
  284 + data: [{
  285 + "url": {
  286 + action: "",
  287 + url: ""
  288 + },
  289 + "alt": "",
  290 + "src": "",
  291 + "imgId": ""
  292 + }]
  293 + },
  294 + {
281 template_intro: "两张小图", 295 template_intro: "两张小图",
282 dialog: "template_dialog_grid", 296 dialog: "template_dialog_grid",
283 template_name: "smallPic", 297 template_name: "smallPic",
@@ -21,6 +21,20 @@ var Button = [ @@ -21,6 +21,20 @@ var Button = [
21 }] 21 }]
22 }, 22 },
23 { 23 {
  24 + template_intro: "分隔图",
  25 + button_name: "分隔图",
  26 + dialog: "divideImage-template",
  27 + template_name: "divideImage",
  28 + data: [{
  29 + "url": {
  30 + "action": "",
  31 + "url": ""
  32 + },
  33 + "alt": "",
  34 + "src": "",
  35 + }]
  36 + },
  37 + {
24 button_name: "添加小图", 38 button_name: "添加小图",
25 template_name: "smallPic", 39 template_name: "smallPic",
26 dialog:"smallPic-template", 40 dialog:"smallPic-template",
@@ -157,6 +157,14 @@ var addObj = { @@ -157,6 +157,14 @@ var addObj = {
157 "src": "", 157 "src": "",
158 "imgId": "0" 158 "imgId": "0"
159 }, 159 },
  160 + divideImage_data:{
  161 + "url": {
  162 + "action": "",
  163 + "url": ""
  164 + },
  165 + "alt": "",
  166 + "src": "",
  167 + },
160 carouselBanner_list: {//轮播banner->banner 168 carouselBanner_list: {//轮播banner->banner
161 "src": "", 169 "src": "",
162 "url": {} 170 "url": {}