Authored by wangwei

分隔楼层

... ... @@ -8,6 +8,10 @@
<div class="col-sm-12">
<img src="[[module.contentData.data[0].src]]" title="[[module.contentData.data[0].title]]">
</div>
[[else if module.contentData.template_name=='divideImage']]
<div class="col-sm-12">
<img src="[[module.contentData.data[0].src]]" title="[[module.contentData.data[0].title]]">
</div>
[[else if module.contentData.template_name=='smallPic']]
[[each module.contentData.data as item i]]
<div class="col-sm-6">
... ... @@ -178,6 +182,52 @@
</div>
</div>
</script>
<script type="text/template" id="divideImage-template">
<div class="rows">
<div id="baseForm">
<ul class="draggable" data-array="data">
[[each contentData.data as item index]]
<li>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<tbody>
<tr>
<td align="center">[[index+1]]</td>
<td align="center">
<input type="file" name="file" id="src-[[index]]" value="[[item.src]]"
data-field="[[index]].src" data-index="[[index]]" required/>
</td>
<td>
<div class="form-group">
<div class="col-sm-10">
<select class="form-control observe" data-field="[[index]].url.action"
value='[[item.url?item.url.action:""]]'>
[[layout action_template]]
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-10">
<input class="form-control observe" placeholder="跳转地址" data-field="[[index]].url.url"
value="[[item.url?item.url.url:'']]"/>
</div>
</div>
<div class="form-group">
<div class="col-sm-10">
<input class="form-control observe" value="[[item.alt?item.alt:'']]" placeholder="图片描述"
data-field='[[index]].alt'/>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</li>
[[/each]]
</ul>
</div>
</div>
</script>
<!--多张小图-->
<script type="text/template" id="smallPic-template">
[[if contentData.data.length]]
... ...
... ... @@ -278,6 +278,20 @@ var Button = [
}]
},
{
template_intro: "分隔图",
dialog: "template_dialog_grid",
template_name: "deviceImage",
data: [{
"url": {
action: "",
url: ""
},
"alt": "",
"src": "",
"imgId": ""
}]
},
{
template_intro: "两张小图",
dialog: "template_dialog_grid",
template_name: "smallPic",
... ...
... ... @@ -21,6 +21,20 @@ var Button = [
}]
},
{
template_intro: "分隔图",
button_name: "分隔图",
dialog: "divideImage-template",
template_name: "divideImage",
data: [{
"url": {
"action": "",
"url": ""
},
"alt": "",
"src": "",
}]
},
{
button_name: "添加小图",
template_name: "smallPic",
dialog:"smallPic-template",
... ...
... ... @@ -157,6 +157,14 @@ var addObj = {
"src": "",
"imgId": "0"
},
divideImage_data:{
"url": {
"action": "",
"url": ""
},
"alt": "",
"src": "",
},
carouselBanner_list: {//轮播banner->banner
"src": "",
"url": {}
... ...