Authored by wangwei

后台样式改版

... ... @@ -25,7 +25,7 @@
<input type="hidden" class="form-control"id="dateFromInfinity"value="1970-01-01 08:00:00">
[[each times as item index]]
<li class="[[index==selected?'active':'']] timesLi" data-index="[[index]]">
<input type="text" [[(item.time=="" || item.status == "进行中") ? "disabled" : (index==selected?"":"disabled")]] class="form-control preTimes" data-index="[[index]]" jsaction="time" id="dateFrom[[index]]" prompt="时间" value="[[item.time]]" readonly required>
<input type="text" [[(item.time=="" || item.status == "进行中") ? "disabled" : (index==selected?"":"disabled")]] class="form-control preTimes" data-index="[[index]]" jsaction="time" id="dateFrom[[index]]" prompt="时间" value="[[item.time]]" readonly required>
<span style="display: block; line-height: 20px">[[item.status||"默认"]]</span>
</li>
[[/each]]
... ... @@ -48,20 +48,20 @@
</nav>
</div>
<!--right-->
<div class="content-right" id="contentRight">
<ul class="nav nav-pills nav-stacked">
<li class="active"><a href="#">有货APP</a></li>
<div class="content-right panel-heading" id="contentRight" style="width:700px">
<ul class="nav nav-pills nav-justified" style="height: 80px">
<li class="button-type active"><a href="#" data-channel="all">全部</a></li>
<li class="button-type "><a href="#" data-channel="app">有货APP</a></li>
<!-- 这里的active属性就是使得所在的li的背景色变为蓝色-->
<li><a href="#">有货H5</a></li>
<li><a href="#">有货PC</a></li>
<li><a href="#">有货小程序</a></li>
<li><a href="#">BLK</a></li>
<li><a href="#">全部</a></li>
<li class="button-type"><a href="#" data-channel="h5">有货H5</a></li>
<li class="button-type"><a href="#" data-channel="pc">有货PC</a></li>
<li class="button-type"><a href="#" data-channel="miniapp">有货小程序</a></li>
<li class="button-type"><a href="#" data-channel="blk">BLK</a></li>
</ul>
<nav>
<em><i></i></em>
<ul class="contents clearfix">
</ul>
</ul>
... ... @@ -73,7 +73,7 @@
<!-- 按钮 -->
<script type="text/template" id="template_content_btns">
[[each btns as btn index]]
<li><a href="javascript:void(0)" name="text" class="add_btn" data-index="[[index]]" [[if btn.isNewFloor=='1']] style="font-weight: bold" [[/if]]>[[btn.button_name]]</a></li>
<li><a href="javascript:void(0)" name="text" class="add_btn" data-index="[[index]]" >[[btn.button_name]]</a></li>
[[/each]]
</script>
... ...
... ... @@ -5,6 +5,8 @@ var resourceObj = require('./../partials/resourceObj');
var Validate = require('./../partials/Validate1');
var addObj = require('./../partials/addObj');
require('../../../common/util/datepicker');
var Button = [];
/*获取数据*/
var resources = [];
... ... @@ -19,6 +21,9 @@ var code;
var param = location.href.substring(location.href.lastIndexOf("/") + 1);
if(param==0){
code = location.href.substring(location.href.lastIndexOf("code_")+5,location.href.lastIndexOf("platform_")-1);
}else if(param.indexOf("#")!=-1){
param = param.substring(0,param.length-1);
console.log("param=====",param);
}
//0:查看1:编辑
var lock_type = location.href.substring(location.href.lastIndexOf("/")-1,location.href.lastIndexOf("/"));
... ... @@ -52,6 +57,8 @@ if(param!=0){
var val = originButton[i];
Button.push(val);
}
if(lock_type==1){
common.util.__ajax({
url: "/resources/updateLock",
... ... @@ -501,8 +508,9 @@ for(var i = 0; i < resources.length; i++) {
Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas[currIndex]});
/*第四部 操作按钮 添加 删除 修改*/
var Button_content = [];
$(document).on("click", ".add_btn", function () {
var item = Button[$(this).data("index")];
var item = Button_content[$(this).data("index")];
Bll.module = {};
Bll.module.contentData = $.extend(true, {}, item);
Bll.toast(-1, Bll.module);
... ... @@ -2101,3 +2109,53 @@ function changeGuangRqDivShow(guangFlag){
$(".guangRqSysShow").css('display','none');
}
}
var BT = [];
BT.push({
"channel":"app",
"buttonNames":['focus','newUserFloor','newSingleImage','twoPicture','newProductListFloor','popularListFloor','findGoodsListFloor','imageListFloor','recommendContentFive','limitSaleListFloor','editorTalk','shopActivityListFloor','shopFloor','tabFloor','textNav','tfGoodsList','recommendGoodsGroup','guangRqFloor','guangShowOrderFloor','timeImage']
});
BT.push({
"channel":"pc",
"buttonNames":['recommendContentThree','text','singleImage','smallPic','focus','addfloor','textNav','hotCategory','link','appIconList','goods']
});
BT.push({
"channel":"h5",
"buttonNames":['focus','appIconList','divideImage','singleImage','recommendContentFive','appHotBrands','popularSingleProduct','newUserFloor']
});
BT.push({
"channel":"miniapp",
"buttonNames":['focus','recommendContentFive','imageListFloor','newSingleImage','newProductListFloor','popularListFloor']
});
BT.push({
"channel":"blk",
"buttonNames":['newSingleImage','blkNewProductFloor','twoPicture','focus','recommendContentFive','textNav','tfGoodsList','blkCategory']
});
$(document).on("click", ".button-type a", function() {
Button_content = [];
var channel = $(this).data("channel");
if(channel=='all'){
Button_content = originButton;
Bll.__render(".contents", "template_content_btns", {btns: originButton});
}else{
for(var i = 0; i < BT.length; i++) {
if(BT[i].channel==channel){
var buttonNames = BT[i].buttonNames;
for(var t=0;t<originButton.length;t++){
if(buttonNames.indexOf(originButton[t].template_name)>-1){
Button_content.push(originButton[t]);
}
}
}
}
Bll.__render(".contents", "template_content_btns", {btns: Button_content});
}
$(".button-type").removeClass("active");
$(".button-type a").each(function(index) {
if($(this).data("channel") == channel) {
$(this).parent().addClass("active");
}
});
});
\ No newline at end of file
... ...