2017 © Pedro Peláez
 

yii2-extension yii2-noty

Yii widget for Noty jQuery notification plugin

image

izemize/yii2-noty

Yii widget for Noty jQuery notification plugin

  • Monday, February 15, 2016
  • by izemize
  • Repository
  • 0 Watchers
  • 1 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

yii2-noty

Yii2 widget for Noty jQuery notification plugin, Visit Noty, (*1)

For Yii1: Please check yii-noty, (*2)

Installation:

The preferred way to install this extension is through composer, (*3)

Note: The instructions below refer to the global composer installation. You might need to replace composer with php composer.phar (or similar) for your setup., (*4)

Direct install:, (*5)

composer require shifrin/yii2-noty 1.0.1

or add it manually to the composer.json and update composer, (*6)

"shifrin/yii2-noty": "1.0.1",
composer update



## Usage Details: Add the widget in your main layout file like below,
\shifrin\noty\NotyWidget::widget([ 'options' => [ // you can add js options here, see noty plugin page for available options 'dismissQueue' => true, 'layout' => 'topCenter', 'theme' => 'relax', 'animation' => [ 'open' => 'animated flipInX', 'close' => 'animated flipOutX', ], 'timeout' => false ], 'enableSessionFlash' => true 'enableIcon' => true, 'registerAnimateCss' => true, 'registerButtonsCss' => true, 'registerFontAwesomeCss' => true, ]);

This widget will create a JS function `Noty()`, so it will be available globally and you can call this function in your custom JS codes. See the following example below
var n = Noty('id'); $.noty.setText(n.options.id, 'Welcome to our site!'); $.noty.setType(n.options.id, 'information');

You can set the flash messages like this in your controller or anywhere you need. However, if you set `enableSessionFlash` to `false` it won't be affected.
\Yii::$app->session->setFlash('type', 'Message here');

Replace type with available types, (*7)

Available Types:

  • success
  • error
  • warning
  • information
  • alert

The Versions

15/02 2016

dev-master

9999999-dev

Yii widget for Noty jQuery notification plugin

  Sources   Download

MIT

The Requires

 

by Mohammed Shifreen

yii2 message notification alert flash noty

15/02 2016

dev-patch-2

dev-patch-2

Yii widget for Noty jQuery notification plugin

  Sources   Download

MIT

The Requires

 

by Mohammed Shifreen

yii2 message notification alert flash noty

11/01 2016

dev-patch-1

dev-patch-1

Yii widget for Noty jQuery notification plugin

  Sources   Download

MIT

The Requires

 

by Mohammed Shifreen

yii2 message notification alert flash noty

10/01 2016

v1.0.1

1.0.1.0

Yii widget for Noty jQuery notification plugin

  Sources   Download

MIT

The Requires

 

by Mohammed Shifreen

yii2 message notification alert flash noty

10/01 2016

v1.0

1.0.0.0

Yii widget for Noty jQuery notification plugin

  Sources   Download

MIT

The Requires

 

by Mohammed Shifreen

yii2 message notification alert flash noty

06/01 2016

v0.1-alpha

0.1.0.0-alpha

Yii widget for Noty jQuery notification plugin

  Sources   Download

MIT

The Requires

 

by Mohammed Shifreen

yii2 message notification alert flash noty