Page MenuHomePhabricator

Wikieditor: In a toolbar button, display the label instead of the icon create an error
Open, Needs TriagePublic

Description

Author: nikus0pokus

Description:
I found that if I set a wrong or an empty value in the icon field of a toolbar button in the file « jquery.wikiEditor.toolbar.config.js » it displays the label instead of the icon.

'tt': {

'label': 'tt',
'type': 'button',
'icon': 'noicon.jpg',
'action': {
    'type': 'encapsulate',
    'options': {
        'pre': "<tt>",
        'post': "</tt>"
    }
}

},

It is very useful because the text is well render comparing to text inside png icons. Svg icons have better rendering but it is easier to use the label than to create svg icons.
But if I use wrong or an empty value in the icon field, I have the following error:

[error] open() "/srv/http/mywiki/extensions/WikiEditor/modules/images/toolbar/noicon.jpg" failed (2: No such file or directory)

So, I would like to know how to display the label in a toolbar button without having the previous error.


Version: REL1_22-branch
Severity: enhancement

Details

Reference
bz65409

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:17 AM
bzimport added a project: WikiEditor.
bzimport set Reference to bz65409.
bzimport added a subscriber: Unknown Object (MLST).

The issue of undefined icons was fixed with T172500.