use disabled property for input and fix style

This commit is contained in:
wvengen 2014-01-03 10:59:42 +01:00
parent f1ae2724c6
commit 014a62aa11
3 changed files with 7 additions and 2 deletions

View File

@ -265,6 +265,10 @@ tr.unavailable {
// show package icon after amount of package numbers
input.package {
background: url(package-bg.png) no-repeat right center;
// disabled and readonly definitions though
&[disabled], &[readonly] {
background-color: @inputDisabledBackground;
}
}
i.package {
background: url(package-bg.png) no-repeat left center;
@ -275,6 +279,7 @@ i.package {
.package {
color: #999;
}
.input-nano {
width: 30px;
}

View File

@ -45,7 +45,7 @@ module OrdersHelper
units_expected = (order_article.units_billed or order_article.units_to_order)
form.text_field :units_received, class: 'input-nano package units_received',
data: {'units-expected' => units_expected},
readonly: order_article.result_manually_changed? ? "readonly" : nil,
disabled: order_article.result_manually_changed?,
title: order_article.result_manually_changed? ? t('.locked_to_protect_manual_update') : nil,
autocomplete: 'off'
end

View File

@ -62,7 +62,7 @@
}
function unlock_receive_input_field() {
$('.units_received', $(this).closest('tr')).prop('readonly', false);
$('.units_received', $(this).closest('tr')).prop('disabled', false);
$(this).remove();
}