[ 2 posts ]

Khoa Bui

  • Username: khoaminhbui
  • Joined: Tue Aug 09, 2011 6:11 am
  • Posts: 127
  • Location: Vietnam
  • Twitter: khoaminhbui
  • IRC: k_bui
  • Offline
  • Profile

Cannot skin 2in3 widgets

Post Posted: Mon Sep 19, 2011 4:52 am
+0-
Although I can skin YUI3 widgets with my own style, the same process cannot be applied for 2in3 widgets.
See the code snippet below:

Code:
YUI({
   modules: {
      myYui2Datatable: {
           after: ['yui2-datatable'],
           fullpath: path_to_my_customize_datatable_css,
           type: 'css'
       },
       myYui3Panel: {
           after: ['panel'],
           fullpath: path_to_my_customize_panel_css,
           type: 'css'
       }
   },

   groups: {
       yui2: {
           base: '/2in3/2.9.0/build/',
   
           patterns:  {
               'yui2-': {
                   configFn: function(me) {
                       if(/-skin|reset|fonts|grids|base/.test(me.name)) {
                           me.type = 'css';
                           me.path = me.path.replace(/\.js/, '.css');
                           me.path = me.path.replace(/\/yui2-skin/, '/assets/skins/sam/yui2-skin');
                       }
                   }
               }
           }
       }
   }
}).use('myYui2Datatable', 'yui2-datatable', 'myYui3Panel', 'panel',
   function(Y) {
   // use panel
   // use datatable
});


The panel's style is customizable because my panel's css file is loaded after YUI3 panel's css file. But this method does not work for 2in3 datatable.

So, how can I customize the 2in3 widget?

Alberto Santini

YUI Contributor

  • Offline
  • Profile

Re: Cannot skin 2in3 widgets

Post Posted: Mon Sep 19, 2011 6:21 am
+0-
Hello Khoa.

See the following topic:
viewtopic.php?f=91&t=8553

Hope that helps,
IceBox
  [ 2 posts ]
Display posts from previous:  Sort by  
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