Authored by mlge

种草 话题分组修改

... ... @@ -25,8 +25,8 @@
<tr style="height: 60px">
<td>
<span style="color:red">*</span><label>话题状态</label> <br>
<input type="radio" value="1" checked name="status" style="width:30px">开启</input>
<input type="radio" value="0" name="status" style="width:30px" checked="true">关闭</input>
<input type="radio" value="1" name="status" style="width:30px">开启</input>
<input type="radio" value="0" name="status" style="width:30px" >关闭</input>
</td>
</tr>
... ...
... ... @@ -269,6 +269,12 @@
//
// }
var statusVal = $("input[name='status']:checked").val();
if(statusVal == null || statusVal== ""){
$.messager.alert("保存失败", "状态必选", "error");
return false;
}
$.messager.progress({
title: "正在执行",
msg: "正在执行,请稍后..."
... ...
... ... @@ -256,32 +256,7 @@
$(this).datagrid("scrollTo", index);
index = "";
}
// $(this).datagrid("getPanel").find("a[role='close']").linkbutton({
// iconCls: "icon-redo",
// onClick: function () {
// var close_id = $(this).attr("dataId");
// var group_id = $(this).attr("groupId");
// index = $(this).attr("index");
// $.messager.confirm("确认", "确认删除该分组吗?", function (flag) {
// if(flag){
// $.post(contextPath + "/grassTopicManage/deleteGrassTopic", {
// id : close_id
// }, function(data) {
// if (data.code == CODE_SUCCESS) {
// $("#labelListTable").datagrid("reload");
// window.self.$.messager.show({
// title : "提示",
// msg : "删除成功!"
// });
// } else {
// window.self.$.messager.alert("失败", data.message, "error");
// }
// });
// }
//
// });
// }
// });
// 编辑
$(this).datagrid("getPanel").find("a[role='edit']").linkbutton({
... ... @@ -309,110 +284,7 @@
});
// 编辑分组
function getEditDialog(data) {
/*var labelList = $("<div id='labelList'>").appendTo($(document.body));
var title = data == null ? "新建话题":"修改话题";
var textVar = data == null ? "保存":"保存";
var msgVar = data == null ? "确认新增话题吗?":"确认保存话题吗?";*/
var topicId = data == null ? null : data.id;
//新建话题--打开一个新窗口
window.open(contextPath + "/html/grass/topicManage/topicEdit.html?topicId=" + topicId, "_blank");
/*window.self.paramObject.mkData = data;
$(labelList).myDialog({
title: title,
width: "70%",
height: "80%",
resizable:false,
buttons:[{
id : "saveBtn",
text:textVar,
iconCls : "icon-save",
handler:function(){
$("#activityAddForm").form("submit", {
url: serverContextPath + "/grassTopicManage/addUpGrassTopic",
onSubmit: function (param) {
if(data != null){
param.id = data.id;
}
if (!$("#activityAddForm").form("validate")) {
return false;
}
var topicDesc = $("#topicDesc").val();
if(topicDesc==null || topicDesc==""){
$.messager.alert("失败", "话题描述不能为空!", "error");
return false;
}
if(topicDesc.length>100){
$.messager.alert("失败", "话题描述不能超过100字!", "error");
return false;
}
// param.status = $("input[name='statusRadio'][checked]").val
var topicImageUrl = $("input[name='topicImageUrl']").val();
if(topicImageUrl == null || topicImageUrl ==""){
$.messager.alert("失败", "提交失败,请选择图片", "error");
return false;
}
// debugger
var relatedLabels = "";
$("#taglist").find("span[name=choosedTag]").each(function () {
var choosedTagId = $(this).attr("data-labelid");
relatedLabels +=choosedTagId+",";
});
if(relatedLabels == ""){
$.messager.alert("失败", "提交失败,请至少选择一个标签", "error");
return false;
}
param.relatedLabels = relatedLabels;
$.messager.progress({
title: "正在执行",
msg: "正在执行,请稍后..."
});
return true;
},
success: function (data) {
$.messager.progress("close");
data = JSON.parse(data);
if (data.code == 200) {
$(labelList).dialog("close");
$("#labelListTable").datagrid("reload");
$.messager.show({
title: "提示",
msg: title + "成功!",
height: 120
});
} else {
$.messager.alert("失败", data.message, "error");
}
}
});
}
}, {
text: "关闭",
iconCls: "icon-cancel",
handler: function () {
$.messager.confirm("确认", "确认关闭吗?", function (flag) {
if(flag){
$(labelList).dialog("close");
}
});
}
}],
modal: true,
href: contextPath + "/html/grass/topicManage/topicEdit.html",
});*/
}
// 上架下架
... ...