Commit 43bf84f0 authored by Van's avatar Van

#12150

parent b43be310
<div id="linkTable"></div> <div>
<div id="linkPagination" class="margin12 right"></div> <div id="linkTable"></div>
<div id="linkPagination" class="margin12 right"></div>
</div>
<div class="clear"></div> <div class="clear"></div>
<table class="form" width="100%" cellpadding="0px" cellspacing="9px"> <table class="form" width="100%" cellpadding="0px" cellspacing="9px">
<thead> <thead>
......
<div id="userTable"></div> <div>
<div id="userPagination" class="margin12 right"></div> <div id="userTable"></div>
<div id="userPagination" class="margin12 right"></div>
</div>
<div class="clear"></div> <div class="clear"></div>
<table class="form" width="100%" cellpadding="0px" cellspacing="9px"> <table class="form" width="100%" cellpadding="0px" cellspacing="9px">
<thead> <thead>
......
...@@ -58,7 +58,7 @@ button.selected { ...@@ -58,7 +58,7 @@ button.selected {
background: url("../images/arrows.png") repeat scroll 0 4px transparent; background: url("../images/arrows.png") repeat scroll 0 4px transparent;
float: right; float: right;
height: 20px; height: 20px;
margin: 2px 3px 0 0; margin: -3px 5px 0 0;
width: 18px; width: 18px;
} }
.ico-arrow-up { .ico-arrow-up {
...@@ -84,6 +84,18 @@ button.selected { ...@@ -84,6 +84,18 @@ button.selected {
padding-bottom: 36px; padding-bottom: 36px;
} }
#tabsPanel_article-list,
#tabsPanel_draft-list,
#tabsPanel_comment-list,
#tabsPanel_plugin-list,
#tabsPanel_page-list > div:first-child,
#tabsPanel_user-list > div:first-child,
#tabsPanel_link-list > div:first-child{
background-color: #FFF;
border-radius: 4px;
overflow: hidden;
}
.tip { .tip {
font-weight: bold; font-weight: bold;
margin: 0 auto; margin: 0 auto;
...@@ -162,6 +174,7 @@ button.selected { ...@@ -162,6 +174,7 @@ button.selected {
position: fixed; position: fixed;
top: 0; top: 0;
background-color: #32323a; background-color: #32323a;
overflow: auto;
} }
#tabs ul { #tabs ul {
...@@ -604,74 +617,87 @@ button#submitArticle:hover, ...@@ -604,74 +617,87 @@ button#submitArticle:hover,
padding: 12px; padding: 12px;
} }
.paginate-paginate div, .paginate-paginate a, .paginate-pageCount{ .paginate-paginate div.button.paginate-page, .paginate-paginate a, .paginate-pageCount,
float: left;
height: 20px;
line-height: 20px;
margin: 0 5px;
text-decoration: none;
}
.pagination-pages { .pagination-pages {
background: url(../images/icon.png) repeat center bottom; border: 1px solid #EFF2F7;
border: 1px solid; padding: 6px 12px;
border-color: #CCC #BBBBBB #A0A0A0;
border-radius: 4px;
padding: 0 6px;
cursor: pointer; cursor: pointer;
float: left; float: left;
height: 20px; line-height: 18px;
line-height: 20px; background: #eee;
margin: 0 5px; height: 18px;
margin-left: 1px;
border-radius: 0;
text-decoration: none;
color: #333;
} }
.pagination-current-page { .pagination-current-page,
.paginate-pageCount {
cursor: auto; cursor: auto;
font-weight: bold; }
border-color: #BBB;
.paginate-pageCount {
margin-left: 10px;
}
.pagination-current-page,
.paginate-paginate a:hover,
.paginate-paginate div.button.paginate-page:hover,
.pagination-pages:hover {
border-color: #2eb4ad;
background-color: #2eb4ad;
color: #FFF;
}
.paginate-paginate div.button {
padding: 0;
float: left;
border: 0;
background: none;
} }
.paginate-inputPage { .paginate-inputPage {
height: 14px; height: 26px;
width: 24px; width: 24px;
margin: 0 5px;
} }
.table-main { .table-main {
margin: 0; margin: 0;
padding: 0; padding: 0;
position: relative; position: relative;
} }
.table-main table { .table-main table {
word-break: break-all; word-break: break-all;
word-wrap: break-word; word-wrap: break-word;
} }
.table-header { .table-header {
border: 1px solid #D0D0D0; border-bottom: 1px solid #ddd;
border-bottom: 0px; background-color: #fafafa;
border-radius: 6px 6px 0 0; padding: 15px 0;
} }
.table-header th { .table-header th {
height: 34px; line-height: 18px;
line-height: 34px;
text-align: left; text-align: left;
text-indent: 6px; text-indent: 6px;
font-size: 14px;
font-weight: normal; font-weight: normal;
background: url("../images/icon.png") repeat scroll center bottom #F1F1F1;
} }
.table-main td { .table-main td {
border-bottom: 1px solid #D0D0D0; border-bottom: 1px solid #ddd;
color: #333; color: #767676;
padding: 3px 0; padding: 10px 0;
} }
.table-lineHover .table-hasExpend td { .table-lineHover .table-hasExpend td {
border-bottom: 0px; border-bottom: 0px;
} }
.table-heiglight td, .table-lineHover td { .table-heiglight td, .table-lineHover td {
background-color: #F3F3F3; background-color: #F5F5F5;
border-right-color: #F3F3F3; border-right-color: #F5F5F5;
} }
.table-expendRow td { .table-expendRow td {
padding: 0 0 5px 36px; padding: 0 0 5px 36px;
...@@ -680,16 +706,19 @@ button#submitArticle:hover, ...@@ -680,16 +706,19 @@ button#submitArticle:hover,
margin-left: 60px; margin-left: 60px;
} }
.table-expendRow td a { .table-expendRow td a {
background-color: #999; padding: 1px 5px;
border-radius: 3px;
color: #FFF;
font-size: 12px; font-size: 12px;
margin-right: 5px; line-height: 1.5;
padding: 1px 6px; border-radius: 3px;
text-decoration: none; text-decoration: none;
color: #FFF;
background-color: #c7cbd6;
border-color: #c7cbd6;
} }
.table-expendRow td a:hover { .table-expendRow td a:hover {
background-color: #BBB; background-color: #b0b5b9;
border-color: #b0b5b9;
} }
.table-center { .table-center {
margin: 0 auto; margin: 0 auto;
...@@ -724,4 +753,4 @@ button#submitArticle:hover, ...@@ -724,4 +753,4 @@ button#submitArticle:hover,
padding: 3px; padding: 3px;
position: absolute; position: absolute;
z-index: 1; z-index: 1;
} }
\ No newline at end of file
...@@ -236,6 +236,9 @@ $.extend(Admin.prototype, { ...@@ -236,6 +236,9 @@ $.extend(Admin.prototype, {
$(it).find(".ico-arrow-up")[0].className = "ico-arrow-down"; $(it).find(".ico-arrow-up")[0].className = "ico-arrow-down";
$(it).removeClass('tab-current'); $(it).removeClass('tab-current');
} }
$('#tabs > ul').height('auto');
$('#tabs > ul').height($('#tabs > ul').height() + 80);
}); });
}, },
/** /**
......
...@@ -308,7 +308,7 @@ admin.article = { ...@@ -308,7 +308,7 @@ admin.article = {
} }
$("#tagCheckboxPanel>span").remove(""); $("#tagCheckboxPanel>span").remove("");
var spans = ""; var spans = "";
for (var i = 0; i < result.tags.length; i++) { for (var i = 0; i < result.tags.length; i++) {
spans += "<span>" + result.tags[i].tagTitle + "</span>"; spans += "<span>" + result.tags[i].tagTitle + "</span>";
...@@ -383,11 +383,42 @@ admin.article = { ...@@ -383,11 +383,42 @@ admin.article = {
*/ */
init: function (fun) { init: function (fun) {
this.currentEditorType = Label.editorType; this.currentEditorType = Label.editorType;
// Inits Signs. // Inits Signs.
$(".signs button").click(function (i) { $(".signs button").click(function (i) {
$(".signs button").removeClass('selected'); $(".signs button").removeClass('selected');
$(this).addClass('selected'); $(this).addClass('selected');
});
// 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
...@@ -397,8 +428,8 @@ admin.article = { ...@@ -397,8 +428,8 @@ admin.article = {
} else { } else {
admin.article.add(true); admin.article.add(true);
} }
}); }
);
$("#saveArticle").click(function () { $("#saveArticle").click(function () {
if (admin.article.status.id) { if (admin.article.status.id) {
admin.article.update(admin.article.status.isArticle); admin.article.update(admin.article.status.isArticle);
...@@ -416,26 +447,26 @@ admin.article = { ...@@ -416,26 +447,26 @@ admin.article = {
url: "http://upload.qiniu.com/", url: "http://upload.qiniu.com/",
add: function (e, data) { add: function (e, data) {
filename = data.files[0].name; filename = data.files[0].name;
data.submit(); data.submit();
}, },
formData: function (form) { formData: function (form) {
var data = form.serializeArray(); var data = form.serializeArray();
var ext = filename.substring(filename.lastIndexOf(".") + 1); var ext = filename.substring(filename.lastIndexOf(".") + 1);
data.push({name: 'key', value: getUUID() + "." + ext}); data.push({name: 'key', value: getUUID() + "." + ext});
data.push({name: 'token', value: qiniu.qiniuUploadToken}); data.push({name: 'token', value: qiniu.qiniuUploadToken});
return data; return data;
}, },
done: function (e, data) { done: function (e, data) {
var qiniuKey = data.result.key; var qiniuKey = data.result.key;
if (!qiniuKey) { if (!qiniuKey) {
alert("Upload error"); alert("Upload error");
return; return;
} }
$('#articleUpload').after('<div id="uploadContent">!<a target="_blank" href="http://' + qiniu.qiniuDomain + qiniuKey + '">[' + filename + ']</a>(http://' $('#articleUpload').after('<div id="uploadContent">!<a target="_blank" href="http://' + qiniu.qiniuDomain + qiniuKey + '">[' + filename + ']</a>(http://'
+ qiniu.qiniuDomain + qiniuKey + ')</div>'); + qiniu.qiniuDomain + qiniuKey + ')</div>');
}, },
...@@ -632,14 +663,15 @@ admin.register.article = { ...@@ -632,14 +663,15 @@ admin.register.article = {
function getUUID() { function getUUID() {
var d = new Date().getTime(); var d = new Date().getTime();
var ret = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { var ret = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = (d + Math.random()*16)%16 | 0; var r = (d + Math.random() * 16) % 16 | 0;
d = Math.floor(d/16); d = Math.floor(d / 16);
return (c=='x' ? r : (r&0x3|0x8)).toString(16); return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16);
}); });
ret = ret.replace(new RegExp("-", 'g'), ""); ret = ret.replace(new RegExp("-", 'g'), "");
return ret; return ret;
}; }
;
...@@ -59,8 +59,8 @@ $.extend(TablePaginate.prototype, { ...@@ -59,8 +59,8 @@ $.extend(TablePaginate.prototype, {
}, },
"currentPage": 1, "currentPage": 1,
"errorMessage": Label.inputErrorLabel, "errorMessage": Label.inputErrorLabel,
"nextPageText": Label.nextPagePabel, "nextPageText": '>',
"previousPageText": Label.previousPageLabel, "previousPageText": '<',
"goText": Label.gotoLabel, "goText": Label.gotoLabel,
"type": "custom", "type": "custom",
"custom": [1], "custom": [1],
......
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