Browse Source

Renamed yii\jui\Widget::clientEventsMap to clientEventMap

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
c79965ce5f
  1. 2
      extensions/yii/jui/Slider.php
  2. 2
      extensions/yii/jui/SliderInput.php
  3. 2
      extensions/yii/jui/Spinner.php
  4. 6
      extensions/yii/jui/Widget.php
  5. 1
      framework/CHANGELOG.md

2
extensions/yii/jui/Slider.php

@ -26,7 +26,7 @@ use yii\helpers\Html;
*/ */
class Slider extends Widget class Slider extends Widget
{ {
protected $clientEventsMap = [ protected $clientEventMap = [
'change' => 'slidechange', 'change' => 'slidechange',
'create' => 'slidecreate', 'create' => 'slidecreate',
'slide' => 'slide', 'slide' => 'slide',

2
extensions/yii/jui/SliderInput.php

@ -43,7 +43,7 @@ use yii\helpers\Html;
*/ */
class SliderInput extends InputWidget class SliderInput extends InputWidget
{ {
protected $clientEventsMap = [ protected $clientEventMap = [
'change' => 'slidechange', 'change' => 'slidechange',
'create' => 'slidecreate', 'create' => 'slidecreate',
'slide' => 'slide', 'slide' => 'slide',

2
extensions/yii/jui/Spinner.php

@ -38,7 +38,7 @@ use yii\helpers\Html;
*/ */
class Spinner extends InputWidget class Spinner extends InputWidget
{ {
protected $clientEventsMap = [ protected $clientEventMap = [
'spin' => 'spin', 'spin' => 'spin',
]; ];

6
extensions/yii/jui/Widget.php

@ -46,7 +46,7 @@ class Widget extends \yii\base\Widget
* @var array event names mapped to what should be specified in .on( * @var array event names mapped to what should be specified in .on(
* If empty, it is assumed that event passed to clientEvents is prefixed with widget name. * If empty, it is assumed that event passed to clientEvents is prefixed with widget name.
*/ */
protected $clientEventsMap = []; protected $clientEventMap = [];
/** /**
* Initializes the widget. * Initializes the widget.
@ -97,8 +97,8 @@ class Widget extends \yii\base\Widget
$id = $this->options['id']; $id = $this->options['id'];
$js = []; $js = [];
foreach ($this->clientEvents as $event => $handler) { foreach ($this->clientEvents as $event => $handler) {
if (isset($this->clientEventsMap[$event])) { if (isset($this->clientEventMap[$event])) {
$eventName = $this->clientEventsMap[$event]; $eventName = $this->clientEventMap[$event];
} else { } else {
$eventName = $name.$event; $eventName = $name.$event;
} }

1
framework/CHANGELOG.md

@ -17,6 +17,7 @@ Yii Framework 2 Change Log
- Enh: Added `favicon.ico` and `robots.txt` to defauly application templates (samdark) - Enh: Added `favicon.ico` and `robots.txt` to defauly application templates (samdark)
- Enh: Added `Widget::autoIdPrefix` to support prefixing automatically generated widget IDs (qiangxue) - Enh: Added `Widget::autoIdPrefix` to support prefixing automatically generated widget IDs (qiangxue)
- Enh: Support for file aliases in console command 'message' (omnilight) - Enh: Support for file aliases in console command 'message' (omnilight)
- Chg: Renamed yii\jui\Widget::clientEventsMap to clientEventMap (qiangxue)
- New #1438: [MongoDB integration](https://github.com/yiisoft/yii2-mongodb) ActiveRecord and Query (klimov-paul) - New #1438: [MongoDB integration](https://github.com/yiisoft/yii2-mongodb) ActiveRecord and Query (klimov-paul)
2.0.0 alpha, December 1, 2013 2.0.0 alpha, December 1, 2013

Loading…
Cancel
Save