Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NDEV-48 Once a result is set, the checkbox is automatically checked, but action buttons do not appear #202

Merged
merged 1 commit into from
Jul 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions bika/lims/browser/js/bika.lims.bikalisting.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,22 +323,27 @@ function BikaListingTableView() {
event.preventDefault()
}
// check the item's checkbox
var form_id = $(this).parents("form").attr("id")
var uid = $(this).attr("uid")
if (!($("#" + form_id + "_cb_" + uid).prop("checked"))) {
$("#" + form_id + "_cb_" + uid).prop("checked", true)
var uid = $(this).attr("uid");
var tr = $(this).parents('tr#folder-contents-item-'+uid);
var checkbox = tr.find('input[id$="_cb_' + uid +'"]');
if ($(checkbox).length == 1) {
var blst = $(checkbox).parents("table.bika-listing-table");
$(checkbox).prop('checked', true);
render_transition_buttons(blst);
}
})
}

function listing_string_select_changed() {
// always select checkbox when selectable listing item is changed
$(".listing_select_entry").live("change", function () {
form_id = $(this).parents("form").attr("id")
uid = $(this).attr("uid")
// check the item's checkbox
if (!($("#" + form_id + "_cb_" + uid).prop("checked"))) {
$("#" + form_id + "_cb_" + uid).prop("checked", true)
var uid = $(this).attr("uid");
var tr = $(this).parents('tr#folder-contents-item-'+uid);
var checkbox = tr.find('input[id$="_cb_' + uid +'"]');
if ($(checkbox).length == 1) {
var blst = $(checkbox).parents("table.bika-listing-table");
$(checkbox).prop("checked", true);
render_transition_buttons(blst);
}
})
}
Expand Down