...
|
...
|
@@ -13,6 +13,8 @@ var currIndex = 0; |
|
|
var lockStatus = 0;
|
|
|
//资源id
|
|
|
var param = location.href.substring(location.href.lastIndexOf("/") + 1);
|
|
|
//0:查看1:编辑
|
|
|
var lock_type = location.href.substring(location.href.lastIndexOf("/")-1,location.href.lastIndexOf("/"));
|
|
|
common.util.__ajax({
|
|
|
url: "/resources/resContentIndex",
|
|
|
data: {id: param},
|
...
|
...
|
@@ -21,13 +23,15 @@ common.util.__ajax({ |
|
|
resources = res.data;
|
|
|
console.log(resources);
|
|
|
}, true);
|
|
|
common.util.__ajax({
|
|
|
url: "/resources/updateLock",
|
|
|
data: {id: param,
|
|
|
if(lock_type==1){
|
|
|
common.util.__ajax({
|
|
|
url: "/resources/updateLock",
|
|
|
data: {id: param,
|
|
|
status:1},
|
|
|
async: false
|
|
|
}, function (res) {
|
|
|
}, true);
|
|
|
async: false
|
|
|
}, function (res) {
|
|
|
}, true);
|
|
|
}
|
|
|
|
|
|
/*配置模块*/
|
|
|
var edit = new common.edit2(".modal-body", {
|
...
|
...
|
@@ -449,6 +453,16 @@ $(document).on("change", ".observe", function () { |
|
|
});
|
|
|
});
|
|
|
|
|
|
window.onbeforeunload = function(){
|
|
|
if(lock_type==1){
|
|
|
common.util.__ajax({
|
|
|
url: "/resources/updateLock",
|
|
|
data: {id: param,
|
|
|
status:0}
|
|
|
}, function () {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
/*删除*/
|
|
|
$(document).on("click", ".del", function () {//删除
|
|
|
if(!checkLockStatus()){
|
...
|
...
|
@@ -580,6 +594,10 @@ function dateStrToSeconds(date) { |
|
|
|
|
|
|
|
|
function checkLockStatus(){
|
|
|
if(lock_type==0){
|
|
|
common.util.__tip("请点击内容编辑进行操作");
|
|
|
return false;
|
|
|
}
|
|
|
common.util.__ajax({
|
|
|
url: "/resources/checkLock",
|
|
|
data: {id: param},
|
...
|
...
|
@@ -736,6 +754,9 @@ $(document).on("change", ".preTimes", function() { |
|
|
});
|
|
|
//删除tab
|
|
|
$(document).on("click", "#delTab", function() {
|
|
|
if(!checkLockStatus()){
|
|
|
return false;
|
|
|
}
|
|
|
if(times[currIndex].status == "进行中") {
|
|
|
common.util.__tip("进行中的页面不能删除");
|
|
|
return false;
|
...
|
...
|
@@ -1594,4 +1615,4 @@ function validateRollingOverContent(data) { |
|
|
}
|
|
|
|
|
|
return errArr;
|
|
|
} |
|
|
\ No newline at end of file |
|
|
} |
...
|
...
|
|