diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 780fd3f5e1..151ad7b580 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -56,6 +56,7 @@ Yii Framework 2 Change Log - Enh #9901: Default `Cache.SerializerPermissions` configuration option for `HTMLPurifier` is set to `0775` (klimov-paul) - Enh #10056: Allowed any callable to be passed to `ActionColumn::$urlCreator` (freezy-sk) - Enh #10061: `yii\helpers\BaseInflector::transliterate()` is now public. Introduced different levels of transliteration strictness (silverfire) +- Enh #10098: Changed `yii.confirm` context to the event's target DOM element which is triggered by clickable or changeable elements (lichunqiang) - Enh #10118: Allow easy extension of slug generation in `yii\behaviors\SluggableBehavior` (cebe, hesna) - Enh #10149: Made `yii\db\Connection` serializable (Sam Mousa) - Enh: Added last resort measure for `FileHelper::removeDirectory()` fail to unlink symlinks under Windows (samdark) @@ -63,7 +64,6 @@ Yii Framework 2 Change Log - Chg #9411: `DetailView` now automatically sets container tag ID in case it's not specified (samdark) - Chg #9953: `TimestampBehavior::getValue()` changed to make value processing consistent with `AttributeBehavior::getValue()` (silverfire) - New #10083: Added wrapper for PHP webserver (samdark) -- Enh #10098: Changed `yii.confirm` context bind to triggered dom element. (lichunqiang) 2.0.6 August 05, 2015 --------------------- diff --git a/framework/UPGRADE.md b/framework/UPGRADE.md index 9f789f3b81..66ba964ec1 100644 --- a/framework/UPGRADE.md +++ b/framework/UPGRADE.md @@ -25,8 +25,10 @@ initialization to support wider range of allowed characters. Because of this cha See the [Cache Flushing Guide](http://www.yiiframework.com/doc-2.0/guide-caching-data.html#cache-flushing) - If you implement `parseRequest()` or `createUrl()` and rely on parameter names, call `substitutePlaceholderNames()` in order to replace temporary IDs with parameter names after doing matching. -* The context of `yii.confirm` function in `yii.js` was changed to the triggered dom element. - - If you rewrited the `yii.confirm` function, you can get the triggered dom element as: `this` or `$(this)` to get jquery object. +* The context of `yii.confirm` JavaScript function was changed from `yii` object to the DOM element which triggered +the event. + - If you overrode the `yii.confirm` function and accessed the `yii` object through `this`, you must access it +with global variable `yii` instead. Upgrade from Yii 2.0.5 ----------------------