Commit 792d4ba5 by Tim Krones

Remove :hover effect from disabled buttons.

parent dcf0840b
......@@ -127,16 +127,13 @@
color: #ff0000;
}
.vectordraw_block .menu .vector-properties .disabled {
.vectordraw_block .menu .vector-properties button:disabled {
pointer-events: none;
border: 1px solid #707070;
background-color: #ececec;
color: #868686;
}
.vectordraw_block .menu .vector-properties .disabled:hover {
background: none;
}
.vectordraw_block .action button {
height: 40px;
margin-right: 10px;
......
......@@ -34,16 +34,13 @@
float: right;
}
.vectordraw_edit_block .menu .controls .disabled {
.vectordraw_edit_block .menu .controls button:disabled {
pointer-events: none;
border: 1px solid #707070;
background-color: #ececec;
color: #868686;
}
.vectordraw_edit_block .menu .controls .disabled:hover {
background: none;
}
.vectordraw_edit_block .menu .vector-properties .vector-prop-list .row .vector-prop-name,
.vectordraw_edit_block .menu .vector-properties .vector-prop-list .row .vector-prop-tail,
.vectordraw_edit_block .menu .vector-properties .vector-prop-list .row .vector-prop-angle {
......
......@@ -370,7 +370,7 @@ function VectorDrawXBlock(runtime, element, init_args) {
// Enable input fields
$('.vector-properties input').prop('disabled', false);
// Enable buttons
$('.vector-properties button').removeClass('disabled').prop('disabled', false);
$('.vector-properties button').prop('disabled', false);
// Hide error message
$('.vector-prop-update .update-error', element).hide();
};
......@@ -381,7 +381,7 @@ function VectorDrawXBlock(runtime, element, init_args) {
// Reset input fields to default values and disable them
$('.menu .vector-prop-list input', element).prop('disabled', true).val('');
// Disable "Update" button
$('.vector-properties button').addClass('disabled').prop('disabled', true);
$('.vector-properties button').prop('disabled', true);
};
VectorDraw.prototype.isVectorTailDraggable = function(vector) {
......
......@@ -280,7 +280,7 @@ function VectorDrawXBlockEdit(runtime, element, init_args) {
this.board.update();
}
// Hide or disable buttons for operations that are specific to defining initial state
$(evt.currentTarget).addClass('disabled').prop('disabled', true);
$(evt.currentTarget).prop('disabled', true);
$('.add-vector', element).css('visibility', 'hidden');
$('.vector-remove button').hide();
// Reset vector properties to ensure a clean slate
......@@ -298,7 +298,7 @@ function VectorDrawXBlockEdit(runtime, element, init_args) {
$('.vector-prop-' + propName + ' input', element).prop('disabled', true).val('');
});
// Disable buttons
$('.vector-properties button').addClass('disabled').prop('disabled', true);
$('.vector-properties button').prop('disabled', true);
};
VectorDraw.prototype.getMouseCoords = function(evt) {
......@@ -372,7 +372,7 @@ function VectorDrawXBlockEdit(runtime, element, init_args) {
// Enable input fields
$('.vector-properties input').prop('disabled', false);
// Enable buttons
$('.vector-properties button').removeClass('disabled').prop('disabled', false);
$('.vector-properties button').prop('disabled', false);
};
VectorDraw.prototype.updateChecks = function(vector) {
......
......@@ -99,7 +99,7 @@
</div>
<div class="row">
<div class="vector-prop vector-prop-update">
<button class="update disabled" disabled="disabled">
<button class="update" disabled="disabled">
<span class="update-label" aria-hidden="true">{% trans "Update" %}</span>
<span class="sr">{% trans "Update properties of selected element" %}</span>
</button>
......
......@@ -200,7 +200,7 @@
</div>
<div class="row">
<div class="vector-prop vector-prop-update">
<button class="update disabled" disabled="disabled">
<button class="update" disabled="disabled">
<span class="update-label" aria-hidden="true">{% trans "Update" %}</span>
<span class="sr">{% trans "Update properties of selected element" %}</span>
</button>
......@@ -210,7 +210,7 @@
<span class="update-error">{% trans "Invalid input." %}</span>
</div>
<div class="vector-prop vector-remove">
<button class="remove disabled" disabled="disabled">
<button class="remove" disabled="disabled">
<span class="remove-label" aria-hidden="true">{% trans "Remove" %}</span>
<span class="sr">{% trans "Remove selected element" %}</span>
</button>
......
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