Thread: [phpwebapp-commits] CVS: web_app/parser class.WebPage.php,1.10,1.11 class.WebClassTpl.php,1.9,1.10 c
Brought to you by:
dashohoxha
From: Dashamir H. <das...@us...> - 2004-07-15 13:36:30
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2760/parser Modified Files: class.WebPage.php class.WebClassTpl.php class.Template.php class.Render.php class.Parser.php Log Message: Index: class.WebPage.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.WebPage.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** class.WebPage.php 14 Jul 2004 14:45:41 -0000 1.10 --- class.WebPage.php 15 Jul 2004 13:36:13 -0000 1.11 *************** *** 71,75 **** function append_to_head($str) { ! $this->tpl_collection["HeadTpl"]->contents .= $str; } --- 71,77 ---- function append_to_head($str) { ! $contents = $this->tpl_collection["HeadTpl"]->contents; ! $contents = ereg_replace('</head>', $str.'</head>', $contents); ! $this->tpl_collection["HeadTpl"]->contents = $contents; } *************** *** 191,195 **** $js = "<script type=\"text/javascript\" language=\"javascript\">\n"; ! $js .= "<![CDATA[\n"; for ($i=0; $i < sizeof($this->messages); $i++) { --- 193,197 ---- $js = "<script type=\"text/javascript\" language=\"javascript\">\n"; ! $js .= "//<![CDATA[\n"; for ($i=0; $i < sizeof($this->messages); $i++) { *************** *** 199,203 **** $js .= "\talert('$msg');\n"; } ! $js .= "]]>\n"; $js .= "</script>\n"; return $js; --- 201,205 ---- $js .= "\talert('$msg');\n"; } ! $js .= "//]]>\n"; $js .= "</script>\n"; return $js; Index: class.WebClassTpl.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.WebClassTpl.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** class.WebClassTpl.php 14 Jul 2004 14:45:41 -0000 1.9 --- class.WebClassTpl.php 15 Jul 2004 13:36:13 -0000 1.10 *************** *** 122,126 **** global $webPage; $fname = WebApp::to_url($fname); ! $include_js = " <script type=\"text/javascript\" language=\"JavaScript\" src=\"$fname\"></script>\n"; $webPage->append_to_head($include_js); } --- 122,126 ---- global $webPage; $fname = WebApp::to_url($fname); ! $include_js = " <script type=\"text/javascript\" language=\"javascript\" src=\"$fname\"></script>\n"; $webPage->append_to_head($include_js); } Index: class.Template.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Template.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** class.Template.php 14 Jul 2004 14:45:41 -0000 1.10 --- class.Template.php 15 Jul 2004 13:36:13 -0000 1.11 *************** *** 184,188 **** <td bgcolor='#eeeeee' align='right'>Indent:</td> <td bgcolor='#f9f9f9'> ! <pre><span style='background-color: #888888;'>$indent</span></pre> </td> </tr> --- 184,188 ---- <td bgcolor='#eeeeee' align='right'>Indent:</td> <td bgcolor='#f9f9f9'> ! <span style='background-color: #888888;'>$indent</span> </td> </tr> Index: class.Render.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Render.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** class.Render.php 14 Jul 2004 14:45:41 -0000 1.10 --- class.Render.php 15 Jul 2004 13:36:13 -0000 1.11 *************** *** 253,258 **** function render_MainTpl($main_tpl) { ! $main_tpl->head->contents = '<head>'.$main_tpl->head->contents; ! $main_tpl->head->contents .= '</head>'; $main_tpl->body->contents .= '</body>'; /* --- 253,257 ---- function render_MainTpl($main_tpl) { ! //the body element was not closed in order to append easily other things $main_tpl->body->contents .= '</body>'; /* Index: class.Parser.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Parser.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** class.Parser.php 14 Jul 2004 14:45:41 -0000 1.11 --- class.Parser.php 15 Jul 2004 13:36:13 -0000 1.12 *************** *** 20,1014 **** */ ! /** ! * Parses the templates and constructs $webPage, which ! * keeps the structure of the page. ! * ! * @package parser ! * @see WebPage, Render ! */ [...2010 lines suppressed...] ! print " * ->: "; ! print $this->current_tpl->type; ! print " (".$this->current_tpl->id.")\n"; ! for ($i=sizeof($this->tpl_stack)-1; $i >= 0; $i--) ! { ! if (gettype($this->tpl_stack[$i])=="object") ! { ! print " * $i: "; ! print $this->tpl_stack[$i]->type; ! print " (".$this->tpl_stack[$i]->id.")\n"; ! } ! else ! { ! print " * $i: ".$this->tpl_stack[$i]."\n"; ! } ! } ! } ! } ?> \ No newline at end of file |