From 4d814b078e2eee08a79be64872d754fa924c0f9b Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 4 Sep 2011 19:37:35 +0000 Subject: [PATCH] change css class if button --- htdocs/lib/ajax.lib.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/htdocs/lib/ajax.lib.php b/htdocs/lib/ajax.lib.php index 042f7edeedd..e271f6509e5 100644 --- a/htdocs/lib/ajax.lib.php +++ b/htdocs/lib/ajax.lib.php @@ -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"); + } }); } });