Content deleted Content added
Jackmcbarn (talk | contribs) fix collapse logic to work no matter which one loads first |
Jackmcbarn (talk | contribs) make the page box have autocomplete like the real thing does |
||
(One intermediate revision by the same user not shown) | |||
Line 13:
if($('#wpTemplateSandboxPage').attr('type') == 'hidden') {
mw.loader.using('jquery.makeCollapsible', function() {
$('#templatesandbox-editform').makeCollapsible({collapsed:
});
$('#templatesandbox-editform').prepend('<legend>Preview page with this template</legend>');
$('#wpTemplateSandboxPage').before('<span class="mw-templatesandbox-page" id="wpTemplateSandboxPageLabel"><label for="wpTemplateSandboxPage">Page title:</label></span> ').after('<input id="wpTemplateSandboxPreview" name="wpTemplateSandboxPreview" tabindex="' + (+($('#wpDiff').attr('tabIndex')) + 0.75) + '" value="Show preview" type="submit" />').replaceWith($('#wpTemplateSandboxPage').clone().attr({type: 'text', tabindex: +($('#wpDiff').attr('tabIndex')) + 0.5, size: 60, spellcheck: true, 'data-mw-searchsuggest': '{"wrapAsLink":false}'}).addClass('mw-searchInput'));
}
if($('#wpTemplateSandboxTemplate').attr('type') == 'hidden') {
|