Update of /cvsroot/phpwebapp/web_app/parser
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3358/parser
Modified Files:
class.WebPage.php class.Parser.php
Log Message:
Index: class.WebPage.php
===================================================================
RCS file: /cvsroot/phpwebapp/web_app/parser/class.WebPage.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** class.WebPage.php 21 Jun 2005 08:39:51 -0000 1.16
--- class.WebPage.php 24 Jun 2005 14:50:35 -0000 1.17
***************
*** 47,51 ****
/**
* Keeps a list of translatable messages that are used
! * in the JavaScript code.
*/
var $js_i18n_messages;
--- 47,52 ----
/**
* Keeps a list of translatable messages that are used
! * in the JavaScript code. It is an associative array
! * with msgid as key and msgstr (translation) as value.
*/
var $js_i18n_messages;
***************
*** 61,66 ****
* Keeps a list of windows that are poped up after the page is loaded.
* It is a two dimensional array, indexed by name and with columns for
! * 'url' and 'features'.
! * @see WebApp::window($name, $url, $features)
*/
var $popup_windows;
--- 62,67 ----
* Keeps a list of windows that are poped up after the page is loaded.
* It is a two dimensional array, indexed by name and with columns for
! * 'url', 'features' and 'html_content'.
! * @see WebApp::popup_window($name, $url, $features, $html_content)
*/
var $popup_windows;
***************
*** 241,244 ****
--- 242,246 ----
while ( list($name,$data) = each ($this->popup_windows) )
{
+ //open the window
$url = $data['url'];
$features = $data['features'];
***************
*** 247,250 ****
--- 249,261 ----
else
$js .= " $name = window.open('$url', '$name', '$features');\n";
+
+ //write the content
+ $html_content = $data['html_content'];
+ if ($html_content!=UNDEFINED)
+ {
+ $html_content = str_replace("\n", '\\n', $html_content);
+ $html_content = str_replace("'", "\\'", $html_content);
+ $js .= " $name.document.write('$html_content');";
+ }
}
$js .= "</script>\n";
Index: class.Parser.php
===================================================================
RCS file: /cvsroot/phpwebapp/web_app/parser/class.Parser.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** class.Parser.php 9 Jun 2005 13:12:53 -0000 1.23
--- class.Parser.php 24 Jun 2005 14:50:35 -0000 1.24
***************
*** 184,192 ****
$err_idx = xml_get_current_byte_index($xml_parser);
! //get the part of the file arround the error
$start = ( (($err_idx-40) < 0) ? 0 : ($err_idx-40) );
$str_1 = substr($content, $start, $err_idx - $start);
$str_2 = substr($content, $err_idx, 10);
! $bad_xml = "... $str_1 ^err^ $str_2 ...";
$xml_err_msg = WebApp::xml_err_msg($fname, $line_nr, $col_nr,
--- 184,192 ----
$err_idx = xml_get_current_byte_index($xml_parser);
! //get the part of the file around the error
$start = ( (($err_idx-40) < 0) ? 0 : ($err_idx-40) );
$str_1 = substr($content, $start, $err_idx - $start);
$str_2 = substr($content, $err_idx, 10);
! $bad_xml = "... $str_1^err^$str_2 ...";
$xml_err_msg = WebApp::xml_err_msg($fname, $line_nr, $col_nr,
|