Changeset 044d664 in github
- Timestamp:
- Mar 1, 2011 5:33:12 PM (2 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 79cd6ce
- Parents:
- e490642
- Location:
- program/include
- Files:
-
- 3 edited
-
main.inc (modified) (1 diff)
-
rcube_html_page.php (modified) (3 diffs)
-
rcube_template.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/include/main.inc
rf572575 r044d664 1662 1662 $quota = rcmail_quota_content($attrib); 1663 1663 1664 $OUTPUT->add_script('$(document).ready(function(){ 1665 rcmail.set_quota('.json_serialize($quota).')});', 'foot'); 1664 $OUTPUT->add_script('rcmail.set_quota('.json_serialize($quota).');', 'docready'); 1666 1665 1667 1666 return html::span($attrib, ''); -
program/include/rcube_html_page.php
r798764c r044d664 6 6 | | 7 7 | This file is part of the Roundcube PHP suite | 8 | Copyright (C) 2005-20 09,The Roundcube Dev Team |8 | Copyright (C) 2005-2011 The Roundcube Dev Team | 9 9 | Licensed under the GNU GPL | 10 10 | | … … 34 34 35 35 protected $script_tag_file = "<script type=\"text/javascript\" src=\"%s\"></script>\n"; 36 protected $script_tag = "<script type=\"text/javascript\">\n/* <![CDATA[ */\n%s\n/* ]]> */\n</script> ";36 protected $script_tag = "<script type=\"text/javascript\">\n/* <![CDATA[ */\n%s\n/* ]]> */\n</script>\n"; 37 37 protected $link_css_file = "<link rel=\"stylesheet\" type=\"text/css\" href=\"%s\" />\n"; 38 38 protected $default_template = "<html>\n<head><title></title></head>\n<body></body>\n</html>"; … … 209 209 } 210 210 211 // put docready commands into page footer 212 if (!empty($this->scripts['docready'])) { 213 $this->add_script('$(document).ready(function(){ ' . $this->scripts['docready'] . "\n});", 'foot'); 214 } 215 211 216 if (is_array($this->script_files['foot'])) { 212 217 foreach ($this->script_files['foot'] as $file) { -
program/include/rcube_template.php
rae39c47 r044d664 6 6 | | 7 7 | This file is part of the Roundcube Webmail client | 8 | Copyright (C) 2006-201 0, The Roundcube Dev Team |8 | Copyright (C) 2006-2011, The Roundcube Dev Team | 9 9 | Licensed under the GNU GPL | 10 10 | | … … 58 58 * Constructor 59 59 * 60 * @todo Use jQuery's $(document).ready() here.61 60 * @todo Replace $this->config with the real rcube_config object 62 61 */ … … 80 79 81 80 // don't wait for page onload. Call init at the bottom of the page (delayed) 82 $ javascript_foot = '$(document).ready(function(){ '.JS_OBJECT_NAME.'.init(); });';81 $this->add_script(JS_OBJECT_NAME.'.init();', 'docready'); 83 82 84 83 $this->add_script($javascript, 'head_top'); 85 $this->add_script($javascript_foot, 'foot');86 84 $this->scripts_path = 'program/js/'; 87 85 $this->include_script('jquery-1.5.min.js'); … … 1153 1151 return; 1154 1152 1155 $this->add_script('$(document).ready(function(){ 1156 var images = ' . json_serialize($images) .'; 1153 $this->add_script('var images = ' . json_serialize($images) .'; 1157 1154 for (var i=0; i<images.length; i++) { 1158 1155 img = new Image(); 1159 1156 img.src = images[i]; 1160 } });', 'foot');1157 }', 'docready'); 1161 1158 } 1162 1159
Note: See TracChangeset
for help on using the changeset viewer.
