...
|
...
|
@@ -2,13 +2,14 @@ var $ = require('jquery'), |
|
|
common = require('../common/common');
|
|
|
var ENUM={};
|
|
|
// common.util.__ajax({
|
|
|
// url:'EnumListRest/getEnumList',
|
|
|
// url:'/guang/article/getEnumList',
|
|
|
// async:false
|
|
|
// },function(res){
|
|
|
// ENUM=res.data;
|
|
|
// });
|
|
|
console.log(ENUM);
|
|
|
|
|
|
$("#panel-body").html(common.util.__template2($("#tempalte1").html(),{}));
|
|
|
$("#panel-body").html(common.util.__template2($("#tempalte1").html(),ENUM));
|
|
|
|
|
|
new common.dropDown({el:"#authorId",ajax:"guangGetAuthorList"});
|
|
|
new common.dropDown({el:"#maxSortId",ajax:"guangGetSort",params:function(){
|
...
|
...
|
@@ -18,26 +19,39 @@ new common.dropDown({el:"#minSortId",ajax:"guangGetSort",params:function(){ |
|
|
return {pid:$("#maxSortId").val()};
|
|
|
}});
|
|
|
|
|
|
var g=new common.gird({
|
|
|
el:"grid",
|
|
|
var g= new common.grid({
|
|
|
el:"#gird",
|
|
|
columns:[
|
|
|
{display:"选择","type":"checkbox"},
|
|
|
{display:"标签名",name:"tagName"}
|
|
|
{display:"选择","type":"checkbox"},
|
|
|
{display:"标签名",name:"tagName"}
|
|
|
]
|
|
|
});
|
|
|
|
|
|
|
|
|
var Url={},Urls=[];
|
|
|
$(document).on("click","#addUrl",function(){
|
|
|
common.dialog.confirm("添加链接",common.util.__template2($("#template2").html(),{}),function(){
|
|
|
|
|
|
Url[$("#goTo").val()]=$("#goToUrl").val();
|
|
|
//todo
|
|
|
Urls=[];
|
|
|
for(var i in Url){
|
|
|
Urls.push({url:i,text:Url[i]});
|
|
|
}
|
|
|
$("#url").val(JSON.stringify(Urls));
|
|
|
});
|
|
|
});
|
|
|
|
|
|
$(document).on("click","#TagsSelectBtn",function(){
|
|
|
common.dialog.confirm("选择标签","<div id='gird'></div>",function(){
|
|
|
|
|
|
$("#taglist").html(common.util.__template2($("#template4").html(),{tags:g.selected}));
|
|
|
});
|
|
|
g.init('/guang/tags/getList');
|
|
|
});
|
|
|
$(document).on("click",".tag a",function(){
|
|
|
var index=$(this).data("index");
|
|
|
g.selected.splice(index,1);
|
|
|
$("#taglist").html(common.util.__template2($("#template4").html(),{tags:g.selected}));
|
|
|
return false;
|
|
|
});
|
|
|
|
|
|
var e=new common.edit("#panel-body",{});
|
|
|
e.init();
|
...
|
...
|
|