Commit 20593ba1 authored by Liang Ding's avatar Liang Ding

🔖 发布 v3.3.0

parent 01b99fec
{ {
"name": "Solo", "name": "Solo",
"version": "3.2.0", "version": "3.3.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
...@@ -1954,8 +1954,7 @@ ...@@ -1954,8 +1954,7 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
...@@ -1998,8 +1997,7 @@ ...@@ -1998,8 +1997,7 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
...@@ -2010,8 +2008,7 @@ ...@@ -2010,8 +2008,7 @@
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
...@@ -2128,8 +2125,7 @@ ...@@ -2128,8 +2125,7 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
...@@ -2141,7 +2137,6 @@ ...@@ -2141,7 +2137,6 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
...@@ -2171,7 +2166,6 @@ ...@@ -2171,7 +2166,6 @@
"version": "2.2.4", "version": "2.2.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.1", "safe-buffer": "^5.1.1",
"yallist": "^3.0.0" "yallist": "^3.0.0"
...@@ -2190,7 +2184,6 @@ ...@@ -2190,7 +2184,6 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
...@@ -2284,7 +2277,6 @@ ...@@ -2284,7 +2277,6 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
...@@ -2370,8 +2362,7 @@ ...@@ -2370,8 +2362,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.1", "version": "5.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
...@@ -2407,7 +2398,6 @@ ...@@ -2407,7 +2398,6 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
...@@ -2427,7 +2417,6 @@ ...@@ -2427,7 +2417,6 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
...@@ -2471,14 +2460,12 @@ ...@@ -2471,14 +2460,12 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.2", "version": "3.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
} }
} }
}, },
......
{ {
"name": "Solo", "name": "Solo",
"version": "3.2.0", "version": "3.3.0",
"description": " 一款小而美的博客系统,专为程序员设计。", "description": " 一款小而美的博客系统,专为程序员设计。",
"homepage": "https://github.com/b3log/solo", "homepage": "https://github.com/b3log/solo",
"repository": { "repository": {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<artifactId>solo</artifactId> <artifactId>solo</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<name>Solo</name> <name>Solo</name>
<version>3.2.0</version> <version>3.3.0</version>
<description> <description>
一款小而美的博客系统,专为程序员设计。 一款小而美的博客系统,专为程序员设计。
</description> </description>
......
...@@ -58,7 +58,7 @@ import javax.servlet.http.HttpSessionEvent; ...@@ -58,7 +58,7 @@ import javax.servlet.http.HttpSessionEvent;
* Solo Servlet listener. * Solo Servlet listener.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.10.0.10, Feb 16, 2019 * @version 1.10.0.11, Mar 17, 2019
* @since 0.3.1 * @since 0.3.1
*/ */
public final class SoloServletListener extends AbstractServletListener { public final class SoloServletListener extends AbstractServletListener {
...@@ -71,7 +71,7 @@ public final class SoloServletListener extends AbstractServletListener { ...@@ -71,7 +71,7 @@ public final class SoloServletListener extends AbstractServletListener {
/** /**
* Solo version. * Solo version.
*/ */
public static final String VERSION = "3.2.0"; public static final String VERSION = "3.3.0";
/** /**
* Bean manager. * Bean manager.
......
...@@ -26,13 +26,14 @@ import org.b3log.solo.model.Option; ...@@ -26,13 +26,14 @@ import org.b3log.solo.model.Option;
import org.b3log.solo.upgrade.V299_300; import org.b3log.solo.upgrade.V299_300;
import org.b3log.solo.upgrade.V300_310; import org.b3log.solo.upgrade.V300_310;
import org.b3log.solo.upgrade.V310_320; import org.b3log.solo.upgrade.V310_320;
import org.b3log.solo.upgrade.V320_330;
import org.json.JSONObject; import org.json.JSONObject;
/** /**
* Upgrade service. * Upgrade service.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.2.1.2, Mar 3, 2019 * @version 1.2.1.3, Mar 17, 2019
* @since 1.2.0 * @since 1.2.0
*/ */
@Service @Service
...@@ -71,6 +72,8 @@ public class UpgradeService { ...@@ -71,6 +72,8 @@ public class UpgradeService {
V300_310.perform(); V300_310.perform();
case "3.1.0": case "3.1.0":
V310_320.perform(); V310_320.perform();
case "3.2.0":
V320_330.perform();
break; break;
default: default:
......
...@@ -18,25 +18,14 @@ ...@@ -18,25 +18,14 @@
package org.b3log.solo.upgrade; package org.b3log.solo.upgrade;
import org.b3log.latke.Keys; import org.b3log.latke.Keys;
import org.b3log.latke.Latkes;
import org.b3log.latke.ioc.BeanManager; import org.b3log.latke.ioc.BeanManager;
import org.b3log.latke.logging.Level; import org.b3log.latke.logging.Level;
import org.b3log.latke.logging.Logger; import org.b3log.latke.logging.Logger;
import org.b3log.latke.repository.FilterOperator;
import org.b3log.latke.repository.PropertyFilter;
import org.b3log.latke.repository.Query;
import org.b3log.latke.repository.Transaction; import org.b3log.latke.repository.Transaction;
import org.b3log.latke.repository.jdbc.util.Connections;
import org.b3log.solo.model.Article;
import org.b3log.solo.model.Option; import org.b3log.solo.model.Option;
import org.b3log.solo.repository.ArticleRepository;
import org.b3log.solo.repository.OptionRepository; import org.b3log.solo.repository.OptionRepository;
import org.json.JSONObject; import org.json.JSONObject;
import java.sql.Connection;
import java.sql.Statement;
import java.util.List;
/** /**
* Upgrade script from v3.2.0 to v3.3.0. * Upgrade script from v3.2.0 to v3.3.0.
* *
...@@ -64,13 +53,21 @@ public final class V320_330 { ...@@ -64,13 +53,21 @@ public final class V320_330 {
final BeanManager beanManager = BeanManager.getInstance(); final BeanManager beanManager = BeanManager.getInstance();
final OptionRepository optionRepository = beanManager.getReference(OptionRepository.class); final OptionRepository optionRepository = beanManager.getReference(OptionRepository.class);
final ArticleRepository articleRepository = beanManager.getReference(ArticleRepository.class);
try { try {
final Transaction transaction = optionRepository.beginTransaction(); final Transaction transaction = optionRepository.beginTransaction();
optionRepository.remove("allowRegister"); optionRepository.remove("allowRegister");
JSONObject faviconURLOpt = optionRepository.get(Option.ID_C_FAVICON_URL);
if (null == faviconURLOpt) {
faviconURLOpt = new JSONObject();
faviconURLOpt.put(Keys.OBJECT_ID, Option.ID_C_FAVICON_URL);
faviconURLOpt.put(Option.OPTION_CATEGORY, Option.CATEGORY_C_PREFERENCE);
faviconURLOpt.put(Option.OPTION_VALUE, Option.DefaultPreference.DEFAULT_FAVICON_URL);
optionRepository.add(faviconURLOpt);
}
final JSONObject versionOpt = optionRepository.get(Option.ID_C_VERSION); final JSONObject versionOpt = optionRepository.get(Option.ID_C_VERSION);
versionOpt.put(Option.OPTION_VALUE, toVer); versionOpt.put(Option.OPTION_VALUE, toVer);
optionRepository.update(Option.ID_C_VERSION, versionOpt); optionRepository.update(Option.ID_C_VERSION, versionOpt);
......
...@@ -8,7 +8,7 @@ admin.draftList={tablePagination:new TablePaginate("draft"),init:function(t){thi ...@@ -8,7 +8,7 @@ admin.draftList={tablePagination:new TablePaginate("draft"),init:function(t){thi
admin.pageList={tablePagination:new TablePaginate("page"),pageInfo:{currentCount:1,pageCount:1,currentPage:1},id:"",type:"link",init:function(e){this.tablePagination.buildTable([{text:"",index:"pageOrder",width:60,style:"padding-left: 12px;font-size:14px;"},{style:"padding-left: 12px;",text:Label.titleLabel,index:"pageTitle",width:300},{style:"padding-left: 12px;",text:Label.permalinkLabel,index:"pagePermalink",minWidth:100},{style:"padding-left: 12px;",text:Label.openMethodLabel,index:"pageTarget",width:120},{style:"padding-left: 12px;",text:Label.typeLabel,index:"pageType",width:80},{text:Label.commentLabel,index:"comments",width:80,style:"padding-left: 12px;"}]),this.tablePagination.initPagination(),this.tablePagination.initCommentsDialog(),this.getList(e),admin.editors.pageEditor=new SoloEditor({id:"pageContent"}),$(".fn-type").click(function(){var e=$(this);e.hasClass("selected")||($(".fn-type").removeClass("selected"),e.addClass("selected"),admin.pageList.type=e.data("type"),"page"===admin.pageList.type?$("#pagePagePanel").slideDown():$("#pagePagePanel").slideUp())})},getList:function(p){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var l=this;$.ajax({url:latkeConfig.servePath+"/console/pages/"+p+"/"+Label.PAGE_SIZE+"/"+Label.WINDOW_SIZE,type:"GET",cache:!1,success:function(e,a){if($("#tipMsg").text(e.msg),e.sc){var t=e.pages,n=[];admin.pageList.pageInfo.currentCount=t.length,admin.pageList.pageInfo.pageCount=0===e.pagination.paginationPageCount?1:e.pagination.paginationPageCount;for(var i=0;i<t.length;i++){n[i]={},0===i?1===t.length?n[i].pageOrder="":n[i].pageOrder='<div class="table-center" style="width:14px"> <span onclick="admin.pageList.changeOrder('+t[i].oId+", "+i+', \'down\');" class="icon-move-down"></span></div>':i===t.length-1?n[i].pageOrder='<div class="table-center" style="width:14px"> <span onclick="admin.pageList.changeOrder('+t[i].oId+", "+i+', \'up\');" class="icon-move-up"></span> </div>':n[i].pageOrder='<div class="table-center" style="width:38px"> <span onclick="admin.pageList.changeOrder('+t[i].oId+", "+i+', \'up\');" class="icon-move-up"></span> <span onclick="admin.pageList.changeOrder('+t[i].oId+", "+i+', \'down\');" class="icon-move-down"></span> </div>';var g="";""!==t[i].pageIcon&&(g="<img class='navigation-icon' src='"+t[i].pageIcon+"'/> "),n[i].pageTitle=g+"<a class='no-underline' href='"+t[i].pagePermalink+"' target='_blank'>"+t[i].pageTitle+"</a>",n[i].pagePermalink="<a class='no-underline' href='"+t[i].pagePermalink+"' target='_blank'>"+t[i].pagePermalink+"</a>",n[i].pageTarget=t[i].pageOpenTarget,n[i].pageType=t[i].pageType,n[i].comments=t[i].pageCommentCount,n[i].expendRow="<span><a href='"+t[i].pagePermalink+"' target='_blank'>"+Label.viewLabel+"</a> <a href='javascript:void(0)' onclick=\"admin.pageList.get('"+t[i].oId+"')\">"+Label.updateLabel+"</a> <a href='javascript:void(0)' onclick=\"admin.pageList.del('"+t[i].oId+"', '"+encodeURIComponent(t[i].pageTitle)+"')\">"+Label.removeLabel+"</a> <a href='javascript:void(0)' onclick=\"admin.comment.open('"+t[i].oId+"', 'page')\">"+Label.commentLabel+"</a></span>"}l.tablePagination.updateTablePagination(n,p,e.pagination),$("#loadMsg").text("")}else $("#loadMsg").text("")}})},get:function(t){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),$.ajax({url:latkeConfig.servePath+"/console/page/"+t,type:"GET",cache:!1,success:function(e,a){$("#tipMsg").text(e.msg),e.sc&&(admin.pageList.id=t,$("#pageTitle").val(e.page.pageTitle),$("#pagePermalink").val(e.page.pagePermalink),$("#pageTarget").val(e.page.pageOpenTarget),$("#pageIcon").val(e.page.pageIcon),"page"===e.page.pageType?$($(".fn-type").get(1)).click():$($(".fn-type").get(0)).click(),$("#pageCommentable").prop("checked",e.page.pageCommentable),admin.editors.pageEditor.setContent(e.page.pageContent)),$("#loadMsg").text("")}})},del:function(e,a){confirm(Label.confirmRemoveLabel+Label.navLabel+'"'+Util.htmlDecode(a)+'"?')&&($("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),$.ajax({url:latkeConfig.servePath+"/console/page/"+e,type:"DELETE",cache:!1,success:function(e,a){if($("#tipMsg").text(e.msg),e.sc){var t=admin.pageList.pageInfo.currentPage;1===admin.pageList.pageInfo.currentCount&&1!==admin.pageList.pageInfo.pageCount&&admin.pageList.pageInfo.currentPage===admin.pageList.pageInfo.pageCount&&(admin.pageList.pageInfo.pageCount--,t=admin.pageList.pageInfo.pageCount);var n=window.location.hash.split("/");t==n[n.length-1]?admin.pageList.getList(t):admin.setHashByPage(t),$("#loadMsg").text("")}else $("#loadMsg").text("")}}))},add:function(){if(this.validate()){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var e=admin.editors.pageEditor.getContent(),a=$("#pagePermalink").val().replace(/(^\s*)|(\s*$)/g,"");"link"===admin.pageList.type&&(a=Util.proessURL(a));var t={page:{pageTitle:$("#pageTitle").val(),pageContent:e,pagePermalink:a,pageCommentable:$("#pageCommentable").prop("checked"),pageType:admin.pageList.type,pageOpenTarget:$("#pageTarget").val(),pageIcon:$("#pageIcon").val()}};$.ajax({url:latkeConfig.servePath+"/console/page/",type:"POST",cache:!1,data:JSON.stringify(t),success:function(e,a){if($("#tipMsg").text(e.msg),e.sc){admin.pageList.id="",$("#pagePermalink").val(""),$("#pageTitle").val(""),$("#pageIcon").val(""),$("#pageCommentable").prop("cheked",!1),$("#pageTarget").val("_self"),$($(".fn-type").get(0)).click(),admin.editors.pageEditor.setContent(""),admin.pageList.pageInfo.currentCount===Label.PAGE_SIZE&&admin.pageList.pageInfo.currentPage===admin.pageList.pageInfo.pageCount&&admin.pageList.pageInfo.pageCount++;var t=window.location.hash.split("/");admin.pageList.pageInfo.pageCount==t[t.length-1]?admin.pageList.getList(admin.pageList.pageInfo.pageCount):admin.setHashByPage(admin.pageList.pageInfo.pageCount),$("#loadMsg").text("")}else $("#loadMsg").text("")}})}},update:function(){if(this.validate()){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var e=admin.editors.pageEditor.getContent(),a=$("#pagePermalink").val().replace(/(^\s*)|(\s*$)/g,"");"link"===admin.pageList.type&&(a=Util.proessURL(a));var t={page:{pageTitle:$("#pageTitle").val(),oId:this.id,pageContent:e,pagePermalink:a,pageCommentable:$("#pageCommentable").prop("checked"),pageType:admin.pageList.type,pageOpenTarget:$("#pageTarget").val(),pageIcon:$("#pageIcon").val()}};$.ajax({url:latkeConfig.servePath+"/console/page/",type:"PUT",cache:!1,data:JSON.stringify(t),success:function(e,a){$("#tipMsg").text(e.msg),e.sc&&(admin.pageList.id="",admin.pageList.getList(admin.pageList.pageInfo.currentPage),$("#pageTitle").val(""),$("#pageIcon").val(""),$("#pagePermalink").val(""),$("#pageCommentable").prop("cheked",!1),$("#pageTarget").val("_self"),$($(".fn-type").get(0)).click(),admin.editors.pageEditor.setContent("")),$("#loadMsg").text("")}})}},validate:function(){if(""===$("#pageTitle").val().replace(/\s/g,""))$("#tipMsg").text(Label.titleEmptyLabel),$("#pageTitle").focus();else{if("link"!==admin.pageList.type||""!==$("#pagePermalink").val().replace(/\s/g,""))return!0;$("#tipMsg").text(Label.linkEmptyLabel)}return!1},submit:function(){""!==this.id?this.update():this.add()},changeOrder:function(e,a,t){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var n={oId:e.toString(),direction:t};$.ajax({url:latkeConfig.servePath+"/console/page/order/",type:"PUT",cache:!1,data:JSON.stringify(n),success:function(e,a){$("#tipMsg").text(e.msg),admin.pageList.getList(admin.pageList.pageInfo.currentPage),$("#loadMsg").text("")}})}},admin.register["page-list"]={obj:admin.pageList,init:admin.pageList.init,refresh:admin.pageList.getList}; admin.pageList={tablePagination:new TablePaginate("page"),pageInfo:{currentCount:1,pageCount:1,currentPage:1},id:"",type:"link",init:function(e){this.tablePagination.buildTable([{text:"",index:"pageOrder",width:60,style:"padding-left: 12px;font-size:14px;"},{style:"padding-left: 12px;",text:Label.titleLabel,index:"pageTitle",width:300},{style:"padding-left: 12px;",text:Label.permalinkLabel,index:"pagePermalink",minWidth:100},{style:"padding-left: 12px;",text:Label.openMethodLabel,index:"pageTarget",width:120},{style:"padding-left: 12px;",text:Label.typeLabel,index:"pageType",width:80},{text:Label.commentLabel,index:"comments",width:80,style:"padding-left: 12px;"}]),this.tablePagination.initPagination(),this.tablePagination.initCommentsDialog(),this.getList(e),admin.editors.pageEditor=new SoloEditor({id:"pageContent"}),$(".fn-type").click(function(){var e=$(this);e.hasClass("selected")||($(".fn-type").removeClass("selected"),e.addClass("selected"),admin.pageList.type=e.data("type"),"page"===admin.pageList.type?$("#pagePagePanel").slideDown():$("#pagePagePanel").slideUp())})},getList:function(p){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var l=this;$.ajax({url:latkeConfig.servePath+"/console/pages/"+p+"/"+Label.PAGE_SIZE+"/"+Label.WINDOW_SIZE,type:"GET",cache:!1,success:function(e,a){if($("#tipMsg").text(e.msg),e.sc){var t=e.pages,n=[];admin.pageList.pageInfo.currentCount=t.length,admin.pageList.pageInfo.pageCount=0===e.pagination.paginationPageCount?1:e.pagination.paginationPageCount;for(var i=0;i<t.length;i++){n[i]={},0===i?1===t.length?n[i].pageOrder="":n[i].pageOrder='<div class="table-center" style="width:14px"> <span onclick="admin.pageList.changeOrder('+t[i].oId+", "+i+', \'down\');" class="icon-move-down"></span></div>':i===t.length-1?n[i].pageOrder='<div class="table-center" style="width:14px"> <span onclick="admin.pageList.changeOrder('+t[i].oId+", "+i+', \'up\');" class="icon-move-up"></span> </div>':n[i].pageOrder='<div class="table-center" style="width:38px"> <span onclick="admin.pageList.changeOrder('+t[i].oId+", "+i+', \'up\');" class="icon-move-up"></span> <span onclick="admin.pageList.changeOrder('+t[i].oId+", "+i+', \'down\');" class="icon-move-down"></span> </div>';var g="";""!==t[i].pageIcon&&(g="<img class='navigation-icon' src='"+t[i].pageIcon+"'/> "),n[i].pageTitle=g+"<a class='no-underline' href='"+t[i].pagePermalink+"' target='_blank'>"+t[i].pageTitle+"</a>",n[i].pagePermalink="<a class='no-underline' href='"+t[i].pagePermalink+"' target='_blank'>"+t[i].pagePermalink+"</a>",n[i].pageTarget=t[i].pageOpenTarget,n[i].pageType=t[i].pageType,n[i].comments=t[i].pageCommentCount,n[i].expendRow="<span><a href='"+t[i].pagePermalink+"' target='_blank'>"+Label.viewLabel+"</a> <a href='javascript:void(0)' onclick=\"admin.pageList.get('"+t[i].oId+"')\">"+Label.updateLabel+"</a> <a href='javascript:void(0)' onclick=\"admin.pageList.del('"+t[i].oId+"', '"+encodeURIComponent(t[i].pageTitle)+"')\">"+Label.removeLabel+"</a> <a href='javascript:void(0)' onclick=\"admin.comment.open('"+t[i].oId+"', 'page')\">"+Label.commentLabel+"</a></span>"}l.tablePagination.updateTablePagination(n,p,e.pagination),$("#loadMsg").text("")}else $("#loadMsg").text("")}})},get:function(t){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),$.ajax({url:latkeConfig.servePath+"/console/page/"+t,type:"GET",cache:!1,success:function(e,a){$("#tipMsg").text(e.msg),e.sc&&(admin.pageList.id=t,$("#pageTitle").val(e.page.pageTitle),$("#pagePermalink").val(e.page.pagePermalink),$("#pageTarget").val(e.page.pageOpenTarget),$("#pageIcon").val(e.page.pageIcon),"page"===e.page.pageType?$($(".fn-type").get(1)).click():$($(".fn-type").get(0)).click(),$("#pageCommentable").prop("checked",e.page.pageCommentable),admin.editors.pageEditor.setContent(e.page.pageContent)),$("#loadMsg").text("")}})},del:function(e,a){confirm(Label.confirmRemoveLabel+Label.navLabel+'"'+Util.htmlDecode(a)+'"?')&&($("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),$.ajax({url:latkeConfig.servePath+"/console/page/"+e,type:"DELETE",cache:!1,success:function(e,a){if($("#tipMsg").text(e.msg),e.sc){var t=admin.pageList.pageInfo.currentPage;1===admin.pageList.pageInfo.currentCount&&1!==admin.pageList.pageInfo.pageCount&&admin.pageList.pageInfo.currentPage===admin.pageList.pageInfo.pageCount&&(admin.pageList.pageInfo.pageCount--,t=admin.pageList.pageInfo.pageCount);var n=window.location.hash.split("/");t==n[n.length-1]?admin.pageList.getList(t):admin.setHashByPage(t),$("#loadMsg").text("")}else $("#loadMsg").text("")}}))},add:function(){if(this.validate()){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var e=admin.editors.pageEditor.getContent(),a=$("#pagePermalink").val().replace(/(^\s*)|(\s*$)/g,"");"link"===admin.pageList.type&&(a=Util.proessURL(a));var t={page:{pageTitle:$("#pageTitle").val(),pageContent:e,pagePermalink:a,pageCommentable:$("#pageCommentable").prop("checked"),pageType:admin.pageList.type,pageOpenTarget:$("#pageTarget").val(),pageIcon:$("#pageIcon").val()}};$.ajax({url:latkeConfig.servePath+"/console/page/",type:"POST",cache:!1,data:JSON.stringify(t),success:function(e,a){if($("#tipMsg").text(e.msg),e.sc){admin.pageList.id="",$("#pagePermalink").val(""),$("#pageTitle").val(""),$("#pageIcon").val(""),$("#pageCommentable").prop("cheked",!1),$("#pageTarget").val("_self"),$($(".fn-type").get(0)).click(),admin.editors.pageEditor.setContent(""),admin.pageList.pageInfo.currentCount===Label.PAGE_SIZE&&admin.pageList.pageInfo.currentPage===admin.pageList.pageInfo.pageCount&&admin.pageList.pageInfo.pageCount++;var t=window.location.hash.split("/");admin.pageList.pageInfo.pageCount==t[t.length-1]?admin.pageList.getList(admin.pageList.pageInfo.pageCount):admin.setHashByPage(admin.pageList.pageInfo.pageCount),$("#loadMsg").text("")}else $("#loadMsg").text("")}})}},update:function(){if(this.validate()){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var e=admin.editors.pageEditor.getContent(),a=$("#pagePermalink").val().replace(/(^\s*)|(\s*$)/g,"");"link"===admin.pageList.type&&(a=Util.proessURL(a));var t={page:{pageTitle:$("#pageTitle").val(),oId:this.id,pageContent:e,pagePermalink:a,pageCommentable:$("#pageCommentable").prop("checked"),pageType:admin.pageList.type,pageOpenTarget:$("#pageTarget").val(),pageIcon:$("#pageIcon").val()}};$.ajax({url:latkeConfig.servePath+"/console/page/",type:"PUT",cache:!1,data:JSON.stringify(t),success:function(e,a){$("#tipMsg").text(e.msg),e.sc&&(admin.pageList.id="",admin.pageList.getList(admin.pageList.pageInfo.currentPage),$("#pageTitle").val(""),$("#pageIcon").val(""),$("#pagePermalink").val(""),$("#pageCommentable").prop("cheked",!1),$("#pageTarget").val("_self"),$($(".fn-type").get(0)).click(),admin.editors.pageEditor.setContent("")),$("#loadMsg").text("")}})}},validate:function(){if(""===$("#pageTitle").val().replace(/\s/g,""))$("#tipMsg").text(Label.titleEmptyLabel),$("#pageTitle").focus();else{if("link"!==admin.pageList.type||""!==$("#pagePermalink").val().replace(/\s/g,""))return!0;$("#tipMsg").text(Label.linkEmptyLabel)}return!1},submit:function(){""!==this.id?this.update():this.add()},changeOrder:function(e,a,t){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var n={oId:e.toString(),direction:t};$.ajax({url:latkeConfig.servePath+"/console/page/order/",type:"PUT",cache:!1,data:JSON.stringify(n),success:function(e,a){$("#tipMsg").text(e.msg),admin.pageList.getList(admin.pageList.pageInfo.currentPage),$("#loadMsg").text("")}})}},admin.register["page-list"]={obj:admin.pageList,init:admin.pageList.init,refresh:admin.pageList.getList};
admin.others={init:function(){$("#tabOthers").tabs(),$("#loadMsg").text("")},removeUnusedTags:function(){$("#tipMsg").text(""),$.ajax({url:latkeConfig.servePath+"/console/tag/unused",type:"DELETE",cache:!1,success:function(t,e){$("#tipMsg").text(t.msg)}})},exportSQL:function(){$("#tipMsg").text(""),$.ajax({url:latkeConfig.servePath+"/console/export/sql",type:"GET",cache:!1,success:function(t,e){t.sc?$("#tipMsg").text(t.msg):window.location=latkeConfig.servePath+"/console/export/sql"}})},exportJSON:function(){$("#tipMsg").text(""),$.ajax({url:latkeConfig.servePath+"/console/export/json",type:"GET",cache:!1,success:function(t,e){t.sc?$("#tipMsg").text(t.msg):window.location=latkeConfig.servePath+"/console/export/json"}})},exportHexo:function(){$("#tipMsg").text(""),$.ajax({url:latkeConfig.servePath+"/console/export/hexo",type:"GET",cache:!1,success:function(t,e){t.sc?$("#tipMsg").text(t.msg):window.location=latkeConfig.servePath+"/console/export/hexo"}})},getUnusedTags:function(){$.ajax({url:latkeConfig.servePath+"/console/tag/unused",type:"GET",cache:!1,success:function(t,e){($("#tipMsg").text(t.msg),t.sc)?t.unusedTags.length:$("#loadMsg").text("")}})}},admin.register.others={obj:admin.others,init:admin.others.init,refresh:function(){admin.clearTip()}}; admin.others={init:function(){$("#tabOthers").tabs(),$("#loadMsg").text("")},removeUnusedTags:function(){$("#tipMsg").text(""),$.ajax({url:latkeConfig.servePath+"/console/tag/unused",type:"DELETE",cache:!1,success:function(t,e){$("#tipMsg").text(t.msg)}})},exportSQL:function(){$("#tipMsg").text(""),$.ajax({url:latkeConfig.servePath+"/console/export/sql",type:"GET",cache:!1,success:function(t,e){t.sc?$("#tipMsg").text(t.msg):window.location=latkeConfig.servePath+"/console/export/sql"}})},exportJSON:function(){$("#tipMsg").text(""),$.ajax({url:latkeConfig.servePath+"/console/export/json",type:"GET",cache:!1,success:function(t,e){t.sc?$("#tipMsg").text(t.msg):window.location=latkeConfig.servePath+"/console/export/json"}})},exportHexo:function(){$("#tipMsg").text(""),$.ajax({url:latkeConfig.servePath+"/console/export/hexo",type:"GET",cache:!1,success:function(t,e){t.sc?$("#tipMsg").text(t.msg):window.location=latkeConfig.servePath+"/console/export/hexo"}})},getUnusedTags:function(){$.ajax({url:latkeConfig.servePath+"/console/tag/unused",type:"GET",cache:!1,success:function(t,e){($("#tipMsg").text(t.msg),t.sc)?t.unusedTags.length:$("#loadMsg").text("")}})}},admin.register.others={obj:admin.others,init:admin.others.init,refresh:function(){admin.clearTip()}};
admin.linkList={tablePagination:new TablePaginate("link"),pageInfo:{currentCount:1,pageCount:1,currentPage:1},id:"",init:function(i){this.tablePagination.buildTable([{text:"",index:"linkOrder",width:60},{style:"padding-left: 12px;",text:Label.linkTitleLabel,index:"linkTitle",width:230},{style:"padding-left: 12px;",text:Label.urlLabel,index:"linkAddress",minWidth:180},{style:"padding-left: 12px;",text:Label.linkDescriptionLabel,index:"linkDescription",width:360}]),this.tablePagination.initPagination(),this.getList(i),$("#updateLink").dialog({title:$("#updateLink").data("title"),width:700,height:290,modal:!0,hideFooter:!0})},getList:function(l){$("#loadMsg").text(Label.loadingLabel),0===l&&(l=1),this.pageInfo.currentPage=l;var s=this;$.ajax({url:latkeConfig.servePath+"/console/links/"+l+"/"+Label.PAGE_SIZE+"/"+Label.WINDOW_SIZE,type:"GET",cache:!1,success:function(i,e){if($("#tipMsg").text(i.msg),i.sc){var n=i.links,t=[];admin.linkList.pageInfo.currentCount=n.length,admin.linkList.pageInfo.pageCount=0===i.pagination.paginationPageCount?1:i.pagination.paginationPageCount;for(var a=0;a<n.length;a++)t[a]={},0===a?1===n.length?t[a].linkOrder="":t[a].linkOrder='<div class="table-center" style="width:14px"> <span onclick="admin.linkList.changeOrder('+n[a].oId+", "+a+', \'down\');" class="icon-move-down"></span> </div>':a===n.length-1?t[a].linkOrder='<div class="table-center" style="width:14px"> <span onclick="admin.linkList.changeOrder('+n[a].oId+", "+a+', \'up\');" class="icon-move-up"></span> </div>':t[a].linkOrder='<div class="table-center" style="width:38px"> <span onclick="admin.linkList.changeOrder('+n[a].oId+", "+a+', \'up\');" class="icon-move-up"></span> <span onclick="admin.linkList.changeOrder('+n[a].oId+", "+a+', \'down\');" class="icon-move-down"></span> </div>',t[a].linkTitle=n[a].linkTitle,t[a].linkAddress="<a target='_blank' class='no-underline' href='"+n[a].linkAddress+"'>"+n[a].linkAddress+"</a>",t[a].linkDescription=n[a].linkDescription,t[a].expendRow="<span><a href='"+n[a].linkAddress+"' target='_blank'>"+Label.viewLabel+"</a> <a href='javascript:void(0)' onclick=\"admin.linkList.get('"+n[a].oId+"')\">"+Label.updateLabel+"</a> <a href='javascript:void(0)' onclick=\"admin.linkList.del('"+n[a].oId+"', '"+encodeURIComponent(n[a].linkTitle)+"')\">"+Label.removeLabel+"</a></span>";s.tablePagination.updateTablePagination(t,l,i.pagination),$("#loadMsg").text("")}else $("#loadMsg").text("")}})},add:function(){if(this.validate()){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var i={link:{linkTitle:$("#linkTitle").val(),linkAddress:$("#linkAddress").val(),linkDescription:$("#linkDescription").val()}};$.ajax({url:latkeConfig.servePath+"/console/link/",type:"POST",cache:!1,data:JSON.stringify(i),success:function(i,e){if($("#tipMsg").text(i.msg),i.sc){$("#linkTitle").val(""),$("#linkAddress").val(""),$("#linkDescription").val(""),admin.linkList.pageInfo.currentCount===Label.PAGE_SIZE&&admin.linkList.pageInfo.currentPage===admin.linkList.pageInfo.pageCount&&admin.linkList.pageInfo.pageCount++;var n=window.location.hash.split("/");admin.linkList.pageInfo.pageCount!==parseInt(n[n.length-1])&&admin.setHashByPage(admin.linkList.pageInfo.pageCount),admin.linkList.getList(admin.linkList.pageInfo.pageCount),$("#loadMsg").text("")}else $("#loadMsg").text("")}})}},get:function(n){$("#loadMsg").text(Label.loadingLabel),$("#updateLink").dialog("open"),$.ajax({url:latkeConfig.servePath+"/console/link/"+n,type:"GET",cache:!1,success:function(i,e){$("#tipMsg").text(i.msg),i.sc&&(admin.linkList.id=n,$("#linkTitleUpdate").val(i.link.linkTitle),$("#linkAddressUpdate").val(i.link.linkAddress),$("#linkDescriptionUpdate").val(i.link.linkDescription)),$("#loadMsg").text("")}})},update:function(){if(this.validate("Update")){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var i={link:{linkTitle:$("#linkTitleUpdate").val(),oId:this.id,linkAddress:$("#linkAddressUpdate").val(),linkDescription:$("#linkDescriptionUpdate").val()}};$.ajax({url:latkeConfig.servePath+"/console/link/",type:"PUT",cache:!1,data:JSON.stringify(i),success:function(i,e){$("#updateLink").dialog("close"),$("#tipMsg").text(i.msg),i.sc&&admin.linkList.getList(admin.linkList.pageInfo.currentPage),$("#loadMsg").text("")}})}},del:function(i,e){confirm(Label.confirmRemoveLabel+Label.permalinkLabel+'"'+Util.htmlDecode(e)+'"?')&&($("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),$.ajax({url:latkeConfig.servePath+"/console/link/"+i,type:"DELETE",cache:!1,success:function(i,e){if($("#tipMsg").text(i.msg),i.sc){var n=admin.linkList.pageInfo.currentPage;1===admin.linkList.pageInfo.currentCount&&1!==admin.linkList.pageInfo.pageCount&&admin.linkList.pageInfo.currentPage===admin.linkList.pageInfo.pageCount&&(admin.linkList.pageInfo.pageCount--,n=admin.linkList.pageInfo.pageCount);var t=window.location.hash.split("/");n!==parseInt(t[t.length-1])&&admin.setHashByPage(n),admin.linkList.getList(n),$("#loadMsg").text("")}else $("#loadMsg").text("")}}))},validate:function(i){if(i||(i=""),""===$("#linkTitle"+i).val().replace(/\s/g,""))$("#tipMsg").text(Label.titleEmptyLabel),$("#linkTitle"+i).focus().val("");else if(""===$("#linkAddress"+i).val().replace(/\s/g,""))$("#tipMsg").text(Label.addressEmptyLabel),$("#linkAddress"+i).focus().val("");else{if(/^\w+:\/\//.test($("#linkAddress"+i).val()))return!0;$("#tipMsg").text(Label.addressInvalidLabel),$("#linkAddress"+i).focus().val("")}return!1},changeOrder:function(i,e,n){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var t={oId:i.toString(),direction:n};$.ajax({url:latkeConfig.servePath+"/console/link/order/",type:"PUT",cache:!1,data:JSON.stringify(t),success:function(i,e){$("#tipMsg").text(i.msg),admin.linkList.getList(admin.linkList.pageInfo.currentPage),$("#loadMsg").text("")}})}},admin.register["link-list"]={obj:admin.linkList,init:admin.linkList.init,refresh:admin.linkList.getList}; admin.linkList={tablePagination:new TablePaginate("link"),pageInfo:{currentCount:1,pageCount:1,currentPage:1},id:"",init:function(i){this.tablePagination.buildTable([{text:"",index:"linkOrder",width:60},{style:"padding-left: 12px;",text:Label.linkTitleLabel,index:"linkTitle",width:230},{style:"padding-left: 12px;",text:Label.urlLabel,index:"linkAddress",minWidth:180},{style:"padding-left: 12px;",text:Label.linkDescriptionLabel,index:"linkDescription",width:360}]),this.tablePagination.initPagination(),this.getList(i),$("#updateLink").dialog({title:$("#updateLink").data("title"),width:700,height:290,modal:!0,hideFooter:!0})},getList:function(l){$("#loadMsg").text(Label.loadingLabel),0===l&&(l=1),this.pageInfo.currentPage=l;var s=this;$.ajax({url:latkeConfig.servePath+"/console/links/"+l+"/"+Label.PAGE_SIZE+"/"+Label.WINDOW_SIZE,type:"GET",cache:!1,success:function(i,e){if($("#tipMsg").text(i.msg),i.sc){var n=i.links,t=[];admin.linkList.pageInfo.currentCount=n.length,admin.linkList.pageInfo.pageCount=0===i.pagination.paginationPageCount?1:i.pagination.paginationPageCount;for(var a=0;a<n.length;a++)t[a]={},0===a?1===n.length?t[a].linkOrder="":t[a].linkOrder='<div class="table-center" style="width:14px"> <span onclick="admin.linkList.changeOrder('+n[a].oId+", "+a+', \'down\');" class="icon-move-down"></span> </div>':a===n.length-1?t[a].linkOrder='<div class="table-center" style="width:14px"> <span onclick="admin.linkList.changeOrder('+n[a].oId+", "+a+', \'up\');" class="icon-move-up"></span> </div>':t[a].linkOrder='<div class="table-center" style="width:38px"> <span onclick="admin.linkList.changeOrder('+n[a].oId+", "+a+', \'up\');" class="icon-move-up"></span> <span onclick="admin.linkList.changeOrder('+n[a].oId+", "+a+', \'down\');" class="icon-move-down"></span> </div>',t[a].linkTitle=n[a].linkTitle,t[a].linkAddress="<a target='_blank' class='no-underline' href='"+n[a].linkAddress+"'>"+n[a].linkAddress+"</a>",t[a].linkDescription=n[a].linkDescription,t[a].expendRow="<span><a href='"+n[a].linkAddress+"' target='_blank'>"+Label.viewLabel+"</a> <a href='javascript:void(0)' onclick=\"admin.linkList.get('"+n[a].oId+"')\">"+Label.updateLabel+"</a> <a href='javascript:void(0)' onclick=\"admin.linkList.del('"+n[a].oId+"', '"+encodeURIComponent(n[a].linkTitle)+"')\">"+Label.removeLabel+"</a></span>";s.tablePagination.updateTablePagination(t,l,i.pagination),$("#loadMsg").text("")}else $("#loadMsg").text("")}})},add:function(){if(this.validate()){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var i={link:{linkTitle:$("#linkTitle").val(),linkAddress:$("#linkAddress").val(),linkDescription:$("#linkDescription").val()}};$.ajax({url:latkeConfig.servePath+"/console/link/",type:"POST",cache:!1,data:JSON.stringify(i),success:function(i,e){if($("#tipMsg").text(i.msg),i.sc){$("#linkTitle").val(""),$("#linkAddress").val(""),$("#linkDescription").val(""),admin.linkList.pageInfo.currentCount===Label.PAGE_SIZE&&admin.linkList.pageInfo.currentPage===admin.linkList.pageInfo.pageCount&&admin.linkList.pageInfo.pageCount++;var n=window.location.hash.split("/");admin.linkList.pageInfo.pageCount!==parseInt(n[n.length-1])&&admin.setHashByPage(admin.linkList.pageInfo.pageCount),admin.linkList.getList(admin.linkList.pageInfo.pageCount),$("#loadMsg").text("")}else $("#loadMsg").text("")}})}},get:function(n){$("#loadMsg").text(Label.loadingLabel),$("#updateLink").dialog("open"),$.ajax({url:latkeConfig.servePath+"/console/link/"+n,type:"GET",cache:!1,success:function(i,e){$("#tipMsg").text(i.msg),i.sc&&(admin.linkList.id=n,$("#linkTitleUpdate").val(i.link.linkTitle),$("#linkAddressUpdate").val(i.link.linkAddress),$("#linkDescriptionUpdate").val(i.link.linkDescription)),$("#loadMsg").text("")}})},update:function(){if(this.validate("Update")){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var i={link:{linkTitle:$("#linkTitleUpdate").val(),oId:this.id,linkAddress:$("#linkAddressUpdate").val(),linkDescription:$("#linkDescriptionUpdate").val()}};$.ajax({url:latkeConfig.servePath+"/console/link/",type:"PUT",cache:!1,data:JSON.stringify(i),success:function(i,e){$("#updateLink").dialog("close"),$("#tipMsg").text(i.msg),i.sc&&admin.linkList.getList(admin.linkList.pageInfo.currentPage),$("#loadMsg").text("")}})}},del:function(i,e){confirm(Label.confirmRemoveLabel+Label.permalinkLabel+'"'+Util.htmlDecode(e)+'"?')&&($("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),$.ajax({url:latkeConfig.servePath+"/console/link/"+i,type:"DELETE",cache:!1,success:function(i,e){if($("#tipMsg").text(i.msg),i.sc){var n=admin.linkList.pageInfo.currentPage;1===admin.linkList.pageInfo.currentCount&&1!==admin.linkList.pageInfo.pageCount&&admin.linkList.pageInfo.currentPage===admin.linkList.pageInfo.pageCount&&(admin.linkList.pageInfo.pageCount--,n=admin.linkList.pageInfo.pageCount);var t=window.location.hash.split("/");n!==parseInt(t[t.length-1])&&admin.setHashByPage(n),admin.linkList.getList(n),$("#loadMsg").text("")}else $("#loadMsg").text("")}}))},validate:function(i){if(i||(i=""),""===$("#linkTitle"+i).val().replace(/\s/g,""))$("#tipMsg").text(Label.titleEmptyLabel),$("#linkTitle"+i).focus().val("");else if(""===$("#linkAddress"+i).val().replace(/\s/g,""))$("#tipMsg").text(Label.addressEmptyLabel),$("#linkAddress"+i).focus().val("");else{if(/^\w+:\/\//.test($("#linkAddress"+i).val()))return!0;$("#tipMsg").text(Label.addressInvalidLabel),$("#linkAddress"+i).focus().val("")}return!1},changeOrder:function(i,e,n){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var t={oId:i.toString(),direction:n};$.ajax({url:latkeConfig.servePath+"/console/link/order/",type:"PUT",cache:!1,data:JSON.stringify(t),success:function(i,e){$("#tipMsg").text(i.msg),admin.linkList.getList(admin.linkList.pageInfo.currentPage),$("#loadMsg").text("")}})}},admin.register["link-list"]={obj:admin.linkList,init:admin.linkList.init,refresh:admin.linkList.getList};
admin.preference={locale:"",init:function(){$("#tabPreference").tabs(),$.ajax({url:latkeConfig.servePath+"/console/preference/",type:"GET",cache:!1,success:function(result,textStatus){if($("#tipMsg").text(result.msg),result.sc){var preference=result.preference;$("#metaKeywords").val(preference.metaKeywords),$("#metaDescription").val(preference.metaDescription),$("#blogTitle").val(preference.blogTitle),$("#blogSubtitle").val(preference.blogSubtitle),$("#mostCommentArticleDisplayCount").val(preference.mostCommentArticleDisplayCount),$("#mostViewArticleDisplayCount").val(preference.mostViewArticleDisplayCount),$("#recentCommentDisplayCount").val(preference.recentCommentDisplayCount),$("#mostUsedTagDisplayCount").val(preference.mostUsedTagDisplayCount),$("#articleListDisplayCount").val(preference.articleListDisplayCount),$("#articleListPaginationWindowSize").val(preference.articleListPaginationWindowSize),$("#localeString").val(preference.localeString),$("#timeZoneId").val(preference.timeZoneId),$("#noticeBoard").val(preference.noticeBoard),$("#footerContent").val(preference.footerContent),$("#htmlHead").val(preference.htmlHead),$("#externalRelevantArticlesDisplayCount").val(preference.externalRelevantArticlesDisplayCount),$("#relevantArticlesDisplayCount").val(preference.relevantArticlesDisplayCount),$("#randomArticlesDisplayCount").val(preference.randomArticlesDisplayCount),$("#customVars").val(preference.customVars),"true"===preference.enableArticleUpdateHint?$("#enableArticleUpdateHint").attr("checked","checked"):$("#enableArticleUpdateHint").removeAttr("checked"),"true"===preference.allowVisitDraftViaPermalink?$("#allowVisitDraftViaPermalink").attr("checked","checked"):$("allowVisitDraftViaPermalink").removeAttr("checked"),"true"===preference.commentable?$("#commentable").attr("checked","checked"):$("commentable").removeAttr("checked"),admin.preference.locale=preference.localeString,$("#skinMain").data("skinDirName",preference.skinDirName);for(var skins=eval("("+preference.skins+")"),skinsHTML="",i=0;i<skins.length;i++){var selectedClass="";skins[i].skinName===preference.skinName&&skins[i].skinDirName===preference.skinDirName&&(selectedClass+=" selected"),skinsHTML+='<div class="fn__left skinItem'+selectedClass+'"><div class="ft__center">'+skins[i].skinName+'</div><img class="skinPreview" src="'+latkeConfig.staticServePath+"/skins/"+skins[i].skinDirName+'/preview.png"/><div><button class="update small" data-name="'+skins[i].skinDirName+'">'+Label.enableLabel+'</button><button class="small" onclick="window.open(\''+latkeConfig.servePath+"?skin="+skins[i].skinName+"')\">"+Label.previewLabel+"</button></div></div>"}$("#skinMain").append(skinsHTML+"<div class='fn__clear'></div>"),$(".skinItem .update").click(function(){$(".skinItem").removeClass("selected"),$(this).closest(".skinItem").addClass("selected"),$("#skinMain").data("skinDirName",$(this).data("name")),admin.preference.update()});for(var signs=eval("("+preference.signs+")"),j=1;j<signs.length;j++)$("#preferenceSign"+j).val(signs[j].signHTML);$("#articleListDisplay").val(preference.articleListStyle),$("#feedOutputMode").val(preference.feedOutputMode),$("#feedOutputCnt").val(preference.feedOutputCnt),$("#loadMsg").text("")}else $("#loadMsg").text("")}})},validate:function(){return/^\d+$/.test($("#mostUsedTagDisplayCount").val())?/^\d+$/.test($("#recentCommentDisplayCount").val())?/^\d+$/.test($("#mostCommentArticleDisplayCount").val())?/^\d+$/.test($("#mostViewArticleDisplayCount").val())?/^\d+$/.test($("#articleListDisplayCount").val())?/^\d+$/.test($("#articleListPaginationWindowSize").val())?/^\d+$/.test($("#randomArticlesDisplayCount").val())?/^\d+$/.test($("#relevantArticlesDisplayCount").val())?!!/^\d+$/.test($("#externalRelevantArticlesDisplayCount").val())||($("#tipMsg").text("["+Label.paramSettingsLabel+" - "+Label.externalRelevantArticlesDisplayCntLabel+"] "+Label.nonNegativeIntegerOnlyLabel),$("#externalRelevantArticlesDisplayCount").focus(),!1):($("#tipMsg").text("["+Label.paramSettingsLabel+" - "+Label.relevantArticlesDisplayCntLabel+"] "+Label.nonNegativeIntegerOnlyLabel),$("#relevantArticlesDisplayCount").focus(),!1):($("#tipMsg").text("["+Label.paramSettingsLabel+" - "+Label.randomArticlesDisplayCntLabel+"] "+Label.nonNegativeIntegerOnlyLabel),$("#randomArticlesDisplayCount").focus(),!1):($("#tipMsg").text("["+Label.paramSettingsLabel+" - "+Label.windowSizeLabel+"] "+Label.nonNegativeIntegerOnlyLabel),$("#articleListPaginationWindowSize").focus(),!1):($("#tipMsg").text("["+Label.paramSettingsLabel+" - "+Label.pageSizeLabel+"] "+Label.nonNegativeIntegerOnlyLabel),$("#articleListDisplayCount").focus(),!1):($("#tipMsg").text("["+Label.paramSettingsLabel+" - "+Label.indexMostViewArticleDisplayCntLabel+"] "+Label.nonNegativeIntegerOnlyLabel),$("#mostViewArticleDisplayCount").focus(),!1):($("#tipMsg").text("["+Label.paramSettingsLabel+" - "+Label.indexMostCommentArticleDisplayCntLabel+"] "+Label.nonNegativeIntegerOnlyLabel),$("#mostCommentArticleDisplayCount").focus(),!1):($("#tipMsg").text("["+Label.paramSettingsLabel+" - "+Label.indexRecentCommentDisplayCntLabel+"] "+Label.nonNegativeIntegerOnlyLabel),$("#recentCommentDisplayCount").focus(),!1):($("#tipMsg").text("["+Label.paramSettingsLabel+" - "+Label.indexTagDisplayCntLabel+"] "+Label.nonNegativeIntegerOnlyLabel),$("#mostUsedTagDisplayCount").focus(),!1)},update:function(){if(admin.preference.validate()){$("#tipMsg").text(""),$("#loadMsg").text(Label.loadingLabel);var e=[{oId:0,signHTML:""},{oId:1,signHTML:$("#preferenceSign1").val()},{oId:2,signHTML:$("#preferenceSign2").val()},{oId:3,signHTML:$("#preferenceSign3").val()}],t={preference:{metaKeywords:$("#metaKeywords").val(),metaDescription:$("#metaDescription").val(),blogTitle:$("#blogTitle").val(),blogSubtitle:$("#blogSubtitle").val(),mostCommentArticleDisplayCount:$("#mostCommentArticleDisplayCount").val(),mostViewArticleDisplayCount:$("#mostViewArticleDisplayCount").val(),recentCommentDisplayCount:$("#recentCommentDisplayCount").val(),mostUsedTagDisplayCount:$("#mostUsedTagDisplayCount").val(),articleListDisplayCount:$("#articleListDisplayCount").val(),articleListPaginationWindowSize:$("#articleListPaginationWindowSize").val(),skinDirName:$("#skinMain").data("skinDirName"),localeString:$("#localeString").val(),timeZoneId:$("#timeZoneId").val(),noticeBoard:$("#noticeBoard").val(),footerContent:$("#footerContent").val(),htmlHead:$("#htmlHead").val(),externalRelevantArticlesDisplayCount:$("#externalRelevantArticlesDisplayCount").val(),relevantArticlesDisplayCount:$("#relevantArticlesDisplayCount").val(),randomArticlesDisplayCount:$("#randomArticlesDisplayCount").val(),enableArticleUpdateHint:$("#enableArticleUpdateHint").prop("checked"),signs:e,allowVisitDraftViaPermalink:$("#allowVisitDraftViaPermalink").prop("checked"),articleListStyle:$("#articleListDisplay").val(),feedOutputMode:$("#feedOutputMode").val(),feedOutputCnt:$("#feedOutputCnt").val(),commentable:$("#commentable").prop("checked"),customVars:$("#customVars").val()}};$.ajax({url:latkeConfig.servePath+"/console/preference/",type:"PUT",cache:!1,data:JSON.stringify(t),success:function(e,t){$("#tipMsg").text(e.msg),e.sc&&$("#localeString").val()!==admin.preference.locale&&window.location.reload(),$("#loadMsg").text("")}})}}},admin.register.preference={obj:admin.preference,init:admin.preference.init,refresh:function(){admin.clearTip()}}; admin.preference={locale:"",init:function(){$("#tabPreference").tabs(),$.ajax({url:latkeConfig.servePath+"/console/preference/",type:"GET",cache:!1,success:function(result,textStatus){if($("#tipMsg").text(result.msg),result.sc){var preference=result.preference;$("#metaKeywords").val(preference.metaKeywords),$("#metaDescription").val(preference.metaDescription),$("#blogTitle").val(preference.blogTitle),$("#blogSubtitle").val(preference.blogSubtitle),$("#mostCommentArticleDisplayCount").val(preference.mostCommentArticleDisplayCount),$("#mostViewArticleDisplayCount").val(preference.mostViewArticleDisplayCount),$("#recentCommentDisplayCount").val(preference.recentCommentDisplayCount),$("#mostUsedTagDisplayCount").val(preference.mostUsedTagDisplayCount),$("#articleListDisplayCount").val(preference.articleListDisplayCount),$("#articleListPaginationWindowSize").val(preference.articleListPaginationWindowSize),$("#localeString").val(preference.localeString),$("#timeZoneId").val(preference.timeZoneId),$("#noticeBoard").val(preference.noticeBoard),$("#footerContent").val(preference.footerContent),$("#htmlHead").val(preference.htmlHead),$("#externalRelevantArticlesDisplayCount").val(preference.externalRelevantArticlesDisplayCount),$("#relevantArticlesDisplayCount").val(preference.relevantArticlesDisplayCount),$("#randomArticlesDisplayCount").val(preference.randomArticlesDisplayCount),$("#customVars").val(preference.customVars),"true"===preference.enableArticleUpdateHint?$("#enableArticleUpdateHint").attr("checked","checked"):$("#enableArticleUpdateHint").removeAttr("checked"),"true"===preference.allowVisitDraftViaPermalink?$("#allowVisitDraftViaPermalink").attr("checked","checked"):$("allowVisitDraftViaPermalink").removeAttr("checked"),"true"===preference.commentable?$("#commentable").attr("checked","checked"):$("commentable").removeAttr("checked"),admin.preference.locale=preference.localeString,$("#skinMain").data("skinDirName",preference.skinDirName);for(var skins=eval("("+preference.skins+")"),skinsHTML="",i=0;i<skins.length;i++){var selectedClass="";skins[i].skinName===preference.skinName&&skins[i].skinDirName===preference.skinDirName&&(selectedClass+=" selected"),skinsHTML+='<div class="fn__left skinItem'+selectedClass+'"><div class="ft__center">'+skins[i].skinName+'</div><img class="skinPreview" src="'+latkeConfig.staticServePath+"/skins/"+skins[i].skinDirName+'/preview.png"/><div><button class="update small" data-name="'+skins[i].skinDirName+'">'+Label.enableLabel+'</button><button class="small" onclick="window.open(\''+latkeConfig.servePath+"?skin="+skins[i].skinName+"')\">"+Label.previewLabel+"</button></div></div>"}$("#skinMain").append(skinsHTML+"<div class='fn__clear'></div>"),$(".skinItem .update").click(function(){$(".skinItem").removeClass("selected"),$(this).closest(".skinItem").addClass("selected"),$("#skinMain").data("skinDirName",$(this).data("name")),admin.preference.update()});for(var signs=eval("("+preference.signs+")"),j=1;j<signs.length;j++)$("#preferenceSign"+j).val(signs[j].signHTML);$("#articleListDisplay").val(preference.articleListStyle),$("#feedOutputMode").val(preference.feedOutputMode),$("#feedOutputCnt").val(preference.feedOutputCnt),$("#faviconURL").val(preference.faviconURL),$("#loadMsg").text("")}else $("#loadMsg").text("")}})},validate:function(){return/^\d+$/.test($("#mostUsedTagDisplayCount").val())?/^\d+$/.test($("#recentCommentDisplayCount").val())?/^\d+$/.test($("#mostCommentArticleDisplayCount").val())?/^\d+$/.test($("#mostViewArticleDisplayCount").val())?/^\d+$/.test($("#articleListDisplayCount").val())?/^\d+$/.test($("#articleListPaginationWindowSize").val())?/^\d+$/.test($("#randomArticlesDisplayCount").val())?/^\d+$/.test($("#relevantArticlesDisplayCount").val())?!!/^\d+$/.test($("#externalRelevantArticlesDisplayCount").val())||($("#tipMsg").text("["+Label.paramSettingsLabel+" - "+Label.externalRelevantArticlesDisplayCntLabel+"] "+Label.nonNegativeIntegerOnlyLabel),$("#externalRelevantArticlesDisplayCount").focus(),!1):($("#tipMsg").text("["+Label.paramSettingsLabel+" - "+Label.relevantArticlesDisplayCntLabel+"] "+Label.nonNegativeIntegerOnlyLabel),$("#relevantArticlesDisplayCount").focus(),!1):($("#tipMsg").text("["+Label.paramSettingsLabel+" - "+Label.randomArticlesDisplayCntLabel+"] "+Label.nonNegativeIntegerOnlyLabel),$("#randomArticlesDisplayCount").focus(),!1):($("#tipMsg").text("["+Label.paramSettingsLabel+" - "+Label.windowSizeLabel+"] "+Label.nonNegativeIntegerOnlyLabel),$("#articleListPaginationWindowSize").focus(),!1):($("#tipMsg").text("["+Label.paramSettingsLabel+" - "+Label.pageSizeLabel+"] "+Label.nonNegativeIntegerOnlyLabel),$("#articleListDisplayCount").focus(),!1):($("#tipMsg").text("["+Label.paramSettingsLabel+" - "+Label.indexMostViewArticleDisplayCntLabel+"] "+Label.nonNegativeIntegerOnlyLabel),$("#mostViewArticleDisplayCount").focus(),!1):($("#tipMsg").text("["+Label.paramSettingsLabel+" - "+Label.indexMostCommentArticleDisplayCntLabel+"] "+Label.nonNegativeIntegerOnlyLabel),$("#mostCommentArticleDisplayCount").focus(),!1):($("#tipMsg").text("["+Label.paramSettingsLabel+" - "+Label.indexRecentCommentDisplayCntLabel+"] "+Label.nonNegativeIntegerOnlyLabel),$("#recentCommentDisplayCount").focus(),!1):($("#tipMsg").text("["+Label.paramSettingsLabel+" - "+Label.indexTagDisplayCntLabel+"] "+Label.nonNegativeIntegerOnlyLabel),$("#mostUsedTagDisplayCount").focus(),!1)},update:function(){if(admin.preference.validate()){$("#tipMsg").text(""),$("#loadMsg").text(Label.loadingLabel);var e=[{oId:0,signHTML:""},{oId:1,signHTML:$("#preferenceSign1").val()},{oId:2,signHTML:$("#preferenceSign2").val()},{oId:3,signHTML:$("#preferenceSign3").val()}],t={preference:{metaKeywords:$("#metaKeywords").val(),metaDescription:$("#metaDescription").val(),blogTitle:$("#blogTitle").val(),blogSubtitle:$("#blogSubtitle").val(),mostCommentArticleDisplayCount:$("#mostCommentArticleDisplayCount").val(),mostViewArticleDisplayCount:$("#mostViewArticleDisplayCount").val(),recentCommentDisplayCount:$("#recentCommentDisplayCount").val(),mostUsedTagDisplayCount:$("#mostUsedTagDisplayCount").val(),articleListDisplayCount:$("#articleListDisplayCount").val(),articleListPaginationWindowSize:$("#articleListPaginationWindowSize").val(),skinDirName:$("#skinMain").data("skinDirName"),localeString:$("#localeString").val(),timeZoneId:$("#timeZoneId").val(),noticeBoard:$("#noticeBoard").val(),footerContent:$("#footerContent").val(),htmlHead:$("#htmlHead").val(),externalRelevantArticlesDisplayCount:$("#externalRelevantArticlesDisplayCount").val(),relevantArticlesDisplayCount:$("#relevantArticlesDisplayCount").val(),randomArticlesDisplayCount:$("#randomArticlesDisplayCount").val(),enableArticleUpdateHint:$("#enableArticleUpdateHint").prop("checked"),signs:e,allowVisitDraftViaPermalink:$("#allowVisitDraftViaPermalink").prop("checked"),articleListStyle:$("#articleListDisplay").val(),feedOutputMode:$("#feedOutputMode").val(),feedOutputCnt:$("#feedOutputCnt").val(),faviconURL:$("#faviconURL").val(),commentable:$("#commentable").prop("checked"),customVars:$("#customVars").val()}};$.ajax({url:latkeConfig.servePath+"/console/preference/",type:"PUT",cache:!1,data:JSON.stringify(t),success:function(e,t){$("#tipMsg").text(e.msg),e.sc&&$("#localeString").val()!==admin.preference.locale&&window.location.reload(),$("#loadMsg").text("")}})}}},admin.register.preference={obj:admin.preference,init:admin.preference.init,refresh:function(){admin.clearTip()}};
admin.pluginList={tablePagination:new TablePaginate("plugin"),pageInfo:{currentCount:1,pageCount:1,currentPage:1},init:function(t){this.tablePagination.buildTable([{style:"padding-left: 12px;",text:Label.pluginNameLabel,index:"name",width:230},{style:"padding-left: 12px;",text:Label.statusLabel,index:"status",minWidth:80},{style:"padding-left: 12px;",text:Label.authorLabel,index:"author",width:200},{style:"padding-left: 12px;",text:Label.versionLabel,index:"version",width:120}]),this.tablePagination.initPagination(),$("#pluginSetting").dialog({width:700,height:180,modal:!0,hideFooter:!0}),this.getList(t)},getList:function(n){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var l=this;$.ajax({url:latkeConfig.servePath+"/console/plugins/"+n+"/"+Label.PAGE_SIZE+"/"+Label.WINDOW_SIZE,type:"GET",cache:!1,success:function(t,e){if($("#tipMsg").text(t.msg),t.sc){admin.pluginList.pageInfo.currentPage=n;for(var a=t.plugins,i=0;i<a.length;i++)a[i].expendRow="<a href='javascript:void(0)' onclick=\"admin.pluginList.changeStatus('"+a[i].oId+"', '"+a[i].status+"')\">","ENABLED"===a[i].status?(a[i].status=Label.enabledLabel,a[i].expendRow+=Label.disableLabel):(a[i].status=Label.disabledLabel,a[i].expendRow+=Label.enableLabel),a[i].expendRow+="</a> ","{}"!=a[i].setting&&(a[i].expendRow+="<a href='javascript:void(0)' onclick=\"admin.pluginList.toSetting('"+a[i].oId+"')\"> "+Label.settingLabel+" </a> ");l.tablePagination.updateTablePagination(t.plugins,n,t.pagination),$("#loadMsg").text("")}else $("#loadMsg").text("")}})},toSetting:function(t){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var e={oId:t};$.ajax({url:latkeConfig.servePath+"/console/plugin/toSetting",type:"POST",cache:!1,data:JSON.stringify(e),success:function(t,e){$("#tipMsg").text(t.msg),$("#pluginSetting").html(t),$("#pluginSetting").dialog("open"),$("#loadMsg").text("")}})},changeStatus:function(t,e){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var a={oId:t,status:e="ENABLED"===e?"DISABLED":"ENABLED"};$.ajax({url:latkeConfig.servePath+"/console/plugin/status/",type:"PUT",cache:!1,data:JSON.stringify(a),success:function(t,e){$("#tipMsg").text(t.msg),t.sc?($("#loadMsg").text(""),window.location.reload()):$("#loadMsg").text("")}})}},admin.register["plugin-list"]={obj:admin.pluginList,init:admin.pluginList.init,refresh:function(){$("#loadMsg").text("")}}; admin.pluginList={tablePagination:new TablePaginate("plugin"),pageInfo:{currentCount:1,pageCount:1,currentPage:1},init:function(t){this.tablePagination.buildTable([{style:"padding-left: 12px;",text:Label.pluginNameLabel,index:"name",width:230},{style:"padding-left: 12px;",text:Label.statusLabel,index:"status",minWidth:80},{style:"padding-left: 12px;",text:Label.authorLabel,index:"author",width:200},{style:"padding-left: 12px;",text:Label.versionLabel,index:"version",width:120}]),this.tablePagination.initPagination(),$("#pluginSetting").dialog({width:700,height:180,modal:!0,hideFooter:!0}),this.getList(t)},getList:function(n){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var l=this;$.ajax({url:latkeConfig.servePath+"/console/plugins/"+n+"/"+Label.PAGE_SIZE+"/"+Label.WINDOW_SIZE,type:"GET",cache:!1,success:function(t,e){if($("#tipMsg").text(t.msg),t.sc){admin.pluginList.pageInfo.currentPage=n;for(var a=t.plugins,i=0;i<a.length;i++)a[i].expendRow="<a href='javascript:void(0)' onclick=\"admin.pluginList.changeStatus('"+a[i].oId+"', '"+a[i].status+"')\">","ENABLED"===a[i].status?(a[i].status=Label.enabledLabel,a[i].expendRow+=Label.disableLabel):(a[i].status=Label.disabledLabel,a[i].expendRow+=Label.enableLabel),a[i].expendRow+="</a> ","{}"!=a[i].setting&&(a[i].expendRow+="<a href='javascript:void(0)' onclick=\"admin.pluginList.toSetting('"+a[i].oId+"')\"> "+Label.settingLabel+" </a> ");l.tablePagination.updateTablePagination(t.plugins,n,t.pagination),$("#loadMsg").text("")}else $("#loadMsg").text("")}})},toSetting:function(t){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var e={oId:t};$.ajax({url:latkeConfig.servePath+"/console/plugin/toSetting",type:"POST",cache:!1,data:JSON.stringify(e),success:function(t,e){$("#tipMsg").text(t.msg),$("#pluginSetting").html(t),$("#pluginSetting").dialog("open"),$("#loadMsg").text("")}})},changeStatus:function(t,e){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var a={oId:t,status:e="ENABLED"===e?"DISABLED":"ENABLED"};$.ajax({url:latkeConfig.servePath+"/console/plugin/status/",type:"PUT",cache:!1,data:JSON.stringify(a),success:function(t,e){$("#tipMsg").text(t.msg),t.sc?($("#loadMsg").text(""),window.location.reload()):$("#loadMsg").text("")}})}},admin.register["plugin-list"]={obj:admin.pluginList,init:admin.pluginList.init,refresh:function(){$("#loadMsg").text("")}};
admin.userList={tablePagination:new TablePaginate("user"),pageInfo:{currentCount:1,pageCount:1,currentPage:1},userInfo:{oId:"",userRole:""},init:function(e){this.tablePagination.buildTable([{style:"padding-left: 12px;",text:Label.userNameLabel,index:"userName",width:230},{style:"padding-left: 12px;",text:Label.roleLabel,index:"isAdmin",width:120}]),this.tablePagination.initPagination(),this.getList(e),$("#userUpdate").dialog({width:700,height:450,modal:!0,hideFooter:!0})},getList:function(n){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),this.pageInfo.currentPage=n;var o=this;$.ajax({url:latkeConfig.servePath+"/console/users/"+n+"/"+Label.PAGE_SIZE+"/"+Label.WINDOW_SIZE,type:"GET",cache:!1,success:function(e,a){if($("#tipMsg").text(e.msg),e.sc){var t=e.users,s=[];if(admin.userList.pageInfo.currentCount=t.length,admin.userList.pageInfo.pageCount=e.pagination.paginationPageCount,t.length<1)return $("#tipMsg").text("No user "+Label.reportIssueLabel),void $("#loadMsg").text("");$("#tipMsg").text(Label.uploadMsg);for(var i=0;i<t.length;i++)s[i]={},s[i].userName=t[i].userName,"adminRole"===t[i].userRole?(s[i].isAdmin="&nbsp;"+Label.administratorLabel,s[i].expendRow="<a href='javascript:void(0)' onclick=\"admin.userList.get('"+t[i].oId+"', '"+t[i].userRole+"')\">"+Label.updateLabel+"</a>"):(s[i].expendRow="<a href='javascript:void(0)' onclick=\"admin.userList.get('"+t[i].oId+"', '"+t[i].userRole+"')\">"+Label.updateLabel+"</a> <a href='javascript:void(0)' onclick=\"admin.userList.del('"+t[i].oId+"', '"+encodeURIComponent(t[i].userName)+"')\">"+Label.removeLabel+"</a> <a href='javascript:void(0)' onclick=\"admin.userList.changeRole('"+t[i].oId+"')\">"+Label.changeRoleLabel+"</a>","defaultRole"===t[i].userRole?s[i].isAdmin=Label.commonUserLabel:s[i].isAdmin=Label.visitorUserLabel),o.tablePagination.updateTablePagination(s,n,e.pagination);$("#loadMsg").text("")}else $("#loadMsg").text("")}})},get:function(t,s){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),$("#userUpdate").dialog("open"),$.ajax({url:latkeConfig.servePath+"/console/user/"+t,type:"GET",cache:!1,success:function(e,a){$("#tipMsg").text(e.msg),e.sc&&($("#userURLUpdate").val(e.user.userURL),$("#userAvatarUpdate").val(e.user.userAvatar),$("#userB3KeyUpdate").val(e.user.userB3Key),$("#userNameUpdate").val(e.user.userName).data("userInfo",{oId:t,userRole:s})),$("#loadMsg").text("")}})},update:function(){if(this.validate("Update")){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var e=$("#userNameUpdate").data("userInfo"),a={userName:$("#userNameUpdate").val(),oId:e.oId,userURL:$("#userURLUpdate").val(),userRole:e.userRole,userAvatar:$("#userAvatarUpdate").val(),userB3Key:$("#userB3KeyUpdate").val()};$.ajax({url:latkeConfig.servePath+"/console/user/",type:"PUT",cache:!1,data:JSON.stringify(a),success:function(e,a){$("#userUpdate").dialog("close"),$("#tipMsg").text(e.msg),e.sc&&admin.userList.getList(admin.userList.pageInfo.currentPage),$("#loadMsg").text("")}})}},del:function(e,a){confirm(Label.confirmRemoveLabel+Label.userLabel+'"'+Util.htmlDecode(a)+'"?')&&($("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),$.ajax({url:latkeConfig.servePath+"/console/user/"+e,type:"DELETE",cache:!1,success:function(e,a){if($("#tipMsg").text(e.msg),e.sc){var t=admin.userList.pageInfo.currentPage;1===admin.userList.pageInfo.currentCount&&1!==admin.userList.pageInfo.pageCount&&admin.userList.pageInfo.currentPage===admin.userList.pageInfo.pageCount&&(admin.userList.pageInfo.pageCount--,t=admin.userList.pageInfo.pageCount);var s=window.location.hash.split("/");t!==parseInt(s[s.length-1])&&admin.setHashByPage(t),admin.userList.getList(t),$("#loadMsg").text("")}else $("#loadMsg").text("")}}))},changeRole:function(e){$("#tipMsg").text(""),$.ajax({url:latkeConfig.servePath+"/console/changeRole/"+e,type:"GET",cache:!1,success:function(e,a){if($("#tipMsg").text(e.msg),e.sc){var t=admin.userList.pageInfo.currentPage;1===admin.userList.pageInfo.currentCount&&1!==admin.userList.pageInfo.pageCount&&admin.userList.pageInfo.currentPage===admin.userList.pageInfo.pageCount&&(admin.userList.pageInfo.pageCount--,t=admin.userList.pageInfo.pageCount);var s=window.location.hash.split("/");t!==parseInt(s[s.length-1])&&admin.setHashByPage(t),admin.userList.getList(t),$("#loadMsg").text("")}else $("#loadMsg").text("")}})},validate:function(e){e||(e="");var a=$("#userName"+e).val().replace(/(^\s*)|(\s*$)/g,"");return!(a.length<2||20<a.length)||($("#tipMsg").text(Label.nameTooLongLabel),$("#userName"+e).focus(),!1)}},admin.register["user-list"]={obj:admin.userList,init:admin.userList.init,refresh:admin.userList.getList}; admin.userList={tablePagination:new TablePaginate("user"),pageInfo:{currentCount:1,pageCount:1,currentPage:1},userInfo:{oId:"",userRole:""},init:function(e){this.tablePagination.buildTable([{style:"padding-left: 12px;",text:Label.userNameLabel,index:"userName",width:230},{style:"padding-left: 12px;",text:Label.roleLabel,index:"isAdmin",width:120}]),this.tablePagination.initPagination(),this.getList(e),$("#userUpdate").dialog({width:700,height:450,modal:!0,hideFooter:!0})},getList:function(n){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),this.pageInfo.currentPage=n;var o=this;$.ajax({url:latkeConfig.servePath+"/console/users/"+n+"/"+Label.PAGE_SIZE+"/"+Label.WINDOW_SIZE,type:"GET",cache:!1,success:function(e,a){if($("#tipMsg").text(e.msg),e.sc){var t=e.users,s=[];if(admin.userList.pageInfo.currentCount=t.length,admin.userList.pageInfo.pageCount=e.pagination.paginationPageCount,t.length<1)return $("#tipMsg").text("No user "+Label.reportIssueLabel),void $("#loadMsg").text("");$("#tipMsg").text(Label.uploadMsg);for(var i=0;i<t.length;i++)s[i]={},s[i].userName=t[i].userName,"adminRole"===t[i].userRole?(s[i].isAdmin="&nbsp;"+Label.administratorLabel,s[i].expendRow="<a href='javascript:void(0)' onclick=\"admin.userList.get('"+t[i].oId+"', '"+t[i].userRole+"')\">"+Label.updateLabel+"</a>"):(s[i].expendRow="<a href='javascript:void(0)' onclick=\"admin.userList.get('"+t[i].oId+"', '"+t[i].userRole+"')\">"+Label.updateLabel+"</a> <a href='javascript:void(0)' onclick=\"admin.userList.del('"+t[i].oId+"', '"+encodeURIComponent(t[i].userName)+"')\">"+Label.removeLabel+"</a> <a href='javascript:void(0)' onclick=\"admin.userList.changeRole('"+t[i].oId+"')\">"+Label.changeRoleLabel+"</a>","defaultRole"===t[i].userRole?s[i].isAdmin=Label.commonUserLabel:s[i].isAdmin=Label.visitorUserLabel),o.tablePagination.updateTablePagination(s,n,e.pagination);$("#loadMsg").text("")}else $("#loadMsg").text("")}})},get:function(t,s){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),$("#userUpdate").dialog("open"),$.ajax({url:latkeConfig.servePath+"/console/user/"+t,type:"GET",cache:!1,success:function(e,a){$("#tipMsg").text(e.msg),e.sc&&($("#userURLUpdate").val(e.user.userURL),$("#userAvatarUpdate").val(e.user.userAvatar),$("#userB3KeyUpdate").val(e.user.userB3Key),$("#userNameUpdate").val(e.user.userName).data("userInfo",{oId:t,userRole:s})),$("#loadMsg").text("")}})},update:function(){if(this.validate("Update")){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var e=$("#userNameUpdate").data("userInfo"),a={userName:$("#userNameUpdate").val(),oId:e.oId,userURL:$("#userURLUpdate").val(),userRole:e.userRole,userAvatar:$("#userAvatarUpdate").val(),userB3Key:$("#userB3KeyUpdate").val()};$.ajax({url:latkeConfig.servePath+"/console/user/",type:"PUT",cache:!1,data:JSON.stringify(a),success:function(e,a){$("#userUpdate").dialog("close"),$("#tipMsg").text(e.msg),e.sc&&admin.userList.getList(admin.userList.pageInfo.currentPage),$("#loadMsg").text("")}})}},del:function(e,a){confirm(Label.confirmRemoveLabel+Label.userLabel+'"'+Util.htmlDecode(a)+'"?')&&($("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),$.ajax({url:latkeConfig.servePath+"/console/user/"+e,type:"DELETE",cache:!1,success:function(e,a){if($("#tipMsg").text(e.msg),e.sc){var t=admin.userList.pageInfo.currentPage;1===admin.userList.pageInfo.currentCount&&1!==admin.userList.pageInfo.pageCount&&admin.userList.pageInfo.currentPage===admin.userList.pageInfo.pageCount&&(admin.userList.pageInfo.pageCount--,t=admin.userList.pageInfo.pageCount);var s=window.location.hash.split("/");t!==parseInt(s[s.length-1])&&admin.setHashByPage(t),admin.userList.getList(t),$("#loadMsg").text("")}else $("#loadMsg").text("")}}))},changeRole:function(e){$("#tipMsg").text(""),$.ajax({url:latkeConfig.servePath+"/console/changeRole/"+e,type:"GET",cache:!1,success:function(e,a){if($("#tipMsg").text(e.msg),e.sc){var t=admin.userList.pageInfo.currentPage;1===admin.userList.pageInfo.currentCount&&1!==admin.userList.pageInfo.pageCount&&admin.userList.pageInfo.currentPage===admin.userList.pageInfo.pageCount&&(admin.userList.pageInfo.pageCount--,t=admin.userList.pageInfo.pageCount);var s=window.location.hash.split("/");t!==parseInt(s[s.length-1])&&admin.setHashByPage(t),admin.userList.getList(t),$("#loadMsg").text("")}else $("#loadMsg").text("")}})},validate:function(e){e||(e="");var a=$("#userName"+e).val().replace(/(^\s*)|(\s*$)/g,"");return!(a.length<2||20<a.length)||($("#tipMsg").text(Label.nameTooLongLabel),$("#userName"+e).focus(),!1)}},admin.register["user-list"]={obj:admin.userList,init:admin.userList.init,refresh:admin.userList.getList};
admin.categoryList={tablePagination:new TablePaginate("category"),pageInfo:{currentCount:1,pageCount:1,currentPage:1},init:function(t){this.tablePagination.buildTable([{text:"",index:"linkOrder",width:60},{style:"padding-left: 12px;",text:Label.titleLabel,index:"categoryTitle",width:230},{style:"padding-left: 12px;",text:"URI",index:"categoryURI",width:230},{style:"padding-left: 12px;",text:Label.descriptionLabel,index:"categoryDesc",minWidth:180}]),this.tablePagination.initPagination(),this.getList(t),$("#categoryUpdate").dialog({title:$("#categoryUpdate").data("title"),width:700,height:358,modal:!0,hideFooter:!0}),$.ajax({url:latkeConfig.servePath+"/console/tags",type:"GET",cache:!1,success:function(t,e){if($("#tipMsg").text(t.msg),t.sc){if(!(t.tags.length<=0)){for(var a=[],o=0;o<t.tags.length;o++)a.push(t.tags[o].tagTitle);$("#categoryTags").completed({height:160,buttonText:Label.selectLabel,data:a}),$("#loadMsg").text("")}}else $("#loadMsg").text("")}})},getList:function(g){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),this.pageInfo.currentPage=g;var n=this;$.ajax({url:latkeConfig.servePath+"/console/categories/"+g+"/"+Label.PAGE_SIZE+"/"+Label.WINDOW_SIZE,type:"GET",cache:!1,success:function(t,e){if($("#tipMsg").text(t.msg),t.sc){var a=t.categories,o=[];admin.categoryList.pageInfo.currentCount=a.length,admin.categoryList.pageInfo.pageCount=0===t.pagination.paginationPageCount?1:t.pagination.paginationPageCount;for(var i=0;i<a.length;i++)o[i]={},0===i?1===a.length?o[i].linkOrder="":o[i].linkOrder='<div class="table-center" style="width:14px"> <span onclick="admin.categoryList.changeOrder('+a[i].oId+", "+i+', \'down\');" class="icon-move-down"></span> </div>':i===a.length-1?o[i].linkOrder='<div class="table-center" style="width:14px"> <span onclick="admin.categoryList.changeOrder('+a[i].oId+", "+i+', \'up\');" class="icon-move-up"></span> </div>':o[i].linkOrder='<div class="table-center" style="width:38px"> <span onclick="admin.categoryList.changeOrder('+a[i].oId+", "+i+', \'up\');" class="icon-move-up"></span> <span onclick="admin.categoryList.changeOrder('+a[i].oId+", "+i+', \'down\');" class="icon-move-down"></span> </div>',o[i].categoryTitle=a[i].categoryTitle,o[i].categoryURI=a[i].categoryURI,o[i].categoryDesc=a[i].categoryDescription,o[i].expendRow="<a href='javascript:void(0)' onclick=\"admin.categoryList.get('"+a[i].oId+"')\">"+Label.updateLabel+"</a> <a href='javascript:void(0)' onclick=\"admin.categoryList.del('"+a[i].oId+"', '"+encodeURIComponent(a[i].categoryTitle)+"')\">"+Label.removeLabel+"</a> ";n.tablePagination.updateTablePagination(o,g,t.pagination),$("#loadMsg").text("")}else $("#loadMsg").text("")}})},add:function(){if(this.validate()){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var t={categoryTitle:$("#categoryName").val(),categoryTags:$("#categoryTags").val(),categoryURI:$("#categoryURI").val(),categoryDescription:$("#categoryDesc").val()};$.ajax({url:latkeConfig.servePath+"/console/category/",type:"POST",cache:!1,data:JSON.stringify(t),success:function(t,e){if($("#tipMsg").text(t.msg),t.sc){$("#categoryName").val(""),$("#categoryTags").val(""),$("#categoryURI").val(""),$("#categoryDesc").val(""),admin.categoryList.pageInfo.currentCount===Label.PAGE_SIZE&&admin.categoryList.pageInfo.currentPage===admin.categoryList.pageInfo.pageCount&&admin.categoryList.pageInfo.pageCount++;var a=window.location.hash.split("/");admin.categoryList.pageInfo.pageCount!==parseInt(a[a.length-1])&&admin.setHashByPage(admin.categoryList.pageInfo.pageCount),admin.categoryList.getList(admin.categoryList.pageInfo.pageCount),$("#loadMsg").text("")}else $("#loadMsg").text("")}})}},get:function(a){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),$("#categoryUpdate").dialog("open"),$.ajax({url:latkeConfig.servePath+"/console/category/"+a,type:"GET",cache:!1,success:function(t,e){$("#tipMsg").text(t.msg),t.sc&&($("#categoryNameUpdate").val(t.categoryTitle).data("oId",a),$("#categoryURIUpdate").val(t.categoryURI),$("#categoryDescUpdate").val(t.categoryDescription),$("#categoryTagsUpdate").val(t.categoryTags)),$("#loadMsg").text("")}})},update:function(){if(this.validate("Update")){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var t={categoryTitle:$("#categoryNameUpdate").val(),oId:$("#categoryNameUpdate").data("oId"),categoryTags:$("#categoryTagsUpdate").val(),categoryURI:$("#categoryURIUpdate").val(),categoryDescription:$("#categoryDescUpdate").val()};$.ajax({url:latkeConfig.servePath+"/console/category/",type:"PUT",cache:!1,data:JSON.stringify(t),success:function(t,e){$("#categoryUpdate").dialog("close"),$("#tipMsg").text(t.msg),t.sc&&admin.categoryList.getList(admin.categoryList.pageInfo.currentPage),$("#loadMsg").text("")}})}},del:function(t,e){confirm(Label.confirmRemoveLabel+Label.categoryLabel+'"'+Util.htmlDecode(e)+'"?')&&($("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),$.ajax({url:latkeConfig.servePath+"/console/category/"+t,type:"DELETE",cache:!1,success:function(t,e){if($("#tipMsg").text(t.msg),t.sc){var a=admin.categoryList.pageInfo.currentPage;1===admin.categoryList.pageInfo.currentCount&&1!==admin.categoryList.pageInfo.pageCount&&admin.categoryList.pageInfo.currentPage===admin.categoryList.pageInfo.pageCount&&(admin.categoryList.pageInfo.pageCount--,a=admin.categoryList.pageInfo.pageCount);var o=window.location.hash.split("/");a!==parseInt(o[o.length-1])&&admin.setHashByPage(a),admin.categoryList.getList(a),$("#loadMsg").text("")}else $("#loadMsg").text("")}}))},validate:function(t){t||(t="");var e=$("#categoryName"+t).val().replace(/(^\s*)|(\s*$)/g,"");if(e.length<2||32<e.length)$("#tipMsg").text(Label.categoryTooLongLabel),$("#categoryName"+t).focus();else{if(""!==$.trim($("#categoryTags"+t).val()))return!0;$("#tipMsg").text(Label.tagsEmptyLabel),$("#categoryTags"+t).focus()}return!1},changeOrder:function(t,e,a){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var o={oId:t.toString(),direction:a};$.ajax({url:latkeConfig.servePath+"/console/category/order/",type:"PUT",cache:!1,data:JSON.stringify(o),success:function(t,e){$("#tipMsg").text(t.msg),admin.categoryList.getList(admin.categoryList.pageInfo.currentPage),$("#loadMsg").text("")}})}},admin.register["category-list"]={obj:admin.categoryList,init:admin.categoryList.init,refresh:admin.categoryList.getList}; admin.categoryList={tablePagination:new TablePaginate("category"),pageInfo:{currentCount:1,pageCount:1,currentPage:1},init:function(t){this.tablePagination.buildTable([{text:"",index:"linkOrder",width:60},{style:"padding-left: 12px;",text:Label.titleLabel,index:"categoryTitle",width:230},{style:"padding-left: 12px;",text:"URI",index:"categoryURI",width:230},{style:"padding-left: 12px;",text:Label.descriptionLabel,index:"categoryDesc",minWidth:180}]),this.tablePagination.initPagination(),this.getList(t),$("#categoryUpdate").dialog({title:$("#categoryUpdate").data("title"),width:700,height:358,modal:!0,hideFooter:!0}),$.ajax({url:latkeConfig.servePath+"/console/tags",type:"GET",cache:!1,success:function(t,e){if($("#tipMsg").text(t.msg),t.sc){if(!(t.tags.length<=0)){for(var a=[],o=0;o<t.tags.length;o++)a.push(t.tags[o].tagTitle);$("#categoryTags").completed({height:160,buttonText:Label.selectLabel,data:a}),$("#loadMsg").text("")}}else $("#loadMsg").text("")}})},getList:function(g){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),this.pageInfo.currentPage=g;var n=this;$.ajax({url:latkeConfig.servePath+"/console/categories/"+g+"/"+Label.PAGE_SIZE+"/"+Label.WINDOW_SIZE,type:"GET",cache:!1,success:function(t,e){if($("#tipMsg").text(t.msg),t.sc){var a=t.categories,o=[];admin.categoryList.pageInfo.currentCount=a.length,admin.categoryList.pageInfo.pageCount=0===t.pagination.paginationPageCount?1:t.pagination.paginationPageCount;for(var i=0;i<a.length;i++)o[i]={},0===i?1===a.length?o[i].linkOrder="":o[i].linkOrder='<div class="table-center" style="width:14px"> <span onclick="admin.categoryList.changeOrder('+a[i].oId+", "+i+', \'down\');" class="icon-move-down"></span> </div>':i===a.length-1?o[i].linkOrder='<div class="table-center" style="width:14px"> <span onclick="admin.categoryList.changeOrder('+a[i].oId+", "+i+', \'up\');" class="icon-move-up"></span> </div>':o[i].linkOrder='<div class="table-center" style="width:38px"> <span onclick="admin.categoryList.changeOrder('+a[i].oId+", "+i+', \'up\');" class="icon-move-up"></span> <span onclick="admin.categoryList.changeOrder('+a[i].oId+", "+i+', \'down\');" class="icon-move-down"></span> </div>',o[i].categoryTitle=a[i].categoryTitle,o[i].categoryURI=a[i].categoryURI,o[i].categoryDesc=a[i].categoryDescription,o[i].expendRow="<a href='javascript:void(0)' onclick=\"admin.categoryList.get('"+a[i].oId+"')\">"+Label.updateLabel+"</a> <a href='javascript:void(0)' onclick=\"admin.categoryList.del('"+a[i].oId+"', '"+encodeURIComponent(a[i].categoryTitle)+"')\">"+Label.removeLabel+"</a> ";n.tablePagination.updateTablePagination(o,g,t.pagination),$("#loadMsg").text("")}else $("#loadMsg").text("")}})},add:function(){if(this.validate()){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var t={categoryTitle:$("#categoryName").val(),categoryTags:$("#categoryTags").val(),categoryURI:$("#categoryURI").val(),categoryDescription:$("#categoryDesc").val()};$.ajax({url:latkeConfig.servePath+"/console/category/",type:"POST",cache:!1,data:JSON.stringify(t),success:function(t,e){if($("#tipMsg").text(t.msg),t.sc){$("#categoryName").val(""),$("#categoryTags").val(""),$("#categoryURI").val(""),$("#categoryDesc").val(""),admin.categoryList.pageInfo.currentCount===Label.PAGE_SIZE&&admin.categoryList.pageInfo.currentPage===admin.categoryList.pageInfo.pageCount&&admin.categoryList.pageInfo.pageCount++;var a=window.location.hash.split("/");admin.categoryList.pageInfo.pageCount!==parseInt(a[a.length-1])&&admin.setHashByPage(admin.categoryList.pageInfo.pageCount),admin.categoryList.getList(admin.categoryList.pageInfo.pageCount),$("#loadMsg").text("")}else $("#loadMsg").text("")}})}},get:function(a){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),$("#categoryUpdate").dialog("open"),$.ajax({url:latkeConfig.servePath+"/console/category/"+a,type:"GET",cache:!1,success:function(t,e){$("#tipMsg").text(t.msg),t.sc&&($("#categoryNameUpdate").val(t.categoryTitle).data("oId",a),$("#categoryURIUpdate").val(t.categoryURI),$("#categoryDescUpdate").val(t.categoryDescription),$("#categoryTagsUpdate").val(t.categoryTags)),$("#loadMsg").text("")}})},update:function(){if(this.validate("Update")){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var t={categoryTitle:$("#categoryNameUpdate").val(),oId:$("#categoryNameUpdate").data("oId"),categoryTags:$("#categoryTagsUpdate").val(),categoryURI:$("#categoryURIUpdate").val(),categoryDescription:$("#categoryDescUpdate").val()};$.ajax({url:latkeConfig.servePath+"/console/category/",type:"PUT",cache:!1,data:JSON.stringify(t),success:function(t,e){$("#categoryUpdate").dialog("close"),$("#tipMsg").text(t.msg),t.sc&&admin.categoryList.getList(admin.categoryList.pageInfo.currentPage),$("#loadMsg").text("")}})}},del:function(t,e){confirm(Label.confirmRemoveLabel+Label.categoryLabel+'"'+Util.htmlDecode(e)+'"?')&&($("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),$.ajax({url:latkeConfig.servePath+"/console/category/"+t,type:"DELETE",cache:!1,success:function(t,e){if($("#tipMsg").text(t.msg),t.sc){var a=admin.categoryList.pageInfo.currentPage;1===admin.categoryList.pageInfo.currentCount&&1!==admin.categoryList.pageInfo.pageCount&&admin.categoryList.pageInfo.currentPage===admin.categoryList.pageInfo.pageCount&&(admin.categoryList.pageInfo.pageCount--,a=admin.categoryList.pageInfo.pageCount);var o=window.location.hash.split("/");a!==parseInt(o[o.length-1])&&admin.setHashByPage(a),admin.categoryList.getList(a),$("#loadMsg").text("")}else $("#loadMsg").text("")}}))},validate:function(t){t||(t="");var e=$("#categoryName"+t).val().replace(/(^\s*)|(\s*$)/g,"");if(e.length<2||32<e.length)$("#tipMsg").text(Label.categoryTooLongLabel),$("#categoryName"+t).focus();else{if(""!==$.trim($("#categoryTags"+t).val()))return!0;$("#tipMsg").text(Label.tagsEmptyLabel),$("#categoryTags"+t).focus()}return!1},changeOrder:function(t,e,a){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var o={oId:t.toString(),direction:a};$.ajax({url:latkeConfig.servePath+"/console/category/order/",type:"PUT",cache:!1,data:JSON.stringify(o),success:function(t,e){$("#tipMsg").text(t.msg),admin.categoryList.getList(admin.categoryList.pageInfo.currentPage),$("#loadMsg").text("")}})}},admin.register["category-list"]={obj:admin.categoryList,init:admin.categoryList.init,refresh:admin.categoryList.getList};
......
html{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;height:100%}body{margin:0;font-family:"Helvetica Neue", "Luxi Sans", "DejaVu Sans", Tahoma, "Hiragino Sans GB", "Microsoft Yahei", sans-serif;font-size:14px;background-color:#fff;-webkit-font-smoothing:antialiased;-webkit-overflow-scrolling:touch}::-moz-selection{text-shadow:none;background:rgba(65,131,196,0.4)}::selection{text-shadow:none;background:rgba(66,133,244,0.4)}ul,ol{margin:0;padding:0}h1,h2,h3,h4,h5,h6,dl,dd,p{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none}a{outline:0;text-decoration:none}a:hover{text-decoration:underline}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{max-width:100%;vertical-align:middle;border:0;height:auto;-ms-interpolation-mode:bicubic;overflow:hidden;font-size:12px}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;font-family:"Helvetica Neue", "Luxi Sans", "DejaVu Sans", Tahoma, "Hiragino Sans GB", "Microsoft Yahei", sans-serif;outline:none}button,input{line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}input[type="search"]{box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;resize:vertical}svg{fill:currentColor;display:inline-block;stroke-width:0;stroke:currentColor;width:14px;height:14px}blockquote{margin:0}@keyframes tooltip-appear{from{opacity:0}to{opacity:1}}.vditor-tooltipped{position:relative;cursor:pointer}.vditor-tooltipped::after{position:absolute;z-index:1000000;display:none;padding:5px 8px;font-size:11px;font-weight:normal;-webkit-font-smoothing:subpixel-antialiased;color:#fff;text-align:center;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-wrap:break-word;white-space:pre;pointer-events:none;content:attr(aria-label);background:rgba(0,0,0,0.8);border-radius:3px;line-height:16px;opacity:0}.vditor-tooltipped::before{position:absolute;z-index:1000001;display:none;width:0;height:0;color:rgba(0,0,0,0.8);pointer-events:none;content:"";border:5px solid transparent;opacity:0}.vditor-tooltipped--hover::before,.vditor-tooltipped--hover::after,.vditor-tooltipped:hover::before,.vditor-tooltipped:hover::after,.vditor-tooltipped:active::before,.vditor-tooltipped:active::after,.vditor-tooltipped:focus::before,.vditor-tooltipped:focus::after{display:inline-block;text-decoration:none;animation-name:tooltip-appear;animation-duration:0.1s;animation-fill-mode:forwards;animation-timing-function:ease-in;animation-delay:0.4s}.vditor-tooltipped__s::after,.vditor-tooltipped__se::after,.vditor-tooltipped__sw::after{top:100%;right:50%;margin-top:5px}.vditor-tooltipped__s::before,.vditor-tooltipped__se::before,.vditor-tooltipped__sw::before{top:auto;right:50%;bottom:-5px;margin-right:-5px;border-bottom-color:rgba(0,0,0,0.8)}.vditor-tooltipped__se::after{right:auto;left:50%;margin-left:-15px}.vditor-tooltipped__sw::after{margin-right:-15px}.vditor-tooltipped__n::after,.vditor-tooltipped__ne::after,.vditor-tooltipped__nw::after{right:50%;bottom:100%;margin-bottom:5px}.vditor-tooltipped__n::before,.vditor-tooltipped__ne::before,.vditor-tooltipped__nw::before{top:-5px;right:50%;bottom:auto;margin-right:-5px;border-top-color:rgba(0,0,0,0.8)}.vditor-tooltipped__ne::after{right:auto;left:50%;margin-left:-15px}.vditor-tooltipped__nw::after{margin-right:-15px}.vditor-tooltipped__s::after,.vditor-tooltipped__n::after{transform:translateX(50%)}.vditor-tooltipped__w::after{right:100%;bottom:50%;margin-right:5px;transform:translateY(50%)}.vditor-tooltipped__w::before{top:50%;bottom:50%;left:-5px;margin-top:-5px;border-left-color:rgba(0,0,0,0.8)}.vditor-tooltipped__e::after{bottom:50%;left:100%;margin-left:5px;transform:translateY(50%)}.vditor-tooltipped__e::before{top:50%;right:-5px;bottom:50%;margin-top:-5px;border-right-color:rgba(0,0,0,0.8)}.vditor-panel{background-color:#fff;position:absolute;box-shadow:0 1px 2px rgba(0,0,0,0.2);border-radius:3px;padding:5px;z-index:1;font-size:14px;display:none;user-select:none;max-width:200px;min-width:80px}.vditor-panel h1,.vditor-panel h2,.vditor-panel h3,.vditor-panel h4,.vditor-panel h5,.vditor-panel h6{margin:0;cursor:pointer;padding:3px 10px;border-radius:3px;line-height:normal}.vditor-panel h1:hover,.vditor-panel h2:hover,.vditor-panel h3:hover,.vditor-panel h4:hover,.vditor-panel h5:hover,.vditor-panel h6:hover{background-color:#4285f4;color:#fff}.vditor-toolbar{background-color:#f6f8fa;border-bottom:1px solid #d1d5da;padding:0 5px;border-radius:3px 3px 0 0}.vditor-toolbar>div{padding:10px 5px;float:left;line-height:14px;height:36px;box-sizing:border-box}.vditor-toolbar svg{fill:currentColor;display:inline-block;stroke-width:0;stroke:currentColor;width:14px;height:14px}.vditor-toolbar .vditor-tooltipped{color:#586069}.vditor-toolbar .vditor-tooltipped:hover{color:#4285f4}.vditor-toolbar label{overflow:hidden;position:relative;height:14px;width:15px;display:block;cursor:pointer}.vditor-toolbar input{position:absolute;width:1px;opacity:.001;height:14px;overflow:hidden}.vditor-menu--current svg{color:#4285f4}.vditor-menu__divider{width:10px}.vditor-menu__br{width:100%;padding:0 !important;height:0 !important}.vditor-emojis{display:inline-block}.vditor-emojis__tail{font-size:12px;text-align:right;color:#586069}.vditor-emojis__tail a{text-decoration:none;color:#586069}.vditor-emojis__tail a:hover{color:#4285f4}.vditor-emojis span{cursor:pointer;border-radius:3px;float:left;height:26px;width:26px;text-align:center;line-height:20px;padding:3px;box-sizing:border-box;font-size:16px}.vditor-emojis span:hover{background-color:#4285f4}.vditor-emojis img{height:20px;width:20px;float:left}.vditor{display:flex;flex-direction:column;border:1px solid #d1d5da;border-radius:3px;box-sizing:border-box}.vditor--fullscreen{position:fixed;top:0;width:100% !important;left:0;height:100vh !important;z-index:90;background-color:#fff}.vditor-content{display:flex;min-height:60px;flex:1;position:relative}.vditor-textarea{flex:1;border:0;resize:none;padding:10px;box-sizing:border-box;background-color:#fafbfc;outline:0 none;font-size:16px;line-height:22px;color:#24292e;border-radius:0 0 3px 3px}.vditor-textarea[disabled]{opacity:0.3;cursor:not-allowed}.vditor-textarea:focus{background-color:#fff}.vditor-preview{flex:1;background-color:#fff;overflow:auto;padding:10px;box-shadow:inset 1px 0 #d1d5da;box-sizing:border-box;border-radius:0 0 3px 0}.vditor-preview::-webkit-scrollbar{display:none}.vditor-counter{padding:0 3px;position:absolute;bottom:10px;right:20px;color:#24292e;background-color:rgba(255,255,255,0.6);border-radius:3px;font-size:12px;user-select:none}.vditor-counter--error{color:#d23f31;background-color:rgba(210,63,49,0.1)}.vditor-resize{padding:1px 0;border-radius:5px;cursor:row-resize;transition:all .15s ease-in-out;user-select:none;background-color:#f6f8fa}.vditor-resize:hover{background-color:#4285f4}.vditor-resize:hover svg{color:#fff}.vditor-resize svg{fill:currentColor;stroke-width:0;stroke:currentColor;width:13px;height:3px;display:block;margin:0 auto;color:#586069}.vditor-upload{opacity:0;position:absolute;width:100%;height:5px;left:0;top:-3px;border-radius:3px;overflow:hidden;transition:all .15s ease-in-out;color:#fff;font-size:12px;line-height:14px}.vditor-upload ul{margin:0}.vditor-upload--tip{height:auto;opacity:1 !important}.vditor-upload--tip .vditor-upload__close{display:block}.vditor-upload__close{display:none;position:absolute;right:5px;cursor:pointer;padding:5px;top:0}.vditor-upload__progress{height:100%;background-color:rgba(66,133,244,0.8);transition:all .15s ease-in-out;padding:5px;box-sizing:border-box}.vditor-hint{background-color:#fff;position:absolute;box-shadow:0 1px 2px rgba(0,0,0,0.2);border-radius:3px;padding:5px 0;z-index:1;line-height:20px;list-style:none;color:#24292e;font-size:12px;margin:0;max-width:200px;min-width:80px;display:none}.vditor-hint li{cursor:pointer;padding:3px 10px;border-bottom:1px solid #d1d5da;line-height:20px}.vditor-hint li:last-child{border-bottom:0}.vditor-hint--current,.vditor-hint li:hover{background-color:#4285f4;color:#fff}.vditor-hint__emoji{font-size:16px;float:left;margin-right:3px}.vditor-hint img{height:20px;width:20px;float:left;margin-right:3px}.vditor-reset{font-family:"Helvetica Neue","Luxi Sans","DejaVu Sans",Tahoma,"Hiragino Sans GB","Microsoft Yahei",sans-serif;word-wrap:break-word;overflow:auto;line-height:1.65;font-size:16px;word-break:break-word}.vditor-reset ul,.vditor-reset ol{padding-left:2em;margin-top:0;margin-bottom:16px}.vditor-reset li{margin-top:0.25em}.vditor-reset audio{max-width:100%}.vditor-reset video{max-height:90vh}.vditor-reset img.emoji{cursor:auto;max-width:20px;vertical-align:top}.vditor-reset h1,.vditor-reset h2,.vditor-reset h3,.vditor-reset h4,.vditor-reset h5,.vditor-reset h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}.vditor-reset h1{padding-bottom:0.3em;font-size:1.7em;border-bottom:1px solid #eee}.vditor-reset h2{padding-bottom:0.3em;font-size:1.5em;border-bottom:1px solid #eee}.vditor-reset h3{font-size:1.25em}.vditor-reset h4{font-size:1em}.vditor-reset h5{font-size:0.875em}.vditor-reset h6{font-size:0.85em}.vditor-reset hr{height:0.15em;padding:0;margin:24px 0;background-color:#e7e7e7;border:0}.vditor-reset p{margin-top:0;margin-bottom:16px}.vditor-reset blockquote{padding:0 1em;color:#777;border-left:0.25em solid #ddd;margin:0 0 16px 0}.vditor-reset blockquote p{margin:0}.vditor-reset ins>iframe{border:0}.vditor-reset iframe{border:1px solid #d1d5da}.vditor-reset table{width:100%;border:1px solid #dedede;margin:15px auto;border-collapse:collapse;empty-cells:show}.vditor-reset thead{text-align:center}.vditor-reset td,.vditor-reset th{height:35px;border:1px solid #dedede;padding:0 10px}.vditor-reset th{font-weight:bold;text-align:center !important;background:rgba(158,188,226,0.2)}.vditor-reset tbody tr:nth-child(2n){background:rgba(158,188,226,0.12)}.vditor-reset tr:hover{background:#efefef}.vditor-reset code{padding:0.2em 0.4em;margin:0;font-size:85%;background-color:rgba(27,31,35,0.05);border-radius:3px;font-family:mononoki,Consolas,"Liberation Mono",Menlo,Courier,monospace;word-break:break-word}.vditor-reset pre>code{padding:0.5em;background-color:rgba(0,0,0,0.04);background-image:url("https://cdn.jsdelivr.net/npm/vditor@1.1.2/src/assets/images/code-bg.png");background-size:20px 20px;border-radius:5px;display:block;overflow:auto}.vditor-reset pre:hover div.vditor-copy{display:block}.vditor-reset kbd{display:inline-block;padding:3px 5px;font:11px Consolas, "Liberation Mono", Menlo, Courier, monospace;line-height:10px;color:#555;vertical-align:middle;background-color:#fcfcfc;border:solid 1px #d1d5da;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}.vditor-reset summary{cursor:pointer}.vditor-reset summary:focus{outline:none}.vditor-reset svg{height:auto;width:auto}.vditor-reset .katex{position:relative}.vditor-task{list-style:none;margin-left:-1.4em;display:flex;align-items:center}.vditor-task input{margin-right:5px}.vditor-copy{position:relative;display:none}.vditor-copy textarea{position:absolute;top:-100000px}.vditor-copy span{cursor:pointer;position:absolute;right:0.5em;top:0.5em;height:20px;width:20px}.vditor-copy svg{height:20px;width:20px}button{background-size:110% 110%;border:1px solid rgba(27,31,35,0.2);font-size:13px;font-weight:700;text-shadow:0 1px 0 rgba(255,255,255,0.9);white-space:nowrap;background-color:#eff3f6;background-image:linear-gradient(-180deg, #fafbfc, #eff3f6 90%);color:#24292e;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,0.075);outline:none;padding:7px 15px;margin-top:10px;cursor:pointer}button:hover{background-color:#e6ebf1;background-image:linear-gradient(-180deg, #f0f3f6, #e6ebf1 90%);background-position:-.5em;border-color:rgba(27,31,35,0.35)}a{color:#4285f4;text-decoration:none}h2{background-color:#F3F1E5;border-radius:4px 4px 0 0;font-size:16px;margin:0;padding:10px 20px}h2 a:hover{color:#d23f31}input[type=password],input[type=text]{border:1px solid #d1d5da;background-color:#FAFAFA;border-radius:3px;box-shadow:inset 0 1px 2px rgba(27,31,35,0.075);padding:7px 8px;width:100%;line-height:17px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;outline:none;margin-top:10px}input[type=password]:focus,input[type=text]:focus{background-color:#FFF;box-shadow:inset 0 1px 2px rgba(27,31,35,0.075),0 0 0 0.2em #dbedff;border:1px solid #4285f4}.error{color:#d23f31;font-weight:bold}.wrap{border-top:5px solid #E6E5D9;background-color:#F3F1E5;display:flex;flex-direction:column;min-height:100vh;box-sizing:border-box}.content-wrap{flex:1;display:flex}.content{background-color:#fff;margin:0 auto;width:760px;align-self:center;display:flex}.main{border-left:1px solid #E6E5D9;font-size:15px;padding:20px;flex:1}.footerWrapper{background-color:#FFFFFF;border-top:1px solid #E6E5D9;padding:12px 0;text-align:center}.a-error{text-align:right}.img-error{max-width:100%;margin:20px auto;padding:0;display:block}.kill__btns{text-align:right}.kill__img{float:right;margin:-280px 0 0 0}.kill .vditor-reset{margin:10px}#github{position:relative;text-align:center}#github.github--loading:after{content:"Loading...";position:absolute;height:100%;width:100%;top:0;left:0;z-index:7;background-color:rgba(255,255,255,0.6);font-size:22px;text-align:center;padding-top:135px;color:#000;text-shadow:0 1px 2px rgba(0,0,0,0.2);box-sizing:border-box}#github .github__icon{height:200px;width:266px;background-image:url("../images/github.png");margin:0 auto;background-size:contain;cursor:pointer}#github .github__icon:hover{background-image:url("../images/github.gif")}#github img{display:none}.github__text{cursor:pointer;font-size:12px;color:#666}.github__text ul{display:none;text-align:left;margin:5px auto 0;width:280px;padding-left:24px;box-sizing:border-box}.github__link{font-size:12px;text-decoration:underline;margin-top:10px;display:block}.github__check{font-size:12px;display:inline-block;margin:10px auto 0;align-items:center;line-height:20px;color:#999}.github__check a{color:#999;text-decoration:underline}.github__check input{width:auto;margin-right:5px}.search{border-top:5px solid #e6e5d9;background-color:#f3f1e5;padding:20px 0 20px 84px;min-height:480px;flex:1}.search__body{display:flex;flex-direction:column}.search__header{margin:20px;display:flex}.search__header a{line-height:44px}.search__input{flex:1;display:flex}.search__input input{margin:0 10px 0 20px;width:523px;height:44px;line-height:44px}.search__input button{height:44px;margin:0}.search__articles{width:600px}.search__articles .tag{color:#616161;padding:2px 5px;border:1px solid transparent;position:relative;height:20px;white-space:nowrap;word-wrap:normal;background-color:#f7f7f7;border-radius:3px 3px 3px 3px;line-height:21px;font-size:12px;display:inline-block;margin-right:5px}.search__articles .tag:hover{color:#000;box-shadow:0 1px 2px rgba(0,0,0,0.2);text-decoration:none}.search__articles header h1{margin:0}.search__articles header h1>a{font-size:18px;text-decoration:none;font-weight:normal}.search__articles .meta{font-size:14px;color:#999;margin:5px 0}.search__articles footer{margin-bottom:30px}.search__articles footer a{text-decoration:none;font-size:13px}.search__articles footer a:hover,.search__articles header h1>a:hover,.search__pagination a:hover{text-decoration:underline}.search__pagination a{color:#4285f4;text-decoration:none}.search__pagination a,.search__pagination span{margin-right:5px}@media (max-width: 780px){.wrap{padding:40px 0 0 0}.content{width:auto}.logo,.search__header img,.search__header>.fn-right{display:none}.main{border:0;float:none;width:auto;padding:10px}.a-500,.a-403,.a-404{margin:0 20px 0 0}#init{width:100%;padding:0 20px;box-sizing:border-box;left:0}.search{padding:20px;width:100%;min-height:auto;box-sizing:border-box}.search__input input{width:auto;flex:1;margin-left:0}.search__articles{width:auto}} html{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;height:100%}body{margin:0;font-family:"Helvetica Neue", "Luxi Sans", "DejaVu Sans", Tahoma, "Hiragino Sans GB", "Microsoft Yahei", sans-serif;font-size:14px;background-color:#fff;-webkit-font-smoothing:antialiased;-webkit-overflow-scrolling:touch}::-moz-selection{text-shadow:none;background:rgba(65,131,196,0.4)}::selection{text-shadow:none;background:rgba(66,133,244,0.4)}ul,ol{margin:0;padding:0}h1,h2,h3,h4,h5,h6,dl,dd,p{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none}a{outline:0;text-decoration:none}a:hover{text-decoration:underline}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{max-width:100%;vertical-align:middle;border:0;height:auto;-ms-interpolation-mode:bicubic;overflow:hidden;font-size:12px}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;font-family:"Helvetica Neue", "Luxi Sans", "DejaVu Sans", Tahoma, "Hiragino Sans GB", "Microsoft Yahei", sans-serif;outline:none}button,input{line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}input[type="search"]{box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;resize:vertical}svg{fill:currentColor;display:inline-block;stroke-width:0;stroke:currentColor;width:14px;height:14px}blockquote{margin:0}@keyframes tooltip-appear{from{opacity:0}to{opacity:1}}.vditor-tooltipped{position:relative;cursor:pointer}.vditor-tooltipped::after{position:absolute;z-index:1000000;display:none;padding:5px 8px;font-size:11px;font-weight:normal;-webkit-font-smoothing:subpixel-antialiased;color:#fff;text-align:center;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-wrap:break-word;white-space:pre;pointer-events:none;content:attr(aria-label);background:rgba(0,0,0,0.8);border-radius:3px;line-height:16px;opacity:0}.vditor-tooltipped::before{position:absolute;z-index:1000001;display:none;width:0;height:0;color:rgba(0,0,0,0.8);pointer-events:none;content:"";border:5px solid transparent;opacity:0}.vditor-tooltipped--hover::before,.vditor-tooltipped--hover::after,.vditor-tooltipped:hover::before,.vditor-tooltipped:hover::after,.vditor-tooltipped:active::before,.vditor-tooltipped:active::after,.vditor-tooltipped:focus::before,.vditor-tooltipped:focus::after{display:inline-block;text-decoration:none;animation-name:tooltip-appear;animation-duration:0.1s;animation-fill-mode:forwards;animation-timing-function:ease-in;animation-delay:0.4s}.vditor-tooltipped__s::after,.vditor-tooltipped__se::after,.vditor-tooltipped__sw::after{top:100%;right:50%;margin-top:5px}.vditor-tooltipped__s::before,.vditor-tooltipped__se::before,.vditor-tooltipped__sw::before{top:auto;right:50%;bottom:-5px;margin-right:-5px;border-bottom-color:rgba(0,0,0,0.8)}.vditor-tooltipped__se::after{right:auto;left:50%;margin-left:-15px}.vditor-tooltipped__sw::after{margin-right:-15px}.vditor-tooltipped__n::after,.vditor-tooltipped__ne::after,.vditor-tooltipped__nw::after{right:50%;bottom:100%;margin-bottom:5px}.vditor-tooltipped__n::before,.vditor-tooltipped__ne::before,.vditor-tooltipped__nw::before{top:-5px;right:50%;bottom:auto;margin-right:-5px;border-top-color:rgba(0,0,0,0.8)}.vditor-tooltipped__ne::after{right:auto;left:50%;margin-left:-15px}.vditor-tooltipped__nw::after{margin-right:-15px}.vditor-tooltipped__s::after,.vditor-tooltipped__n::after{transform:translateX(50%)}.vditor-tooltipped__w::after{right:100%;bottom:50%;margin-right:5px;transform:translateY(50%)}.vditor-tooltipped__w::before{top:50%;bottom:50%;left:-5px;margin-top:-5px;border-left-color:rgba(0,0,0,0.8)}.vditor-tooltipped__e::after{bottom:50%;left:100%;margin-left:5px;transform:translateY(50%)}.vditor-tooltipped__e::before{top:50%;right:-5px;bottom:50%;margin-top:-5px;border-right-color:rgba(0,0,0,0.8)}.vditor-panel{background-color:#fff;position:absolute;box-shadow:0 1px 2px rgba(0,0,0,0.2);border-radius:3px;padding:5px;z-index:1;font-size:14px;display:none;user-select:none;max-width:200px;min-width:80px}.vditor-panel h1,.vditor-panel h2,.vditor-panel h3,.vditor-panel h4,.vditor-panel h5,.vditor-panel h6{margin:0;cursor:pointer;padding:3px 10px;border-radius:3px;line-height:normal}.vditor-panel h1:hover,.vditor-panel h2:hover,.vditor-panel h3:hover,.vditor-panel h4:hover,.vditor-panel h5:hover,.vditor-panel h6:hover{background-color:#4285f4;color:#fff}.vditor-toolbar{background-color:#f6f8fa;border-bottom:1px solid #d1d5da;padding:0 5px;border-radius:3px 3px 0 0}.vditor-toolbar>div{padding:10px 5px;float:left;line-height:14px;height:36px;box-sizing:border-box}.vditor-toolbar svg{fill:currentColor;display:inline-block;stroke-width:0;stroke:currentColor;width:14px;height:14px}.vditor-toolbar .vditor-tooltipped{color:#586069}.vditor-toolbar .vditor-tooltipped:hover{color:#4285f4}.vditor-toolbar label{overflow:hidden;position:relative;height:14px;width:15px;display:block;cursor:pointer}.vditor-toolbar input{position:absolute;width:1px;opacity:.001;height:14px;overflow:hidden}.vditor-menu--current svg{color:#4285f4}.vditor-menu__divider{width:10px}.vditor-menu__br{width:100%;padding:0 !important;height:0 !important}.vditor-emojis{display:inline-block}.vditor-emojis__tail{font-size:12px;text-align:right;color:#586069}.vditor-emojis__tail a{text-decoration:none;color:#586069}.vditor-emojis__tail a:hover{color:#4285f4}.vditor-emojis span{cursor:pointer;border-radius:3px;float:left;height:26px;width:26px;text-align:center;line-height:20px;padding:3px;box-sizing:border-box;font-size:16px}.vditor-emojis span:hover{background-color:#4285f4}.vditor-emojis img{height:20px;width:20px;float:left}.vditor{display:flex;flex-direction:column;border:1px solid #d1d5da;border-radius:3px;box-sizing:border-box}.vditor--fullscreen{position:fixed;top:0;width:100% !important;left:0;height:100vh !important;z-index:90;background-color:#fff}.vditor-content{display:flex;min-height:60px;flex:1;position:relative}.vditor-textarea{flex:1;border:0;resize:none;padding:10px;box-sizing:border-box;background-color:#fafbfc;outline:0 none;font-size:16px;line-height:22px;color:#24292e;border-radius:0 0 3px 3px}.vditor-textarea[disabled]{opacity:0.3;cursor:not-allowed}.vditor-textarea:focus{background-color:#fff}.vditor-preview{flex:1;background-color:#fff;overflow:auto;padding:10px;box-shadow:inset 1px 0 #d1d5da;box-sizing:border-box;border-radius:0 0 3px 0}.vditor-preview::-webkit-scrollbar{display:none}.vditor-counter{padding:0 3px;position:absolute;bottom:10px;right:20px;color:#24292e;background-color:rgba(255,255,255,0.6);border-radius:3px;font-size:12px;user-select:none}.vditor-counter--error{color:#d23f31;background-color:rgba(210,63,49,0.1)}.vditor-resize{padding:1px 0;border-radius:5px;cursor:row-resize;transition:all .15s ease-in-out;user-select:none;background-color:#f6f8fa}.vditor-resize:hover{background-color:#4285f4}.vditor-resize:hover svg{color:#fff}.vditor-resize svg{fill:currentColor;stroke-width:0;stroke:currentColor;width:13px;height:3px;display:block;margin:0 auto;color:#586069}.vditor-upload{opacity:0;position:absolute;width:100%;height:5px;left:0;top:-3px;border-radius:3px;overflow:hidden;transition:all .15s ease-in-out;color:#fff;font-size:12px;line-height:14px}.vditor-upload ul{margin:0}.vditor-upload--tip{height:auto;opacity:1 !important}.vditor-upload--tip .vditor-upload__close{display:block}.vditor-upload__close{display:none;position:absolute;right:5px;cursor:pointer;padding:5px;top:0}.vditor-upload__progress{height:100%;background-color:rgba(66,133,244,0.8);transition:all .15s ease-in-out;padding:5px;box-sizing:border-box}.vditor-hint{background-color:#fff;position:absolute;box-shadow:0 1px 2px rgba(0,0,0,0.2);border-radius:3px;padding:5px 0;z-index:1;line-height:20px;list-style:none;color:#24292e;font-size:12px;margin:0;max-width:200px;min-width:80px;display:none}.vditor-hint li{cursor:pointer;padding:3px 10px;border-bottom:1px solid #d1d5da;line-height:20px}.vditor-hint li:last-child{border-bottom:0}.vditor-hint--current,.vditor-hint li:hover{background-color:#4285f4;color:#fff}.vditor-hint__emoji{font-size:16px;float:left;margin-right:3px}.vditor-hint img{height:20px;width:20px;float:left;margin-right:3px}.vditor-reset{font-family:"Helvetica Neue","Luxi Sans","DejaVu Sans",Tahoma,"Hiragino Sans GB","Microsoft Yahei",sans-serif;word-wrap:break-word;overflow:auto;line-height:1.65;font-size:16px;word-break:break-word}.vditor-reset ul,.vditor-reset ol{padding-left:2em;margin-top:0;margin-bottom:16px}.vditor-reset li{margin-top:0.25em}.vditor-reset audio{max-width:100%}.vditor-reset video{max-height:90vh}.vditor-reset img.emoji{cursor:auto;max-width:20px;vertical-align:top}.vditor-reset h1,.vditor-reset h2,.vditor-reset h3,.vditor-reset h4,.vditor-reset h5,.vditor-reset h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}.vditor-reset h1{padding-bottom:0.3em;font-size:1.7em;border-bottom:1px solid #eee}.vditor-reset h2{padding-bottom:0.3em;font-size:1.5em;border-bottom:1px solid #eee}.vditor-reset h3{font-size:1.25em}.vditor-reset h4{font-size:1em}.vditor-reset h5{font-size:0.875em}.vditor-reset h6{font-size:0.85em}.vditor-reset hr{height:0.15em;padding:0;margin:24px 0;background-color:#e7e7e7;border:0}.vditor-reset p{margin-top:0;margin-bottom:16px}.vditor-reset blockquote{padding:0 1em;color:#777;border-left:0.25em solid #ddd;margin:0 0 16px 0}.vditor-reset blockquote p{margin:0}.vditor-reset ins>iframe{border:0}.vditor-reset iframe{border:1px solid #d1d5da}.vditor-reset table{width:100%;border:1px solid #dedede;margin:15px auto;border-collapse:collapse;empty-cells:show}.vditor-reset thead{text-align:center}.vditor-reset td,.vditor-reset th{height:35px;border:1px solid #dedede;padding:0 10px}.vditor-reset th{font-weight:bold;text-align:center !important;background:rgba(158,188,226,0.2)}.vditor-reset tbody tr:nth-child(2n){background:rgba(158,188,226,0.12)}.vditor-reset tr:hover{background:#efefef}.vditor-reset code{padding:0.2em 0.4em;margin:0;font-size:85%;background-color:rgba(27,31,35,0.05);border-radius:3px;font-family:mononoki,Consolas,"Liberation Mono",Menlo,Courier,monospace;word-break:break-word}.vditor-reset pre>code{padding:0.5em;background-color:rgba(0,0,0,0.04);background-image:url("https://cdn.jsdelivr.net/npm/vditor@1.1.2/src/assets/images/code-bg.png");background-size:20px 20px;border-radius:5px;display:block;overflow:auto}.vditor-reset pre:hover div.vditor-copy{display:block}.vditor-reset kbd{display:inline-block;padding:3px 5px;font:11px Consolas, "Liberation Mono", Menlo, Courier, monospace;line-height:10px;color:#555;vertical-align:middle;background-color:#fcfcfc;border:solid 1px #d1d5da;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}.vditor-reset summary{cursor:pointer}.vditor-reset summary:focus{outline:none}.vditor-reset svg{height:auto;width:auto}.vditor-reset .katex{position:relative}.vditor-task{list-style:none;margin-left:-1.4em;display:flex;align-items:center}.vditor-task input{margin-right:5px}.vditor-copy{position:relative;display:none}.vditor-copy textarea{position:absolute;top:-100000px}.vditor-copy span{cursor:pointer;position:absolute;right:0.5em;top:0.5em;height:20px;width:20px}.vditor-copy svg{height:20px;width:20px}button{background-size:110% 110%;border:1px solid rgba(27,31,35,0.2);font-size:13px;font-weight:700;text-shadow:0 1px 0 rgba(255,255,255,0.9);white-space:nowrap;background-color:#eff3f6;background-image:linear-gradient(-180deg, #fafbfc, #eff3f6 90%);color:#24292e;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,0.075);outline:none;padding:7px 15px;margin-top:10px;cursor:pointer}button:hover{background-color:#e6ebf1;background-image:linear-gradient(-180deg, #f0f3f6, #e6ebf1 90%);background-position:-.5em;border-color:rgba(27,31,35,0.35)}a{color:#4285f4;text-decoration:none}h2{background-color:#F3F1E5;border-radius:4px 4px 0 0;font-size:16px;margin:0;padding:10px 20px}h2 a:hover{color:#d23f31}input[type=password],input[type=text]{border:1px solid #d1d5da;background-color:#FAFAFA;border-radius:3px;box-shadow:inset 0 1px 2px rgba(27,31,35,0.075);padding:7px 8px;width:100%;line-height:17px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;outline:none;margin-top:10px}input[type=password]:focus,input[type=text]:focus{background-color:#FFF;box-shadow:inset 0 1px 2px rgba(27,31,35,0.075),0 0 0 0.2em #dbedff;border:1px solid #4285f4}.error{color:#d23f31;font-weight:bold}.wrap{border-top:5px solid #E6E5D9;background-color:#F3F1E5;display:flex;flex-direction:column;min-height:100vh;box-sizing:border-box}.content-wrap{flex:1;display:flex}.content{background-color:#fff;margin:0 auto;width:760px;align-self:center;display:flex}.main{border-left:1px solid #E6E5D9;font-size:15px;padding:20px;flex:1}.footerWrapper{background-color:#FFFFFF;border-top:1px solid #E6E5D9;padding:12px 0;text-align:center}.a-error{text-align:right}.img-error{max-width:100%;margin:20px auto;padding:0;display:block}.kill__btns{text-align:right}.kill__img{float:right;margin:-280px 0 0 0}.kill .vditor-reset{margin:10px}#github{position:relative;text-align:center}#github.github--loading:after{content:"Loading...";position:absolute;height:100%;width:100%;top:0;left:0;z-index:7;background-color:rgba(255,255,255,0.6);font-size:22px;text-align:center;padding-top:135px;color:#000;text-shadow:0 1px 2px rgba(0,0,0,0.2);box-sizing:border-box}#github .github__icon{height:200px;width:266px;background-image:url("../images/github.png");margin:0 auto;background-size:contain;cursor:pointer}#github .github__icon:hover{background-image:url("../images/github.gif")}#github img{display:none}.github__text{cursor:pointer;font-size:12px;color:#666}.github__text ul{display:none;text-align:left;margin:5px auto 0;width:280px;padding-left:24px;box-sizing:border-box}.github__link{font-size:12px;text-decoration:underline;margin-top:10px;display:block}.github__check{font-size:12px;display:inline-block;margin:10px auto 0;align-items:center;line-height:20px;color:#999}.github__check a{color:#999;text-decoration:underline}.github__check input{width:auto;margin-right:5px}.search{border-top:5px solid #e6e5d9;background-color:#f3f1e5;padding:20px 0 20px 84px;min-height:480px;flex:1}.search__body{display:flex;flex-direction:column}.search__header{margin:20px;display:flex}.search__header a{line-height:32px}.search__input{flex:1;display:flex}.search__input input{margin:0 10px 0 20px;width:523px;height:32px;line-height:32px}.search__input button{height:32px;margin:0}.search__articles{width:600px}.search__articles .tag{color:#616161;padding:2px 5px;border:1px solid transparent;position:relative;height:20px;white-space:nowrap;word-wrap:normal;background-color:#f7f7f7;border-radius:3px 3px 3px 3px;line-height:21px;font-size:12px;display:inline-block;margin-right:5px}.search__articles .tag:hover{color:#000;box-shadow:0 1px 2px rgba(0,0,0,0.2);text-decoration:none}.search__articles header h1{margin:0}.search__articles header h1>a{font-size:18px;text-decoration:none;font-weight:normal}.search__articles .meta{font-size:14px;color:#999;margin:5px 0}.search__articles footer{margin-bottom:30px}.search__articles footer a{text-decoration:none;font-size:13px}.search__articles footer a:hover,.search__articles header h1>a:hover,.search__pagination a:hover{text-decoration:underline}.search__pagination a{color:#4285f4;text-decoration:none}.search__pagination a,.search__pagination span{margin-right:5px}@media (max-width: 780px){.wrap{padding:40px 0 0 0}.content{width:auto}.logo,.search__header img,.search__header>.fn-right{display:none}.main{border:0;float:none;width:auto;padding:10px}.a-500,.a-403,.a-404{margin:0 20px 0 0}#init{width:100%;padding:0 20px;box-sizing:border-box;left:0}.search{padding:20px;width:100%;min-height:auto;box-sizing:border-box}.search__input input{width:auto;flex:1;margin-left:0}.search__articles{width:auto}}
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* *
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a> * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 2.0.0.3, Mar 16, 2019 * @version 2.0.0.4, Mar 17, 2019
*/ */
@import "reset"; @import "reset";
...@@ -262,7 +262,7 @@ input[type=text]:focus { ...@@ -262,7 +262,7 @@ input[type=text]:focus {
} }
.search__header a { .search__header a {
line-height: 44px; line-height: 32px;
} }
.search__input { .search__input {
...@@ -273,12 +273,12 @@ input[type=text]:focus { ...@@ -273,12 +273,12 @@ input[type=text]:focus {
.search__input input { .search__input input {
margin: 0 10px 0 20px; margin: 0 10px 0 20px;
width: 523px; width: 523px;
height: 44px; height: 32px;
line-height: 44px; line-height: 32px;
} }
.search__input button { .search__input button {
height: 44px; height: 32px;
margin: 0; margin: 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment