Showing
5 changed files
with
83 additions
and
41 deletions
1 | <!-- PC模板渲染 --> | 1 | <!-- PC模板渲染 --> |
2 | <script type="text/template" id="pc-template"> | 2 | <script type="text/template" id="pc-template"> |
3 | - <div class="pc-template"> | ||
4 | - <!-- 1150区域 --> | ||
5 | - [[each data[0] as item index]] | ||
6 | - <!-- 店招 --> | ||
7 | - [[if item.moduleType == 'ShopBanner']] | ||
8 | - [[if item.moduleData]] | ||
9 | - [[else]] | ||
10 | - <div class="pc-shop-banner modular-editor"> | ||
11 | - <img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo"> | ||
12 | - </div> | 3 | + <div class="pc-template-area"> |
4 | + <div class="pc-template"> | ||
5 | + <!-- 1150区域 --> | ||
6 | + [[each data[0] as item index]] | ||
7 | + <!-- 店招 --> | ||
8 | + [[if item.moduleType == 'ShopBanner']] | ||
9 | + [[if item.moduleData]] | ||
10 | + [[else]] | ||
11 | + <div class="modular-editor pc-shop-banner"> | ||
12 | + <img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo"> | ||
13 | + </div> | ||
14 | + [[/if]] | ||
13 | [[/if]] | 15 | [[/if]] |
14 | - [[/if]] | ||
15 | - <!-- 导航 --> | ||
16 | - [[if item.moduleType == 'ShopNavbar']] | ||
17 | - [[if item.moduleData]] | ||
18 | - [[else]] | ||
19 | - <div class="pc-shop-navbar modular-editor"></div> | 16 | + <!-- 导航 --> |
17 | + [[if item.moduleType == 'ShopNavbar']] | ||
18 | + [[if item.moduleData]] | ||
19 | + [[else]] | ||
20 | + <div class="pc-shop-navbar modular-editor"> | ||
21 | + <ul> | ||
22 | + <li><a href="javascript:;">店铺首页</a></li> | ||
23 | + <li><a href="javascript:;">全部商品</a></li> | ||
24 | + <li><a href="javascript:;">人气单品</a></li> | ||
25 | + <li><a href="javascript:;">新品上架</a></li> | ||
26 | + </ul> | ||
27 | + </div> | ||
28 | + [[/if]] | ||
20 | [[/if]] | 29 | [[/if]] |
21 | - [[/if]] | ||
22 | - [[/each]] | 30 | + [[/each]] |
23 | 31 | ||
24 | - <div> | ||
25 | - <!-- 160区域 --> | ||
26 | - <div class="left-area"> | ||
27 | - [[each data[1] as item index]] | ||
28 | - [[/each]] | ||
29 | - </div> | 32 | + <div> |
33 | + <!-- 160区域 --> | ||
34 | + <div class="left-area"> | ||
35 | + [[each data[1] as item index]] | ||
36 | + [[/each]] | ||
37 | + </div> | ||
30 | 38 | ||
31 | - <!-- 975区域 --> | ||
32 | - <div class="right-area"> | ||
33 | - [[each data[2] as item index]] | ||
34 | - [[/each]] | 39 | + <!-- 975区域 --> |
40 | + <div class="right-area"> | ||
41 | + [[each data[2] as item index]] | ||
42 | + [[/each]] | ||
43 | + </div> | ||
35 | </div> | 44 | </div> |
36 | </div> | 45 | </div> |
37 | </div> | 46 | </div> |
@@ -217,11 +217,13 @@ var Bll = { | @@ -217,11 +217,13 @@ var Bll = { | ||
217 | }, | 217 | }, |
218 | 218 | ||
219 | renderDecoratorPCTemplate: function() { | 219 | renderDecoratorPCTemplate: function() { |
220 | - $('.main-decorator').html(common.util.__template2($('#pc-template').html(), {data: defaultPCModuleData})); | 220 | + // $('.main-decorator').html(common.util.__template2($('#pc-template').html(), {data: defaultPCModuleData})); |
221 | + $('.decorator-right').html(common.util.__template2($('#pc-template').html(), {data: defaultPCModuleData})); | ||
221 | }, | 222 | }, |
222 | 223 | ||
223 | renderDecoratorAppTemplate: function() { | 224 | renderDecoratorAppTemplate: function() { |
224 | - $('.main-decorator').html(common.util.__template2($('#app-template').html(), {data: Bll.moduleDataList})); | 225 | + // $('.main-decorator').html(common.util.__template2($('#app-template').html(), {data: Bll.moduleDataList})); |
226 | + $('.decorator-right').html(common.util.__template2($('#app-template').html(), {data: Bll.moduleDataList})); | ||
225 | }, | 227 | }, |
226 | 228 | ||
227 | // 模块增加编辑图标 | 229 | // 模块增加编辑图标 |
@@ -545,6 +547,9 @@ var Bll = { | @@ -545,6 +547,9 @@ var Bll = { | ||
545 | Bll.moduleGrid.init(Bll.moduleGrid.__rows); | 547 | Bll.moduleGrid.init(Bll.moduleGrid.__rows); |
546 | break; | 548 | break; |
547 | }; | 549 | }; |
550 | + | ||
551 | + var e = new common.edit('.editorTitle',{bucket:"yhb-img02"}); | ||
552 | + e.init(); | ||
548 | }, | 553 | }, |
549 | 554 | ||
550 | // 设置当前模块与下个模块间的间隔,对于"店招"模块不涉及,没有间距 | 555 | // 设置当前模块与下个模块间的间隔,对于"店招"模块不涉及,没有间距 |
@@ -555,9 +560,6 @@ var Bll = { | @@ -555,9 +560,6 @@ var Bll = { | ||
555 | } | 560 | } |
556 | 561 | ||
557 | $('.editorTitle').append(common.util.__template2($('#module-margin-template').html(), {isModuleMargin: Bll.getModuleMargin(module)})); | 562 | $('.editorTitle').append(common.util.__template2($('#module-margin-template').html(), {isModuleMargin: Bll.getModuleMargin(module)})); |
558 | - | ||
559 | - var e = new common.edit('.editorTitle',{bucket:"yhb-img02"}); | ||
560 | - e.init(); | ||
561 | }, | 563 | }, |
562 | 564 | ||
563 | // 获取是否设置模块间间距,默认是1 | 565 | // 获取是否设置模块间间距,默认是1 |
@@ -1194,6 +1196,7 @@ var publishDecoratorTemplate = function() { | @@ -1194,6 +1196,7 @@ var publishDecoratorTemplate = function() { | ||
1194 | var curTemplate = $('.selected-template').parent(); | 1196 | var curTemplate = $('.selected-template').parent(); |
1195 | var templateId = $(curTemplate).data('id'); | 1197 | var templateId = $(curTemplate).data('id'); |
1196 | var isSystemTemplate = $(curTemplate).data('is-system-template'); | 1198 | var isSystemTemplate = $(curTemplate).data('is-system-template'); |
1199 | + var index = $(curTemplate).data('index'); | ||
1197 | 1200 | ||
1198 | if(isSystemTemplate && +isSystemTemplate == 1) { | 1201 | if(isSystemTemplate && +isSystemTemplate == 1) { |
1199 | common.util.__tip('系统模板无法发布,请编辑存储为备份模板后,再发布!', 'warning'); | 1202 | common.util.__tip('系统模板无法发布,请编辑存储为备份模板后,再发布!', 'warning'); |
@@ -1205,6 +1208,10 @@ var publishDecoratorTemplate = function() { | @@ -1205,6 +1208,10 @@ var publishDecoratorTemplate = function() { | ||
1205 | data: { | 1208 | data: { |
1206 | templateId: templateId | 1209 | templateId: templateId |
1207 | } | 1210 | } |
1211 | + }, function(res) { | ||
1212 | + // 发布模板之后,模板状态变更,重载模板列表 | ||
1213 | + Bll.getTemplates(); | ||
1214 | + Bll.renderTemplateList(index); | ||
1208 | }); | 1215 | }); |
1209 | }; | 1216 | }; |
1210 | 1217 |
@@ -209,7 +209,7 @@ | @@ -209,7 +209,7 @@ | ||
209 | .decorator-template .template-del-icon { | 209 | .decorator-template .template-del-icon { |
210 | position: absolute; | 210 | position: absolute; |
211 | margin-top: -108px; | 211 | margin-top: -108px; |
212 | - margin-left: 18px; | 212 | + margin-left: 20px; |
213 | z-index: 21; | 213 | z-index: 21; |
214 | width: 20px; | 214 | width: 20px; |
215 | height: 20px; | 215 | height: 20px; |
@@ -221,6 +221,7 @@ | @@ -221,6 +221,7 @@ | ||
221 | top: 60px; | 221 | top: 60px; |
222 | left: 200px; | 222 | left: 200px; |
223 | bottom: 0; | 223 | bottom: 0; |
224 | + overflow: hidden; | ||
224 | } | 225 | } |
225 | 226 | ||
226 | .app-template { | 227 | .app-template { |
@@ -234,13 +235,13 @@ | @@ -234,13 +235,13 @@ | ||
234 | } | 235 | } |
235 | 236 | ||
236 | .pc-template { | 237 | .pc-template { |
237 | - margin-top: 38px; | 238 | + /*margin-top: 38px;*/ |
238 | width: 1150px; | 239 | width: 1150px; |
239 | overflow-y: auto; | 240 | overflow-y: auto; |
240 | - height: 800px; | 241 | + height: 1800px; |
241 | background: #F0F0F0; | 242 | background: #F0F0F0; |
242 | border: 1px dashed; | 243 | border: 1px dashed; |
243 | - box-shadow: 0px 0px 15px rgba(0,0,0,.8); | 244 | + /*box-shadow: 0px 0px 15px rgba(0,0,0,.8);*/ |
244 | } | 245 | } |
245 | 246 | ||
246 | /* 适配笔记本电脑 */ | 247 | /* 适配笔记本电脑 */ |
1 | +.pc-template-area { | ||
2 | + margin-top: 38px; | ||
3 | + height: 100%; | ||
4 | + overflow-y: auto; | ||
5 | +} | ||
6 | + | ||
1 | .pc-template .pc-shop-banner { | 7 | .pc-template .pc-shop-banner { |
2 | height: 150px; | 8 | height: 150px; |
3 | margin-bottom: 0; | 9 | margin-bottom: 0; |
4 | text-align: center; | 10 | text-align: center; |
5 | } | 11 | } |
6 | 12 | ||
13 | +.pc-shop-banner .logo { | ||
14 | + top: 66px !important; | ||
15 | +} | ||
16 | + | ||
17 | + | ||
7 | .pc-template .pc-shop-navbar { | 18 | .pc-template .pc-shop-navbar { |
8 | height: 40px; | 19 | height: 40px; |
9 | margin-bottom: 30px; | 20 | margin-bottom: 30px; |
10 | - background: url(/static/assets/images/decorator/pc-shop-navbar.png); | 21 | + background: #000000; |
11 | } | 22 | } |
12 | 23 | ||
13 | -.pc-shop-banner .logo { | ||
14 | - top: 66px !important; | 24 | +.pc-shop-navbar ul { |
25 | + list-style: none; | ||
26 | + margin: 0; | ||
27 | +} | ||
28 | + | ||
29 | +.pc-shop-navbar ul li { | ||
30 | + float: left; | ||
31 | + width: 14%; | ||
32 | + line-height: 40px; | ||
33 | + padding: 0 20px; | ||
34 | + font-size: 16px; | ||
35 | + font-family: microsoft yahei; | ||
36 | +} | ||
37 | + | ||
38 | +.pc-shop-navbar ul li a { | ||
39 | + color: #FFFFFF; | ||
15 | } | 40 | } |
16 | 41 | ||
17 | .pc-template .left-area { | 42 | .pc-template .left-area { |
-
Please register or login to post a comment