Content deleted Content added
0.9.14b |
No edit summary |
||
Line 440:
// image URLs, preset as wikEdImage[''] = '';
'blank': '5/51/WikEd_blank.png',
'bold': '5/59/WikEd_bold.png',
Line 784:
if (array[key] == null) {
array[key] = preset[key];
}
}
return;
}
//
// WikEdInitImage: initialize images, keep pre-defined values
//
function WikEdInitImage(array, preset) {
for (var key in preset) {
if (array[key] == null) {
// remove MediaWiki path prefixes and add local path
if (wikEdUseLocalImages == true) {
array[key] = wikEdImagePathLocal + preset[key].replace(/^[0-9a-f]+\/[0-9a-f]+\//, '');
}
// add path
else {
array[key] = wikEdImagePath + preset[key];
}
}
}
Line 862 ⟶ 886:
// add image path to image filename
if (wikEdLogo.id == null) {
/*
////////////////// remove Instaview buttons and preview field
Line 1,164 ⟶ 1,177:
wikEdFrameBody = wikEdFrameDocument.body;
// generate button bars
wikEdButtonsFormat = MakeButtonBar(wikEdButtonBar['format']);
wikEdButtonsControl = MakeButtonBar(wikEdButtonBar['control']);
wikEdButtonsFind = MakeButtonBar(wikEdButtonBar['find']);
//
wikEdButtonsWrapper.appendChild(wikEdButtonsFormat);
wikEdButtonsWrapper.appendChild(wikEdButtonsControl);
wikEdButtonsWrapper.appendChild(wikEdButtonsFind);
wikEdButtonsWrapper.appendChild(wikEdButtonsFix);
var br = document.createElement('br');
br.style.clear = 'both';
wikEdButtonsWrapper.appendChild(br);
wikEdCaseSensitive = document.getElementById('wikEdCaseSensitive');
wikEdRegExp = document.getElementById('wikEdRegExp');
Line 1,198 ⟶ 1,204:
// add preview box top bar to submit wrapper
wikEdButtonsPreview = MakeButtonBar(wikEdButtonBar['preview']);
wikEdSubmitWrapper.insertBefore(wikEdButtonsPreview, wikEdSubmitWrapper.firstChild);
// add preview box and its bottom bar to preview wrapper
var div = document.createElement('div');
div.id = 'wikEdPreviewBoxOuter';
div.className = 'wikEdPreviewBoxOuter';
wikEdLocalPrevWrapper.appendChild(div);
wikEdPreviewBox = document.createElement('div');
wikEdPreviewBox.id = 'wikEdPreviewBox';
wikEdPreviewBox.className = 'wikEdPreviewBox';
div.appendChild(wikEdPreviewBox);
wikEdButtonsPreview2 = MakeButtonBar(wikEdButtonBar['preview2']);
wikEdLocalPrevWrapper.appendChild(wikEdButtonsPreview2);
// add jump box to standard preview
Line 1,227 ⟶ 1,225:
if (wikiPreview != null) {
if (wikiPreview.firstChild != null) {
wikEdButtonsJump = MakeButtonBar(wikEdButtonBar['jump']);
wikiPreview.insertBefore(wikEdButtonsJump, wikiPreview.firstChild);
}
}
Line 1,576 ⟶ 1,566:
function MakeButtonBar(bar) {
var div = document.createElement('div');
div.id = bar[0];
div.className = bar[1];
var html = '';
for each (buttonNo in bar[2]) {
switch (buttonNo) {
html += '<br />';
break;
html += '<span class="wikEdFindComboInput" id="wikEdFindComboInput">';
html += '<input class="wikEdCombo" id="wikEdFindText" type="text" value="" onfocus="javascript:this.setSelectionRange(0, this.textLength);">';
Line 1,589 ⟶ 1,583:
html += '</span>';
break;
html += '<span class="wikEdReplaceComboInput" id="wikEdReplaceComboInput">';
html += '<input class="wikEdCombo" id="wikEdReplaceText" type="text" value="" onfocus="this.setSelectionRange(0, this.textLength);">';
Line 1,595 ⟶ 1,589:
html += '</select>';
html += '</span>';
break;
default:
var currButton = wikEdButton[buttonNo];
if ( (currButton[0] != 'wikEdSource') || (wikEdShowSourceButton == true) ) {
html += '<img id="' + currButton[0] + '" class="' + currButton[1] + '" title="' + currButton[2] + '" src="' + currButton[3] + '" width="' + currButton[4] + '" height="' + currButton[5] + '" alt="' + currButton[6] + '" onClick="' + currButton[7] + '">';
}
break;
}
}
div.innerHTML = html;
return(
}
|