Изменения

MediaWiki:Common.js

234 байта убрано, 20:41, 18 августа 2016
Нет описания правки
( function() {
'use strict';
 
/* Variables for interface text used throughout the script, for ease of translating */
var i18n = {
// Collapsible elements and page loader
hideText: 'скрыть',
showText: 'показать',
// Page loader
loadErrorTitle: 'An error occurred loading the content',
};
/**
var $children = $collapsible.children();
var showText = $collapsible.data( 'expandtext' ) || i18n.showText'показать'; var hideText = $collapsible.data( 'collapsetext' ) || i18n.hideText'скрыть';
// If there is no content area, add it
// Will be changed to the show text while calculating the maximum button size
var $buttonTemplate = $( '<span>' ).addClass( 'mw-editsection-like load-page-button' )
.append( '[', $( '<span>' ).addClass( 'jslink' ).text( i18n.hideText 'скрыть' ), ']' );
var extractList = function( $contentContainer, listClass ) {
// Find max button width, and set its min-width to it
var hideWidth = $button.width();
$buttonLink.text( i18n.showText 'показать' );
var showWidth = $button.width();
$buttonLink.click( function() {
if ( $body.hasClass( 'pageloader-contentloaded' ) ) {
if ( $buttonLink.text() === i18n.showText 'показать' ) {
if ( treeview ) {
$content.insertAfter( $body );
$contentContainer.show();
}
$buttonLink.text( i18n.hideText 'скрыть' );
} else {
if ( treeview ) {
$contentContainer.hide();
}
$buttonLink.text( i18n.showText 'показать' );
}
return;
}
$buttonLink.text( i18n.hideText 'скрыть' );
$body.addClass( 'pageloader-contentloaded' );
gotContent = true;
$spinner.remove();
$spinner = false;
$buttonLink.text( i18n.hideText 'скрыть' );
$button.show();
$body.addClass( 'pageloader-contentloaded' );
}
mw.notify( errorText, { title: i18n.loadErrorTitle'An error occurred loading the content', autoHide: false } );
} );
} );