User:Chaotic Enby/Unblock wizard.js: Difference between revisions
From Test Wiki
Content deleted Content added
Chaotic Enby (talk | contribs) No edit summary |
Chaotic Enby (talk | contribs) test |
||
| Line 78: | Line 78: | ||
var infoLevels = { |
var infoLevels = { |
||
"process": " |
"process": ["6/61", "Eo_circle_green_checkmark.svg"], |
||
"notice": " |
"notice": ["9/93", "Eo_circle_amber_white_info.svg"], |
||
"success": " |
"success": ["3/3b", "Eo_circle_green_checkmark.svg"], |
||
"warning": " |
"warning": ["9/93", "Eo_circle_amber_white_info.svg"], |
||
"error": " |
"error": ["e/ee", "Eo_circle_red_no-entry.svg"], |
||
}; |
}; |
||
| Line 343: | Line 343: | ||
} |
} |
||
return []; |
return []; |
||
} |
|||
function imglink(img) { |
|||
return '<img src="https://upload.wikimedia.org/wikipedia/commons/' + img[0] + '/' + img[1] + '" decoding="async" width="30" height="30" class="mw-file-element" srcset="' + img[0] + '/' + img[1] + ' 1.5x">'; |
|||
} |
} |
||
| Line 358: | Line 362: | ||
ui.fieldset.addItems([ |
ui.fieldset.addItems([ |
||
ui.mainStatusLayout = new OO.ui.FieldLayout(ui.mainStatusArea = new OO.ui.LabelWidget({ |
ui.mainStatusLayout = new OO.ui.FieldLayout(ui.mainStatusArea = new OO.ui.LabelWidget({ |
||
label: $('<div>').append( |
label: $('<div>').append(imglink(infoLevels[type]) + linkify(message)) |
||
}), { |
}), { |
||
align: 'top' |
align: 'top' |
||
| Line 368: | Line 372: | ||
debug("ee"); |
debug("ee"); |
||
debug($('<div>').append(linkify(message))); |
debug($('<div>').append(linkify(message))); |
||
ui.mainStatusArea.setLabel($('<div>').append( |
ui.mainStatusArea.setLabel($('<div>').append(imglink(infoLevels[type]) + linkify(message))); |
||
debug(ui.mainStatusArea); |
debug(ui.mainStatusArea); |
||
debug(ui.mainStatusLayout); |
debug(ui.mainStatusLayout); |
||