Hello there
I am trying to disable button in ribbon bar in client-side script. After building pretty complex script to get reference to button item I called set_enabled(false) and nothing happened. I think problem is in set_enabled function in:
I am trying to disable button in ribbon bar in client-side script. After building pretty complex script to get reference to button item I called set_enabled(false) and nothing happened. I think problem is in set_enabled function in:
set_enabled: function (c) { if (this._element) { return; } if (c) { b(this._element).attr("disabled", "disabled"); } else { b(this._element).removeAttr("disabled"); } }
if this._element is set, return is called. I think it should be opossite. Or am I doing something wrong?
I was able to disable the button with hard-code hacks in js. But disabled image is not used.
Another problem is that when I disable button even from server-side, button text looks like disabled and
button frame is not shown. But I am still able to click the button and I am redirected to '#'.
BTW:
How can I easily find reference to button item in js?
Thank you very much.
Kind regards
Andrej