Merge branch 'k-fet' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/arrondi_ukf

This commit is contained in:
Ludovic Stephan 2016-12-04 00:19:38 -02:00
commit a2dc92d799
52 changed files with 1109 additions and 211 deletions

View file

@ -8,7 +8,5 @@ from channels.routing import route, route_class
from kfet import consumers
channel_routing = [
route_class(consumers.KPsul, path=r"^/gestion/ws/k-fet/k-psul/$"),
#route("websocket.connect", ws_kpsul_history_connect),
#route('websocket.receive', ws_message)
route_class(consumers.KPsul, path=r"^ws/k-fet/k-psul/$"),
]

View file

@ -924,7 +924,7 @@ $(document).ready(function() {
}
});
},
onClose: function() { this._lastFocused = articleSelect; }
onClose: function() { this._lastFocused = (articleSelect.val() ? articleNb : articleSelect) ; }
});
}

View file

@ -34,12 +34,12 @@
<tr class="transfer_form" id="{{ form.prefix }}">
<td class="from_acc_data"></td>
<td class="from_acc">
<input type="text" name="from_acc" class="input_from_acc" autocomplete="off" spellcheck="false">
<input type="text" name="from_acc" class="input_from_acc" maxlength="3" autocomplete="off" spellcheck="false">
{{ form.from_acc }}
</td>
<td class="amount">{{ form.amount }}</td>
<td class="to_acc">
<input type="text" name="to_acc" class="input_to_acc" autocomplete="off" spellcheck="false">
<input type="text" name="to_acc" class="input_to_acc" maxlength="3" autocomplete="off" spellcheck="false">
{{ form.to_acc }}
</td>
<td class="to_acc_data"></td>
@ -71,18 +71,21 @@ $(document).ready(function () {
var $next = $form.next('.transfer_form').find('.from_acc input');
}
var $input_id = $input.next('input');
getAccountData(trigramme, function(data) {
$input_id.val(data.id);
$data.text(data.name);
$next.focus();
});
if (isValidTrigramme(trigramme)) {
getAccountData(trigramme, function(data) {
$input_id.val(data.id);
$data.text(data.name);
$next.focus();
});
} else {
$input_id.val('');
$data.text('');
}
}
$('.input_from_acc, .input_to_acc').on('input', function() {
var tri = $(this).val().toUpperCase();
if (isValidTrigramme(tri)) {
updateAccountData(tri, $(this));
}
updateAccountData(tri, $(this));
});
$('#transfers_form').on('submit', function(e) {