25575 在预定车票页面点击添加乘车人,取消勾选的乘车人仍然在乘车人列表中,修正成人与儿童票5张的逻辑

This commit is contained in:
luolei 2014-09-03 21:36:55 +08:00
parent 2114622aa2
commit 7096071de5
3 changed files with 3 additions and 8783 deletions

View File

@ -16,3 +16,4 @@ node_modules/
build/
#忽略服务器hook
update.php
assets/js/debug.js

File diff suppressed because it is too large Load Diff

View File

@ -100,7 +100,7 @@ var OrderSubmit = {
Public.hideInnerPage('passenger');
});
$('#passengers [type="checkbox"]').on('change', function() {
if ($('#passengers [type="checkbox"]:checked').length > 5 || $('#passenger_list li').length >= 5) {
if ($(this).prop("checked") && ($('#passengers [type="checkbox"]:checked').length > 5 || $('#passenger_list li').length >= 5)) {
Public.alert('联系人最多只能选择五个');
$(this).prop("checked", false);
return false;