Authored by 陶雨

资源内容预发布时间限制修改为不能重复

... ... @@ -401,6 +401,12 @@ $(document).on("click", "#saveTime", function() {
common.util.__tip("该页面不能更改时间");
return;
}
for(var i = 0; i < times.length; i++) {
if(currIndex != i && times[currIndex].time == times[i].time) {
common.util.__tip("不能和已有的预发布时间重复");
return;
}
}
common.util.__ajax({
url: "/resources/updateResPublishTime",
data: {
... ... @@ -463,6 +469,7 @@ $(document).on("click", "#sub_btn", function () {
addSuffix(contentData);
delete contentData.button_name;
delete contentData.dialog;
delete contentData.__title;
//kids推荐品牌
if (contentData.template_name == "kidsBrands") {
action = contentData.data.params.more_url.action || "";
... ...
... ... @@ -43,7 +43,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:end:dateFrom[[index-1<0?'Infinity1':index-1]]" jsaction1="time:start:dateFrom[[index+1>=times.length?Infinity:index+1]]" 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]]
... ...