Changeset 2729 for trunk/phpgwapi/js/tools/xlink.js
- Timestamp:
- 05/06/10 17:30:43 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/js/tools/xlink.js
r2712 r2729 78 78 if ( js ) 79 79 { 80 var tag = /<script([^>]* src="(\S+)"|[^>]*)>(.*?)<\/script>/;80 var tag = /<script([^>]*src="(\S+)"[^>]*|[^>]*)>(.*?)<\/script>/; 81 81 for ( var i = 0; i < js.length; i++ ) 82 82 { 83 83 var type = tag.exec( js[ i ] ); 84 data = data.replace( "\n\t\t" +type[ 0 ], '' );84 data = data.replace( type[ 0 ], '' ); 85 85 _new_scripts[ _new_scripts.length ] = type; 86 86 } … … 98 98 _container.appendChild( el.firstChild ); 99 99 100 var _count = 0; 101 function _scripts( ) 100 for ( var i = 0; i < _new_scripts.length; i++ ) 102 101 { 103 if ( _new_scripts[ _count ][ 2 ] == undefined || _new_scripts[ _count ][ 2 ].length == 0 ) 104 _script.load( function( ) 105 { 106 if ( ++_count < _new_scripts.length ) 107 _scripts( ); 108 }, _new_scripts[ _count ][ 3 ] ); 102 if ( _new_scripts[ i ][ 2 ] == undefined || _new_scripts[ i ][ 2 ].length == 0 ) 103 _script.inline( _new_scripts[ i ][ 3 ] ); 109 104 else 110 105 { 111 if ( _new_scripts[ _count][ 2 ].indexOf( window.location.host ) < 0 )112 _new_scripts[ _count ][ 2 ] = window.location.protocol + '//' + window.location.host + _new_scripts[ _count][ 2 ];106 if ( _new_scripts[ i ][ 2 ].indexOf( window.location.host ) < 0 ) 107 _new_scripts[ i ][ 2 ] = window.location.protocol + '//' + window.location.host + _new_scripts[ i ][ 2 ]; 113 108 114 _script. add(115 _new_scripts[ _count][ 2 ].substr(109 _script.external( 110 _new_scripts[ i ][ 2 ].substr( 116 111 _path.length - 1, 117 _new_scripts[ _count][ 2 ].length - _path.length + 1 - (118 ( _new_scripts[ _count][ 2 ].indexOf( '?' ) < 0 ) ?119 0 : ( _new_scripts[ _count ][ 2 ].length - _new_scripts[ _count][ 2 ].indexOf( '?' ) )112 _new_scripts[ i ][ 2 ].length - _path.length + 1 - ( 113 ( _new_scripts[ i ][ 2 ].indexOf( '?' ) < 0 ) ? 114 0 : ( _new_scripts[ i ][ 2 ].length - _new_scripts[ i ][ 2 ].indexOf( '?' ) ) 120 115 ) 121 116 ) 122 117 ); 123 if ( ++_count < _new_scripts.length )124 _scripts( );125 118 } 126 119 } 127 120 128 if ( _new_scripts.length ) 129 { 130 _scripts( ); 131 _script.load( ); 132 } 121 _script.load( ); 133 122 } 134 123
Note: See TracChangeset
for help on using the changeset viewer.