...
|
...
|
@@ -3,11 +3,13 @@ var $ = require('jquery'), |
|
|
util = require('../common/util');
|
|
|
|
|
|
|
|
|
new common.dropDown({el: "#subject-type"});
|
|
|
new common.dropDown({el: "#subject-paltform"});
|
|
|
new common.dropDown({el: "#subject-status"});
|
|
|
new common.dropDown({el: "#subject-type"});
|
|
|
new common.dropDown({el: "#subject-paltform"});
|
|
|
new common.dropDown({el: "#subject-status"});
|
|
|
|
|
|
var g = new common.grid({
|
|
|
var yhChannelArr = ["男生", "女生", "儿童", "创意生活"];
|
|
|
|
|
|
var g = new common.grid({
|
|
|
el: "#subject-manage",
|
|
|
parms: function () {
|
|
|
return {
|
...
|
...
|
@@ -36,6 +38,11 @@ var $ = require('jquery'), |
|
|
return temp;
|
|
|
}
|
|
|
}},
|
|
|
{display:"频道", name:"yhChannel", render: function (item) {
|
|
|
if(item.yhChannel) {
|
|
|
return yhChannelArr[item.yhChannel-1];
|
|
|
}
|
|
|
}},
|
|
|
{display: "状态", name: "status", render: function (item) {
|
|
|
if(item.status == 1) return "未定时";
|
|
|
else if(item.status == 2) return "未发布";
|
...
|
...
|
@@ -61,11 +68,11 @@ var $ = require('jquery'), |
|
|
}
|
|
|
|
|
|
]
|
|
|
});
|
|
|
});
|
|
|
|
|
|
g.init('/runManage/subjectManage/subjectList');
|
|
|
g.init('/runManage/subjectManage/subjectList');
|
|
|
|
|
|
var Bll = {
|
|
|
var Bll = {
|
|
|
getLocalTime:function(nS) {
|
|
|
var date = new Date(parseInt(nS) * 1000);
|
|
|
var mm = date.getMonth() + 1;
|
...
|
...
|
@@ -166,21 +173,21 @@ var $ = require('jquery'), |
|
|
}
|
|
|
};
|
|
|
|
|
|
$('#add-subject').on('click', function() {
|
|
|
$('#add-subject').on('click', function() {
|
|
|
var item = {};
|
|
|
Bll.toast('/runManage/subjectManage/addSubject', item, "专题添加");
|
|
|
});
|
|
|
});
|
|
|
|
|
|
$(document).on('click', '.add2', function() {
|
|
|
$(document).on('click', '.add2', function() {
|
|
|
var item = g.rows[$(this).data("index")];
|
|
|
if(typeof item.startTime == "number") {
|
|
|
item.startTime = Bll.getLocalTime(item.startTime);
|
|
|
item.endTime = Bll.getLocalTime(item.endTime);
|
|
|
}
|
|
|
Bll.toast('/runManage/subjectManage/modify', item, "专题编辑");
|
|
|
});
|
|
|
});
|
|
|
|
|
|
$(document).on('click', '.delbtn', function() {
|
|
|
$(document).on('click', '.delbtn', function() {
|
|
|
var item=g.rows[$(this).data("index")];
|
|
|
common.dialog.confirm("警告",
|
|
|
"确认删除?",
|
...
|
...
|
@@ -192,8 +199,8 @@ var $ = require('jquery'), |
|
|
g.reload();
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
|
|
|
$(document).on("click","#filter-btn",function () {
|
|
|
$(document).on("click","#filter-btn",function () {
|
|
|
g.reload(1);
|
|
|
}); |
|
|
\ No newline at end of file |
|
|
}); |
|
|
\ No newline at end of file |
...
|
...
|
|