mirror of
https://github.com/brmlab/brmsklad.git
synced 2025-08-05 23:53:38 +02:00
Upgrade CakePHP from 2.2.5 to 2.9.5
This commit is contained in:
parent
5a580df460
commit
235a541597
793 changed files with 60746 additions and 23753 deletions
|
@ -2,25 +2,24 @@
|
|||
/**
|
||||
* jQuery Engine Helper for JsHelper
|
||||
*
|
||||
* Provides jQuery specific Javascript for JsHelper.
|
||||
* Provides jQuery specific JavaScript for JsHelper.
|
||||
*
|
||||
* Implements the JsHelper interface for jQuery. All $options arrays
|
||||
* Implements the JsHelper interface for jQuery. All $options arrays
|
||||
* support all options found in the JsHelper, as well as those in the jQuery
|
||||
* documentation.
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package Cake.View.Helper
|
||||
* @since CakePHP(tm) v 1.3
|
||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
App::uses('AppHelper', 'View/Helper');
|
||||
|
@ -29,9 +28,9 @@ App::uses('JsBaseEngineHelper', 'View/Helper');
|
|||
/**
|
||||
* jQuery Engine Helper for JsHelper
|
||||
*
|
||||
* Provides jQuery specific Javascript for JsHelper.
|
||||
* Provides jQuery specific JavaScript for JsHelper.
|
||||
*
|
||||
* Implements the JsHelper interface for jQuery. All $options arrays
|
||||
* Implements the JsHelper interface for jQuery. All $options arrays
|
||||
* support all options found in the JsHelper, as well as those in the jQuery
|
||||
* documentation.
|
||||
*
|
||||
|
@ -146,10 +145,10 @@ class JqueryEngineHelper extends JsBaseEngineHelper {
|
|||
* Create javascript selector for a CSS rule
|
||||
*
|
||||
* @param string $selector The selector that is targeted
|
||||
* @return JqueryEngineHelper instance of $this. Allows chained methods.
|
||||
* @return self
|
||||
*/
|
||||
public function get($selector) {
|
||||
if ($selector == 'window' || $selector == 'document') {
|
||||
if ($selector === 'window' || $selector === 'document') {
|
||||
$this->selection = $this->jQueryObject . '(' . $selector . ')';
|
||||
} else {
|
||||
$this->selection = $this->jQueryObject . '("' . $selector . '")';
|
||||
|
@ -166,13 +165,13 @@ class JqueryEngineHelper extends JsBaseEngineHelper {
|
|||
* - 'stop' - Whether you want the event to stopped. (defaults true)
|
||||
*
|
||||
* @param string $type Type of event to bind to the current dom id
|
||||
* @param string $callback The Javascript function you wish to trigger or the function literal
|
||||
* @param string $callback The JavaScript function you wish to trigger or the function literal
|
||||
* @param array $options Options for the event.
|
||||
* @return string completed event handler
|
||||
*/
|
||||
public function event($type, $callback, $options = array()) {
|
||||
$defaults = array('wrap' => true, 'stop' => true);
|
||||
$options = array_merge($defaults, $options);
|
||||
$options += $defaults;
|
||||
|
||||
$function = 'function (event) {%s}';
|
||||
if ($options['wrap'] && $options['stop']) {
|
||||
|
@ -189,7 +188,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper {
|
|||
* bind a 'traditional event' as `$(document).bind('ready', fn)`
|
||||
* Works in an entirely different fashion than `$(document).ready()`
|
||||
* The first will not run the function when eval()'d as part of a response
|
||||
* The second will. Because of the way that ajax pagination is done
|
||||
* The second will. Because of the way that ajax pagination is done
|
||||
* `$().ready()` is used.
|
||||
*
|
||||
* @param string $functionBody The code to run on domReady
|
||||
|
@ -226,7 +225,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper {
|
|||
switch ($name) {
|
||||
case 'slideIn':
|
||||
case 'slideOut':
|
||||
$name = ($name == 'slideIn') ? 'slideDown' : 'slideUp';
|
||||
$name = ($name === 'slideIn') ? 'slideDown' : 'slideUp';
|
||||
case 'hide':
|
||||
case 'show':
|
||||
case 'fadeIn':
|
||||
|
@ -234,7 +233,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper {
|
|||
case 'slideDown':
|
||||
case 'slideUp':
|
||||
$effect = ".$name($speed);";
|
||||
break;
|
||||
break;
|
||||
}
|
||||
return $this->selection . $effect;
|
||||
}
|
||||
|
@ -244,7 +243,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper {
|
|||
*
|
||||
* If the 'update' key is set, success callback will be overridden.
|
||||
*
|
||||
* @param string|array $url
|
||||
* @param string|array $url URL
|
||||
* @param array $options See JsHelper::request() for options.
|
||||
* @return string The completed ajax call.
|
||||
* @see JsBaseEngineHelper::request() for options list.
|
||||
|
@ -270,7 +269,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper {
|
|||
$options['success'] = $success;
|
||||
unset($options['update']);
|
||||
}
|
||||
$callbacks = array('success', 'error', 'beforeSend', 'complete');
|
||||
$callbacks = array('success', 'error', 'beforeSend', 'complete', 'xhr');
|
||||
if (!empty($options['dataExpression'])) {
|
||||
$callbacks[] = 'data';
|
||||
unset($options['dataExpression']);
|
||||
|
@ -339,14 +338,14 @@ class JqueryEngineHelper extends JsBaseEngineHelper {
|
|||
|
||||
/**
|
||||
* Serialize a form attached to $selector. If the current selection is not an input or
|
||||
* form, errors will be created in the Javascript.
|
||||
* form, errors will be created in the JavaScript.
|
||||
*
|
||||
* @param array $options Options for the serialization
|
||||
* @return string completed form serialization script.
|
||||
* @see JsBaseEngineHelper::serializeForm() for option list.
|
||||
*/
|
||||
public function serializeForm($options = array()) {
|
||||
$options = array_merge(array('isForm' => false, 'inline' => false), $options);
|
||||
$options += array('isForm' => false, 'inline' => false);
|
||||
$selector = $this->selection;
|
||||
if (!$options['isForm']) {
|
||||
$selector = $this->selection . '.closest("form")';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue