diff --git a/route/static/app/site.js b/route/static/app/site.js index 21aa1e9fd..be2d8da0d 100755 --- a/route/static/app/site.js +++ b/route/static/app/site.js @@ -101,7 +101,7 @@ function getWeb(page, search) { }); } if(body.length < 10){ - body = ""+lan.site.site_no_data+""; + body = "当前没有站点数据"; $(".dataTables_paginate").hide(); $("#webBody").html(body); } @@ -113,6 +113,7 @@ function getWeb(page, search) { }); //输出分页 $("#webPage").html(data.page); + // $("#webPage").html('
站点分类:
'); $(".btlinkbed").click(function(){ var dataid = $(this).attr("data-id"); @@ -2183,6 +2184,7 @@ function setRewrite(filename){ },'json'); } var aindex = null; + //保存为模板 function setRewriteTel(act){ if(act != undefined){ @@ -2207,7 +2209,7 @@ function setRewriteTel(act){ shift: 5, closeBtn: 2, area: '320px', //宽高 - title: lan.site.save_rewrite_temp, + title: '保存为Rewrite模板', content: '
\
\ \ @@ -2237,7 +2239,7 @@ function siteDefaultPage(){ content: '
\ \ \ - \ + \ \
' }); @@ -2263,4 +2265,76 @@ function changeDefault(type){ break; } onlineEditFile(0,vhref); -} \ No newline at end of file +} + +function setClassType(){ + $.post('/site/get_site_types',function(rdata){ + var list = '',name =''; + for (var i = 0; i\ + 编辑 | 删除\ + '; + } + + layer.open({ + type: 1, + area: '350px', + title: '网站分类管理', + closeBtn: 2, + shift: 0, + content: '
\ +
\ +
\ +
\ +
\ + \ + \ + '+list+'\ +
名称操作
\ +
\ +
' + }); + },'json'); +} + +function addClassType(){ + var name = $("input[name=type_name]").val(); + $.post('/site/add_site_type','name='+name, function(rdata){ + showMsg(rdata.msg,function(){ + if (rdata.status){ + layer.closeAll(); + setClassType(); + } + },{icon:rdata.status?1:2}); + // layer.msg(rdata.msg,{icon:rdata.status?1:2}); + },'json'); +} + +function removeClassType(id,name){ + if (id == 0){ + layer.msg('默认分类不可删除/不可编辑!',{icon:2}); + return; + } + layer.confirm('是否确定删除分类?',{title: '删除分类【'+ name +'】' }, function(){ + $.post('/site/remove_site_type','id='+id, function(rdata){ + showMsg(rdata.msg,function(){ + if (rdata.status){ + layer.closeAll(); + setClassType(); + } + },{icon:rdata.status?1:2}); + },'json'); + }); +} + + + + + + + + + + +