[phpwebapp-commits] CVS: web_app/parser class.WebObjectTpl.php,1.6,1.7 class.Render.php,1.6,1.7 clas
Brought to you by:
dashohoxha
From: Dashamir H. <das...@us...> - 2003-09-24 14:20:12
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1:/tmp/cvs-serv28723/parser Modified Files: class.WebObjectTpl.php class.Render.php class.Parser.php Log Message: Improved the identation of webobjects. Index: class.WebObjectTpl.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.WebObjectTpl.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** class.WebObjectTpl.php 25 Aug 2003 13:18:32 -0000 1.6 --- class.WebObjectTpl.php 24 Sep 2003 14:20:08 -0000 1.7 *************** *** 41,44 **** --- 41,46 ---- var $obj_count; + /** Helps to render the template with a good indentation. */ + var $indentation; /** Constructor */ Index: class.Render.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Render.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** class.Render.php 25 Aug 2003 13:18:32 -0000 1.6 --- class.Render.php 24 Sep 2003 14:20:08 -0000 1.7 *************** *** 223,227 **** --- 223,234 ---- $wobj_tpl->onRender(); + //increase indentation + $prev_indent = $this->indent; + $this->indent .= $wobj_tpl->indentation; + $this->render_tpl($wobj_tpl); //render it to HTML + + //revert to previous indentation + $this->indent = $prev_indent; $tplVars->popScope(); Index: class.Parser.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Parser.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** class.Parser.php 8 Sep 2003 13:18:24 -0000 1.7 --- class.Parser.php 24 Sep 2003 14:20:08 -0000 1.8 *************** *** 662,665 **** --- 662,667 ---- $tpl->params = $webClassTpl->params; $tpl->construct_WebObject($full_obj_name); + ereg("(^ *)", $line, $regs); + $tpl->indentation = $regs[1]; //get the values of the parameter attributes |