Ignore:
Timestamp:
11/29/11 17:07:52 (13 years ago)
Author:
vmipsl
Message:

BO User

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ether_megapoli/trunk/web/resources/js/classesForJQuery/etherHelper.js

    r234 r268  
    1313    return (-1 == index); 
    1414} 
     15 
     16function getJSONUser() 
     17{ 
     18    return getLoginModule().getJSONUser(); 
     19} 
     20 
     21function getPath() 
     22{ 
     23    return InterfaceTemplate.path; 
     24} 
     25 
     26function setPath( path ) 
     27{ 
     28    InterfaceTemplate.path = path; 
     29} 
     30 
     31function getLoginModule() 
     32{ 
     33    return InterfaceTemplate.loginModule; 
     34} 
     35 
     36function setLoginModule( loginModule ) 
     37{ 
     38    InterfaceTemplate.loginModule = loginModule; 
     39} 
     40 
     41function 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" 
     53function 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.