Code Monkey home page Code Monkey logo

yii2-widget-growl's Introduction

Krajee Logo
yii2-widget-growl
Donate       kartikv

Stable Version Unstable Version License Total Downloads Monthly Downloads Daily Downloads

A widget that turns standard Bootstrap alerts into "Growl-like" notifications. This widget is a wrapper for the Bootstrap Growl plugin by remabledesigns.

NOTE: This extension is a sub repo split of yii2-widgets. The split has been done since 08-Nov-2014 to allow developers to install this specific widget in isolation if needed. One can also use the extension the previous way with the whole suite of yii2-widgets.

Installation

The preferred way to install this extension is through composer. Check the composer.json for this extension's requirements and dependencies. Read this web tip /wiki on setting the minimum-stability settings for your application's composer.json.

To install, either run

$ php composer.phar require kartik-v/yii2-widget-growl "*"

or add

"kartik-v/yii2-widget-growl": "*"

to the require section of your composer.json file.

Latest Release

Refer the CHANGE LOG for details on changes to various releases.

Demo

You can refer detailed documentation and demos on usage of the extension.

Usage

use kartik\growl\Growl;

echo Growl::widget([
	'type' => Growl::TYPE_SUCCESS,
	'icon' => 'glyphicon glyphicon-ok-sign',
	'title' => 'Note',
	'showSeparator' => true,
	'body' => 'This is a successful growling alert.'
]);

License

yii2-widget-growl is released under the BSD-3-Clause License. See the bundled LICENSE.md for details.

yii2-widget-growl's People

Contributors

kartik-v avatar vismutx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

yii2-widget-growl's Issues

growl.css not loaded?

It seems css class 'growl-close' is missed and close button not displayed correctly. Please take a look ad screenshot
close-button

Any hint?

using event onShow

It seems like the events are not working.
Here is my code
<?= \kartik\growl\Growl::widget([ 'type' => 'success', 'title' => 'Congrats', 'icon' => 'glyphicon glyphicon-info-sign', 'body' => $message, 'showSeparator' => true, 'delay' => 0, 'pluginOptions' => [ 'onShow' => 'function() { alert("ok"); console.log("yes"); }', ], ]); ?>

I've found nothing on documentation.

Call from javascript

I use ajax to send form and get response in form of JSON. The response contains type (success/error), title, and message. How could I call the growl from javascript given I have title and message?

Thanks a lot.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Improve code override

Hi,
I need to change html for my growl.
I override protected method initOptions.

Problem:
$this->_settings is private so if I override initOptions I need to declare it in my class
I also need to redeclare protected function registerAssets() since it uses $this->_settings too

Why don't declare a protected method only for html generation?

Thanks in advance


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.