Commit 792d4ba5 by Tim Krones

Remove :hover effect from disabled buttons.

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