summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Weber2007-08-31 18:59:49 +0000
committerChristian Weber2007-08-31 18:59:49 +0000
commitfc0049f0dc6bc710d1336f46a3dd8549ac48c90c (patch)
tree88a7ddc8e2950fd64446e406bb1d6366b8ddfa9f
parenteaeb6b586db5a06c7d2f91d7f8b8e259be5bea22 (diff)
downloaditools-fc0049f0dc6bc710d1336f46a3dd8549ac48c90c.tar.gz
itools-fc0049f0dc6bc710d1336f46a3dd8549ac48c90c.tar.bz2
itools-fc0049f0dc6bc710d1336f46a3dd8549ac48c90c.zip
get rid of oldhtml (use htmltypee), don't add it_boot tags outside of body
-rw-r--r--it_html.class19
1 files changed, 10 insertions, 9 deletions
diff --git a/it_html.class b/it_html.class
index 79ba540..7acaa69 100644
--- a/it_html.class
+++ b/it_html.class
@@ -64,8 +64,6 @@ function it_html($p = array())
'xhtml-mobile' => '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">'
);
- $this->p['oldhtml'] = $this->p['htmltype'] == "html";
-
$this->hasnonewline = array_flip(explode(',', "dummy," . $this->p['nonewlinetags'])); # dummy keeps values > 0
$notexported = array_flip(explode(',', "dummy," . $this->p['notexported'])); # dummy keeps values > 0
@@ -181,10 +179,13 @@ function head($args = array())
*/
function body($args)
{
- return $this->head() .
- ($this->p['use_it_state'] ? tag('iframe', array('id' => "it_state", 'src' => "/itjs/state.html", 'width' => 1, 'height' => 1, 'frameborder' => 0)) : '') .
- $this->_tag('body', $args) .
- ($this->p['show_boot_dom'] ? div(array('id' => "it_boot_dom", 'style' => "visibility:hidden")) : '');
+ if ($this->p['use_it_state'])
+ array_unshift($args, tag('iframe', array('id' => "it_state", 'src' => "/itjs/state.html", 'width' => 1, 'height' => 1, 'frameborder' => 0)));
+
+ if ($this->p['show_boot_dom'])
+ $args[] = div(array('id' => "it_boot_dom", 'style' => "visibility:hidden"));
+
+ return $this->head() . $this->_tag('body', $args);
}
@@ -238,13 +239,13 @@ function _tag($name, $args)
else if (isset($value) && $value !== true) # normal case: value
$result .= " $key=\"" . (preg_match("/[<>&\"'\n\x80-\x9f]/", $value) ? str_replace("\n", "&#10;", Q($value)) : $value) . '"';
else # true: tag without value
- $result .= $this->p['oldhtml'] ? " $key" : " $key=\"$key\"";
+ $result .= ($this->p['htmltype'] == 'html') ? " $key" : " $key=\"$key\"";
}
# Apply a kind of magic... this needs further investigation
if (isset($data) || preg_match('/^(a|div|iframe|script|span|td|textarea)$/i', $name))
$result .= ">$data</$name>$newline";
- elseif ($this->p['oldhtml'])
+ elseif ($this->p['htmltype'] == 'html')
$result .= ">$newline";
else
$result .= " />$newline";
@@ -458,7 +459,7 @@ function u(/* ... */)
*/
function js($args)
{
- if (!$this->p['oldhtml'] && isset($args[0]))
+ if (($this->p['htmltype'] != 'html') && isset($args[0]))
{
array_unshift($args, "<!--//--><![CDATA[//><!--\n");
$args[] = "\n//--><!]]>";