Changeset 563 for trunk/app/webroot

Show
Ignore:
Timestamp:
05/26/08 22:47:53 (6 months ago)
Author:
aarkerio
Message:

Reports

Location:
trunk/app/webroot
Files:
2 added
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/webroot/css/cpanel/cpanel.css

    r460 r563  
    150150    color: #888a85; 
    151151    border: 1px solid #d3d7cf; 
    152     -moz-border-radius: 4px; 
     152    /* -moz-border-radius: 4px;*/ 
    153153    cursor: pointer; 
    154154} 
     
    253253    border: 1px solid #d3d7cf; 
    254254    -moz-border-radius: 2px; 
    255     border-radius: 2px; 
    256255    margin: 1em 1em 0; 
    257256    padding: 20px; 
  • trunk/app/webroot/js/admin.js

    r71 r563  
    5454} 
    5555 
     56// Get student total points  
     57function tp(user_id, vclassroom_id)  
     58{ 
     59 var url    = '/admin/vclassrooms/points/'+user_id +'/'+vclassroom_id; 
     60  
     61 var params = ''; 
     62 var ajax = new Ajax.Updater( 
     63                             {success: 'totalpoints'}, 
     64                              url, 
     65                             {method: 'get', parameters: params, onFailure: reportError}); 
     66} 
     67 
     68// Get student webquests points 
     69function tw(user_id, vclassroom_id)  
     70{ 
     71 var url    = '/admin/webquests/points/'+user_id +'/'+vclassroom_id; 
     72  
     73 var params = ''; 
     74 var ajax = new Ajax.Updater( 
     75                             {success: 'totalpoints'}, 
     76                              url, 
     77                             {method: 'get', parameters: params, onFailure: reportError}); 
     78} 
     79 
     80function reportError(request)  
     81{ 
     82  $F('totaloints') = "Error please contact support team"; 
     83} 
     84 
    5685function onok() { 
    5786        // Get the image tag field information 
  • trunk/app/webroot/js/myfunctions.js

    r529 r563  
    9696} 
    9797 
    98 function validatecode()  
    99 {    
    100    var code = document.getElementById("VclassmemberCode").value;  
    101     
    102    var invi = document.getElementById("hinvi").value; 
    103     
    104    //alert(code + invi); 
    105     
    106    if (invi == 1)  
    107    { 
    108       if ( !code || code == '' )  
    109       { 
    110          alert("You must type the code"); 
    111          return false; 
    112        } 
    113    } 
    114    return true; 
    115 } 
    116  
    117 function validateUser() { 
    118      
    119     var group     = document.getElementById('UserGroupId'); 
    120     var code      = document.getElementById('UserCode'); 
    121     var username  = document.getElementById('UserUsername'); 
    122     var name      = document.getElementById('UserName'); 
    123     var passwd    = document.getElementById('UserPasswd'); 
    124  var email     = document.getElementById('UserEmail'); 
    125      
    126     if (username.value.length < 6)  
    127     { 
    128          alert("Login must have at least six characters"); 
    129          username.focus(); 
    130          return false; 
    131     }     
    132      
    133     if (name.value.length < 6)  
    134     { 
    135          alert("Type your name and last name"); 
    136          name.focus(); 
    137          return false; 
    138     }     
    139   
    140      
    141     if (email.value.length < 3)  
    142     { 
    143          alert("You must type an email"); 
    144          email.focus(); 
    145          return false; 
    146     } 
    147      
    148     var check = validate_email(email.value); 
    149      
    150     if (check == false) 
    151     { 
    152          alert("Email is not valid"); 
    153          passwd.focus(); 
    154          return false; 
    155     } 
    156      
    157     if (passwd.value.length < 6)  
    158     { 
    159          alert("Password must have at least six characters"); 
    160          passwd.focus(); 
    161          return false; 
    162     }     
    163      
    164    //alert(code + invi); 
    165     
    166    if (group.value == 5)  
    167    { 
    168       if ( !code || code.value.length < 4 )  
    169       { 
    170          alert("You must type the code"); 
    171          code.focus(); 
    172          return false; 
    173        } 
    174    } 
    175    return true; 
    176 } 
    177  
    178 function validate_email(email) { 
    179      
    180  with (email) 
    181  { 
    182   var apos   = email.indexOf("@"); 
    183   var dotpos = email.lastIndexOf("."); 
    184  
    185      if (apos < 1|| dotpos-apos < 2)  
    186      { 
    187         return false; 
    188      } else { 
    189         return true; 
    190      } 
    191  } 
    192 } 
    193  
    194 function validateEntry() { 
    195     
    196    var EntryTitle = document.getElementById("EntryTitle");  
    197     
    198    var EntryBody = document.getElementById("EntryBody"); 
    199     
    200    if (EntryTitle.value.length < 1)  
    201    { 
    202          alert("You must type a title"); 
    203          return false; 
    204    } 
    205     
    206    if (EntryBody.value.length < 3)  
    207    { 
    208          alert("You must type the entry's body"); 
    209          return false; 
    210    }   
    211    return true; 
    212 } 
    213  
    21498function ocultar()  
    21599{