Jump to content

Howto Handle TUniToolButton.Enable change


Freeman35

Recommended Posts

32 minutes ago, Hayri ASLAN said:

Hi,

You mean if we execute "button.setEnabled(false)" in clientside i want to able to know it? 

I mean, I need handle this property changing, because, I wanna "add / remove" css, so make a disable efect.

If I handle this property after changing, I can add this code. Other wise, I have to add more line after each xxx.Enable:= True; or False;

Link to comment
Share on other sites

function beforeInit(sender, config)
{
    config.defaults = {
        listeners: {
            enable: function(sender, eOpts) {
                ajaxRequest(sender, '_enable',[]);
            },
            disable: function(sender, eOpts) {
              ajaxRequest(sender, '_disable'',[]);  
            }
        }
    }
}

Is any wrong type or which component's onAjaxEvent? I mean form's.OnAjaxEvent or ToolButton's.OnAjaxEvent

Thank you

Link to comment
Share on other sites

function beforeInit(sender, config)
{
    config.defaults = {
        listeners: {
            enable: function(sender, eOpts) {
                sender.removeClass('disabled');
            },
            disable: function(sender, eOpts) {
              sender.addClass('disabled');  
            }
        }
    }
}

This is much better translate what I want :) for TUniToolButton

regards

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...