mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
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:
parent
c0ac0f536b
commit
e823ca1bf2
2 changed files with 12 additions and 2 deletions
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<?php echo $scripts_for_layout; ?>
|
||||
<?php echo $content_for_layout; ?>
|
||||
<script type="text/javascript"><?php echo $content_for_layout; ?></script>
|
Loading…
Add table
Reference in a new issue