Changeset 2703 for trunk/phpgwapi
- Timestamp:
- 05/04/10 15:25:37 (14 years ago)
- Location:
- trunk/phpgwapi
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/inc/class.common.inc.php
r2677 r2703 392 392 $webserver_url .= '/'; 393 393 394 $expressolivre = CreateObject( 'phpgwapi.expressolivre' ); 395 394 396 $GLOBALS['phpgw_info']['flags']['java_script_thirst'] .= '<script type="text/javascript">' 395 397 . 'var URL_SERVER = window.location.protocol + "//" + window.location.host + "' . $webserver_url . '";' 396 . 'var template = "' . $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'template_set' ] . '";</script>'; 398 . 'var template = "' . $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'template_set' ] . '";' 399 . 'var ExpressoLivre = function ExpressoLivre( ) { return String( \'' . $expressolivre -> configuration( ) . '\' ); };' 400 . '</script>'; 397 401 398 402 $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'wz_dragdrop', 'wz_dragdrop', NULL, true ); 399 403 $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'expressoAjax', 'expressoAjax', NULL, true ); 400 404 $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'expressoAjax', 'dom', NULL, true ); 405 $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'expressolivre','expressolivre', NULL, true ); 401 406 $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'tools','xlink', NULL, true ); 402 407 $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'tools','xscript', NULL, true ); -
trunk/phpgwapi/js/tools/xlink.js
r2700 r2703 1 1 ( function( ) 2 2 { 3 if ( window.location.protocol + '//' + window.location.host + window.location.pathname != URL_SERVER ) 4 window.location.href = URL_SERVER + ( 5 ( window.location.hash ) ? 6 window.location.hash : '#' + String( window.location.protocol + '//' + window.location.host + window.location.pathname ).substr( URL_SERVER.length ) 7 ); 3 var _path = null; 4 var _last_request = null; 8 5 9 var _connector = n ew XConnector;10 var _script = n ull;6 var _connector = null; 7 var _script = new XScript; 11 8 12 9 var _container = null; 13 10 var _divAppboxHeader = null; 11 14 12 var _loading = new Image( ); 15 _loading.src = URL_SERVER + 'phpgwapi/images/loading.gif';16 17 var _last_request = null;18 13 19 14 function _click( _action, _cache ) … … 47 42 48 43 window.location = '#' + ( 49 ( _action.indexOf( URL_SERVER) < 0 ) ?50 _action : _action.substr( _action.indexOf( URL_SERVER) + URL_SERVER.length )44 ( _action.indexOf( _path ) < 0 ) ? 45 _action : _action.substr( _action.indexOf( _path ) + URL_SERVER.length ) 51 46 ); 52 47 } … … 116 111 _script.add( 117 112 _new_scripts[ _count ][ 2 ].substr( 118 URL_SERVER.length - 1,119 _new_scripts[ _count ][ 2 ].length - URL_SERVER.length + 1 - (113 _path.length - 1, 114 _new_scripts[ _count ][ 2 ].length - _path.length + 1 - ( 120 115 ( _new_scripts[ _count ][ 2 ].indexOf( '?' ) < 0 ) ? 121 116 0 : ( _new_scripts[ _count ][ 2 ].length - _new_scripts[ _count ][ 2 ].indexOf( '?' ) ) … … 137 132 function Link( ) 138 133 { 134 _path = ( arguments.length && arguments[ 0 ].constructor == String ) ? arguments[ 0 ] : '/'; 135 136 if ( window.location.protocol + '//' + window.location.host + window.location.pathname != _path ) 137 window.location.href = _path + ( 138 ( window.location.hash ) ? 139 window.location.hash : '#' + String( window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search ).substr( _path.length ) 140 ); 141 142 _loading.src = _path + 'phpgwapi/images/loading.gif'; 143 _connector = new XConnector; 144 } 145 146 Link.prototype.click = function( ) 147 { 139 148 _click( arguments[ 0 ], 140 149 ( … … 143 152 ) 144 153 ); 145 } 154 }; 155 Link.prototype.intercept = _intercept; 146 156 147 157 window.XLink = Link; … … 149 159 XEvents.add( window, 'onload', function( ) 150 160 { 151 var _scripts = document.getElementsByTagName( 'head' ).item( 0 ).getElementsByTagName( 'script' );152 var _loaded = [ ];153 154 for ( var i = 0; i < _scripts.length; i++ )155 if ( _scripts.item( i ).getAttribute( 'src' ) != null )156 _loaded[ _loaded.length ] = _scripts.item( i ).getAttribute( 'src' ).substr(157 URL_SERVER.length - 1,158 _scripts.item( i ).getAttribute( 'src' ).indexOf( '?' ) - URL_SERVER.length + 1159 );160 161 _script = new XScript( _loaded );162 163 161 _divAppboxHeader = document.getElementById( 'divAppboxHeader' ); 164 162 _divAppboxHeader.innerHTML = ''; 165 163 166 164 _container = document.getElementById( 'divAppbox' ); 167 168 document.getElementsByTagName( 'body' ).item( 0 ).style.overflowY = 'scroll';169 170 var _links = document.getElementsByTagName( 'a' );171 for ( var i = 0; i < _links.length; i++ )172 _intercept( _links.item( i ) );173 165 } ); 174 166 } )( ); -
trunk/phpgwapi/js/tools/xscript.js
r2642 r2703 1 1 ( function( ) 2 2 { 3 var _connector = n ull;3 var _connector = new XConnector; 4 4 var _loaded = [ ]; 5 5 var _new = [ ]; … … 65 65 66 66 window.XScript = Script; 67 68 XEvents.add( window, 'onload', function( )69 {70 _connector = new XConnector;71 } );72 67 } )( );
Note: See TracChangeset
for help on using the changeset viewer.