Regression 1.8.4 compared to 1.8.2 in manipulating disabled option of a button on a dialog ?

Regression 1.8.4 compared to 1.8.2 in manipulating disabled option of a button on a dialog ?

Hi,

In 1.8.2, I have 2 functions that permits to :
  1. disable or enable a button of a dialog (ButtonDialogState).
  2. hide or show a button of a dialog (showButtonDialog)

Working functions in 1.8.2 :
  1. function ButtonDialogState(sIDDialog,sLabel,bEnable){
        $("#"+sIDDialog+" ~ .ui-dialog-buttonpane").children("button:contains('"+sLabel+"')").button((bEnable==true) ? "enable" : "disable" );
    }

  2. function showButtonDialog(sIDDialog,sLabel,bvisible){
        if(bvisible==true){
            $("#"+sIDDialog+" ~ .ui-dialog-buttonpane").children("button:contains('"+sLabel+"')").show();
        }else{
            $("#"+sIDDialog+" ~ .ui-dialog-buttonpane").children("button:contains('"+sLabel+"')").hide();
        }
    }








Those functions don't work any more in 1.8.4.
There is some change to do for the traversing or another thing to do ?

In 1.8.4, by changing the traversing (as shown below) only showButtonDialog() work but ButtonDialogState() don't:

  1. function ButtonDialogState(sIDDialog,sLabel,bEnable){
        $("#"+sIDDialog+" ~ .ui-dialog-buttonpane").children().has(".ui-button-text:contains('"+sLabel+"')").button((bEnable==true) ? "enable" : "disable" );
    }

  2. function showButtonDialog(sIDDialog,sLabel,bvisible){
        if(bvisible==true){
            $("#"+sIDDialog+" ~ .ui-dialog-buttonpane").children().has(".ui-button-text:contains('"+sLabel+"')").show();
        }else{
            $("#"+sIDDialog+" ~ .ui-dialog-buttonpane").children().has(".ui-button-text:contains('"+sLabel+"')").hide();
        }
    }







By the way, i don't understand why the chaining of .button("enable" or "disable") don't work.

Thanks for a clue.

Best regards