roundcubemail/program/include/rcmail_output_html.php
protected function preloader($attrib)
    {
        $images = preg_split('/[\s\t\n,]+/', $attrib['images'], -1, PREG_SPLIT_NO_EMPTY);
        $images = array_map(array($this, 'abs_url'), $images);
        $images = array_map(array($this, 'asset_url'), $images);

        if (empty($images) || $_REQUEST['_task'] == 'logout') {
            return;
        }

        $this->add_script('var images = ' . self::json_serialize($images, $this->devel_mode) .';
            for (var i=0; i<images.length; i++) {
                img = new Image();
                img.src = images[i];
            }', 'docready');
    }
protected function preloader($attrib)
    {
        $images = preg_split('/[\s\t\n,]+/', $attrib['images'], -1, PREG_SPLIT_NO_EMPTY);
        $images = array_map(array($this, 'abs_url'), $images);
        $images = array_map(array($this, 'asset_url'), $images);

        if (empty($images) || $_REQUEST['_task'] == 'logout') {
            return;
        }

        $this->add_script('var images = ' . self::json_serialize($images, $this->devel_mode) .';
            for (var i=0; i<images.length; i++) {
                img = new Image();
                img.src = images[i];
            }', 'docready');
    }
protected function preloader ( $ attrib ) { $ images = preg_split ( '/[\s\t\n,]+/' , $ attrib [ 'images' ] , - 1 , PREG_SPLIT_NO_EMPTY ) ; $ images = array_map ( array ( $ this , 'abs_url' ) , $ images ) ; $ images = array_map ( array ( $ this , 'asset_url' ) , $ images ) ; if ( empty ( $ images ) || $ _REQUEST [ '_task' ] == 'logout' ) { return ; } $ this -> add_script ( 'var images = ' . self :: json_serialize ( $ images , $ this -> devel_mode ) . ';
            for (var i=0; i<images.length; i++) {
                img = new Image();
                img.src = images[i];
            }' , 'docready' ) ; }
GUI object 'preloader'
Loads javascript code for images preloading

@param array $attrib Named parameters
@return void
GUI object preloader Loads javascript code for images preloading