MediaWiki:Editortoolbar.js — различия между версиями

Материал из Энциклопедия фонда «Хайазг»
Перейти к: навигация, поиск
Строка 14: Строка 14:
 
   type: 'booklet',
 
   type: 'booklet',
 
   pages: {
 
   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': "]]" }
 
            }
 
          },
 
          {
 
            'label': "|img=no",
 
            'action': {
 
              'type': 'encapsulate', 'options': { 'pre': "|img=no", 'post': "" }
 
            }
 
          },
 
          {
 
            'label': "[[Draft:]]",
 
            'action': {
 
              'type': 'encapsulate', 'options': { 'pre': "[[Draft:", 'post': "]]" }
 
            }
 
          },
 
          {
 
            'label': "Цитата",
 
            'action': {
 
              'type': 'encapsulate', 'options': { 'pre': "<blockquote>", 'post': "</blockquote>" }
 
            }
 
          }
 
        ]
 
    },
 
  
 
     'template': {
 
     'template': {
Строка 199: Строка 145:
 
           }
 
           }
 
       }
 
       }
 +
    },
 +
 +
    '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': "]]" }
 +
            }
 +
          },
 +
          {
 +
            'label': "|img=no",
 +
            'action': {
 +
              'type': 'encapsulate', 'options': { 'pre': "|img=no", 'post': "" }
 +
            }
 +
          },
 +
          {
 +
            'label': "[[Draft:]]",
 +
            'action': {
 +
              'type': 'encapsulate', 'options': { 'pre': "[[Draft:", 'post': "]]" }
 +
            }
 +
          },
 +
          {
 +
            'label': "Цитата",
 +
            'action': {
 +
              'type': 'encapsulate', 'options': { 'pre': "<blockquote>", 'post': "</blockquote>" }
 +
            }
 +
          }
 +
        ]
 
     }
 
     }
 +
 +
  
 
   }
 
   }

Версия 18:17, 25 марта 2011

var disable_zero_section = 0;
function edit_zero_section()
{ 
  if(disable_zero_section != 1)
  {
   jQuery("<span class=\"editsection\">[<a href=\"/" + wgPageName + "?action=edit&section=0\">править</a>]</span>").prependTo("h1.firstHeading");
  }
}
addOnloadHook(edit_zero_section);


var hayazg_hash = {
  labelMsg: 'wikieditor-toolbar-section-hayazg',
  type: 'booklet',
  pages: {

    'template': {
      'labelMsg': 'wikieditor-toolbar-hayazg-template',
      'layout': 'tools',
      'tools': {
          'persona': {
            label: 'Персона',
            type: 'normal_button',
            action: {
              type: 'encapsulate',
              options: {
                peri: "{{Персона\n\
| name-ru-main  =\n\
| name-ru-01    =\n\
| name-ru-02    =\n\
| name-ru-03    =\n\
| name-lat =\n\
| name-en       =\n\
| name-am       =\n\
| name-fr       =\n\
| состояние текста     = 1\n\
| состояние поиска     = 1\n\
| состояние тэгов      = 1\n\
| состояние ссылок     = 1\n\
| флаг чистовик        =\n\
| автокартинки         =\n\
| портрет              =\n\
| дата рождения        =\n\
| место рождения       =\n\
| дата смерти          =\n\
| место смерти         =\n\
| краткая информация =\n\
| тэг01 =\n\
| тэг02 =\n\
| тэг03 =\n\
| тэг04 =\n\
| тэг05 =\n\
}}\n\
\n\
=Биография=\n\
\n\
==Сочинения==\n\
\n\
==Достижения==\n\
\n\
==Изображения==\n\
\n\
=Библиография=\n",
                ownline: true
              }
            }
          },
          'organization': {
            labelMsg: 'wikieditor-toolbar-hayazg-template-organization',
            type: 'normal_button',
            action: {
              type: 'encapsulate',
              options: {
                pre: "{{",
                periMsg: 'wikieditor-toolbar-hayazg-template-organization-template',
                post: "}}",
                ownline: true
              }
            }
          },
          'study': {
            labelMsg: 'wikieditor-toolbar-hayazg-template-study',
            type: 'normal_button',
            action: {
              type: 'encapsulate',
              options: {
                pre: "{{",
                periMsg: 'wikieditor-toolbar-hayazg-template-study-template',
                post: "}}",
                ownline: true
              }
            }
          },
          'public': {
            labelMsg: 'wikieditor-toolbar-hayazg-template-public',
            type: 'normal_button',
            action: {
              type: 'encapsulate',
              options: {
                pre: "{{",
                periMsg: 'wikieditor-toolbar-hayazg-template-public-template',
                post: "}}",
                ownline: true
              }
            }
          },
          'library': {
            labelMsg: 'wikieditor-toolbar-hayazg-template-library',
            type: 'normal_button',
            action: {
              type: 'encapsulate',
              options: {
                pre: "{{",
                periMsg: 'wikieditor-toolbar-hayazg-template-library-template',
                post: "}}",
                ownline: true
              }
            }
          },
          'media': {
            labelMsg: 'wikieditor-toolbar-hayazg-template-media',
            type: 'normal_button',
            action: {
              type: 'encapsulate',
              options: {
                pre: "{{",
                periMsg: 'wikieditor-toolbar-hayazg-template-media-template',
                post: "}}",
                ownline: true
              }
            }
          },
          'church': {
            labelMsg: 'wikieditor-toolbar-hayazg-template-church',
            type: 'normal_button',
            action: {
              type: 'encapsulate',
              options: {
                pre: "{{",
                periMsg: 'wikieditor-toolbar-hayazg-template-church-template',
                post: "}}",
                ownline: true
              }
            }
          }
      }
    },

    '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': "]]" }
            }
          },
          {
            'label': "|img=no",
            'action': {
              'type': 'encapsulate', 'options': { 'pre': "|img=no", 'post': "" }
            }
          },
          {
            'label': "[[Draft:]]",
            'action': {
              'type': 'encapsulate', 'options': { 'pre': "[[Draft:", 'post': "]]" }
            }
          },
          {
            'label': "Цитата",
            'action': {
              'type': 'encapsulate', 'options': { 'pre': "<blockquote>", 'post': "</blockquote>" }
            }
          }
        ]
    }



  }
}




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");
});