diff --git a/extensions/yii/jui/Slider.php b/extensions/yii/jui/Slider.php index f051b9e..b1efcce 100644 --- a/extensions/yii/jui/Slider.php +++ b/extensions/yii/jui/Slider.php @@ -26,7 +26,7 @@ use yii\helpers\Html; */ class Slider extends Widget { - protected $clientEventsMap = [ + protected $clientEventMap = [ 'change' => 'slidechange', 'create' => 'slidecreate', 'slide' => 'slide', @@ -42,4 +42,4 @@ class Slider extends Widget echo Html::tag('div', '', $this->options); $this->registerWidget('slider', SliderAsset::className()); } -} \ No newline at end of file +} diff --git a/extensions/yii/jui/SliderInput.php b/extensions/yii/jui/SliderInput.php index cc77103..8ded4e8 100644 --- a/extensions/yii/jui/SliderInput.php +++ b/extensions/yii/jui/SliderInput.php @@ -43,7 +43,7 @@ use yii\helpers\Html; */ class SliderInput extends InputWidget { - protected $clientEventsMap = [ + protected $clientEventMap = [ 'change' => 'slidechange', 'create' => 'slidecreate', 'slide' => 'slide', @@ -76,4 +76,4 @@ class SliderInput extends InputWidget $this->registerWidget('slider', SliderAsset::className()); $this->getView()->registerJs('$("#'.$inputId.'").val($("#'.$this->id.'").slider("value"));'); } -} \ No newline at end of file +} diff --git a/extensions/yii/jui/Spinner.php b/extensions/yii/jui/Spinner.php index d6a5026..d53bd3a 100644 --- a/extensions/yii/jui/Spinner.php +++ b/extensions/yii/jui/Spinner.php @@ -38,7 +38,7 @@ use yii\helpers\Html; */ class Spinner extends InputWidget { - protected $clientEventsMap = [ + protected $clientEventMap = [ 'spin' => 'spin', ]; diff --git a/extensions/yii/jui/Widget.php b/extensions/yii/jui/Widget.php index ced00fb..90bad68 100644 --- a/extensions/yii/jui/Widget.php +++ b/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( * If empty, it is assumed that event passed to clientEvents is prefixed with widget name. */ - protected $clientEventsMap = []; + protected $clientEventMap = []; /** * Initializes the widget. @@ -97,8 +97,8 @@ class Widget extends \yii\base\Widget $id = $this->options['id']; $js = []; foreach ($this->clientEvents as $event => $handler) { - if (isset($this->clientEventsMap[$event])) { - $eventName = $this->clientEventsMap[$event]; + if (isset($this->clientEventMap[$event])) { + $eventName = $this->clientEventMap[$event]; } else { $eventName = $name.$event; } diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index a09910e..978bb98 100644 --- a/framework/CHANGELOG.md +++ b/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 `Widget::autoIdPrefix` to support prefixing automatically generated widget IDs (qiangxue) - 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) 2.0.0 alpha, December 1, 2013