Commit b43be310 authored by Vanesssa's avatar Vanesssa

#12150

parent 075f5723
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
</div> </div>
<div> <div>
<label>${content1Label}</label> <label>${content1Label}</label>
</div>
<div>
<textarea id="articleContent" name="articleContent" <textarea id="articleContent" name="articleContent"
style="height: 500px;width:100%;"></textarea> style="height: 500px;width:100%;"></textarea>
</div> </div>
...@@ -22,8 +20,6 @@ ...@@ -22,8 +20,6 @@
</div> </div>
<div> <div>
<label>${abstract1Label}</label> <label>${abstract1Label}</label>
</div>
<div>
<textarea id="abstract" style="height: 200px;width: 100%;" name="abstract"></textarea> <textarea id="abstract" style="height: 200px;width: 100%;" name="abstract"></textarea>
</div> </div>
<div> <div>
...@@ -40,7 +36,7 @@ ...@@ -40,7 +36,7 @@
<div> <div>
<span class="signs"> <span class="signs">
<label>${sign1Label}</label> <label>${sign1Label}</label>
<button style="margin-left: 0px;" id="articleSign1">${signLabel} 1</button> <button style="margin-left: 0px;" id="articleSign1" class="selected">${signLabel} 1</button>
<button id="articleSign2">${signLabel} 2</button> <button id="articleSign2">${signLabel} 2</button>
<button id="articleSign3">${signLabel} 3</button> <button id="articleSign3">${signLabel} 3</button>
<button id="articleSign0">${noSignLabel}</button> <button id="articleSign0">${noSignLabel}</button>
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</div> </div>
</li> </li>
<li> <li>
<div onclick="admin.collapseNav(this)"> <div id="tabArticleTitle" class="tab-current" onclick="admin.collapseNav(this)">
<span class="left postIcon"></span> <span class="left postIcon"></span>
${articleLabel} ${articleLabel}
<span class="ico-arrow-up"></span> <span class="ico-arrow-up"></span>
......
<div id="tabPreference" class="sub-tabs"> <div id="tabPreference" class="sub-tabs fn-clear">
<ul> <ul>
<li> <li>
<div id="tabPreference_config"> <div id="tabPreference_config">
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</div> </div>
<div id="tabPreferencePanel" class="sub-tabs-main"> <div id="tabPreferencePanel" class="sub-tabs-main">
<div id="tabPreferencePanel_config"> <div id="tabPreferencePanel_config">
<table class="form" width="98%" cellpadding="0" cellspacing="9px"> <table class="form" width="100%" cellpadding="0" cellspacing="9px">
<tbody> <tbody>
<tr> <tr>
<td colspan="2" align="right"> <td colspan="2" align="right">
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
</table> </table>
</div> </div>
<div id="tabPreferencePanel_solo" class="none"> <div id="tabPreferencePanel_solo" class="none">
<table class="form" width="98%" cellpadding="0" cellspacing="9px"> <table class="form" width="100%" cellpadding="0" cellspacing="9px">
<tbody> <tbody>
<tr> <tr>
<th width="80px"> <th width="80px">
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
</table> </table>
</div> </div>
<div id="tabPreferencePanel_setting" class="none"> <div id="tabPreferencePanel_setting" class="none">
<table class="form" width="98%" cellpadding="0" cellspacing="9px"> <table class="form" width="100%" cellpadding="0" cellspacing="9px">
<tbody> <tbody>
<tr> <tr>
<td colspan="2" align="right"> <td colspan="2" align="right">
...@@ -325,7 +325,7 @@ ...@@ -325,7 +325,7 @@
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<div id="tabPreferencePanel_signs" class="none"> <div id="tabPreferencePanel_signs" class="none">
<table class="form" width="98%" cellpadding="0" cellspacing="9px"> <table class="form" width="100%" cellpadding="0" cellspacing="9px">
<tbody> <tbody>
<tr> <tr>
<th colspan="2"> <th colspan="2">
...@@ -365,7 +365,7 @@ ...@@ -365,7 +365,7 @@
</table> </table>
</div> </div>
<div id="tabPreferencePanel_qiniu" class="none"> <div id="tabPreferencePanel_qiniu" class="none">
<table class="form" width="98%" cellpadding="0" cellspacing="9px"> <table class="form" width="100%" cellpadding="0" cellspacing="9px">
<tbody> <tbody>
<tr> <tr>
<th colspan="2"> <th colspan="2">
...@@ -373,7 +373,7 @@ ...@@ -373,7 +373,7 @@
</th> </th>
</tr> </tr>
<tr> <tr>
<th> <th width="120">
<label for="qiniuAccessKey">${accessKey1Label}</label> <label for="qiniuAccessKey">${accessKey1Label}</label>
</th> </th>
<td> <td>
......
...@@ -31,22 +31,25 @@ html, body { ...@@ -31,22 +31,25 @@ html, body {
background: #f1f2f7; background: #f1f2f7;
font-size: 13px; font-size: 13px;
} }
a:link { a {
color: #21759B; color: #4183c4;
text-decoration: none;
} }
a:visited { a:visited {
color: #551A8B; color: #7ba9d6;
} }
a:active { a:active {
color: #D54121; color: #2c5d8d;
} }
a:hover { a:hover {
color: #D54121; text-decoration: underline;
} }
button.selected { button.selected {
background: url("../images/bowknot/completed.png") no-repeat scroll right bottom transparent; background: url("../images/bowknot/completed.png") no-repeat scroll right bottom transparent !important;
color: #D54121; color: #D54121 !important;
border-color: #b0b5b9 !important;
} }
/* end reset */ /* end reset */
...@@ -73,9 +76,8 @@ button.selected { ...@@ -73,9 +76,8 @@ button.selected {
position: relative; position: relative;
} }
#tabsPanel { #tabsPanel {
margin: 80px 0 0 0; margin: 80px 0 0 240px;
padding: 15px; padding: 15px;
float: left;
} }
#tabsPanel>div { #tabsPanel>div {
...@@ -89,19 +91,17 @@ button.selected { ...@@ -89,19 +91,17 @@ button.selected {
padding: 2px 0; padding: 2px 0;
position: fixed; position: fixed;
text-align: center; text-align: center;
top: 5px; top: 15px;
width: 100%; left: 255px;
z-index: 2; z-index: 1001;
}
.tip-msg {
top: 33px;
} }
#tipMsg, #loadMsg { #tipMsg, #loadMsg {
background-color: #E5E7EB; color: #31708f;
border-radius: 3px; background-color: #d9edf7;
padding: 2px 0; border-radius: 4px;
line-height: 40px;
display: inline-block;
} }
.footer { .footer {
...@@ -120,6 +120,7 @@ button.selected { ...@@ -120,6 +120,7 @@ button.selected {
width: 100%; width: 100%;
top: 0; top: 0;
background-color: #fff; background-color: #fff;
z-index: 1000;
} }
#top>a { #top>a {
...@@ -158,7 +159,9 @@ button.selected { ...@@ -158,7 +159,9 @@ button.selected {
min-height: 468px; min-height: 468px;
width: 240px; width: 240px;
margin-top: 80px; margin-top: 80px;
float: left; position: fixed;
top: 0;
background-color: #32323a;
} }
#tabs ul { #tabs ul {
...@@ -167,139 +170,187 @@ button.selected { ...@@ -167,139 +170,187 @@ button.selected {
#tabs li { #tabs li {
margin-left: 0px; margin-left: 0px;
border-bottom: 1px solid rgba(255,255,255,0.05);
} }
#tabs a, #tabs>ul>li>div { #tabs li > div > a,
color: #21759B; #tabs #tabToolsTitle,
#tabs #tabArticleTitle {
color: #aeb2b7;
display: block; display: block;
text-decoration: none; text-decoration: none;
cursor: pointer;
letter-spacing: 1px; letter-spacing: 1px;
} padding: 18px 0 18px 25px;
#tabs a:hover, #tabs>ul>li>div:hover { line-height: 18px;
color: #D54121; height: 18px;
} transition: all 0.3s ease;
#tabs>ul>li>div {
border-bottom: 1px solid #DFDFDF;
border-top: 1px solid #F9F9F9;
font-weight: bold;
padding-left: 12px;
line-height: 30px;
height: 30px;
} }
#tabs>ul>li>div>a.tab-current{ #tabs a:hover,
background-color: #777777; #tabs a.tab-current,
border-bottom: 1px solid #6D6D6D; #tabs #tabToolsTitle.tab-current,
border-top: 1px solid #808080; #tabs #tabArticleTitle.tab-current,
color: #FFFFFF; #tabs #tabToolsTitle:hover,
margin-left: -12px; #tabs #tabArticleTitle:hover {
padding-left: 12px; background-color:#28282e;
text-shadow: 0 -1px 0 #333333; color:#1fb5ad;
} }
#tabs li li a { #tabs li li {
background-color: #FFFFFF; border-bottom: 0;
padding-left: 36px;
line-height: 28px;
height: 28px;
} }
#tabs .tab-current { #tabs li li > div > a {
background-color: #EAF2FA; padding: 13px 0 13px 46px;
color: #333333; line-height: 15px;
font-weight: bold; height: 15px;
background-color:#28282e;
} }
#tabs li li a:hover { #tabs li li > div > a:hover,
background-color: #EAF2FA; #tabs li li > div > a.tab-current {
color: #333333; background-color:#202025;
} }
#tabs .commentIcon, #tabs .postIcon, #tabs .preferenceIcon, #tabs .usersIcon, #tabs .commentIcon, #tabs .postIcon, #tabs .preferenceIcon, #tabs .usersIcon,
#tabs .aboutIcon { #tabs .aboutIcon {
margin: 6px 9px 0 0; display: none;
} }
/* end first tabs */ /* end first tabs */
/* start sub tabs */ /* start sub tabs */
.sub-tabs { .sub-tabs {
height: 30px; background-color: #e0e1e7;
border-radius: 4px 4px 0 0;
overflow: hidden;
} }
.sub-tabs ul { .sub-tabs ul {
float: right; float: left;
list-style: none outside none; list-style: none outside none;
margin-right: 24px; margin-right: 24px;
} }
.sub-tabs li { .sub-tabs li {
float: left; float: left;
margin: 0;
} }
.sub-tabs li a { .sub-tabs li a {
background-color: #ECECEC; border-right: 1px solid #e0e1e7;
border: 1px solid #DFDFDF; color: #898989;
border-bottom: 0px;
border-radius: 5px 5px 0 0;
color: #333333;
display: block; display: block;
line-height: 29px; line-height: 18px;
padding: 0 12px; padding: 20px 15px;
text-decoration: none; text-decoration: none;
} }
.sub-tabs .tab-current, .sub-tabs .tab-current:hover { .sub-tabs .tab-current, .sub-tabs .tab-current:hover,
background-color: #FFFFFF;
font-weight: bold;
line-height: 30px;
}
.sub-tabs a:hover { .sub-tabs a:hover {
background-color: #F5F5F5; background-color: #FFFFFF;
color: #1fb5ad;
} }
.sub-tabs-main { .sub-tabs-main {
background-color: #FFFFFF; background-color: #FFFFFF;
border: 1px solid #DFDFDF; padding: 15px;
padding: 12px; border-radius: 0 0 4px 4px;
border-radius: 6px;
} }
/* end preference tabs*/ /* end preference tabs*/
/* start form */ /* start form */
.form>div { .form>div {
margin: 12px 0; margin: 15px 0;
} }
.form>div label {
font-weight: bold; .form label {
line-height: 28px; margin-bottom: 10px;
margin-right: 12px; display: inline-block;
}
.form input[type='text'], .form input[type='password'], .form textarea {
font-size: 14px;
outline: medium none;
width: 100%;
padding: 6px 12px;
height: 34px;
box-sizing: border-box;
border: 1px solid #e2e2e4;
color: #333;
border-radius: 4px;
transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
}
.form input[type='text']:focus, .form input[type='password']:focus, .form textarea:focus {
box-shadow: none;
border-color: #1fb5ad;
}
.form button,
.completed-ck span {
padding: 6px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: 400;
text-align: center;
white-space: nowrap;
vertical-align: middle;
cursor: pointer;
user-select: none;
background-image: none;
border: 1px solid #1fb5ad;
border-radius: 4px;
background-color: #1fb5ad;
color: #fff;
height: auto;
outline: none;
}
.form button:hover {
background-color: #1ca59e;
border-color: #1ca59e;
} }
/* end form */ /* end form */
/* start module */ /* start module */
.module-panel { .module-panel {
border: 1px solid #DFDFDF; border-radius: 4px;
border-radius: 3px 3px 3px 3px; background-color: #fff;
box-shadow: 0 1px 0 #FFFFFF inset; margin-bottom: 20px;
background-color: #F5F5F5;
margin-bottom: 36px;
min-height: 160px; min-height: 160px;
} }
.module-header { .module-header {
background-color: #f9f9f9; background: #fafafa;
background-image: linear-gradient(#f9f9f9,#ececec); padding: 15px;
background-image: -ms-linear-gradient(#f9f9f9,#ececec); border-bottom: 1px solid #eff2f7;
background-image: -o-linear-gradient(#f9f9f9,#ececec); border-top-left-radius: 3px;
background-image: -webkit-linear-gradient(#f9f9f9,#ececec); border-top-right-radius: 3px;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#f9f9f9', endColorstr='#ececec');
border-bottom-color: #DFDFDF;
box-shadow: 0 1px 0 #FFFFFF;
text-shadow: 0 1px 0 #FFFFFF;
padding: 5px 10px;
} }
.module-header h2 { .module-header h2 {
color: #464646; font-size: 13px;
font-size: 16px; font-weight: 400;
} }
.module-header a { .module-header a {
color: #767676;
text-decoration: none;
}
.module-header a:hover {
color: #1fb5ad;
}
.module-panel .module-body {
padding: 15px;
}
.module-panel .module-body li {
padding: 10px;
line-height: 18px;
border-bottom: 1px solid #ddd;
}
.module-panel .module-body li:hover {
background-color: #F5F5F5;
}
.module-panel .module-body li a:hover {
text-decoration: none; text-decoration: none;
} }
/* end module */ /* end module */
...@@ -366,11 +417,16 @@ button.selected { ...@@ -366,11 +417,16 @@ button.selected {
margin-left: 12px; margin-left: 12px;
} }
button#submitArticle { button#submitArticle,
background: none repeat scroll 0 0 #D54121; #unSubmitArticle {
box-shadow: 0 0 0 1px #FFFFFF inset, 0 1px 1px rgba(0, 0, 0, 0.1); background-color: #fa8564;
text-shadow: 0 1px rgba(0, 0, 0, 0.1); border-color: #fa8564;
color: #FFF; }
button#submitArticle:hover,
#unSubmitArticle:hover{
background-color: #ec6459;
border-color: #ec6459;
} }
/* end article */ /* end article */
...@@ -396,7 +452,7 @@ button#submitArticle { ...@@ -396,7 +452,7 @@ button#submitArticle {
} }
#skinMain .skinItem.selected { #skinMain .skinItem.selected {
background-color: #D54121; background-color: #1fb5ad;
} }
.skinItem:hover { .skinItem:hover {
background-color: #EEE; background-color: #EEE;
...@@ -473,22 +529,17 @@ button#submitArticle { ...@@ -473,22 +529,17 @@ button#submitArticle {
.completed-ck { .completed-ck {
margin-top: 9px; margin-top: 9px;
} }
.completed-ck span { .completed-ck span {
background: url(../images/icon.png) repeat center bottom; margin: 5px 10px 5px 0;
border: 1px solid; display: inline-block;
border-color: #CCC #BBBBBB #A0A0A0; background-color: #c7cbd6;
border-radius: 4px; border-color: #c7cbd6;
color: #21759B;
cursor: pointer;
float: left;
height: 28px;
line-height: 26px;
margin: 3px 6px;
padding: 0 6px;
vertical-align: top;
} }
.completed-ck span:hover { .completed-ck span:hover {
border-color: #BBB; background-color: #b0b5b9;
border-color: #b0b5b9;
} }
.completed-ck span.selected { .completed-ck span.selected {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a> * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 1.0.2.2, May 28, 2013 * @version 1.0.2.2, May 28, 2013
*/ */
var Admin = function() { var Admin = function () {
this.register = {}; this.register = {};
// 工具栏下的工具 // 工具栏下的工具
this.tools = ['#page-list', '#file-list', '#link-list', '#preference', this.tools = ['#page-list', '#file-list', '#link-list', '#preference',
...@@ -33,13 +33,13 @@ $.extend(Admin.prototype, { ...@@ -33,13 +33,13 @@ $.extend(Admin.prototype, {
/** /**
* @description 登出 * @description 登出
*/ */
logout: function() { logout: function () {
window.location.href = latkeConfig.servePath + "/logout?goto=" + latkeConfig.servePath; window.location.href = latkeConfig.servePath + "/logout?goto=" + latkeConfig.servePath;
}, },
/** /**
* @description 清除提示 * @description 清除提示
*/ */
clearTip: function() { clearTip: function () {
$("#tipMsg").text(""); $("#tipMsg").text("");
$("#loadMsg").text(""); $("#loadMsg").text("");
}, },
...@@ -47,7 +47,7 @@ $.extend(Admin.prototype, { ...@@ -47,7 +47,7 @@ $.extend(Admin.prototype, {
* @description 根据当前页数设置 hash * @description 根据当前页数设置 hash
* @param {Int} currentPage 当前页 * @param {Int} currentPage 当前页
*/ */
setHashByPage: function(currentPage) { setHashByPage: function (currentPage) {
var hash = window.location.hash, var hash = window.location.hash,
hashList = hash.split("/"); hashList = hash.split("/");
if (/^\d*$/.test(hashList[hashList.length - 1])) { if (/^\d*$/.test(hashList[hashList.length - 1])) {
...@@ -61,13 +61,13 @@ $.extend(Admin.prototype, { ...@@ -61,13 +61,13 @@ $.extend(Admin.prototype, {
* @description 设置某个 tab 被选择 * @description 设置某个 tab 被选择
* @param {Stirng} id id tab id * @param {Stirng} id id tab id
*/ */
selectTab: function(id) { selectTab: function (id) {
window.location.hash = "#" + id; window.location.hash = "#" + id;
}, },
/** /**
* @description 根据当前 hash 解析出当前页数及 hash 数组。 * @description 根据当前 hash 解析出当前页数及 hash 数组。
*/ */
analyseHash: function() { analyseHash: function () {
var hash = window.location.hash; var hash = window.location.hash;
var tag = hash.substr(1, hash.length - 1); var tag = hash.substr(1, hash.length - 1);
var tagList = tag.split("/"); var tagList = tag.split("/");
...@@ -86,7 +86,8 @@ $.extend(Admin.prototype, { ...@@ -86,7 +86,8 @@ $.extend(Admin.prototype, {
/** /**
* @description 根据当前 hash 设置当前 tab * @description 根据当前 hash 设置当前 tab
*/ */
setCurByHash: function() { setCurByHash: function () {
$(window).scrollTop(0);
$("#tipMsg").text(""); $("#tipMsg").text("");
var tags = admin.analyseHash(); var tags = admin.analyseHash();
var tab = tags.hashList[1], var tab = tags.hashList[1],
...@@ -103,7 +104,7 @@ $.extend(Admin.prototype, { ...@@ -103,7 +104,7 @@ $.extend(Admin.prototype, {
if (tab !== "article") { if (tab !== "article") {
admin.article.clearDraftTimer(); admin.article.clearDraftTimer();
} else if (tab === "article") { } else if (tab === "article") {
admin.article.autoSaveDraftTimer = setInterval(function() { admin.article.autoSaveDraftTimer = setInterval(function () {
admin.article._autoSaveToDraft(); admin.article._autoSaveToDraft();
}, admin.article.AUTOSAVETIME); }, admin.article.AUTOSAVETIME);
} }
...@@ -157,7 +158,7 @@ $.extend(Admin.prototype, { ...@@ -157,7 +158,7 @@ $.extend(Admin.prototype, {
if ($("#tabsPanel_" + tab).length === 1) { if ($("#tabsPanel_" + tab).length === 1) {
if ($("#tabsPanel_" + tab).html().replace(/\s/g, "") === "") { if ($("#tabsPanel_" + tab).html().replace(/\s/g, "") === "") {
// 还未加载 HTML // 还未加载 HTML
$("#tabsPanel_" + tab).load("admin-" + tab + ".do", function() { $("#tabsPanel_" + tab).load("admin-" + tab + ".do", function () {
// 页面加载完后,回调初始函数 // 页面加载完后,回调初始函数
if (tab === "article" && admin.article.status.id) { if (tab === "article" && admin.article.status.id) {
// 当文章页面编辑器未初始化时,调用更新文章需先初始化编辑器 // 当文章页面编辑器未初始化时,调用更新文章需先初始化编辑器
...@@ -202,7 +203,7 @@ $.extend(Admin.prototype, { ...@@ -202,7 +203,7 @@ $.extend(Admin.prototype, {
/** /**
* @description 初始化整个后台 * @description 初始化整个后台
*/ */
init: function() { init: function () {
//window.onerror = Util.error; //window.onerror = Util.error;
Util.killIE(); Util.killIE();
...@@ -212,9 +213,9 @@ $.extend(Admin.prototype, { ...@@ -212,9 +213,9 @@ $.extend(Admin.prototype, {
$("#tabs").tabs(); $("#tabs").tabs();
// tipMsg // tipMsg
setInterval(function() { setInterval(function () {
if ($("#tipMsg").text() !== "") { if ($("#tipMsg").text() !== "") {
setTimeout(function() { setTimeout(function () {
$("#tipMsg").text(""); $("#tipMsg").text("");
}, 7000); }, 7000);
} }
...@@ -225,20 +226,22 @@ $.extend(Admin.prototype, { ...@@ -225,20 +226,22 @@ $.extend(Admin.prototype, {
* @description tools and article collapse * @description tools and article collapse
* @param {Bom} it 触发事件对象 * @param {Bom} it 触发事件对象
*/ */
collapseNav: function(it) { collapseNav: function (it) {
var subNav = $(it).next(); var subNav = $(it).next();
subNav.slideToggle("normal", function() { subNav.slideToggle("normal", function () {
if (this.style.display !== "none") { if (this.style.display !== "none") {
$(it).find(".ico-arrow-down")[0].className = "ico-arrow-up"; $(it).find(".ico-arrow-down")[0].className = "ico-arrow-up";
$(it).addClass('tab-current');
} else { } else {
$(it).find(".ico-arrow-up")[0].className = "ico-arrow-down"; $(it).find(".ico-arrow-up")[0].className = "ico-arrow-down";
$(it).removeClass('tab-current');
} }
}); });
}, },
/** /**
* @description 后台及当前页面所需插件初始化完后,对权限进行控制及当前页面属于 tools 时,tools 选项需展开。 * @description 后台及当前页面所需插件初始化完后,对权限进行控制及当前页面属于 tools 时,tools 选项需展开。
*/ */
inited: function() { inited: function () {
// Removes functions with the current user role // Removes functions with the current user role
if (Label.userRole !== "adminRole") { if (Label.userRole !== "adminRole") {
for (var i = 0; i < this.adTools.length; i++) { for (var i = 0; i < this.adTools.length; i++) {
......
...@@ -384,72 +384,10 @@ admin.article = { ...@@ -384,72 +384,10 @@ admin.article = {
init: function (fun) { init: function (fun) {
this.currentEditorType = Label.editorType; this.currentEditorType = Label.editorType;
// Inits Signs. // Inits Signs.
$.ajax({
url: latkeConfig.servePath + "/console/signs/", $(".signs button").click(function (i) {
type: "GET", $(".signs button").removeClass('selected');
cache: false, $(this).addClass('selected');
success: function (result, textStatus) {
$("#tipMsg").text(result.msg);
if (!result.sc) {
$("#loadMsg").text("");
return;
}
$(".signs button").each(function (i) {
// Sets signs.
if (i === result.signs.length) {
$("#articleSign1").addClass("selected");
} else {
$("#articleSign" + result.signs[i].oId).tip({
content: result.signs[i].signHTML === "" ? Label.signIsNullLabel :
result.signs[i].signHTML.replace(/\n/g, "").replace(/<script.*<\/script>/ig, ""),
position: "top"
});
}
// Binds checkbox event.
$(this).click(function () {
if (this.className !== "selected") {
$(".signs button").each(function () {
this.className = "";
});
this.className = "selected";
}
});
});
$("#loadMsg").text("");
}
});
// For tag auto-completion
$.ajax({// Gets all tags
url: latkeConfig.servePath + "/console/tags",
type: "GET",
cache: false,
success: function (result, textStatus) {
$("#tipMsg").text(result.msg);
if (!result.sc) {
$("#loadMsg").text("");
return;
}
if (0 >= result.tags.length) {
return;
}
var tags = [];
for (var i = 0; i < result.tags.length; i++) {
tags.push(result.tags[i].tagTitle);
}
$("#tag").completed({
height: 160,
buttonText: Label.selectLabel,
data: tags
});
$("#loadMsg").text("");
}
}); });
// submit action // submit action
......
...@@ -99,10 +99,6 @@ admin.preference = { ...@@ -99,10 +99,6 @@ admin.preference = {
var signs = eval('(' + preference.signs + ')'); var signs = eval('(' + preference.signs + ')');
for (var j = 1; j < signs.length; j++) { for (var j = 1; j < signs.length; j++) {
$("#preferenceSign" + j).val(signs[j].signHTML); $("#preferenceSign" + j).val(signs[j].signHTML);
$("#preferenceSignButton" + j).tip({
content: signs[j].signHTML === "" ? Label.signIsNullLabel : signs[j].signHTML.replace(/\n/g, "").replace(/<script.*<\/script>/ig, ""),
position: "bottom"
});
} }
$("#articleListDisplay").val(preference.articleListStyle); $("#articleListDisplay").val(preference.articleListStyle);
......
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