| Page 1 of 1 | [ 4 posts ] |
|
Hi, I am building a custom widget that uses WidgetButtons extension (YUI3.5PR2). I am trying to override the default "X" button, but whatever I try has no effect. Can anyone let me what could be wrong with my code?
I also tried updating the attribute in initializer() function using this.set('buttons',[...]), which had no effect either. Code: YUI.add('portlet-panel', function(Y) { Y.PortletPanel = Y.Base.create("portlet-panel", Y.Widget, [Y.WidgetStdMod, Y.WidgetButtons], { ATTRS : { buttons: [ { value:'TEST', section: Y.WidgetStdMod.HEADER, action:function (e) { console.log('test'); } } ] }, initializer : function(config) {}, renderUI: function() {}, bindUI: function() {}, syncUI: function() {} }); }, '3.5.0pr2' ,{requires:['widget', 'widget-stdmod']}); |
|
Jim,
WidgetButtons is currently pretty broken, but luckily I've been spending some time this week rewriting it from scratch The updated WidgetButtons will be in 3.5.0pr3. For your current issue, are you trying to remove the default close (x) button? Or retain it but add other buttons in the Widget's header? |
|
I am trying to replace "X" button with another button at the class level.
|
|
I am trying to replace the default button with another button at the widget class level. Let me know if this approach is incorrect
|
| Page 1 of 1 | [ 4 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group