Commit a2e24d76 authored by Bas Lijnse's avatar Bas Lijnse

Merge branch 'disabled-buttons' into 'master'

Replace itasks-button-disabled class by disabled attribute

See merge request !309
parents 063c7a9f 267d30e0
Pipeline #29254 passed with stage
in 4 minutes and 36 seconds
......@@ -956,16 +956,16 @@ div.itasks-exception {
height: 16px;
}
.itasks-button-disabled {
.itasks-button:disabled {
color: #595959;
background: linear-gradient(white, #bbbbbb);
}
.itasks-button-disabled:hover {
.itasks-button:disabled:hover {
border-color: #888888;
}
.itasks-button-disabled .itasks-button-icon {
.itasks-button:disabled .itasks-button-icon {
opacity: 0.5;
}
......
......@@ -956,16 +956,16 @@ div.itasks-exception {
height: 16px;
}
.itasks-button-disabled {
.itasks-button:disabled {
color: #595959;
background: linear-gradient(white, #bbbbbb);
}
.itasks-button-disabled:hover {
.itasks-button:disabled:hover {
border-color: #888888;
}
.itasks-button-disabled .itasks-button-icon {
.itasks-button:disabled .itasks-button-icon {
opacity: 0.5;
}
......
......@@ -39,13 +39,13 @@
width: 16px;
height: 16px;
}
.#{$prefix}button-disabled {
.#{$prefix}button:disabled {
color: lighten($button-text-color,35%);
background: linear-gradient(lighten($button-base-color,20%), darken($button-base-color,20%));
}
.#{$prefix}button-disabled:hover {
.#{$prefix}button:disabled:hover {
border-color: darken($button-base-color,40%);
}
.#{$prefix}button-disabled .#{$prefix}button-icon {
.#{$prefix}button:disabled .#{$prefix}button-icon {
opacity: 0.5;
}
......@@ -355,7 +355,7 @@ itasks.Button = {
el.appendChild(me.icon);
}
if(!me.attributes.enabled) {
el.classList.add(me.cssPrefix + 'button-disabled');
el.disabled = true;
}
if(me.attributes.text) {
me.label = document.createElement('div');
......@@ -387,11 +387,7 @@ itasks.Button = {
var me = this;
switch(name) {
case 'enabled':
if(value) {
me.domEl.classList.remove(me.cssPrefix + 'button-disabled');
} else {
me.domEl.classList.add(me.cssPrefix + 'button-disabled');
}
me.domEl.disabled = !value;
break;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment