1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-29 04:55:02 +03:00

Обновление markItUp до версии 1.1.12 + fix jquery templates bugs

This commit is contained in:
Mzhelskiy Maxim 2011-08-13 12:03:34 +00:00
parent 637e55d18b
commit 458f3ef400
5 changed files with 12 additions and 12 deletions

View file

@ -1,6 +1,6 @@
// ----------------------------------------------------------------------------
// markItUp! Universal MarkUp Engine, JQuery plugin
// v 1.1.11
// v 1.1.12
// Dual licensed under the MIT and GPL licenses.
// ----------------------------------------------------------------------------
// Copyright (C) 2007-2011 Jay Salvat
@ -250,13 +250,12 @@
string = string || selection;
var lines = selection.split(/\r?\n/), blocks = [];
for (var l=0; l < lines.length; l++) {
line = lines[l];
if ($.trim(line) == '') {
continue;
}
if (line.match(/ +$/)) {
blocks.push(openWith + line.replace(/ $/, '') + closeWith + ' ');
var trailingSpaces;
if (trailingSpaces = line.match(/ *$/)) {
blocks.push(openWith + line.replace(/ *$/g, '') + closeWith + trailingSpaces);
} else {
blocks.push(openWith + line + closeWith);
}

View file

@ -36,7 +36,7 @@ function getMarkitupSettings() {
{name: ls.lang.get('panel_url'), className:'editor-link', key:'L', openWith:'<a href="[!['+ls.lang.get('panel_url_promt')+':!:http://]!]"(!( title="[![Title]!]")!)>', closeWith:'</a>', placeHolder:'Your text to link...' },
{separator:'---------------' },
{name: ls.lang.get('panel_clear_tags'), className:'editor-clean', replaceWith: function(markitup) { return markitup.selection.replace(/<(.*?)>/g, "") } },
{name: ls.lang.get('panel_cut'), className:'editor-cut', openWith:'<cut>'}
{name: ls.lang.get('panel_cut'), className:'editor-cut', replaceWith: function(markitup) { if (markitup.selection) return '<cut name="'+markitup.selection+'">'; else return '<cut>' }}
]
}
}

View file

@ -49,6 +49,7 @@
/* Menu */
#nav .menu { padding-bottom: 30px; float: left; font-size: 15px; margin: 11px 0 0 0; }
#nav .menu li { float: left; color: #51B038; padding: 3px 10px 4px 10px; margin-right: 5px; position: relative; }
#nav .menu li a.new { color: #390; }
#nav .menu li a { text-decoration: none; color: #838383; }
#nav .menu li a:hover { color: #333; }
#nav .menu li.active { position: relative; background: #fff; border-bottom: 1px solid #ddd; }

View file

@ -35,8 +35,8 @@ function getMarkitupSettings() {
{name: ls.lang.get('panel_video'), className:'editor-video', replaceWith:'<video>[!['+ls.lang.get('panel_video_promt')+':!:http://]!]</video>' },
{name: ls.lang.get('panel_url'), className:'editor-link', key:'L', openWith:'<a href="[!['+ls.lang.get('panel_url_promt')+':!:http://]!]"(!( title="[![Title]!]")!)>', closeWith:'</a>', placeHolder:'Your text to link...' },
{separator:'---------------' },
{name: ls.lang.get('panel_clear_tags'), className:'editor-clean', replaceWith: function(markitup) { return markitup.selection.replace(/<(.*?)>/g, "") } },
{name: ls.lang.get('panel_cut'), className:'editor-cut', openWith:'<cut>'}
{name: ls.lang.get('panel_clear_tags'), className:'editor-clean', replaceWith: function(markitup) { return markitup.selection.replace(/<(.*?)>/g, "") } },
{name: ls.lang.get('panel_cut'), className:'editor-cut', replaceWith: function(markitup) { if (markitup.selection) return '<cut name="'+markitup.selection+'">'; else return '<cut>' }}
]
}
}

View file

@ -1,6 +1,6 @@
<ul class="menu">
<li {if $sMenuItemSelect=='index'}class="active"{/if}>
<a href="{cfg name='path.root.web'}/">{$aLang.blog_menu_all}</a> {if $iCountTopicsNew>0}+{$iCountTopicsNew}{/if}
<a href="{cfg name='path.root.web'}/">{$aLang.blog_menu_all}</a> {if $iCountTopicsNew>0}<a href="{router page='new'}" class="new">+{$iCountTopicsNew}</a>{/if}
{if $sMenuItemSelect=='index'}
<ul class="sub-menu">
<li {if $sMenuSubItemSelect=='good'}class="active"{/if}><a href="{cfg name='path.root.web'}/">{$aLang.blog_menu_all_good}</a></li>
@ -11,7 +11,7 @@
</li>
<li {if $sMenuItemSelect=='blog'}class="active"{/if}>
<a href="{router page='blog'}">{$aLang.blog_menu_collective}</a> {if $iCountTopicsCollectiveNew>0}+{$iCountTopicsCollectiveNew}{/if}
<a href="{router page='blog'}">{$aLang.blog_menu_collective}</a> {if $iCountTopicsCollectiveNew>0}<a href="{router page='blog'}new/" class="new">+{$iCountTopicsCollectiveNew}</a>{/if}
{if $sMenuItemSelect=='blog'}
<ul class="sub-menu">
<li {if $sMenuSubItemSelect=='good'}class="active"{/if}><a href="{$sMenuSubBlogUrl}">{$aLang.blog_menu_collective_good}</a></li>
@ -23,7 +23,7 @@
</li>
<li {if $sMenuItemSelect=='log'}class="active"{/if}>
<a href="{router page='personal_blog'}">{$aLang.blog_menu_personal}</a> {if $iCountTopicsPersonalNew>0}+{$iCountTopicsPersonalNew}{/if}
<a href="{router page='personal_blog'}">{$aLang.blog_menu_personal}</a> {if $iCountTopicsPersonalNew>0}<a href="{router page='personal_blog'}new/" class="new">+{$iCountTopicsPersonalNew}</a>{/if}
{if $sMenuItemSelect=='log'}
<ul class="sub-menu">
<li {if $sMenuSubItemSelect=='good'}class="active"{/if}><a href="{router page='personal_blog'}">{$aLang.blog_menu_personal_good}</a></li>