PDA

View Full Version : [CLOSED] LinkButton with tooltip issue



Leonid_Veriga
Sep 07, 2012, 10:08 AM
Hello.

There is a script error is occured, when I try to add a tooltip for LinkButton.


<ext:LinkButton runat="server" Text="asdf" ToolTip="asdfasdf" />

Could you suggest a solution for this issue?

Best regards.

Daniil
Sep 07, 2012, 10:47 AM
Hi,

Thank you for the report!

I am working on a fix.

Daniil
Sep 07, 2012, 11:29 AM
Hi,

It has been fixed in SVN, revision #4337.

Please update or use this fix.

Thanks again for the report!

Fix

<script type="text/javascript">
Ext.net.LinkButton.override({
applyRenderSelectors : Ext.emptyFn,

onRender : function (ct, position) {
var el = this.el.dom;

var img = document.createElement("img");
img.src = Ext.BLANK_IMAGE_URL;
img.className = "x-label-icon " + (this.iconCls || "");

if (Ext.isEmpty(this.iconCls)) {
img.style.display = "none";
}

if (this.iconAlign == "left") {
el.appendChild(img);
}

el.appendChild(this.valueElement());
this.btnEl = Ext.get(this.textEl);

if (this.iconAlign == "right") {
el.appendChild(img);
}

Ext.net.LinkButton.superclass.onRender.apply(this, arguments);

if (this.pressed && this.allowDepress !== false) {
this.setDisabled(true);
this.disabled = false;
this.el.dom.style.cursor = "pointer";
}
}
});
</script>

Leonid_Veriga
Sep 07, 2012, 12:18 PM
Thank you.