Changeset 2712 for trunk/phpgwapi/js
- Timestamp:
- 05/05/10 15:52:35 (14 years ago)
- Location:
- trunk/phpgwapi/js
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/js/expressolivre/expressolivre.js
r2707 r2712 6 6 var _xlink = null; 7 7 8 window.array_lang = [ ]; 9 10 var _language = [ ] 11 8 12 function _go( ) 9 13 { 10 14 _xconnector.go.apply( _xconnector, arguments ); 15 } 16 17 function _lang( ) 18 { 19 if ( ! ( arguments.length && arguments[ 0 ].constructor == String ) ) 20 return false; 21 22 var module = arguments[ 0 ]; 23 var lang = document.getElementsByTagName( 'html' ).item( 0 ).getAttribute( 'xml:lang' ); 24 25 _xconnector.go( { 26 'access' : 'phpgwapi.expressolivre.lang&lang=' + lang + '&module=' + module, 27 'handler' : function( data ) 28 { 29 data = data.JSON( ); 30 for ( var key in data ) 31 window.array_lang[ key ] = _language[ key ] = data[ key ]; 32 } 33 } ); 11 34 } 12 35 … … 31 54 } 32 55 56 function _translate( ) 57 { 58 if ( ! ( arguments.length && arguments[ 0 ].constructor == String ) ) 59 return false; 60 61 var _phrase = arguments[ 0 ]; 62 63 if ( _language[ _phrase.toLowerCase( ) ] ) 64 return _language[ _phrase.toLowerCase( ) ]; 65 else 66 return _phrase + '*'; 67 } 68 33 69 function _ExpressoLivre( ) 34 70 { … … 36 72 { 37 73 this.go = _go; 74 this.lang = _lang; 38 75 this.link = _link; 39 76 this.path = _path; 40 77 this.theme = _theme; 41 78 this.template = _template; 79 this.translate = _translate; 42 80 } ); 43 81 } -
trunk/phpgwapi/js/tools/xconnector.js
r2685 r2712 218 218 '_ACCESS' : _argv.access, 219 219 '_HANDLER' : { }, 220 '_POST' : ( ( _argv.post ) ? _argv.post : false ), // [GET | POST]220 '_POST' : ( ( _argv.post && _argv.post != null ) ? _argv.post : false ), // [GET | POST] 221 221 '_MODE' : 'TEXT', // [XML | TEXT] 222 222 '_TYPE' : null, // [4 for request | 3 for stream] -
trunk/phpgwapi/js/tools/xlink.js
r2710 r2712 17 17 _action = window.location.protocol + '//' + window.location.host + _action; 18 18 19 if ( _action == _last_request ) 19 var _post = ( arguments.length == 3 && arguments[ 2 ] && arguments[ 2 ].constructor == String ) ? arguments[ 2 ] : null; 20 21 if ( _post == null && _action == _last_request ) 20 22 return false; 21 23 … … 36 38 'access' : _action, 37 39 'cache' : _cache, 38 'handler' : _handler 40 'handler' : _handler, 41 'post' : _post 39 42 } ); 40 43 … … 148 151 _click( arguments[ 0 ], 149 152 ( 150 ( arguments.length > 1 && arguments[ 1 ] .constructor == Boolean ) ?153 ( arguments.length > 1 && arguments[ 1 ] && arguments[ 1 ].constructor == Boolean ) ? 151 154 arguments[ 1 ] : false 155 ), 156 ( 157 ( arguments.length > 2 && arguments[ 2 ] && arguments[ 2 ].constructor == String ) ? 158 arguments[ 2 ] : null 152 159 ) 153 160 ); -
trunk/phpgwapi/js/tools/xobject.js
r2665 r2712 21 21 String.prototype.trim = function( ) 22 22 { 23 return this.replace( /^ +|+$/g, '' );23 return this.replace( /^\s+|\s+$/g, '' ); 24 24 }; 25 25
Note: See TracChangeset
for help on using the changeset viewer.