mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
More <message-dialog> fixes.
This commit is contained in:
@@ -178,14 +178,14 @@ dialog {
|
||||
dialog > h1 {
|
||||
margin: 0;
|
||||
margin-bottom: 1em;
|
||||
text-align: center;
|
||||
font-weight: normal;
|
||||
display: inline-block;
|
||||
}
|
||||
dialog > span:first-child {
|
||||
font-size: 4em;
|
||||
position: absolute;
|
||||
left: 1em;
|
||||
top: 23px;
|
||||
position: relative;
|
||||
margin-right: 0.5em;
|
||||
top: 0.2em;
|
||||
}
|
||||
dialog[data-type=warn] > span:first-child {
|
||||
color: gold;
|
||||
|
||||
@@ -93,8 +93,6 @@ var messageDialogProto = Object.create(HTMLDialogElement.prototype, {
|
||||
/* A type of 'error' or 'info' produces an 'OK'-only dialog box. */
|
||||
value: function(type, title, text, onClose) {
|
||||
|
||||
this.setAttribute('data-type', type);
|
||||
|
||||
this.querySelector('h1').textContent = title;
|
||||
this.querySelector('p').textContent = text;
|
||||
|
||||
@@ -103,7 +101,7 @@ var messageDialogProto = Object.create(HTMLDialogElement.prototype, {
|
||||
|
||||
if (type == 'error' || type == 'info') {
|
||||
this.querySelector('.accept').textContent = 'OK';
|
||||
hideElement(this.querySelector('.cancel'));
|
||||
this.querySelector('.cancel').style.display = 'hidden';
|
||||
}
|
||||
|
||||
HTMLDialogElement.prototype.showModal.call(this);
|
||||
|
||||
Reference in New Issue
Block a user