Changeset 2703
- Timestamp:
- 05/04/10 15:25:37 (14 years ago)
- Location:
- trunk
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/inc/class.uimainscreen.inc.php
r2698 r2703 137 137 $GLOBALS['phpgw']->template->set_var('tr_color',$tr_color); 138 138 $GLOBALS['phpgw']->template->set_var('value','<input type="submit" value="' . lang('Edit') 139 . '"><input type="button" name="cancel" value="'. lang('cancel') .'" onclick=" XLink( \'' . $GLOBALS[ 'phpgw' ] -> link( '/admin/index.php' ) . '\' )">');139 . '"><input type="button" name="cancel" value="'. lang('cancel') .'" onclick="ExpressoLivre.link( \'' . $GLOBALS[ 'phpgw' ] -> link( '/admin/index.php' ) . '\' )">'); 140 140 $GLOBALS['phpgw']->template->fp('rows','row_2',True); 141 141 } -
trunk/admin/templates/default/application_form.tpl
r2686 r2703 15 15 <td nowrap> 16 16 <input type="submit" name="save" value="{lang_save_button}"> 17 <input type="button" name="cancel" value="{lang_cancel_button}" onclick=" XLink( '{cancel_button}' )" />17 <input type="button" name="cancel" value="{lang_cancel_button}" onclick="ExpressoLivre.link( '{cancel_button}' )" /> 18 18 </td> 19 19 <td align="right"> -
trunk/admin/templates/default/applications.tpl
r2686 r2703 29 29 <tr> 30 30 <td align="left" nobreak> 31 <input type="button" value="{lang_add}" onclick=" XLink( '{new_action}' )" />31 <input type="button" value="{lang_add}" onclick="ExpressoLivre.link( '{new_action}' )" /> 32 32 </td> 33 33 <td> -
trunk/admin/templates/default/category_form.tpl
r2686 r2703 60 60 <input type="hidden" id="idgroup" name="idgroup" value="{cat_id_group}"> 61 61 <td><input onclick="return verifyCatOwners('td_group')" type="submit" name="save" value="{lang_save}"></td> 62 <td><input type="button" name="cancel" value="{lang_cancel}" onclick=" XLink( '{cancel_button}' )" /></td>63 <td align="right"><input type="button" name="delete" value="{lang_delete}" onclick=" XLink( '{delete_button}' )" /></td>62 <td><input type="button" name="cancel" value="{lang_cancel}" onclick="ExpressoLivre.link( '{cancel_button}' )" /></td> 63 <td align="right"><input type="button" name="delete" value="{lang_delete}" onclick="ExpressoLivre.link( '{delete_button}' )" /></td> 64 64 </tr> 65 65 </table> -
trunk/admin/templates/default/config.tpl
r2698 r2703 236 236 <td colspan="2" align="center"> 237 237 <input type="submit" name="submit" value="{lang_submit}"> 238 <input type="button" name="cancel" value="{lang_cancel}" onclick=" XLink( '{cancel_button}' )" />238 <input type="button" name="cancel" value="{lang_cancel}" onclick="ExpressoLivre.link( '{cancel_button}' )" /> 239 239 <br> 240 240 </td> -
trunk/admin/templates/default/delete_cat.tpl
r2686 r2703 20 20 </td> 21 21 <td align="center"> 22 <input type="button" name="cancel" value="{lang_no}" onclick=" XLink( '{no_button}' )">22 <input type="button" name="cancel" value="{lang_no}" onclick="ExpressoLivre.link( '{no_button}' )"> 23 23 </td> 24 24 <!-- END delete --> -
trunk/admin/templates/default/delete_common.tpl
r2686 r2703 8 8 <tr> 9 9 <td width="50%" align="center"> 10 <input type="button" name="no" value="{no}" onclick=" XLink( '{no_button}' )" >10 <input type="button" name="no" value="{no}" onclick="ExpressoLivre.link( '{no_button}' )" > 11 11 </td> 12 12 <td width="50%" align="center"> -
trunk/admin/templates/default/listcats.tpl
r2686 r2703 58 58 <td> 59 59 <!form method="POST" action="{action_url}"> 60 <input type="button" name="add" value="{lang_add}" onclick=" XLink( '{add_button}' )" /> 61 <input type="button" name="done" value="{lang_cancel}" onclick=" XLink( '{done_button}' )" />60 <input type="button" name="add" value="{lang_add}" onclick="ExpressoLivre.link( '{add_button}' )" /> 61 <input type="button" name="done" value="{lang_cancel}" onclick="ExpressoLivre.link( '{done_button}' )" /> 62 62 <!/form> 63 63 </td> -
trunk/admin/templates/default/voip.tpl
r2698 r2703 62 62 <td colspan="2" align="center"> 63 63 <input type="submit" name="save" value="{lang_save}" onclick="javascript:voip.select_();"> 64 <input type="button" name="cancel" value="{lang_cancel}" onclick=" XLink( '{cancel_button}' )">64 <input type="button" name="cancel" value="{lang_cancel}" onclick="ExpressoLivre.link( '{cancel_button}' )"> 65 65 <br> 66 66 </td> -
trunk/calendar/inc/class.uicustom_fields.inc.php
r2698 r2703 82 82 'action_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicustom_fields.submited'), 83 83 'save_button' => $this->html->submit_button('save','Save'), 84 'cancel_button'=> '<input type="button" value="' . lang( 'Cancel' ) . '" onclick=" XLink( \'' . $GLOBALS[ 'phpgw' ] -> link( '/admin/' ) . '\' )" />'84 'cancel_button'=> '<input type="button" value="' . lang( 'Cancel' ) . '" onclick="ExpressoLivre.link( \'' . $GLOBALS[ 'phpgw' ] -> link( '/admin/' ) . '\' )" />' 85 85 )); 86 86 -
trunk/calendar/templates/classic/config.tpl
r2698 r2703 100 100 <td colspan="2" align="center"> 101 101 <input type="submit" name="submit" value="{lang_submit}"> 102 <input type="button" name="cancel" value="{lang_cancel}" onclick=" XLink( '{cancel_button}' )" />102 <input type="button" name="cancel" value="{lang_cancel}" onclick="ExpressoLivre.link( '{cancel_button}' )" /> 103 103 </td> 104 104 </tr> -
trunk/calendar/templates/default/config.tpl
r2698 r2703 100 100 <td colspan="2" align="center"> 101 101 <input type="submit" name="submit" value="{lang_submit}"> 102 <input type="button" name="cancel" value="{lang_cancel}" onclick=" XLink( '{cancel_button}' )" />102 <input type="button" name="cancel" value="{lang_cancel}" onclick="ExpressoLivre.link( '{cancel_button}' )" /> 103 103 </td> 104 104 </tr> -
trunk/contactcenter/templates/classic/config.tpl
r2698 r2703 112 112 <td colspan="2" align="center"> 113 113 <input type="submit" name="submit" value="{lang_submit}"> 114 <input type="button" name="cancel" value="{lang_cancel}" onclick=" XLink( '{cancel_button}' )" />114 <input type="button" name="cancel" value="{lang_cancel}" onclick="ExpressoLivre.link( '{cancel_button}' )" /> 115 115 </td> 116 116 </tr> -
trunk/contactcenter/templates/default/config.tpl
r2698 r2703 145 145 <td colspan="2" align="center"> 146 146 <input type="submit" name="submit" value="{lang_submit}"> 147 <input type="button" name="cancel" value="{lang_cancel}" onclick=" XLink( '{cancel_button}' )" />147 <input type="button" name="cancel" value="{lang_cancel}" onclick="ExpressoLivre.link( '{cancel_button}' )" /> 148 148 </td> 149 149 </tr> -
trunk/expressoAdmin1_2/templates/default/config.tpl
r2698 r2703 203 203 <td colspan="2" align="center"> 204 204 <input type="submit" name="submit" value="{lang_submit}"> 205 <input type="button" name="cancel" value="{lang_cancel}" onclick=" XLink( '{cancel_button}' )">205 <input type="button" name="cancel" value="{lang_cancel}" onclick="ExpressoLivre.link( '{cancel_button}' )"> 206 206 </td> 207 207 </tr> -
trunk/expressoMail1_2/templates/classic/config.tpl
r2698 r2703 106 106 <td colspan="2" align="center"> 107 107 <input type="submit" name="submit" value="{lang_submit}"> 108 <input type="button" name="cancel" value="{lang_cancel}" onclick=" XLink( '{cancel_button}' )" />108 <input type="button" name="cancel" value="{lang_cancel}" onclick="ExpressoLivre.link( '{cancel_button}' )" /> 109 109 </td> 110 110 </tr> -
trunk/expressoMail1_2/templates/default/config.tpl
r2698 r2703 100 100 <td colspan="2" align="center"> 101 101 <input type="submit" name="submit" value="{lang_submit}"> 102 <input type="button" name="cancel" value="{lang_cancel}" onclick=" XLink( '{cancel_button}' )" />102 <input type="button" name="cancel" value="{lang_cancel}" onclick="ExpressoLivre.link( '{cancel_button}' )" /> 103 103 </td> 104 104 </tr> -
trunk/filemanager/templates/default/config.tpl
r2698 r2703 36 36 <td colspan="2" align="center"> 37 37 <input type="submit" name="submit" value="{lang_submit}"> 38 <input type="button" name="cancel" value="{lang_cancel}" onclick=" XLink( '{cancel_button}' )" />38 <input type="button" name="cancel" value="{lang_cancel}" onclick="ExpressoLivre.link( '{cancel_button}' )" /> 39 39 </td> 40 40 </tr> -
trunk/index.php
r2691 r2703 72 72 $target = '( function( ){ var target = window.location.hash; target = (' 73 73 . '( arguments.length && ( target && target.length > 1 ) ) ?' 74 . 'URL_SERVER + target.substr( 1 ) : "' . $GLOBALS[ 'phpgw' ] -> link( $target ). '" ); XLink( target ); } )';74 . 'URL_SERVER + target.substr( 1 ) : "' . $GLOBALS[ 'phpgw' ] -> link( $target ). '" ); ExpressoLivre.link( target ); } )'; 75 75 76 76 if ( array_key_exists( 'HTTP_BACKGROUNDREQUEST', $_SERVER ) || array_key_exists( 'BackgroundRequest', $_GET ) ) … … 137 137 } 138 138 139 echo '<script> XLink( "' . $GLOBALS[ 'phpgw' ] -> link( '/home.php' ) . '", true );</script>';139 echo '<script>ExpressoLivre.link( "' . $GLOBALS[ 'phpgw' ] -> link( '/home.php' ) . '", true );</script>'; 140 140 exit; 141 141 } -
trunk/news_admin/templates/default/acl.tpl
r2698 r2703 42 42 <td colspan="3" align="center"> 43 43 <input type="submit" name="btnSave" value="{lang_save}"> 44 <input type="submit" name="btnDone" value="{lang_done}" onclick=" XLink( '{done_button}' )" />44 <input type="submit" name="btnDone" value="{lang_done}" onclick="ExpressoLivre.link( '{done_button}' )" /> 45 45 </td> 46 46 </tr> -
trunk/news_admin/templates/default/export.tpl
r2698 r2703 53 53 <td colspan="3" align="center"> 54 54 <input type="submit" name="btnSave" value="{lang_save}"> 55 <input type="submit" name="btnDone" value="{lang_done}" onclick=" XLink( '{done_button}' )" />55 <input type="submit" name="btnDone" value="{lang_done}" onclick="ExpressoLivre.link( '{done_button}' )" /> 56 56 </td> 57 57 </tr> -
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.