change css class if button

This commit is contained in:
Regis Houssin 2011-09-04 19:37:35 +00:00
parent b4b620df7a
commit 4d814b078e

View File

@ -245,6 +245,10 @@ function ajax_constantonoff($code,$input=array())
if (input.length > 0) {
$.each(input, function(key,value) {
$( "#" + value).removeAttr("disabled");
if ( $( "#" + value).hasClass("butActionRefused") == true ) {
$( "#" + value).removeClass("butActionRefused");
$( "#" + value).addClass("butAction");
}
});
}
});
@ -263,6 +267,10 @@ function ajax_constantonoff($code,$input=array())
if (input.length > 0) {
$.each(input, function(key,value) {
$( "#" + value).attr("disabled", true);
if ( $( "#" + value).hasClass("butAction") == true ) {
$( "#" + value).removeClass("butAction");
$( "#" + value).addClass("butActionRefused");
}
});
}
});