🎨 后台管理UI优化

pull/56/head
ruibaby 2018-11-03 21:25:59 +08:00
parent 8444583ecd
commit 37307cfeec
12 changed files with 30 additions and 60 deletions

View File

@ -95,6 +95,17 @@ public class AttachmentController {
return "admin/widget/_attachment-select";
}
/**
*
*
* @return String
*/
@GetMapping(value = "/uploadModal")
public String uploadModal(){
return "admin/widget/_attachment-upload";
}
/**
*
*
@ -106,32 +117,6 @@ public class AttachmentController {
@ResponseBody
public Map<String, Object> upload(@RequestParam("file") MultipartFile file,
HttpServletRequest request) {
return uploadAttachment(file, request);
}
/**
* editor.md
*
* @param file file
* @param request request
* @return Map
*/
@PostMapping(value = "/upload/editor", produces = {"application/json;charset=UTF-8"})
@ResponseBody
public Map<String, Object> editorUpload(@RequestParam("editormd-image-file") MultipartFile file,
HttpServletRequest request) {
return uploadAttachment(file, request);
}
/**
*
*
* @param file file
* @param request request
* @return Map
*/
private Map<String, Object> uploadAttachment(MultipartFile file, HttpServletRequest request) {
Map<String, Object> result = new HashMap<>(3);
if (!file.isEmpty()) {
try {

View File

@ -148,3 +148,11 @@
.box {
border-top: none !important;
}
.form-horizontal .control-label {
text-align: left;
}
.control-radio {
padding-top: 7px;
}

View File

@ -1 +1 @@
.skin-blue .box.box-primary{border-top-color:#fff}.skin-blue .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.skin-blue-light .box.box-primary{border-top-color:#fff}.skin-blue-light .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.skin-black .box.box-primary{border-top-color:#fff}.skin-black .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.skin-black-light .box.box-primary{border-top-color:#fff}.skin-black-light .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.skin-green .box.box-primary{border-top-color:#fff}.skin-green .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.skin-green-light .box.box-primary{border-top-color:#fff}.skin-green-light .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.skin-purple .box.box-primary{border-top-color:#fff}.skin-purple .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.skin-purple-light .box.box-primary{border-top-color:#fff}.skin-purple-light .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.skin-red .box.box-primary{border-top-color:#fff}.skin-red .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.skin-red-light .box.box-primary{border-top-color:#fff}.skin-red-light .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.skin-yellow .box.box-primary{border-top-color:#fff}.skin-yellow .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.skin-yellow-light .box.box-primary{border-top-color:#fff}.skin-yellow-light .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.layout-boxed{background:url('../images/boxed-bg.jpg') repeat fixed}::-webkit-scrollbar{width:2px;height:2px;background-color:#eee}::-webkit-scrollbar-thumb{background-color:#d0afaf}::-webkit-scrollbar-track{background-color:#eee}.btn-header{margin-left:4px;padding:3px 6px;position:relative;top:-4px;border:1px solid #ccc;border-radius:2px;background:#fff;text-shadow:none;font-weight:600;font-size:12px;line-height:normal;color:#3c8dbc;cursor:pointer;transition:all .2s ease-in-out}.btn-header:hover{background:#3c8dbc;color:#fff}.table-responsive{border:none!important}.table-bordered{border:none!important}.box{border-top:none!important}
.skin-blue .box.box-primary{border-top-color:#fff}.skin-blue .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.skin-blue-light .box.box-primary{border-top-color:#fff}.skin-blue-light .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.skin-black .box.box-primary{border-top-color:#fff}.skin-black .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.skin-black-light .box.box-primary{border-top-color:#fff}.skin-black-light .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.skin-green .box.box-primary{border-top-color:#fff}.skin-green .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.skin-green-light .box.box-primary{border-top-color:#fff}.skin-green-light .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.skin-purple .box.box-primary{border-top-color:#fff}.skin-purple .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.skin-purple-light .box.box-primary{border-top-color:#fff}.skin-purple-light .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.skin-red .box.box-primary{border-top-color:#fff}.skin-red .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.skin-red-light .box.box-primary{border-top-color:#fff}.skin-red-light .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.skin-yellow .box.box-primary{border-top-color:#fff}.skin-yellow .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.skin-yellow-light .box.box-primary{border-top-color:#fff}.skin-yellow-light .nav-tabs-custom>.nav-tabs>li.active{border-top-color:#fff}.layout-boxed{background:url('../images/boxed-bg.jpg') repeat fixed}::-webkit-scrollbar{width:2px;height:2px;background-color:#eee}::-webkit-scrollbar-thumb{background-color:#d0afaf}::-webkit-scrollbar-track{background-color:#eee}.btn-header{margin-left:4px;padding:3px 6px;position:relative;top:-4px;border:1px solid #ccc;border-radius:2px;background:#fff;text-shadow:none;font-weight:600;font-size:12px;line-height:normal;color:#3c8dbc;cursor:pointer;transition:all .2s ease-in-out}.btn-header:hover{background:#3c8dbc;color:#fff}.table-responsive{border:none!important}.table-bordered{border:none!important}.box{border-top:none!important}.form-horizontal .control-label{text-align:left}.control-radio{padding-top:7px}

View File

@ -4,12 +4,6 @@
<div class="content-wrapper">
<style type="text/css" rel="stylesheet">
.resourceType,.databaseType,.postType{list-style:none;float:left;margin:0;padding-bottom:10px}
.form-horizontal .control-label{
text-align: left;
}
.control-radio{
padding-top: 7px;
}
</style>
<section class="content-header">
<h1 style="display: inline-block;"><@spring.message code='admin.backup.title' /></h1>

View File

@ -45,7 +45,7 @@
<#list comments.content as comment>
<tr>
<td><a href="${comment.commentAuthorUrl}" target="_blank">${comment.commentAuthor}</a></td>
<td>${comment.commentContent}</td>
<td><p>${comment.commentContent}</p></td>
<td>
<#if comment.post.postType == "post">
<a target="_blank" href="/archives/${comment.post.postUrl}#comment-id-${comment.commentId?c}">${comment.post.postTitle}</a>

View File

@ -2,14 +2,6 @@
<#include "module/_macro.ftl">
<@head>${options.blog_title!} | <@spring.message code='admin.index.title' /></@head>
<div class="content-wrapper">
<style type="text/css" rel="stylesheet">
.form-horizontal .control-label{
text-align: left;
}
.control-radio{
padding-top: 7px;
}
</style>
<section class="content-header">
<h1 style="display: inline-block;"><@spring.message code='admin.index.title' /></h1>
<a class="btn-header" id="btnWidgetsOption" href="#">
@ -266,7 +258,7 @@
<thead>
<tr>
<th><@spring.message code='common.th.comment-author' /></th>
<th><@spring.message code='common.th.comment-page' /></th>
<th width="20%"><@spring.message code='common.th.comment-page' /></th>
<th width="30%"><@spring.message code='common.th.content' /></th>
<th><@spring.message code='common.th.status' /></th>
<th><@spring.message code='common.th.date' /></th>

View File

@ -3,9 +3,6 @@
<@head>${options.blog_title!} | <@spring.message code='admin.pages.galleries.title' /></@head>
<div class="content-wrapper">
<style type="text/css" rel="stylesheet">
.form-horizontal .control-label{
text-align: left;
}
.div-thumbnail{transition:all .5s ease-in-out;padding:10px}
.thumbnail{margin-bottom:0}
</style>

View File

@ -5,7 +5,6 @@
<link rel="stylesheet" href="/static/plugins/simplemde/simplemde.min.css">
<style type="text/css">
#post_title{font-weight: 400;}
.form-horizontal .control-label{text-align: left;}
.CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word) {background: none;}
.CodeMirror-fullscreen,.editor-toolbar.fullscreen{z-index: 1030;}
.CodeMirror, .CodeMirror-scroll {min-height: 480px;}

View File

@ -57,11 +57,13 @@
<#if posts.content?size gt 0>
<#list posts.content as post>
<tr>
<#if post.postTitle?length gt 20>
<td>${post.postTitle?substring(0,20)}...</td>
<#else >
<td>${post.postTitle}</td>
</#if>
<td>
<#if post.postStatus==0>
<a target="_blank" href="/archives/${post.postUrl}">${post.postTitle}</a>
<#else>
${post.postTitle}
</#if>
</td>
<td>
<#if post.categories?size gt 0>
<#list post.categories as cate>
@ -90,7 +92,6 @@
<td>
<#switch post.postStatus>
<#case 0>
<a href="/archives/${post.postUrl}" class="btn btn-primary btn-xs " target="_blank"><@spring.message code='common.btn.view' /></a>
<a href="/admin/posts/edit?postId=${post.postId?c}" class="btn btn-info btn-xs "><@spring.message code='common.btn.edit' /></a>
<button class="btn btn-danger btn-xs " onclick="modelShow('/admin/posts/throw?postId=${post.postId?c}&status=0','<@spring.message code="common.text.tips.to-recycle-bin" />')"><@spring.message code='common.btn.recycling' /></button>
<#break >

View File

@ -6,7 +6,6 @@
<link rel="stylesheet" href="/static/plugins/jquery-tageditor/jquery.tag-editor.css">
<style type="text/css">
#post_title{font-weight: 400;}
.form-horizontal .control-label{text-align: left;}
.CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word) {background: none;}
.CodeMirror-fullscreen,.editor-toolbar.fullscreen{z-index: 1030;}
.CodeMirror, .CodeMirror-scroll {min-height: 480px;}

View File

@ -2,11 +2,6 @@
<#include "module/_macro.ftl">
<@head>${options.blog_title!} | <@spring.message code='admin.user.profile.title' /></@head>
<div class="content-wrapper">
<style>
.form-horizontal .control-label{
text-align: left;
}
</style>
<section class="content-header">
<h1>
<@spring.message code='admin.user.profile.title' />

View File

@ -44,7 +44,7 @@
</li>
<li>
<a data-pjax="true" href="/admin/attachments">
<i class="fa fa-camera"></i>
<i class="fa fa-picture-o"></i>
<span><@spring.message code='admin.menu.attachments' /></span>
</a>
</li>