User talk:MarkS/XEB/dev.js: Difference between revisions

Content deleted Content added
MarkS (talk | contribs)
m Do some things on the to do list
MalnadachBot (talk | contribs)
m Fixed Lint errors in signatures. (Task 2)
 
(25 intermediate revisions by 6 users not shown)
Line 5:
 
* Select images from either [[User:Olliminatore]] version (currently being used on the dev version)or the orginal XEB images. The buttons (and the original XEB images) are:
** <s>E - [[Image:Button_array.png]] (commons/0/04/Button_array.png)</s>My mistake the buttons are the same
** <s>H - [[Image:Button_hide_comment.png]] (en/3/34/Button_hide_comment.png)</s>Stick with Olliminatore version. Original XEB is closer to removing comments rather than adding
** <s>F - [[Image:Button_font_color.png]] (en/1/1e/Button_font_color.png)</s>Replace with original version. New version better represents that are choosing the colour for text,
** <s>O - [[Image:Button_codeButton code1.png]] (en/2/23/Button_code.png)</s> - This version doesn't really represent what the button does. Use Olliminatore version - meaning is clearer.
** <s>T - [[Image:Button_template_alt.png]] (commons/3/3b/Button_template_alt.png)</s>The two versions are virtually identical so I'm not going to make a change for the sake of it
** <s>K - [[Image:Button_category_alt.png]] (commons/5/5a/Button_category_alt.png)</s>Olliminatore version is nicer.
** <s>R4 - [[Image:Button_references_alt.png]] (commons/a/a0/Button_references_alt.png)</s>Don't like either so will go ith the current one.
** <s>Subst template button has sp on the image which is presumably German</s>Finally managed to replace this with the original version of the button.
* Put buttons into Commons rather than english Wikipedia (they will need new filenames or English version will be used in preference to commons)
* <s>Put buttons into Commons rather than english Wikipedia</s>
** <s>Possible problem when showing the buttons on XEB's documentation page - by default it will pick up the English wikipedia version rather than commons)</s>Correct buttons are showing - need to monitor in the future.
* <s>Change the default order so similar buttons are together on the toolbar (eg. Underline, strike out, text colour should be together)</s>
* <s>Fix the tabs button. First click: Inserts a tab and then adds a second selected tab (this is okay, it lets further tabs be added). But the second time we end up with three tabs, none of which are selected.</s>Can't find anyway to fix this and code is setup as it should be. Error might be in Wikimedia software which controls the selected text when the buttons are pressed
* Setup category in Commons for XEB buttons
* <s>Check each button is producing the expected text</s>
* <s>Check there is no German text on the speed tip or the inserted text</s>
* <s>Check in IE</s>
* <s>Check in Firefox</s>
* <s>Check in Opera</s>Note: Opera doesn't select the right text when using the buttons. However, this also applies to the Media Wiki toolbar so it isn't a XEB issue.
* Check in Opera
* Update XEB documentation
* Release
* Update image of XEB toolbar to new version
 
--[[User:MarkS|<fontspan colorstyle="color:blue;">Mark</span>]][[User:MarkS|Mark]]</font><fontspan colorstyle="color:#0080A0;">[[User:MarkS|S]]</fontspan>]]<small> ([[User_talk:MarkS|talk]])</small> 19:48, 11 October 2006 (UTC)
 
== Adding_standard_editbuttons_to_XEB_script ==
 
Here is the proposed code (you not need creating the standard buttons new):
 
Replace this lines:
<pre> XEBOrder=XEBOrder.split(",");
for (var b in XEBOrder) {
var bc = BDict[XEBOrder[b]];
addCustomButton(Isrc+bc[0],bc[1],bc[2],bc[3],bc[4])
}</pre>
with:
<pre><nowiki>function initButtons(){
XEBOrder=XEBOrder.split(",");
for (b in BDict) BDict[b][0]=Isrc+BDict[b][0]; // add Isrc
if (typeof myButtons=='object')
for (b in myButtons) BDict[b]=myButtons[b]; // add own user buttons
for (b in mwEditButtons) { // add standard buttons for full XEB order changing
var bc=String(b);
BDict[b]=[];
for (d in mwEditButtons[b]) BDict[bc].push(mwEditButtons[b][d]);
}
for (b in XEBOrder) {
bc = BDict[XEBOrder[b]];
addCustomButton(bc[0],bc[1],bc[2],bc[3],bc[4])
}
}
 
