Changeset 8e211ad in github


Ignore:
Timestamp:
Apr 21, 2010 4:21:33 AM (3 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
479a9915
Parents:
dd51b73
Message:
  • Add images pre-loading on login page (#1451160)
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r3544558 r8e211ad  
    22=========================== 
    33 
     4- Add images pre-loading on login page (#1451160) 
    45- Add HTTP_X_REAL_IP and HTTP_X_FORWARDED_FOR to successful logins log (#1486441) 
    56- Fix setting spellcheck languages with extended codes (#1486605) 
  • program/include/rcube_template.php

    r9b3fdc2 r8e211ad  
    8181        $this->add_handlers(array( 
    8282            'loginform'       => array($this, 'login_form'), 
     83            'preloader'       => array($this, 'preloader'), 
    8384            'username'        => array($this, 'current_username'), 
    8485            'message'         => array($this, 'message_container'), 
     
    10701071 
    10711072        return $out; 
     1073    } 
     1074 
     1075 
     1076    /** 
     1077     * GUI object 'preloader' 
     1078     * Loads javascript code for images preloading 
     1079     * 
     1080     * @param array Named parameters 
     1081     * @return void 
     1082     */ 
     1083    private function preloader($attrib) 
     1084    { 
     1085        $images = preg_split('/[\s\t\n,]+/', $attrib['images'], -1, PREG_SPLIT_NO_EMPTY); 
     1086        $images = array_map(array($this, 'abs_url'), $images); 
     1087 
     1088        if (empty($images) || $this->app->task == 'logout') 
     1089            return; 
     1090 
     1091        $this->add_script('$(document).ready(function(){ 
     1092            var images = ' . json_serialize($images) .'; 
     1093            for (var i=0; i<images.length; i++) { 
     1094                img = new Image(); 
     1095                img.src = images[i]; 
     1096            }});', 'foot'); 
    10721097    } 
    10731098 
  • skins/default/templates/login.html

    rdf2a51e r8e211ad  
    2525</div> 
    2626 
     27<roundcube:object name="preloader" images=" 
     28    /images/icons/folders.png 
     29    /images/mail_footer.png 
     30    /images/taskicons.gif 
     31    /images/display/loading.gif 
     32    /images/pagenav.gif 
     33    /images/mail_toolbar.png 
     34    /images/searchfield.gif 
     35    /images/icons/glass_roll.png 
     36    /images/icons/reset.gif 
     37    /images/icons/attachment.png 
     38    /images/icons/dot.png 
     39    /images/icons/unread.png   
     40 
     41    /images/abook_toolbar.png 
     42    /images/icons/glass.png 
     43    /images/icons/groupactions.png 
     44    /images/watermark.gif 
     45" /> 
     46 
    2747</body> 
    2848</html> 
Note: See TracChangeset for help on using the changeset viewer.