Changeset 2642 for trunk/phpgwapi/js/tools/xlink.js
- Timestamp:
- 04/27/10 16:58:10 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/js/tools/xlink.js
r2630 r2642 62 62 _container.appendChild( el.firstChild ); 63 63 64 var _inline = [ ]; 65 for ( var i = 0; i < _new_scripts.length; i++ ) 66 if ( _new_scripts[ i ][ 2 ] == undefined || _new_scripts[ i ][ 2 ].length == 0 ) 67 _inline[ _inline.length ] = _new_scripts[ i ][ 3 ]; 64 var _count = 0; 65 function _scripts( ) 66 { 67 if ( _new_scripts[ _count ][ 2 ] == undefined || _new_scripts[ _count ][ 2 ].length == 0 ) 68 _script.load( function( ) 69 { 70 if ( ++_count < _new_scripts.length ) 71 _scripts( ); 72 }, _new_scripts[ _count ][ 3 ] ); 68 73 else 69 _script.add( _new_scripts[ i ][ 2 ].substr( 70 URL_SERVER.length - 1, 71 _new_scripts[ i ][ 2 ].indexOf( '?' ) - URL_SERVER.length + 1 72 ) ); 74 { 75 _script.add( 76 _new_scripts[ _count ][ 2 ].substr( 77 URL_SERVER.length - 1, 78 _new_scripts[ _count ][ 2 ].indexOf( '?' ) - URL_SERVER.length + 1 79 ) 80 ); 81 if ( ++_count < _new_scripts.length ) 82 _scripts( ); 83 } 84 } 73 85 74 var _it_has_loaded = _script.load( function()86 if ( _new_scripts.length ) 75 87 { 76 if ( _inline.length ) 77 window.eval( _inline.join( '' ) ); 78 } ); 79 80 if ( ! _it_has_loaded && _inline.length ) 81 window.eval( _inline.join( '' ) ); 88 _scripts( ); 89 _script.load( ); 90 } 82 91 } 83 92 } );
Note: See TracChangeset
for help on using the changeset viewer.