diff --git a/admin/css/grid.css b/admin/css/grid.css index c7a31053..e8c959cd 100644 --- a/admin/css/grid.css +++ b/admin/css/grid.css @@ -1,20 +1,32 @@ /* * Bento Grid System * Source: https://github.com/fenbox/bento - * Version: 1.2.7 - * Update: 2013.11.15 + * Version: 1.2.8 + * Update: 2013.11.25 */ -.colgroup [class*="col-"] { - float: left; - min-height: 1px; - padding-right: 10px; - padding-left: 10px; +.container, .row [class*="col-"] { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } -.colgroup [class*="push-"], -.colgroup [class*="pull-"] { +.container { + margin-left: auto; + margin-right: auto; + padding-left: 10px; + padding-right: 10px; } + +.row { + margin-right: -10px; + margin-left: -10px; } + +.row [class*="col-"] { + float: left; + min-height: 1px; + padding-right: 10px; + padding-left: 10px; } + +.row [class*="-push-"], +.row [class*="-pull-"] { position: relative; } /* @@ -61,8 +73,6 @@ */ @media (min-width: 768px) { .container { - margin-left: auto; - margin-right: auto; max-width: 728px; } .col-tb-1 { @@ -216,11 +226,7 @@ left: 91.66667%; } .col-tb-push-12 { - left: 100%; } - - .colgroup { - margin-right: -10px; - margin-left: -10px; } } + left: 100%; } } /* * Desktop and up */ @@ -554,10 +560,10 @@ /* * Clearfix */ -.clearfix, .colgroup { +.clearfix, .row { zoom: 1; } - .clearfix:before, .colgroup:before, .clearfix:after, .colgroup:after { + .clearfix:before, .row:before, .clearfix:after, .row:after { content: " "; display: table; } - .clearfix:after, .colgroup:after { + .clearfix:after, .row:after { clear: both; } diff --git a/admin/css/style.css b/admin/css/style.css index 15a27499..18791c31 100644 --- a/admin/css/style.css +++ b/admin/css/style.css @@ -210,9 +210,7 @@ button { cursor: default; } .btn-text { - background: transparent; } - .btn-text:hover, .btn-text:active, .btn-text.active { - background: #F3F3F0; } + background-color: transparent !important; } /* 下拉菜单 */ .btn-drop { @@ -974,8 +972,7 @@ a.operate-reply { color: #666; } .typecho-post-area #text { - resize: none; - font-size: .92857em; } + resize: none; } #advance-panel-btn { font-size: .92857em; } @@ -1040,9 +1037,6 @@ a.operate-reply { list-style: none; padding: 0; } -#edit-secondary #tab-files { - display: none; } - /** * 标签列表 */ @@ -1112,17 +1106,19 @@ a.operate-reply { margin: 0 10px; padding: 0; word-break: break-all; } - #file-list li { - padding: 8px 0; - border-top: 1px dashed #D9D9D6; } - #file-list .file { - margin-left: 5px; } + #file-list li, #file-list .insert { - display: block; - max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } + #file-list li { + padding: 8px 0; + border-top: 1px dashed #D9D9D6; } + #file-list .insert { + display: block; + max-width: 100%; } + #file-list .file { + margin-left: 5px; } #file-list .info { text-transform: uppercase; } @@ -1642,8 +1638,7 @@ div.token-input-dropdown ul li.token-input-selected-dropdown-item { * Hide from both screenreaders and browsers: h5bp.com/u */ .hidden { - display: none !important; - visibility: hidden; } + display: none; } /* * Hide only visually, but have it available for screenreaders: h5bp.com/v diff --git a/admin/editor-js.php b/admin/editor-js.php index eb4621e6..366ea958 100644 --- a/admin/editor-js.php +++ b/admin/editor-js.php @@ -48,7 +48,7 @@ $(document).ready(function () { exitFullscreen: ' - Ctrl+E', fullscreenUnsupport: '', - imagedialog: '

', + imagedialog: '

', linkdialog: '

', ok: '', @@ -215,6 +215,9 @@ $(document).ready(function () { }, 10); }; + Typecho.uploadComplete = function (file) { + Typecho.insertFileToEditor(file.title, file.url, file.isImage); + }; // 编辑预览切换 var edittab = $('.editor').prepend('
'), diff --git a/admin/file-upload-js.php b/admin/file-upload-js.php index 13a22b7d..be307ce1 100644 --- a/admin/file-upload-js.php +++ b/admin/file-upload-js.php @@ -52,6 +52,12 @@ $(document).ready(function() { } function fileUploadComplete (id, url, data) { + // 拖拽上传的错误提示 + if (!data) { + alert(errorWord); + return; + } + var li = $('#' + id).removeClass('loading').data('cid', data.cid) .data('url', data.url) .data('image', data.isImage) @@ -65,6 +71,7 @@ $(document).ready(function() { attachInsertEvent(li); attachDeleteEvent(li); updateAttacmentNumber(); + Typecho.uploadComplete(data); } $('#tab-files').bind('init', function () { diff --git a/admin/index.php b/admin/index.php index df51ba86..facff7cb 100644 --- a/admin/index.php +++ b/admin/index.php @@ -8,7 +8,7 @@ $stat = Typecho_Widget::widget('Widget_Stat');
-
+

%s 篇日志, 并有 %s 条关于你的评论在 %s 个分类中.', $stat->myPublishedPostsNum, $stat->myPublishedCommentsNum, $stat->categoriesNum); ?> diff --git a/admin/js/pagedown.js b/admin/js/pagedown.js index 89e34679..b5940033 100644 --- a/admin/js/pagedown.js +++ b/admin/js/pagedown.js @@ -3217,6 +3217,7 @@ else buttons.redo = makeButton("wmd-redo-button", redoTitle, "-220px", null); buttons.redo.execute = function (manager) { if (manager) manager.redo(); }; + makeSpacer(4); buttons.fullscreen = makeButton("wmd-fullscreen-button", getString("fullscreen"), "-240px", null); buttons.fullscreen.execute = function () { fullScreenManager.doFullScreen(buttons, true); }; buttons.exitFullscreen = makeButton("wmd-exit-fullscreen-button", getString("exitFullscreen"), "-260px", null); diff --git a/admin/js/typecho.js b/admin/js/typecho.js index 298bb1a8..f9ea59c5 100644 --- a/admin/js/typecho.js +++ b/admin/js/typecho.js @@ -8,7 +8,8 @@ $.post(url, {size : h}); } }) - } + }, + uploadComplete : function (file) {} }; })(window); diff --git a/admin/manage-comments.php b/admin/manage-comments.php index 87412606..73583eb9 100644 --- a/admin/manage-comments.php +++ b/admin/manage-comments.php @@ -10,7 +10,7 @@ $isAllComments = ('on' == $request->get('__typecho_all_comments') || 'on' == Typ

-
+