מדיה ויקי:Gadget-TemplateParamWizard.js: הבדלים בין גרסאות בדף
ניסוי |
מ 148 גרסאות של הדף wikipedia:he:מדיה_ויקי:Gadget-TemplateParamWizard.js יובאו |
||
| (7 גרסאות ביניים של 2 משתמשים אינן מוצגות) | |||
| שורה 118: | שורה 118: | ||
function onemore(name) { | function onemore(name) { | ||
var param = params[name]; | var param = params[name]; | ||
if (param.deprecated) | |||
return; // ignore deprecated parameters - pretend they are not in TD. | |||
templateParams[name] = { | templateParams[name] = { | ||
desc: param.description || '', | desc: param.description || '', | ||
| שורה 396: | שורה 398: | ||
} | } | ||
break; | break; | ||
case 'ru': | |||
switch (key) { | |||
case 'explain': return 'поля с красной рамкой обязательны, остальные - по желанию'; | |||
case 'wizard dialog title': return 'Настройте параметры для шаблона: ' + template; | |||
case 'ok': return 'OK'; | |||
case 'cancel': return 'Отмена'; | |||
case 'params subpage': return 'Параметры'; | |||
case 'preview': return 'Просмотр'; | |||
case 'options select': return 'Выбрать:'; | |||
case 'multiline': return 'Многострочный вид'; | |||
case 'close': return 'Закрыть'; | |||
case 'required': return 'Необходимое'; | |||
case 'depends': return 'Зависит от'; | |||
case 'defval': return 'По умолчанию'; | |||
case 'choices': return 'Выбор'; | |||
case 'date': return 'Дата'; | |||
case 'extended': return 'Расширенный'; | |||
case 'button hint': return 'Мастер параметров шаблона'; | |||
case 'able templates category name': throw('Необходимо определить название категории для шаблонов с поддержкой мастера'); | |||
case 'template selector title': return 'Пожалуйста, введите имя шаблона'; | |||
case 'notInParamPage': return 'поле "' + param + '" не отображается в списке параметров шаблона'; | |||
case 'editParamPage': return 'Править страницу параметров'; | |||
case 'unknown error': return 'Произошла ошибка: \n' + param; | |||
case 'please select template': return 'Пожалуйста, введите имя шаблона'; | |||
case 'oneliner': return 'Однострочный вид'; | |||
case 'dateFormat': return 'ММ дд, гг'; | |||
case 'extended labels': return 'Показать все параметры'; | |||
} | |||
default: | default: | ||
switch (key) { | switch (key) { | ||
| שורה 449: | שורה 479: | ||
} | } | ||
function templatePage() {return mw.config.get('wgFormattedNamespaces')[10] + ':' + | function templatePage() { | ||
var t = $.trim(template) | |||
return t.match(':') ? t : mw.config.get('wgFormattedNamespaces')[10] + ':' + t; | |||
} | |||
function updateRawPreview(){ | function updateRawPreview(){ | ||
| שורה 577: | שורה 610: | ||
function tipsyContent() { | function tipsyContent() { | ||
var | var | ||
paramName = $(this). | paramName = $(this).data('paramname'), | ||
def = templateParams[paramName], | def = templateParams[paramName], | ||
desc = def && def.desc || ''; | desc = def && def.desc || ''; | ||
| שורה 615: | שורה 648: | ||
$('<td>', {width: 120}) | $('<td>', {width: 120}) | ||
.css({fontWeight: 'bold', color: nameColor}) | .css({fontWeight: 'bold', color: nameColor}) | ||
.data({ paramname: paramName }) | |||
.text(templateParams[paramName].label || paramName) | .text(templateParams[paramName].label || paramName) | ||
.tipsy({html: true, trigger: 'manual', title: tipsyContent}) | .tipsy({html: true, trigger: 'manual', title: tipsyContent}) | ||
| שורה 650: | שורה 684: | ||
function buildDialog(data) { | function buildDialog(data) { | ||
var title = $('<span>').html(i18n('wizard dialog title', template)); | |||
$('.tpw_disposable').remove(); | $('.tpw_disposable').remove(); | ||
if (rawTemplate) | if (rawTemplate) | ||
buildParamsRaw(data); | buildParamsRaw(data); | ||
else if (tdTemplate) | else if (tdTemplate) { | ||
buildParamsTd(data); | buildParamsTd(data); | ||
if (data.description) title.find('a').attr({ title: data.description }); | |||
} | |||
paramsFromSelection(); | paramsFromSelection(); | ||
| שורה 660: | שורה 698: | ||
var dialog = $('<div>', {'class': 'tpw_disposable'}) | var dialog = $('<div>', {'class': 'tpw_disposable'}) | ||
.dialog({height: 'auto', | .dialog({height: 'auto', | ||
title: | title: title.html(), | ||
width: 'auto', | width: 'auto', | ||
overflow: 'auto', | overflow: 'auto', | ||