Path

ez projects / ezjscore / forum / general / yui2 support


yui2 support

You need to be logged in to post messages in the forums. New users may register here.

Paul Forsyth

Member since:
16 January 2009

Posts: 3

Thursday 15 October 2009 4:16:45 pm

Hi,

Since yui3 lacks many of the useful yui2 utilities can we have some good yui2 docs?

Eg. I've tried to get yui2 working from cdn with jscore but it fails.

Please don't just cover yui3.

Thanks,

Paul

eZ Systems

Up

Ɓukasz Serwatka

Member since:
29 September 2004

Posts: 29

Friday 16 October 2009 9:45:57 am

Hi Paul,

Here is a quick example:




{ezscript_require( 'ezjsc::yui2' )}


 

<script type="text/javascript">


<!--


(function() {


  YUILoader.onSuccess = function() {


      // Your code goes here executed upon successful module loading


  }


 

  YUILoader.addModule({


      name: 'customscript',


      type: 'js',


      fullpath: 'full/path/to/customscript.js' // Can be used with ezdesign()


  });


 

  YUILoader.addModule({


      name: 'customcss',


      type: 'css',


      fullpath: 'full/path/to/customcss.css' // Can be used with ezdesign()


  });


 

  YUILoader.require(["customcss","calendar","slider","utilities","customscript"]);


  YUILoader.insert();


})();


//-->


</script>


Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog
Twitter -> @lserwatka
LinkedIn -> http://pl.linkedin.com/in/lukaszserwatka

Up

Gaetano Giunta

Member since:
30 November 1999

Posts: 269

Tuesday 26 October 2010 9:17:31 pm

Can yui2 and yui3 libraries coexist (be loaded in same page)?

I need yui tree, only available within yui2, and Y.io.ez, only available within yui3...

Principal Consultant International Business
Member of the Community Project Board

Up

You need to be logged in to post messages in the forums. New users may register here.