<script type="text/javascript">//<![CDATA[
$(document).ready(function(){
$(".none").click(function(){
- if($(this).attr("checked")){
+ if($(this).prop("checked")){
var rowid = $(this).attr("id");
newid = Number(rowid.replace("none",""))
- $("#sms"+newid).removeAttr("checked");
- $("#email"+newid).removeAttr("checked");
- $("#phone"+newid).removeAttr("checked");
- $("#digest"+newid).removeAttr("checked");
- $("#rss"+newid).removeAttr("checked");
+ $("#sms"+newid).prop("checked", false);
+ $("#email"+newid).prop("checked", false);
+ $("#phone"+newid).prop("checked", false);
+ $("#digest"+newid).prop("checked", false);
+ $("#rss"+newid).prop("checked", false);
}
});
$("#info_digests").tooltip();
<input type="checkbox"
id="sms[% messaging_preference.message_attribute_id %]"
name="[% messaging_preference.message_attribute_id %]"
- value="sms" checked="checked" onclick = "$('#none'+'[% messaging_preference.message_attribute_id %]').removeAttr('checked');" />
+ value="sms" checked="checked" onclick = "$('#none'+'[% messaging_preference.message_attribute_id %]').prop('checked', false);" />
[% ELSE %]
<input type="checkbox"
id="sms[% messaging_preference.message_attribute_id %]"
name="[% messaging_preference.message_attribute_id %]"
- value="sms" onclick = "$('#none'+'[% messaging_preference.message_attribute_id %]').removeAttr('checked');" />
+ value="sms" onclick = "$('#none'+'[% messaging_preference.message_attribute_id %]').prop('checked', false);" />
[% END %]
[% END %]
</td>[% END %]
<input type="checkbox"
id="phone[% messaging_preference.message_attribute_id %]"
name="[% messaging_preference.message_attribute_id %]"
- value="phone" checked="checked" onclick = "$('#none'+'[% messaging_preference.message_attribute_id %]').removeAttr('checked');" />
+ value="phone" checked="checked" onclick = "$('#none'+'[% messaging_preference.message_attribute_id %]').prop('checked', false);" />
[% ELSE %]
<input type="checkbox"
id="phone[% messaging_preference.message_attribute_id %]"
name="[% messaging_preference.message_attribute_id %]"
- value="phone" onclick = "$('#none'+'[% messaging_preference.message_attribute_id %]').removeAttr('checked');" />
+ value="phone" onclick = "$('#none'+'[% messaging_preference.message_attribute_id %]').prop('checked', false);" />
[% END %]
[% END %]
</td>[% END %]
<input type="checkbox"
id="email[% messaging_preference.message_attribute_id %]"
name="[% messaging_preference.message_attribute_id %]"
- value="email" checked="checked" onclick = "$('#none'+'[% messaging_preference.message_attribute_id %]').removeAttr('checked');" />
+ value="email" checked="checked" onclick = "$('#none'+'[% messaging_preference.message_attribute_id %]').prop('checked', false);" />
[% ELSE %]
<input type="checkbox"
id="email[% messaging_preference.message_attribute_id %]"
name="[% messaging_preference.message_attribute_id %]"
- value="email" onclick = "$('#none'+'[% messaging_preference.message_attribute_id %]').removeAttr('checked');" />
+ value="email" onclick = "$('#none'+'[% messaging_preference.message_attribute_id %]').prop('checked', false);" />
[% END %]
[% END %]
</td>
<input type="checkbox"
id="digest[% messaging_preference.message_attribute_id %]"
value="[% messaging_preference.message_attribute_id %]"
- name="digest" checked="checked" onclick = "$('#none'+'[% messaging_preference.message_attribute_id %]').removeAttr('checked');" />
+ name="digest" checked="checked" onclick = "$('#none'+'[% messaging_preference.message_attribute_id %]').prop('checked', false);" />
[% ELSE %]
<input type="checkbox"
id="digest[% messaging_preference.message_attribute_id %]"
value="[% messaging_preference.message_attribute_id %]"
- name="digest" onclick = "$('#none'+'[% messaging_preference.message_attribute_id %]').removeAttr('checked');" />
+ name="digest" onclick = "$('#none'+'[% messaging_preference.message_attribute_id %]').prop('checked', false);" />
[% END %]
[% END %]
</td>
<input type="checkbox"
id="rss[% messaging_preference.message_attribute_id %]"
name="[% messaging_preference.message_attribute_id %]"
- value="rss" [% messaging_preference.transport_rss %] onclick = "$('#none'+'[% messaging_preference.message_attribute_id %]').removeAttr('checked');" />
+ value="rss" [% messaging_preference.transport_rss %] onclick = "$('#none'+'[% messaging_preference.message_attribute_id %]').prop('checked', false);" />
[% END %]
</td>
[% ELSE %]
}
function hideColumn(num) {
- $("#hideall,#showall").removeAttr("checked").parent().removeClass("selected");
+ $("#hideall,#showall").prop("checked", false).parent().removeClass("selected");
$("#"+num).parent().removeClass("selected");
var hide = Number(num.replace("col","")) + 2;
// hide header and cells matching the index
}
function showColumn(num){
- $("#hideall").removeAttr("checked").parent().removeClass("selected");
+ $("#hideall").prop("checked", false).parent().removeClass("selected");
$("#"+num).parent().addClass("selected");
// set the index of the table column to hide
show = Number(num.replace("col","")) + 2;
$("#selections").checkCheckboxes();
$("#selections span").addClass("selected");
$("#plan td:nth-child(2),#plan tr th:nth-child(2)").nextAll().show();
- $("#hideall").removeAttr("checked").parent().removeClass("selected");
+ $("#hideall").prop("checked", false).parent().removeClass("selected");
}
function hideAllColumns(){
var allCols = $("#plan th").length;
$("#selections").unCheckCheckboxes();
$("#selections span").removeClass("selected");
$("#plan td:nth-child(2),#plan th:nth-child(2)").nextUntil("th:nth-child("+(allCols-1)+"),td:nth-child("+(allCols-1)+")").hide(); // hide all but the last two columns
- $("#hideall").attr("checked","checked").parent().addClass("selected");
+ $("#hideall").prop("checked", true).parent().addClass("selected");
}
// Handle the select all/none links for checkouts table columns
$("#CheckAllRenewals").on("click",function(){
$("#UncheckAllCheckins").click();
- $(".renew:visible").attr("checked", "checked" );
+ $(".renew:visible").prop("checked", true);
return false;
});
$("#UncheckAllRenewals").on("click",function(){
- $(".renew:visible").removeAttr("checked");
+ $(".renew:visible").prop("checked", false);
return false;
});
$("#CheckAllCheckins").on("click",function(){
$("#UncheckAllRenewals").click();
- $(".checkin:visible").attr("checked", "checked" );
+ $(".checkin:visible").prop("checked", true);
return false;
});
$("#UncheckAllCheckins").on("click",function(){
- $(".checkin:visible").removeAttr("checked");
+ $(".checkin:visible").prop("checked", false);
return false;
});
// Don't allow both return and renew checkboxes to be checked
$(document).on("change", '.renew', function(){
if ( $(this).is(":checked") ) {
- $( "#checkin_" + $(this).val() ).removeAttr("checked");
+ $( "#checkin_" + $(this).val() ).prop("checked", false);
}
});
$(document).on("change", '.checkin', function(){
if ( $(this).is(":checked") ) {
- $( "#renew_" + $(this).val() ).removeAttr("checked");
+ $( "#renew_" + $(this).val() ).prop("checked", false);
}
});
} else {
$( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show();
}
- } ).attr( 'checked', false );
+ } ).prop('checked', false);
}
});
/* Function to enable/disable hidden values checkboxes when Flag is (de)selected */
function enable_cb(tab) {
if ($("#hidden_flagged_" + tab).is(':checked')) {
- $('.inclusive_' + tab).attr('disabled',true).removeAttr('checked');
+ $('.inclusive_' + tab).attr('disabled',true).prop('checked', false);
}
else {
$('.inclusive_' + tab).removeAttr('disabled');
collapsed_checked = true;
} // else if ( hidden_value == '8') { skip }
- $("#hidden_opac_" + tab).attr('checked',opac_checked);
- $("#hidden_intranet_" + tab).attr('checked',intranet_checked);
- $("#hidden_editor_" + tab).attr('checked',editor_checked);
- $("#hidden_collapsed_" + tab).attr('checked',collapsed_checked);
- $("#hidden_flagged_" + tab).attr('checked',flagged_checked);
+ $("#hidden_opac_" + tab).prop('checked',opac_checked);
+ $("#hidden_intranet_" + tab).prop('checked',intranet_checked);
+ $("#hidden_editor_" + tab).prop('checked',editor_checked);
+ $("#hidden_collapsed_" + tab).prop('checked',collapsed_checked);
+ $("#hidden_flagged_" + tab).prop('checked',flagged_checked);
enable_cb(tab);
'code' : subfield
});
} else {
- $field_li.find('input.fieldpick').attr('checked', true);
+ $field_li.find('input.fieldpick').prop('checked', true);
target_record[field] = [{
'id' : $field_li.attr('id'),
'tag' : field,
$field_clone.find('ul').append($subfield_clone);
}
} else {
- $('#' + field.id).find('input.fieldpick').removeAttr('checked');
+ $('#' + field.id).find('input.fieldpick').prop('checked', false);
}
}
}
$('input.fieldpick').click(function() {
var ischecked = this.checked;
if (ischecked) {
- $(this).removeAttr('checked');
+ $(this).prop('checked', false);
if (!field_can_be_added($('#tabs'), $(this).parent())) {
return false;
}
- $(this).attr('checked', 'checked');
+ $(this).prop('checked', true);
}
// (un)check all subfields
$("input.subfieldpick").click(function() {
var ischecked = this.checked;
if (ischecked) {
- $(this).removeAttr('checked');
+ $(this).prop('checked', false);
if (!subfield_can_be_added($('#tabs'), $(this).parent())) {
return false;
}
- $(this).attr('checked', 'checked');
+ $(this).prop('checked', true);
}
rebuild_target($('#tabs'), $('#resultul'));
});
valCookie = $.cookie("showColumns");
if(valCookie){
valCookie = valCookie.split("/");
- $("#showall").removeAttr("checked").parent().removeClass("selected");
+ $("#showall").prop("checked", false).parent().removeClass("selected");
for( i=0; i<valCookie.length; i++ ){
if(valCookie[i] !== ''){
index = valCookie[i] - 2;
$("#itemst td:nth-child("+valCookie[i]+"),#itemst th:nth-child("+valCookie[i]+")").toggle();
- $("#checkheader"+index).removeAttr("checked").parent().removeClass("selected");
+ $("#checkheader"+index).prop("checked", false).parent().removeClass("selected");
}
}
}
}
function hideColumn(num) {
- $("#hideall,#showall").removeAttr("checked").parent().removeClass("selected");
+ $("#hideall,#showall").prop("checked", false).parent().removeClass("selected");
valCookie = $.cookie("showColumns");
// set the index of the table column to hide
$("#"+num).parent().removeClass("selected");
};
function showColumn(num){
- $("#hideall").removeAttr("checked").parent().removeClass("selected");
+ $("#hideall").prop("checked", false).parent().removeClass("selected");
$("#"+num).parent().addClass("selected");
valCookie = $.cookie("showColumns");
// set the index of the table column to hide
$("#selections span").addClass("selected");
$("#itemst td:nth-child(2),#itemst tr th:nth-child(2)").nextAll().show();
$.removeCookie("showColumns", { path: '/' });
- $("#hideall").removeAttr("checked").parent().removeClass("selected");
+ $("#hideall").prop("checked", false).parent().removeClass("selected");
}
function hideAllColumns(){
$("#selections").unCheckCheckboxes();
$("#selections span").removeClass("selected");
$("#itemst td:nth-child(2),#itemst th:nth-child(2)").nextAll().hide();
- $("#hideall").attr("checked","checked").parent().addClass("selected");
+ $("#hideall").prop("checked", true).parent().addClass("selected");
var cookieString = allColumns.join("/");
$.cookie("showColumns", cookieString, { expires : date, path: '/' });
}
});
$("#clearonloanbutton").click(function(){
$("#itemst input[name='itemnumber'][data-is-onloan='1']").each(function(){
- $(this).attr('checked', false);
+ $(this).prop('checked', false);
});
return false;
});
hideAllColumns();
e.stopPropagation();
} else {
- if($(this).attr("checked")){
+ if($(this).prop("checked")){
showColumn(num);
} else {
hideColumn(num);
$(document).ready(function() {
$("#CheckAllExports").on("click",function(){
- $(".export:visible").attr("checked", "checked" );
+ $(".export:visible").prop("checked", true);
return false;
});
$("#UncheckAllExports").on("click",function(){
- $(".export:visible").removeAttr("checked");
+ $(".export:visible").prop("checked", false);
return false;
});
});
function export_checkouts(format) {
- if ($("input:checkbox[name='biblionumbers'][checked]").length < 1){
+ if ($("input:checkbox[name='biblionumbers']:checked").length < 1){
alert(MSG_EXPORT_SELECT_CHECKOUTS);
return;
}
$("input:checkbox[name='biblionumbers']").each( function(){
var input_item = $(this).siblings("input:checkbox");
if ( $(this).is(":checked") ) {
- $(input_item).attr("checked", "checked");
+ $(input_item).prop("checked", true);
} else {
- $(input_item).attr("checked", "");
+ $(input_item).prop("checked", false);
}
} );
}
} );
- $("input:checkbox").attr("checked", false);
+ $("input:checkbox").prop("checked", false);
$("div.biblio.unselected select").attr("disabled", false);
$("div.biblio.unselected input").attr("disabled", false);
updateColumnsVisibility($(this).is(":checked"));
});
- $("#show_all_details").attr('checked', false);
+ $("#show_all_details").prop('checked', false);
updateColumnsVisibility(false);
[% UNLESS ( closedate ) %]
$('#addtoBasket').on('show', function () {
updateColumnsVisibility( $(this).is(":checked") );
});
- $("#show_all_details").attr('checked', false);
+ $("#show_all_details").prop('checked', false);
updateColumnsVisibility(false);
});
//]]>
]
}));
- $("#show_only_subscription").attr("checked", false);
+ $("#show_only_subscription").prop("checked", false);
$("#show_only_subscription").click(function(){
- if ( $(this).attr("checked") ) {
+ if ( $(this).prop("checked") ) {
resultst.fnFilter( "1", 0, true );
} else {
resultst.fnFilter( '', 0 );
$("#show_only_renewed").click(function(){
updateRowsVisibility( $(this).is(":checked") );
});
- $("#show_only_renewed").attr('checked', false);
+ $("#show_only_renewed").prop('checked', false);
updateRowsVisibility(false);
$("#advsearch_form").show();
function CheckNItems(n) {
$("input[name='items_to_receive']").each(function() {
- $(this).attr('checked', false);
+ $(this).prop('checked', false);
});
$("input[name='items_to_receive']:lt("+n+")").each(function () {
- $(this).attr('checked', true);
+ $(this).prop('checked', true);
});
}
[% END %]
$('body').on('click', '.delete-contact', null, delete_contact);
$('#add-contact').click(add_contact);
$('body').on('click', '.contact_acqprimary', null, function () {
- if ($(this).attr('checked') === 'checked') {
- $('.contact_acqprimary').filter(':checked').not(this).removeAttr('checked');
+ if ($(this).is(':checked')) {
+ $('.contact_acqprimary').filter(':checked').not(this).prop('checked', false);
$('.contact_acqprimary_hidden').each(function () {
$(this).val('0');
});
$(this).next('.contact_acqprimary_hidden').val('1');
});
$('body').on('click', '.contact_serialsprimary', null, function () {
- if ($(this).attr('checked') === 'checked') {
- $('.contact_serialsprimary').filter(':checked').not(this).removeAttr('checked');
+ if ($(this).is(':checked')) {
+ $('.contact_serialsprimary').filter(':checked').not(this).prop('checked', false);
$('.contact_serialsprimary_hidden').each(function () {
$(this).val('0');
});
}
- $(this).next('.contact_serialsprimary_hidden').val($(this).attr('checked') === 'checked' ? '1' : '0');
+ $(this).next('.contact_serialsprimary_hidden').val($(this).is(':checked') ? '1' : '0');
});
$('body').on('click', '.contact_claimacquisition', null, function () {
- $(this).next('.contact_claimacquisition_hidden').val($(this).attr('checked') === 'checked' ? '1' : '0');
+ $(this).next('.contact_claimacquisition_hidden').val($(this).is(':checked') ? '1' : '0');
});
$('body').on('click', '.contact_claimissues', null, function () {
- $(this).next('.contact_claimissues_hidden').val($(this).attr('checked') === 'checked' ? '1' : '0');
+ $(this).next('.contact_claimissues_hidden').val($(this).is(':checked') ? '1' : '0');
});
});
//]]>
hideAllColumns();
e.stopPropagation();
} else {
- if($(this).attr("checked")){
+ if($(this).prop("checked")){
showColumn(num);
} else {
hideColumn(num);
$("#active").removeAttr('disabled');
$("#hint").html("");
} else {
- $("#active").removeAttr('checked');
+ $("#active").prop('checked', false);
$("#active").attr('disabled','disabled');
$("#hint").html(_("The active currency must have a rate of 1.0"));
}
$(this).removeAttr("disabled");
}
if ( type == "checkbox" ) {
- $(this).attr('checked', false);
+ $(this).prop('checked', false);
}
});
$(edit_row).find("select").removeAttr("disabled");
} else if ( i == 12 ) {
// specific processing for cap_fine_to_replacement_price
var cap_fine_to_replacement_price = $(this).find("input[type='checkbox']");
- $('#cap_fine_to_replacement_price').attr('checked', cap_fine_to_replacement_price.is(':checked') );
+ $('#cap_fine_to_replacement_price').prop('checked', cap_fine_to_replacement_price.is(':checked') );
$('#overduefinescap').prop('disabled', cap_fine_to_replacement_price.is(':checked') );
} else {
$(current_column).find("input[type='text']").val(itm);
[% IF StaffDetailItemSelection %]
function selectAllItems(div) {
- $("input[name='itemnumber'][type='checkbox']", div).attr('checked', 'checked');
+ $("input[name='itemnumber'][type='checkbox']", div).prop('checked', true);
itemSelectionBuildActionLinks(div);
}
function clearAllItems(div) {
- $("input[name='itemnumber'][type='checkbox']", div).removeAttr('checked');
+ $("input[name='itemnumber'][type='checkbox']", div).prop('checked', false);
itemSelectionBuildActionLinks(div);
}
}[% END %]
function selectAll () {
- $(".selection").attr("checked", "checked");
+ $(".selection").prop("checked", true);
}
function clearAll () {
- $(".selection").removeAttr("checked");
+ $(".selection").prop("checked", false);
}
function placeHold () {
var checkedItems = $(".selection:checked");
// Check all checkboxes in first tab, and uncheck all others to avoid
// inconsistencies from a page refresh.
- $('#tabs div#tabrecord[% ref_biblionumber %]').find('input[type="checkbox"]').attr('checked', true);
- $('#tabs > div:not("#tabrecord[% ref_biblionumber %]")').find('input[type="checkbox"]').removeAttr('checked');
+ $('#tabs div#tabrecord[% ref_biblionumber %]').find('input[type="checkbox"]').prop('checked', true);
+ $('#tabs > div:not("#tabrecord[% ref_biblionumber %]")').find('input[type="checkbox"]').prop('checked', false);
//Set focus to cataloging search
$("input[name=q]:eq(0)").focus();
// On-site checkout
function toggle_onsite_checkout(){
- if ( $("#onsite_checkout").attr('checked') ) {
+ if ( $("#onsite_checkout").prop('checked') ) {
$("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1%]")
[% IF !Koha.Preference('SpecifyDueDate') %]
$("#duedatespec").datetimepicker('destroy');
$('#table_borrowers tbody tr').removeClass('selected');
$(this).addClass('selected');
if (event.target.type !== 'radio') {
- $(':radio', this).attr('checked', 'true')
+ $(':radio', this).prop('checked', 'true')
}
});
$("#barcode").focus();
});
[% IF(overduecharges) %] $("#barcode").focus(function () {
- if (($("#exemptcheck").attr("checked") == true) || ($("#dropboxcheck").attr("checked") == true)) {
+ if (($("#exemptcheck").prop("checked") == true) || ($("#dropboxcheck").prop("checked") == true)) {
$("#barcode").addClass("alert");
} else {
$("#barcode").removeClass("alert");
$('input[name="flag"]').each(function() {
if($(this).attr('id') != "flag-0"){
$(this).attr('disabled', 'disabled');
- $(this).removeAttr('checked', 'checked');
+ $(this).prop('checked', false);
}
});
}
$('input[name="flag"]').each(function() {
if($(this).attr('id') != "flag-0"){
$(this).attr('disabled', 'disabled');
- $(this).removeAttr('checked', 'checked');
+ $(this).prop('checked', false);
}
});
}
var transports = ['email', 'rss', 'sms'];
$.each(transports, function(j, transport) {
if (item['transports_' + transport] == 1) {
- $('#' + transport + attrid).attr('checked', 'checked');
+ $('#' + transport + attrid).prop('checked', true);
} else {
- $('#' + transport + attrid).removeAttr('checked');
+ $('#' + transport + attrid).prop('checked', false);
}
});
if (item.digest && item.digest != ' ') {
- $('#digest' + attrid).attr('checked', item.digest);
+ $('#digest' + attrid).prop('checked', true);
} else {
- $('#digest' + attrid).removeAttr('checked');
+ $('#digest' + attrid).prop('checked', false);
}
if (item.takes_days == '1') {
$('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance);
});
var selectFieldNames = ["field_1","field_2","field_3"];
for (var i=0; i < selectFieldNames.length; i++) {
- Go($("#"+selectFieldNames[i]+"_enable").attr("checked"), selectFieldNames[i]+"_select");
+ Go($("#"+selectFieldNames[i]+"_enable").prop("checked"), selectFieldNames[i]+"_select");
}
$("#field_1_enable").change(function(){
- $(".field_1_enable").html(Go($(this).attr("checked"), 'field_1_select'));
+ $(".field_1_enable").html(Go($(this).prop("checked"), 'field_1_select'));
});
$("#field_2_enable").change(function(){
- $(".field_2_enable").html(Go($(this).attr("checked"), 'field_2_select'));
+ $(".field_2_enable").html(Go($(this).prop("checked"), 'field_2_select'));
});
$("#field_3_enable").change(function(){
- $(".field_3_enable").html(Go($(this).attr("checked"), 'field_3_select'));
+ $(".field_3_enable").html(Go($(this).prop("checked"), 'field_3_select'));
});
$("#barcode_print").load(barcode_text('barcode_param'));
$("#barcode_print").change(function(){
});
function barcode_text(division) {
var eBarcode = document.getElementById(division);
- if( $("input[name=barcode_print]:checked").attr("checked") ) {
+ if( $("input[name=barcode_print]:checked").prop("checked") ) {
eBarcode.style.display = 'block';
} else {
eBarcode.style.display = 'none';
- $('input[name=barcode_text_print]').removeAttr('checked');
+ $('input[name=barcode_text_print]').prop('checked', false);
}
}
function getUnit(unit){
$("#deldateTo").attr('disabled', false);
} else {
$("#removeddatetr").hide();
- $("input[value='deleteditems.timestamp']").attr('disabled', true).attr('checked', false);
+ $("input[value='deleteditems.timestamp']").attr('disabled', true).prop('checked', false);
$("#deldateFrom").attr('disabled', true).val('');
$("#deldateTo").attr('disabled', true).val('');
}
[% IF (create || editsql || save) %]
$("#select_group").change(function() {
- if($(this).attr('checked')) {
+ if($(this).prop('checked')) {
$("#group_input").attr('disabled', 'disabled');
$("#groupdesc_input").attr('disabled', 'disabled');
$("#group_select").attr('disabled', false);
if ($("#group_select").val().length > 0) {
- $("#select_subgroup").attr('checked', 'checked');
+ $("#select_subgroup").prop('checked', true);
$("#select_subgroup").change();
$("#subgroup, #subgroup *").show();
} else {
}
});
$("#create_group").change(function() {
- if($(this).attr('checked')) {
+ if($(this).prop('checked')) {
$("#group_input").attr('disabled', false);
$("#groupdesc_input").attr('disabled', false);
$("#group_select").attr('disabled', 'disabled');
- $("#create_subgroup").attr('checked', 'checked').change();
+ $("#create_subgroup").prop('checked', true).change();
$("#subgroup_select").hide();
$("#subgroup input[type='radio']").hide();
$("#subgroup label[for]").hide();
}
});
$("#select_subgroup").change(function() {
- if($(this).attr('checked')) {
+ if($(this).prop('checked')) {
$("#subgroup_select").attr('disabled', false);
$("#subgroup_input").attr('disabled', 'disabled');
$("#subgroupdesc_input").attr('disabled', 'disabled');
}
});
$("#create_subgroup").change(function() {
- if($(this).attr('checked')) {
+ if($(this).prop('checked')) {
$("#subgroup_input").attr('disabled', false);
$("#subgroupdesc_input").attr('disabled', false);
$("#subgroup_select").attr('disabled', 'disabled');
$('#table_borrowers tbody tr').removeClass('selected');
$(this).addClass('selected');
if (event.target.type !== 'radio') {
- $(':radio', this).attr('checked', 'true')
+ $(':radio', this).prop('checked', 'true')
}
});
var my_table = $("#requestspecific").dataTable($.extend(true, {}, dataTablesDefaults, {
$("#requestany").click(function() {
if(this.checked){
$("input[name=checkitem]").each(function() {
- $(this).removeAttr("checked");
+ $(this).prop("checked", false);
});
}
});
}
});
if(onechecked == 1){
- $("#requestany").removeAttr("checked");
+ $("#requestany").prop("checked", false);
} else {
- $("#requestany").attr("checked","checked");
+ $("#requestany").prop("checked",true);
}
});
$("span.checkall").html("<input type=\"checkbox\" name=\"CheckAll\"> "+_("Check All")+"</input>");
$("#CheckAll").click(function() {
- $("#claimst tr:visible :checkbox").attr('checked', $("#CheckAll").is(':checked'));
+ $("#claimst tr:visible :checkbox").prop('checked', $("#CheckAll").is(':checked'));
});
// Generates a dynamic link for exporting the selections data as CSV
<script type="text/javascript">
//<![CDATA[
function Check_boxes(dow) {
- if($(":checkbox[data-dow='"+dow+"']:first").attr("checked") == 'checked') {
+ if($(":checkbox[data-dow='"+dow+"']:first").is(':checked')) {
$("#predictionst :checkbox[data-dow='"+dow+"']").each(function(){
- $(this).attr('checked', true);
+ $(this).prop('checked', true);
});
} else {
$("#predictionst :checkbox[data-dow='"+dow+"']").each(function(){
- $(this).attr('checked', false);
+ $(this).prop('checked', false);
});
}
}
$(".records input:checkbox[data-issues!='0']").each(function(){
$(this).attr('title', MSG_CANNOT_BE_DELETED)
$(this).attr('disabled', true);
- $(this).attr('checked', false);
+ $(this).prop('checked', false);
$(this).parents('tr').find('td').css('background-color', '#ffff99');
});
[% END %]
}));
$("#selectallbutton").click(function() {
$("#borrowerst").find("input:checkbox").each(function() {
- $(this).attr("checked", true);
+ $(this).prop("checked", true);
});
return false;
});
$("#clearallbutton").click(function() {
$("#borrowerst").find("input:checkbox").each(function() {
- $(this).attr("checked", false);
+ $(this).prop("checked", false);
});
return false;
});