Fixing default JavaScript template, and code generation

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4562 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2007-02-27 18:23:09 +00:00
parent c0ac0f536b
commit e823ca1bf2
2 changed files with 12 additions and 2 deletions

View file

@ -115,7 +115,7 @@ class JsHelper extends Overloadable2 {
*
* @return string
*/
function tryThese($expr1, $expr2, $expr3) {
function tryThese_($expr1, $expr2, $expr3) {
}
/**
* Loads a remote URL
@ -162,6 +162,16 @@ class JsHelper extends Overloadable2 {
}
return $func;
}
/**
* Redirects to a URL
*
* @param mixed $url
* @param array $options
* @return string
*/
function redirect_($url = null) {
return 'window.location = "' . Router::url($url) . '";';
}
/**
* Escape a string to be JavaScript friendly.
*

View file

@ -1,2 +1,2 @@
<?php echo $scripts_for_layout; ?>
<?php echo $content_for_layout; ?>
<script type="text/javascript"><?php echo $content_for_layout; ?></script>