-
8 Aug 2012 9:16 AM #1
Answered: FadeIn/FadeOut panel for user feedback
Answered: FadeIn/FadeOut panel for user feedback
Hi,
what I would like is to have a panel that fadeIn/fadeOut at the top of the screen to give the user some feedback (completion, saved, loading, ..). I know I could use a status bar but I'd rather like something that catch the eye a little more.
Thank you
-
Best Answer Posted by jnfrancois
From the examples .... the result is great
and then call it everywhere in my app like soCode:Ext.evFeedback = function(){ var msgCt; function createBox(t, s){ return '<div class="msg"><h3>' + t + '</h3><p>' + s + '</p></div>'; } return { msg : function(title, format){ if(!msgCt){ msgCt = Ext.DomHelper.insertFirst(document.body, {id:'msg-div'}, true); } var s = Ext.String.format.apply(String, Array.prototype.slice.call(arguments, 1)); var m = Ext.DomHelper.append(msgCt, createBox(title, s), true); m.hide(); m.slideIn('t').ghost("t", { delay: 1300, remove: true}); }, init : function(){ } }; }();
Also used and modify the css from the examplesCode:Ext.evFeedback.msg('Title', 'Texte');
Hopefully it can help someone else !Code:.msg .x-box-mc { font-size:14px; } #msg-div { position:absolute; left:35%; top:10px; width:300px; z-index:20000; } #msg-div .msg { border-radius: 8px; -moz-border-radius: 8px; background: #e1eed0; border: 2px solid #96b695; margin-top: 2px; padding: 10px 15px; color: #555; } #msg-div .msg h3 { margin: 0 0 8px; font-weight: bold; font-size: 15px; } #msg-div .msg p { margin: 0; } .x-grid3-row-body p { margin:5px 5px 10px 5px !important; }
-
8 Aug 2012 9:45 AM #2Sencha - Support Team
- Join Date
- Jul 2010
- Location
- Houston, Tx
- Posts
- 7,183
- Vote Rating
- 194
- Answers
- 433
-
9 Aug 2012 5:52 AM #3
Found it !
Found it !
From the examples .... the result is great
and then call it everywhere in my app like soCode:Ext.evFeedback = function(){ var msgCt; function createBox(t, s){ return '<div class="msg"><h3>' + t + '</h3><p>' + s + '</p></div>'; } return { msg : function(title, format){ if(!msgCt){ msgCt = Ext.DomHelper.insertFirst(document.body, {id:'msg-div'}, true); } var s = Ext.String.format.apply(String, Array.prototype.slice.call(arguments, 1)); var m = Ext.DomHelper.append(msgCt, createBox(title, s), true); m.hide(); m.slideIn('t').ghost("t", { delay: 1300, remove: true}); }, init : function(){ } }; }();
Also used and modify the css from the examplesCode:Ext.evFeedback.msg('Title', 'Texte');
Hopefully it can help someone else !Code:.msg .x-box-mc { font-size:14px; } #msg-div { position:absolute; left:35%; top:10px; width:300px; z-index:20000; } #msg-div .msg { border-radius: 8px; -moz-border-radius: 8px; background: #e1eed0; border: 2px solid #96b695; margin-top: 2px; padding: 10px 15px; color: #555; } #msg-div .msg h3 { margin: 0 0 8px; font-weight: bold; font-size: 15px; } #msg-div .msg p { margin: 0; } .x-grid3-row-body p { margin:5px 5px 10px 5px !important; }
-
9 Aug 2012 7:17 AM #4Sencha - Support Team
- Join Date
- Jul 2010
- Location
- Houston, Tx
- Posts
- 7,183
- Vote Rating
- 194
- Answers
- 433
Very nice .. thanks for the followup. You may also be interested in this extension as well:
http://www.sencha.com/forum/showthread.php?145503
http://www.eirik.net/Ext/ux/window/Notification.html
Scott.
-
9 Aug 2012 7:26 AM #5
That's a very good extension.... but GPL ;-)
Thanks anyway
-
4 Dec 2012 6:39 AM #6


Reply With Quote