if (is_gecko) addOnloadHook(initButtons);
else hookEvent("load", initButtons);</nowiki></pre>
 
Try it out! Maybe we could also add user definied buttons with <code>var myButtons</code> (which Karl Dickman suggested) The standard buttons can now ordering over the numbers 0-10 (in XEBorder)<span style="white-space:nowrap;"> --[[User:Olliminatore|Olliminatore]] <small>16:52, 1 December 2006 (UTC)</small></span>
 
== rmEditButtons='all' ==
 
I suggest this code: [http://de.wikipedia.org/w/index.php?title=Benutzer:Olliminatore/customToolbar.js&diff=24552182&oldid=24178304]
You not need an additional function or loop, but the paramter must call: <code>rmEditButtons=['all']</code> (the var type must be the same).<span style="white-space:nowrap;"> --[[User:Olliminatore|Olliminatore]] <small>19:41, 1 December 2006 (UTC)</small></span>
 
== function erase? all? ==
 
I think the current function <code>eraseButtons</code> is not working in that way what I (and maybe you?) meant :-P, but (fortuitously) it works, so <u>all</u> buttons get in mwEditButtons (XEB too), and mwCustomEditButtons is <u>empty</u>. Then we don't need mwCustomEditButtonsOld. So this lines are sufficient (does the same, if you really want mwCustomEditButtons is <u>empty</u>, otherwise you must put the var outside... ):
 
for (i in mwCustomEditButtons) mwEditButtons.push(mwCustomEditButtons[i]);
mwCustomEditButtons=[];
 
So we also don't need the <code>function '''addCustomButton'''</code>!?! <tt style="background:#FE3">:p</tt>
If you want (I) open a dev version that can all user edit (as your sub space page).
<span style="white-space:nowrap;"> --[[User:Olliminatore|Olliminatore]] <small>05:50, 5 December 2006 (UTC)</small></span>
 
== Kicking Java Script error at line 219 ==
 
Kicks a javascript error at 219 for IE7 users. Here's a hackfix
 
// table
extendAButton(Isrc+"0/04/Button_array.png",XEBPopupTable);
extendAButton(Isrc+"7/79/Button_reflink.png",XEBPopupRef);
extendAButton(Isrc+"b/b8/Button_Globe.png",XEBPopupGeoLink);
extendAButton(Isrc+"4/49/Button_talk.png",XEBPopupTalk);
extendAButton(Isrc+"1/1c/Button_advanced_image.png",XEBPopupImage);
//extendAButton(Isrc+"6/6a/Button_sup_letter.png",XEBPopupFormattedText);
 
// redirect
for (c=0;c < XEBOrder2.length;c++)
{
if (XEBOrder[c] = 'V') break;
}
if(c == XEBOrder2.length)
{
 
// FIX THIS LATER
// allEditButtons[bu_len+c].onclick=function();
var a='#REDIRECT \[\['+prompt("Which page do you want to redirect to\?")+'\]\]';
document.editform.elements['wpTextbox1'].value=a;
document.editform.elements['wpSummary'].value=a;
document.editform.elements['wpWatchthis'].checked=false;
};
 
== Interface protected edit request ==
 
{{edit interface-protected|answered=yes}}
Can the entire code, or at least line 53 (<code><nowiki>'K': ['b/b4/Button_category03.png', 'Category', "[[Category:", "]]", 'Category name'],</nowiki></code>) be wrapped in <no<nowiki />wiki> tags? Currently, mediawiki is adding the page to [[:Category:", "]], which doesn't exist, because of that line. Thanks, --[[User:DannyS712|DannyS712]] ([[User talk:DannyS712|talk]]) 01:33, 2 March 2019 (UTC)
:[[File:Yes check.svg|20px|link=|alt=]] '''Done'''<!-- Template:EIp --> [[User:Galobtter|Galobtter]] ([[User talk:Galobtter|pingó mió]]) 05:12, 2 March 2019 (UTC)