mirror of
https://github.com/typecho/typecho.git
synced 2025-03-23 19:40:22 +01:00
Merge branch 'master' of https://github.com/typecho/typecho-replica
This commit is contained in:
commit
dfa2e739bb
@ -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();
|
||||
|
@ -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, '<')
|
||||
.replace(/>/g, '>')
|
||||
@ -225,7 +225,7 @@ this.makeHtml = function(text) {
|
||||
return all;
|
||||
});
|
||||
|
||||
if (text.indexOf('<!--more-->')) {
|
||||
if (text.indexOf('<!--more-->') > 0) {
|
||||
var parts = text.split(/\s*<\!\-\-more\-\->\s*/),
|
||||
summary = parts.shift(),
|
||||
details = parts.join('');
|
||||
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5307,7 +5307,7 @@ else
|
||||
commandProto.doMore = function (chunk, postProcessing) {
|
||||
chunk.startTag = "<!--more-->\n\n";
|
||||
chunk.selection = "";
|
||||
chunk.skipLines(2, 1, true);
|
||||
chunk.skipLines(2, 0, true);
|
||||
}
|
||||
|
||||
commandProto.doTab = function (chunk, postProcessing) {
|
||||
|
@ -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;
|
||||
|
@ -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';
|
||||
|
Loading…
x
Reference in New Issue
Block a user