Changeset 268 for ether_megapoli/trunk/web/resources/js
- Timestamp:
- 11/29/11 17:07:52 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ether_megapoli/trunk/web/resources/js/classesForJQuery/etherHelper.js
r234 r268 13 13 return (-1 == index); 14 14 } 15 16 function getJSONUser() 17 { 18 return getLoginModule().getJSONUser(); 19 } 20 21 function getPath() 22 { 23 return InterfaceTemplate.path; 24 } 25 26 function setPath( path ) 27 { 28 InterfaceTemplate.path = path; 29 } 30 31 function getLoginModule() 32 { 33 return InterfaceTemplate.loginModule; 34 } 35 36 function setLoginModule( loginModule ) 37 { 38 InterfaceTemplate.loginModule = loginModule; 39 } 40 41 function neededLogin( href ) 42 { 43 $( "#signin_menu" ).ready( function() 44 { 45 if( !getJSONUser() ) 46 getLoginModule().showLogin( loginTexts["data.authentification.text"] ); 47 else 48 document.location.href = getPath() + href; 49 } ); 50 } 51 52 // Need to import javascript librairy "calendar/anytime.js" 53 function formatDate( date, formatDate ) 54 { 55 var format = formatDate ? formatDate : "%Y-%m-%d %H:%i"; 56 var calendarConverter = new AnyTime.Converter( { format: format } ); 57 return calendarConverter.format( date ); 58 }
Note: See TracChangeset
for help on using the changeset viewer.