[Qual] Use jQuery 'is' instead of 'prop' in conditions

This commit is contained in:
Raphaël Doursenaud 2015-05-12 16:21:21 +02:00
parent d5565fffc1
commit 932e23ac09
3 changed files with 5 additions and 5 deletions

View File

@ -2200,7 +2200,7 @@ if ($action == 'create')
// Show credit note options only if we checked credit note
print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
if (! jQuery("#radio_creditnote").prop("checked"))
if (! jQuery("#radio_creditnote").is(":checked"))
{
jQuery("#credit_note_options").hide();
}

View File

@ -488,7 +488,7 @@ jQuery(document).ready(function() {
function init_needroot()
{
/*alert(jQuery("#db_create_database").prop("checked")); */
if (jQuery("#db_create_database").prop("checked") || jQuery("#db_create_user").prop("checked"))
if (jQuery("#db_create_database").is(":checked") || jQuery("#db_create_user").is(":checked"))
{
jQuery(".hideroot").show();
jQuery(".needroot").removeAttr('disabled');

View File

@ -831,7 +831,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
}
});
$("input[name=superadmin]").change(function() {
if ( $(this).prop("checked", true) ) {
if ( $(this).is(":checked") ) {
$("select[name=entity]")
.prop("disabled", true);
} else {
@ -1825,7 +1825,7 @@ else
.prop("disabled", true)
.prop("checked", false);
}
if ($("input[name=superadmin]").prop("checked", true)) {
if ($("input[name=superadmin]").is(":checked")) {
$("select[name=entity]")
.prop("disabled", true);
}
@ -1842,7 +1842,7 @@ else
}
});
$("input[name=superadmin]").change(function() {
if ( $(this).prop("checked", true)) {
if ( $(this).is(":checked")) {
$("select[name=entity]")
.prop("disabled", true);
} else {