From ce38fcd55bb2f419e27a698c3ba31421b4344601 Mon Sep 17 00:00:00 2001 From: joyqi Date: Mon, 4 Nov 2013 09:17:15 +0800 Subject: [PATCH 1/5] fix content --- var/Widget/Contents/Post/Edit.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/Widget/Contents/Post/Edit.php b/var/Widget/Contents/Post/Edit.php index 116d13c7..ec7c96eb 100644 --- a/var/Widget/Contents/Post/Edit.php +++ b/var/Widget/Contents/Post/Edit.php @@ -187,6 +187,7 @@ class Widget_Contents_Post_Edit extends Widget_Abstract_Contents implements Widg $contents['status'] = 'publish'; } else { $contents['status'] = $contents['visibility']; + $contents['password'] = ''; } } else { $contents['status'] = 'waiting'; @@ -259,6 +260,7 @@ class Widget_Contents_Post_Edit extends Widget_Abstract_Contents implements Widg $contents['status'] = 'publish'; } else { $contents['status'] = $contents['visibility']; + $contents['password'] = ''; } } else { $contents['status'] = 'waiting'; From 7618468df214233343a9c70017ef6402046536f8 Mon Sep 17 00:00:00 2001 From: joyqi Date: Mon, 4 Nov 2013 10:14:03 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=85=A8=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/editor-js.php | 11 +++++++++-- admin/js/markdown.js | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/admin/editor-js.php b/admin/editor-js.php index 495ef0ae..1a356645 100644 --- a/admin/editor-js.php +++ b/admin/editor-js.php @@ -131,17 +131,24 @@ $(document).ready(function () { editor.hooks.chain('enterFakeFullScreen', function () { th = textarea.height(); $(document.body).addClass('fullscreen'); - textarea.css('height', $(window).height() - toolbar.outerHeight()); + var h = $(window).height() - toolbar.outerHeight(); + + textarea.css('height', h); + preview.css('height', h); }); editor.hooks.chain('enterFullScreen', function () { $(document.body).addClass('fullscreen'); - textarea.css('height', window.screen.height - toolbar.outerHeight()); + + var h = window.screen.height - toolbar.outerHeight(); + textarea.css('height', h); + preview.css('height', h); }); editor.hooks.chain('exitFullScreen', function () { $(document.body).removeClass('fullscreen'); textarea.height(th); + preview.css('height', 'auto'); }); editor.run(); diff --git a/admin/js/markdown.js b/admin/js/markdown.js index 8d669c5e..b091ad7c 100644 --- a/admin/js/markdown.js +++ b/admin/js/markdown.js @@ -225,7 +225,7 @@ this.makeHtml = function(text) { return all; }); - if (text.indexOf('')) { + if (text.indexOf('') > 0) { var parts = text.split(/\s*<\!\-\-more\-\->\s*/), summary = parts.shift(), details = parts.join(''); @@ -5307,7 +5307,7 @@ else commandProto.doMore = function (chunk, postProcessing) { chunk.startTag = "\n\n"; chunk.selection = ""; - chunk.skipLines(2, 1, true); + chunk.skipLines(2, 0, true); } commandProto.doTab = function (chunk, postProcessing) { From 4d353e0725a301f88354c6fb53bb775200cbef04 Mon Sep 17 00:00:00 2001 From: joyqi Date: Mon, 4 Nov 2013 10:29:08 +0800 Subject: [PATCH 3/5] fixed #52 --- admin/js/typecho.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/js/typecho.js b/admin/js/typecho.js index 8f848e6f..5ae22962 100644 --- a/admin/js/typecho.js +++ b/admin/js/typecho.js @@ -232,8 +232,9 @@ return true; } + file = file.toLowerCase(); for (var i = 0; i < s.types.length; i ++) { - var ext = s.types[i]; + var ext = s.types[i].toLowerCase(); if (file.length <= ext.length) { continue; From 1eba4e580f1da2fd048af7e952f0956a3a24b881 Mon Sep 17 00:00:00 2001 From: joyqi Date: Mon, 4 Nov 2013 10:37:17 +0800 Subject: [PATCH 4/5] fixed #54 --- admin/js/markdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/js/markdown.js b/admin/js/markdown.js index b091ad7c..a154f1e9 100644 --- a/admin/js/markdown.js +++ b/admin/js/markdown.js @@ -216,7 +216,7 @@ this.makeHtml = function(text) { text = _ExecuteExtension(x, text); }); - text = text.replace(/<\/?(\!doctype|html|head|body|link|title|input|select|button|textarea|style|script|noscript|iframe|object|embed)[^>]*>/ig, function (all) { + text = text.replace(/<\/?(\!doctype|html|head|body|link|title|input|select|button|textarea|style|noscript)[^>]*>/ig, function (all) { return all.replace(/&/g, '&') .replace(//g, '>') From b94c2d2a0aaeeafd2bdb641b36b6198ec277e00b Mon Sep 17 00:00:00 2001 From: joyqi Date: Mon, 4 Nov 2013 10:42:52 +0800 Subject: [PATCH 5/5] fixed #50 --- admin/js/markdown.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/js/markdown.js b/admin/js/markdown.js index a154f1e9..9e57430f 100644 --- a/admin/js/markdown.js +++ b/admin/js/markdown.js @@ -4858,10 +4858,10 @@ else if (!chunk.selection) { if (isImage) { - chunk.selection = that.getString("imagename") || that.getString("imagedescription"); + chunk.selection = that.getString("imagename").replace('_', '\\_') || that.getString("imagedescription"); } else { - chunk.selection = that.getString("linkname") || that.getString("linkdescription"); + chunk.selection = that.getString("linkname").replace('_', '\\_') || that.getString("linkdescription"); } } }