MediaWiki:Editortoolbar.js — различия между версиями
Материал из Энциклопедия фонда «Хайазг»
Oshlikov (обсуждение | вклад) |
Oshlikov (обсуждение | вклад) |
||
Строка 10: | Строка 10: | ||
addOnloadHook(edit_zero_section); | addOnloadHook(edit_zero_section); | ||
+ | |||
+ | var hayazg_hash = { | ||
+ | labelMsg: 'wikieditor-toolbar-section-hayazg', | ||
+ | type: 'booklet', | ||
+ | pages: { | ||
+ | 'specialchars': { | ||
+ | 'labelMsg': 'wikieditor-toolbar-hayazg-specialchars', | ||
+ | 'layout': 'characters', | ||
+ | 'characters': [ | ||
+ | "I", "II", "III", "IV", | ||
+ | { 'label': "\u00ab\u00bb", 'action': { 'type': 'encapsulate', 'options': { 'pre': "\u00ab", 'post': "\u00bb" } } }, | ||
+ | { 'label': "\u2018\u2019", 'action': { 'type': 'encapsulate', 'options': { 'pre': "\u2018", 'post': "\u2019" } } }, | ||
+ | { 'label': "\u201e\u201c", 'action': { 'type': 'encapsulate', 'options': { 'pre': "\u201e", 'post': "\u201c" } } }, | ||
+ | "~", "#", "@", "\u00a7", "$", "\u00a2", "\u00a9", "\u00ae" ,"\u2122", "|", | ||
+ | { | ||
+ | 'label': "[[ссылка|текст]]", | ||
+ | 'action': { | ||
+ | 'type': 'encapsulate', 'options': { 'pre': "[["+"|", 'post': "]]" } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | 'label': "[[Категория:]]", | ||
+ | 'action': { | ||
+ | 'type': 'encapsulate', 'options': { 'pre': "[[Категория:", 'post': "]]" } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | 'label': "[[/доп.ссылка|текст]]", | ||
+ | 'action': { | ||
+ | 'type': 'encapsulate', 'options': { 'pre': "[[/"+"|", 'post': "]]" } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | 'label': "Цитата", | ||
+ | 'action': { | ||
+ | 'type': 'encapsulate', 'options': { 'pre': "{{Цитата|", 'post': "}}" } | ||
+ | } | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | } | ||
+ | }; | ||
Версия 21:38, 1 марта 2013
/*<nowiki>*/
var disable_zero_section = 0;
function edit_zero_section()
{
if(disable_zero_section != 1)
{
jQuery("<span class=\"editsection\">[<a href=\"/" + wgPageName + "?action=edit§ion=0\">править</a>]</span>").prependTo("h1.firstHeading");
}
}
addOnloadHook(edit_zero_section);
var hayazg_hash = {
labelMsg: 'wikieditor-toolbar-section-hayazg',
type: 'booklet',
pages: {
'specialchars': {
'labelMsg': 'wikieditor-toolbar-hayazg-specialchars',
'layout': 'characters',
'characters': [
"I", "II", "III", "IV",
{ 'label': "\u00ab\u00bb", 'action': { 'type': 'encapsulate', 'options': { 'pre': "\u00ab", 'post': "\u00bb" } } },
{ 'label': "\u2018\u2019", 'action': { 'type': 'encapsulate', 'options': { 'pre': "\u2018", 'post': "\u2019" } } },
{ 'label': "\u201e\u201c", 'action': { 'type': 'encapsulate', 'options': { 'pre': "\u201e", 'post': "\u201c" } } },
"~", "#", "@", "\u00a7", "$", "\u00a2", "\u00a9", "\u00ae" ,"\u2122", "|",
{
'label': "[[ссылка|текст]]",
'action': {
'type': 'encapsulate', 'options': { 'pre': "[["+"|", 'post': "]]" }
}
},
{
'label': "[[Категория:]]",
'action': {
'type': 'encapsulate', 'options': { 'pre': "[[Категория:", 'post': "]]" }
}
},
{
'label': "[[/доп.ссылка|текст]]",
'action': {
'type': 'encapsulate', 'options': { 'pre': "[[/"+"|", 'post': "]]" }
}
},
{
'label': "Цитата",
'action': {
'type': 'encapsulate', 'options': { 'pre': "{{Цитата|", 'post': "}}" }
}
}
]
}
}
};
jQuery(document).ready(
function() {
jQuery('<li id="t-commonUpload"><a href="http://commons.hayazg.info/Special:Upload">Загрузить на склад</a></li>').insertAfter("li#t-upload");
jQuery('<input type="submit" value="Загрузить файл" name="wpUpload" title="Начать загрузку [s]" accesskey="s" class="mw-htmlform-submit" />').insertAfter("table#mw-htmlform-source");
});
/*</nowiki>*/