PDA

View Full Version : Ext.ux-notification clossing issue



gulan
23 Feb 2009, 5:43 AM
hi all..

I have an notification window which will popup onmouse over of a button,
now I want to close the notification window on mouseout event of that button..
how can i do that??

23 Feb 2009, 7:07 AM
attach an event handler to the button's el.

gulan
23 Feb 2009, 7:28 AM
ya i did that...

my code is



this.clockBtn = new Ext.Button({
text : "note",
id: 'ux-clockbutton',
cls:'buttonBodyStyle',
renderTo: 'ux-taskclock-panel',
tooltip:"notification",
listeners: {
mouseover: function(){
Ext.ux.NotificationMgr.pushshortNotification("Shift+'N' - Open New Open Places",'Shortcut Keys');
},
mouseout:function(){
Ext.ux.NotificationMgr.closeNotification();
}}
});



pushshortNotification:function(inStrMessage,theTitle){
Ext.ux.NotificationMgr.push({
animateTarget: Ext.get('ux-taskbar'),
autoDestroy: false,
hideDelay: 5000,
title: theTitle || 'Notification',
animateOnHide: true,
html: inStrMessage,
type:Ext.ux.NotificationType.MESSAGE
});
},


closeNotification:function(){debugger;
Ext.ux.Notification.superclass.close();
}
but closeNotification is not working :((

23 Feb 2009, 8:14 AM
you're attaching a listener to the buttons' component, not the element!

this.clockBtn.el.on('mouseout', someFn, someFnScope)

gulan
23 Feb 2009, 10:33 PM
Hi.. Thanks for your reply...

If that is the problem then how the same way I am getting


listeners: {
mouseover: function(){
Ext.ux.NotificationMgr.pushshortNotification("Shift+'N' - Open New Open Places",'Shortcut Keys');
}}

this is working fine...in mouseout also I can call the function
closeNotification but I think some problem with taht function..


closeNotification:function(){
Ext.ux.Notification.superclass.close();
}