%s 篇日志, 并有 %s 条关于你的评论在 %s 个分类中.', +
%s 篇日志, 并有 %s 条关于你的评论在 %s 个分类中.',
$stat->myPublishedPostsNum, $stat->myPublishedCommentsNum, $stat->categoriesNum); ?>
-
pass('contributor', true)): ?>
- - pass('editor', true) && 'on' == $request->get('__typecho_all_comments') && $stat->waitingCommentsNum > 0): ?> + pass('editor', true) && 'on' == $request->get('__typecho_all_comments') && $stat->waitingCommentsNum > 0): ?>
- waitingCommentsNum(); ?> @@ -26,7 +26,7 @@ $stat = Typecho_Widget::widget('Widget_Stat'); myWaitingCommentsNum(); ?> - pass('editor', true) && 'on' == $request->get('__typecho_all_comments') && $stat->spamCommentsNum > 0): ?> + pass('editor', true) && 'on' == $request->get('__typecho_all_comments') && $stat->spamCommentsNum > 0): ?>
- spamCommentsNum(); ?> @@ -37,6 +37,7 @@ $stat = Typecho_Widget::widget('Widget_Stat'); pass('administrator', true)): ?>
- +
- @@ -124,7 +125,7 @@ $(document).ready(function () { $.get('index('/action/ajax?do=feed'); ?>', function (o) { for (var i = 0; i < o.length; i ++) { var item = o[i]; - html += '
- ' + item.date + ' ' + item.title
+ html += '
- ' + item.date + ' ' + item.title + '
'; } @@ -135,9 +136,9 @@ $(document).ready(function () { function applyUpdate(update) { if (update.available) { - $('' + $('
') .appendTo('.welcome-board').effect('highlight'); } diff --git a/admin/scss/_buttons.scss b/admin/scss/_buttons.scss index 64dd2eb8..b547754b 100644 --- a/admin/scss/_buttons.scss +++ b/admin/scss/_buttons.scss @@ -65,6 +65,13 @@ button { color: #FFF; } +.btn-text { + background: transparent; + &:hover, &:active, &.active { + background: #F3F3F0; + } +} + /* 下拉菜单 */ .btn-drop { position: relative; diff --git a/admin/scss/_icons.scss b/admin/scss/_icons.scss index 1d146fe5..a04557ca 100644 --- a/admin/scss/_icons.scss +++ b/admin/scss/_icons.scss @@ -5,19 +5,13 @@ $icons: sprite-map("icons/*.png"); $icons-2x: sprite-map("icons-2x/*.png"); -.icon-sprite-hack { - background: $icons; -} -// .icon-2x-sprite-hack { -// background: $icons-2x; -// } - %i-16 { width: 16px; height: 16px; display: inline-block; vertical-align: text-bottom; - background: url(../img/icons.png) no-repeat; + background: $icons no-repeat; + text-indent: -9999em; &:hover { @include opacity(0.75); } @@ -31,6 +25,10 @@ $icons-2x: sprite-map("icons-2x/*.png"); @extend %i-16; background-position: sprite-position($icons, icon-delete); } +.i-upload { + @extend %i-16; + background-position: sprite-position($icons, icon-upload); +} // 小箭头 .i-caret-up, .i-caret-down, .i-caret-left, .i-caret-right { diff --git a/admin/scss/_mixin.scss b/admin/scss/_mixin.scss deleted file mode 100644 index 52924c9a..00000000 --- a/admin/scss/_mixin.scss +++ /dev/null @@ -1,5 +0,0 @@ -@mixin calc($property, $expression) { - #{$property}: -moz-calc(#{$expression}); - #{$property}: -webkit-calc(#{$expression}); - #{$property}: calc(#{$expression}); -} \ No newline at end of file diff --git a/admin/scss/components/_editor.scss b/admin/scss/components/_editor.scss index d3947337..01f775b4 100644 --- a/admin/scss/components/_editor.scss +++ b/admin/scss/components/_editor.scss @@ -108,7 +108,7 @@ background: #F3F3F0; font-size: .92857em; } - code { color: #B94A48; } + code { color: #C13; } pre { padding: 1em; code { @@ -183,16 +183,26 @@ padding: 10px 20px; border-bottom: 1px solid #F3F3F0; } + + // 全屏附件上传 + #tab-files { + position: absolute; + top: 52px; + right: 20px; + width: 280px; + z-index: 1001; + } + .wmd-edittab, .typecho-post-option, .title, .url-slug, .typecho-page-title, .typecho-head-nav, - .message, - #upload-panel { display: none; } + .message { display: none; } .wmd-hidetab { display: block; } - .wmd-visualhide { + .wmd-visualhide, + #btn-fullscreen-upload { visibility: visible; } } \ No newline at end of file diff --git a/admin/scss/style.scss b/admin/scss/style.scss index a843cca2..71b6d44f 100644 --- a/admin/scss/style.scss +++ b/admin/scss/style.scss @@ -10,7 +10,6 @@ */ @import "compass"; -@import "mixin"; /** * Typecho 全局样式 @@ -794,6 +793,8 @@ background: #FFF1A8; list-style: none; border: 1px solid #D9D9D6; padding: 6px 12px; + max-height: 240px; + overflow: auto; background-color: #FFF; border-radius: 2px; } @@ -878,6 +879,7 @@ background: #FFF1A8; list-style: none; margin: 0 10px; padding: 0; + word-break: break-all; li { padding: 8px 0; border-top: 1px dashed #D9D9D6; @@ -897,6 +899,10 @@ background: #FFF1A8; } } +#btn-fullscreen-upload { + visibility: hidden; +} + /** * 附件管理 diff --git a/admin/write-js.php b/admin/write-js.php index f7586856..5c5c6246 100644 --- a/admin/write-js.php +++ b/admin/write-js.php @@ -256,6 +256,13 @@ $(document).ready(function() { return false; }); + + // 全屏上传按钮控制 + // $('#btn-fullscreen-upload').click(function() { + // $(this).toggleClass('active'); + // $('#tab-files').toggle(); + // return false; + // }); }); diff --git a/admin/write-post.php b/admin/write-post.php index 50e2b4a6..700524aa 100644 --- a/admin/write-post.php +++ b/admin/write-post.php @@ -46,6 +46,7 @@ Typecho_Widget::widget('Widget_Contents_Post_Edit')->to($post);+ diff --git a/var/Widget/Options.php b/var/Widget/Options.php index 9d6e258a..3264840b 100644 --- a/var/Widget/Options.php +++ b/var/Widget/Options.php @@ -319,7 +319,7 @@ class Widget_Options extends Typecho_Widget if (NULL != $this->attachmentTypes) { $attachmentTypes = str_replace( array('@image@', '@media@', '@doc@'), - array('gif,jpg,png,tiff,bmp', 'mp3,wmv,wma,rmvb,rm,avi,flv', + array('gif,jpg,jpeg,png,tiff,bmp', 'mp3,wmv,wma,rmvb,rm,avi,flv', 'txt,doc,docx,xls,xlsx,ppt,pptx,zip,rar,pdf'), $this->attachmentTypes); $attachmentTypesResult = array_unique(array_map('trim', explode(',', $attachmentTypes))); diff --git a/var/Widget/Options/General.php b/var/Widget/Options/General.php index 5d0bced3..13ebef36 100644 --- a/var/Widget/Options/General.php +++ b/var/Widget/Options/General.php @@ -116,7 +116,7 @@ class Widget_Options_General extends Widget_Abstract_Options implements Widget_I } $attachmentTypesOptions = array( - '@image@' => _t('图片文件') . '
(gif jpg png tiff bmp)', + '@image@' => _t('图片文件') . '(gif jpg jpeg png tiff bmp)', '@media@' => _t('多媒体文件') . '(mp3 wmv wma rmvb rm avi flv)', '@doc@' => _t('常用档案文件') . '(txt doc docx xls xlsx ppt pptx zip rar pdf)', '@other@' => _t('其他格式 %s', ' '), diff --git a/var/Widget/Upload.php b/var/Widget/Upload.php index 629dfa8a..fbc06058 100644 --- a/var/Widget/Upload.php +++ b/var/Widget/Upload.php @@ -19,7 +19,7 @@ class Widget_Upload extends Widget_Abstract_Contents implements Widget_Interface_Do { //上传文件目录 - const UPLOAD_PATH = '/usr/uploads'; + const UPLOAD_DIR = '/usr/uploads'; /** * 创建上传路径 @@ -75,8 +75,8 @@ class Widget_Upload extends Widget_Abstract_Contents implements Widget_Interface $options = Typecho_Widget::widget('Widget_Options'); $date = new Typecho_Date($options->gmtTime); - $path = Typecho_Common::url(self::UPLOAD_PATH, __TYPECHO_ROOT_DIR__) - . '/' . $date->year . '/' . $date->month; + $path = Typecho_Common::url(defined('__TYPECHO_UPLOAD_DIR__') ? __TYPECHO_UPLOAD_DIR__ : self::UPLOAD_DIR, + __TYPECHO_ROOT_DIR__) . '/' . $date->year . '/' . $date->month; //创建上传目录 if (!is_dir($path)) { @@ -112,7 +112,8 @@ class Widget_Upload extends Widget_Abstract_Contents implements Widget_Interface //返回相对存储路径 return array( 'name' => $file['name'], - 'path' => self::UPLOAD_PATH . '/' . $date->year . '/' . $date->month . '/' . $fileName, + 'path' => (defined('__TYPECHO_UPLOAD_DIR__') ? __TYPECHO_UPLOAD_DIR__ : self::UPLOAD_DIR) + . '/' . $date->year . '/' . $date->month . '/' . $fileName, 'size' => $file['size'], 'type' => $ext, 'mime' => Typecho_Common::mimeContentType($path)