PDA

View Full Version : pinned quicktip



art.home.ext
21 Oct 2009, 2:56 AM
Hi all !

I have a quicktip shown when a button ('showTipButton') is clicked.
the tip has

closable:true
autoHide:true
hideDelay:5000

I want to add a 'pin' tool to this Tip panel:

tools:[
{
id:'pin',
handler:function(sEvent,sToolEl,sPanel,sToolConfig){
sToolEl.removeClass('x-tool-pin');
sToolEl.addClass('x-tool-unpin');
sPanel.clearTimers();
}
}]Note : unpin is not managed yet

1) Is this the best way to change 'pin' to 'unpin' when I click on the 'pin' button ?
2) May I call clearTimers() since it is a private function ?

Anyway, the handler seems to work. But when I click again on the 'showTipButton', the toolTip reinitializes itself with the 'unpin' tool (it's ok) but with autoHide:true which makes it disappear after 5 seconds.

So is there a simpliest way to make it work ?

Thank you