User talk:MarkS/XEB/dev.js

Latest comment: 5 years ago by Galobtter in topic Interface protected edit request

This page is to discuss things related to the actual development of XEB. If you want to request an additional feature or have a question about how XEB works then please visit the XEB talk page.

Things to do: October 2006

edit

Note: This is a list of things to get the current version out. If you have longer term asperations you may wish to start a separate section.

  • 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:
    • E -   (commons/0/04/Button_array.png)My mistake the buttons are the same
    • H -   (en/3/34/Button_hide_comment.png)Stick with Olliminatore version. Original XEB is closer to removing comments rather than adding
    • F -   (en/1/1e/Button_font_color.png)Replace with original version. New version better represents that are choosing the colour for text,
    • O -   (en/2/23/Button_code.png) - This version doesn't really represent what the button does. Use Olliminatore version - meaning is clearer.
    • T -   (commons/3/3b/Button_template_alt.png)The two versions are virtually identical so I'm not going to make a change for the sake of it
    • K -   (commons/5/5a/Button_category_alt.png)Olliminatore version is nicer.
    • R4 -   (commons/a/a0/Button_references_alt.png)Don't like either so will go ith the current one.
    • Subst template button has sp on the image which is presumably GermanFinally managed to replace this with the original version of the button.
  • Put buttons into Commons rather than english Wikipedia
    • Possible problem when showing the buttons on XEB's documentation page - by default it will pick up the English wikipedia version rather than commons)Correct buttons are showing - need to monitor in the future.
  • Change the default order so similar buttons are together on the toolbar (eg. Underline, strike out, text colour should be together)
  • 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.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
  • Check each button is producing the expected text
  • Check there is no German text on the speed tip or the inserted text
  • Check in IE
  • Check in Firefox
  • Check in OperaNote: 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.
  • Update XEB documentation
  • Release
  • Update image of XEB toolbar to new version

--MarkS (talk) 19:48, 11 October 2006 (UTC)Reply

Adding_standard_editbuttons_to_XEB_script

edit

Here is the proposed code (you not need creating the standard buttons new):

Replace this lines:

 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])
 }

with:

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);

Try it out! Maybe we could also add user definied buttons with var myButtons (which Karl Dickman suggested) The standard buttons can now ordering over the numbers 0-10 (in XEBorder) --Olliminatore 16:52, 1 December 2006 (UTC)Reply

rmEditButtons='all'

edit

I suggest this code: [1] You not need an additional function or loop, but the paramter must call: rmEditButtons=['all'] (the var type must be the same). --Olliminatore 19:41, 1 December 2006 (UTC)Reply

function erase? all?

edit

I think the current function eraseButtons is not working in that way what I (and maybe you?) meant :-P, but (fortuitously) it works, so all buttons get in mwEditButtons (XEB too), and mwCustomEditButtons is empty. Then we don't need mwCustomEditButtonsOld. So this lines are sufficient (does the same, if you really want mwCustomEditButtons is empty, otherwise you must put the var outside... ):

 for (i in mwCustomEditButtons) mwEditButtons.push(mwCustomEditButtons[i]);
 mwCustomEditButtons=[];

So we also don't need the function addCustomButton!?! :p If you want (I) open a dev version that can all user edit (as your sub space page). --Olliminatore 05:50, 5 December 2006 (UTC)Reply

Kicking Java Script error at line 219

edit

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

Can the entire code, or at least line 53 ('K': ['b/b4/Button_category03.png', 'Category', "[[Category:", "]]", 'Category name'],) be wrapped in <nowiki> tags? Currently, mediawiki is adding the page to Category:", ", which doesn't exist, because of that line. Thanks, --DannyS712 (talk) 01:33, 2 March 2019 (UTC)Reply

  Done Galobtter (pingó mió) 05:12, 2 March 2019 (UTC)Reply