Authored by min.ling

fix

... ... @@ -182,10 +182,6 @@
$("#draftType").val(2);
}
if (data && data.draftEditFlag == 1) {
$("#draftType").val(1);
}
// 复制链接
new ClipboardJS('.copy');
... ... @@ -317,7 +313,7 @@
$("#labelList").html(labelList);
},
onLoadSuccess:function () {
debugger;
var arr = $(this).combobox("getValues");
var textarr = $(this).combobox("getData");
var labelList='';
... ... @@ -416,10 +412,14 @@
if (data && data.editFlag == 1) {
url = serverContextPath+"/grassArticle/editArticle";
}
if(data && data.draftEditFlag == 1){
url = serverContextPath+"/grassArticle/updateArticleDraft";
//2-编辑后直接发布
$("#draftType").val(2);
}
$("#publishArticleForm").form("submit",{
url : url,
onSubmit : function(param) {
;
if (!$("#publishArticleForm").form("validate")) {
return false;
... ... @@ -470,7 +470,6 @@
html += "<input name='products["+i+"].productType' hidden value='"+checkedItems[i].productType+"'/>";
}
$("#products").html(html);
return true;
},
success : function(data) {
... ... @@ -497,9 +496,11 @@
iconCls: "icon-save",
width:200,
onClick: function () {
var url = serverContextPath+"/grassArticle/saveArticleDraft";
var url = serverContextPath + "/grassArticle/saveArticleDraft";
if (data && data.draftEditFlag == 1) {
url = "/grassArticle/updateArticleDraft";
url = serverContextPath + "/grassArticle/updateArticleDraft";
//1-编辑后保存草稿箱
$("#draftType").val(1);
}
$("#publishArticleForm").form("submit",{
url : url,
... ... @@ -585,7 +586,7 @@
var count = data.articleContent.length;
$("#content-count").text(count);
}
debugger;
var labelIds = [];
if(data.labelList!=null && data.labelList.length>0){
for (var i=0;i<data.labelList.length;i++){
... ... @@ -617,12 +618,13 @@
// 定时 选择时间
function getTimeDialog(data,id, status){
function getTimeDialog(){
var timeChoose = $("<div id='timeChoose'>").appendTo($(document.body));
var title = "选择时间";
var textVar = "确认";
window.self.paramObject.mkData = data;
var data = window.self.paramObject.mkData;
$(timeChoose).myDialog({
title: title,
width: "20%",
... ... @@ -633,18 +635,27 @@
text:textVar,
iconCls : "icon-save",
handler:function(){
;
var time=''
var time='';
if($("#publishTimeStr").datetimebox('getValue') !=null && $("#publishTimeStr").datetimebox('getValue') !=''){
time = parseInt(new Date($("#publishTimeStr").datetimebox('getValue')).getTime() );
}else {
$.messager.alert("发布失败", "请选择时间", "error");
return;
}
//直接发布视频
var url = serverContextPath + "/grassArticle/timerPublish";
if(data && data.draftEditFlag == 1){
//草稿箱-定时发布
url = serverContextPath+"/grassArticle/updateArticleDraft";
//2-编辑后直接发布
$("#draftType").val(3);
}
$("#publishArticleForm").form("submit",{
url : serverContextPath+"/grassArticle/timerPublish",
url : url,
onSubmit : function(param) {
;
if (!$("#publishArticleForm").form("validate")) {
return false;
}
... ...