Commit c79965ce by Qiang Xue

Renamed yii\jui\Widget::clientEventsMap to clientEventMap

parent 7d1c4637
......@@ -26,7 +26,7 @@ use yii\helpers\Html;
*/
class Slider extends Widget
{
protected $clientEventsMap = [
protected $clientEventMap = [
'change' => 'slidechange',
'create' => 'slidecreate',
'slide' => 'slide',
......
......@@ -43,7 +43,7 @@ use yii\helpers\Html;
*/
class SliderInput extends InputWidget
{
protected $clientEventsMap = [
protected $clientEventMap = [
'change' => 'slidechange',
'create' => 'slidecreate',
'slide' => 'slide',
......
......@@ -38,7 +38,7 @@ use yii\helpers\Html;
*/
class Spinner extends InputWidget
{
protected $clientEventsMap = [
protected $clientEventMap = [
'spin' => 'spin',
];
......
......@@ -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;
}
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment