Skip to content

Commit

Permalink
default layer
Browse files Browse the repository at this point in the history
  • Loading branch information
loveorigami committed Mar 28, 2016
1 parent ed43059 commit 91d7f23
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# CHANGELOG

## 2.1 [28 March 2016]
- `enh` Added new default layer Alert

## 2.0 [26 March 2016]
- `enh` Added new entity "Layers".
- `enh` Delete widgets from composer.
- `fix` Fixed translations sourceLanguage (thezilla-)

## 1.1 [22 March 2016]
- `enh` Rename Noty to Wrapper. First stable release

## 1.0 [21 March 2016]
- `fix` Refactoring #1 (@SilverFire)
- `enh` Noty widget
5 changes: 2 additions & 3 deletions docs/Alert.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ Usage
```php
use lo\modules\noty\widgets\Wrapper;

Wrapper::widget([
'layerClass' => 'lo\modules\noty\widgets\layers\Alert'
]);
Wrapper::widget();

```
Since v.2.1 ```'layerClass' => 'lo\modules\noty\widgets\layers\Alert'``` is default for this module
6 changes: 4 additions & 2 deletions src/widgets/Wrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ class Wrapper extends \yii\base\Widget
const TYPE_WARNING = 'warning';

/** @const wrapper id */
const WRAP_ID = 'noty-warap';
const WRAP_ID = 'noty-warp';

/** @const default Layer */
const DEFAULT_LAYER = 'lo\modules\noty\widgets\layers\Alert';

/** @var array $types */
public $types = [self::TYPE_INFO, self::TYPE_ERROR, self::TYPE_SUCCESS, self::TYPE_WARNING];
Expand Down Expand Up @@ -82,7 +84,7 @@ public function init()
public function run()
{
if (!$this->layerClass) {
throw new InvalidParamException(Yii::t('noty', 'layerClass not configurated'));
$this->layerClass = self::DEFAULT_LAYER;
}

$this->isAjax = false;
Expand Down

0 comments on commit 91d7f23

Please sign in to comment.