nl_tokens: Initializes the file - picker connects it to runtime and dispatches event ready when done .
pl_tokens: function ( ) { var self = this ; self . bind ( 'RuntimeInit' , function ( e , runtime ) { self . ruid = runtime . uid ; self . shimid = runtime . shimid ; self . bind ( "Ready" , function ( ) { self . trigger ( "Refresh" ) ; } , 999 ) ; // re-position and resize shim container self . bind ( 'Refresh' , function ( ) { var pos , size , browseButton , shimContainer , zIndex ; browseButton = Dom . get ( <mask> . browse_button ) ; shimContainer = Dom . get ( runtime . shimid ) ; // do not use runtime.getShimContainer(), since it will create container if it doesn't exist if ( browseButton ) { pos = Dom . getPos ( browseButton , Dom . get ( options . container ) ) ; size = Dom . getSize ( browseButton ) ; zIndex = parseInt ( Dom . getStyle ( browseButton , 'z-index' ) , 10 ) || 0 ; if ( shimContainer ) { Basic . extend ( shimContainer . style , { top : pos . y + 'px' , left : pos . x + 'px' , width : size . w + 'px' , height : size . h + 'px' , zIndex : zIndex + 1 } ) ; } } shimContainer = browseButton = null ; } ) ; runtime . exec . call ( self , 'FileInput' , 'init' , options ) ; } ) ; // runtime needs: options.required_features, options.runtime_order and options.container self . connectRuntime ( Basic . extend ( { } , options , { required_caps : { select_file : true } } ) ) ; }