From 313dd70b68f9df7e0cd49e3d46b3f7d002fc73a3 Mon Sep 17 00:00:00 2001 From: Loveorigami Date: Tue, 3 Jan 2017 13:54:30 +0300 Subject: [PATCH] jquery toaster plugin --- docs/JqueryToastPlugin.md | 35 ++++++++++++++ docs/JqueryToaster.md | 4 +- docs/img/jquery-toast-plugin.jpg | Bin 0 -> 29508 bytes src/assets/JqueryToastPluginAsset.php | 30 ++++++++++++ src/layers/JqueryToastPlugin.php | 63 ++++++++++++++++++++++++++ 5 files changed, 130 insertions(+), 2 deletions(-) create mode 100644 docs/JqueryToastPlugin.md create mode 100644 docs/img/jquery-toast-plugin.jpg create mode 100644 src/assets/JqueryToastPluginAsset.php create mode 100644 src/layers/JqueryToastPlugin.php diff --git a/docs/JqueryToastPlugin.md b/docs/JqueryToastPlugin.md new file mode 100644 index 0000000..dd9f470 --- /dev/null +++ b/docs/JqueryToastPlugin.md @@ -0,0 +1,35 @@ +# Jquery Toast Plugin +!["Jquery Toast Plugin"](img/jquery-toast-plugin.jpg) + +Installation +-------- + +```bash +"loveorigami/yii2-notification-wrapper": "*", +"bower-asset/jquery-toast-plugin": "*" +``` + +to the ```require``` section of your `composer.json` file. + + +Usage +----- + +```php +use lo\modules\noty\Wrapper; + +echo Wrapper::widget([ + 'layerClass' => 'lo\modules\noty\layers\JqueryToastPlugin', + // default options + 'options' => [ + 'showHideTransition' => 'slide', // It can be plain, fade or slide + 'allowToastClose' => 'true', // Show the close button or not + 'hideAfter' => 3000, // `false` to make it sticky or time in miliseconds to hide after + 'stack' => 5, // `false` to show one stack at a time count showing the number of toasts that can be shown at once + 'position' => 'top-right', // bottom-left or bottom-right or bottom-center or top-left or top-right or top-center or mid-center or an object representing the left, right, top, bottom values to position the toast on page + + // and more for this library here https://github.com/kamranahmedse/jquery-toast-plugin + ], +]); + +``` diff --git a/docs/JqueryToaster.md b/docs/JqueryToaster.md index ee317b9..f70a693 100644 --- a/docs/JqueryToaster.md +++ b/docs/JqueryToaster.md @@ -1,5 +1,5 @@ # Jquery Toaster -!["Jquery Notify"](img/jquery_toaster.jpg) +!["JqueryToaster"](img/jquery_toaster.jpg) Installation -------- @@ -19,7 +19,7 @@ Usage use lo\modules\noty\Wrapper; echo Wrapper::widget([ - 'layerClass' => 'lo\modules\noty\layers\JqueryNotify', + 'layerClass' => 'lo\modules\noty\layers\JqueryToaster', // default options 'options' => [ 'settings' => [ diff --git a/docs/img/jquery-toast-plugin.jpg b/docs/img/jquery-toast-plugin.jpg new file mode 100644 index 0000000000000000000000000000000000000000..167566a2978fb35f4dfdaba803593d8877821448 GIT binary patch literal 29508 zcmeFZ2UJsAw>BIE6c9y`Dj+DmBOU1~C2#=g9aK6op$F+G2MblYbd@GuN(en7QbLs$ zBq8(;p@bR;@W*q```-7yw|(FJ#`yp5ALDKY$;jSWS#z%a%(dp4&z$@G=lKlanvNz= z6F^4#drbNRoSy+Wf74KZ$YtW>;0p10=HcSzkdc#LpdhEDq@W=EObF>3fZ{qO{q4Kz7jGCo zxpc>iLGneyM=I|7Rc(w$L)$!3PrYAK(=ai!u-@e5;};MVl9rK`lUKO+;Gu@5mNrnw z*u>P#+``hz!O_Xt#nsK-$JY<)|2!Zt;`hi`uiw0lN=!;lNlkm7p7AL!zo4+_b8$&^ zO)abrUf|qzmy+J$&Jm~E>&COkT&g+@;_z{^JC4d2t zP978Uzj$LVlb+b;bH$k`y@@=yKweMbsM%s0t{|jSJ*A_lxY0)g5CD9*5UyN$zur;=C*2)oWupf<2du!& zdVWkpuy21~PbX6jS7IcDa|Aj!G<<07lPMg_0^f4sL2aV3XD+r(pFXrQ3o6Q1-b{l6 z_pMfodLO*6-cBjowRj+y5;_6$k#4gMHGka)xGmt>pmx>&#_4QETYhpDWYkr&1Yw3l zq@`x;(-&sG3{)^JzL<*Cg757K>V0%WK|QJaN2YDjY@gA*=8=*erW_a2?{*CeJT9Ju zmS&k)7qRVX+{Y2cv-$BrnbP%-GB*#C0=w?li6 zE6*wgH9!u_DcEnZLzGy2O%?t17voV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uv%uxyMytkgFcUXsto(Xp?gUpZy0_NEzr>`SW=ERBj5wsFSH)B=tK-Ht z&MArBy0cm29rcbH`5@6ht}eWjnk3!Bd))plMtxTY-bha!Z6K0+E3hV+TFUN)qyC@m zN&5YJ$_ppfwe1aLAt(R5wfb+s4{#7m;bA8K!DwzvO-Bp$g6;8Xh%K)BQL;-yaieF? zJ&#Qr-@;Xbxq+%1jXbjH#{>*00Cv@ktI~Yq`hTfa`dyjxkB|QjyXDU&@ZA1}1w}J^ ztqu#v8)hg}ta9!1Z%Dnz`^>6yzjJg$pqm~}4Bmhgu!)5im4vIq4R&*MS@I@g>>J*wWO6VQHMZRyAS?2-#Pbbqi|75a~Uy4 'lo\modules\noty\layers\JqueryToastPlugin', + * 'options' => [ + * 'position' => 'top-right', + * 'hideAfter' => 3000, + * 'allowToastClose' => true, + * + * // and more for this library... + * ], + * ]); + * --------------------------------------- + */ +class JqueryToastPlugin extends Layer implements LayerInterface +{ + /** + * @var array $defaultOptions + */ + protected $defaultOptions = [ + 'showHideTransition' => 'slide', // It can be plain, fade or slide + 'allowToastClose' => 'true', // Show the close button or not + 'hideAfter' => 3000, // `false` to make it sticky or time in miliseconds to hide after + 'stack' => 5, // `false` to show one stack at a time count showing the number of toasts that can be shown at once + 'position' => 'top-right', // bottom-left or bottom-right or bottom-center or top-left or top-right or top-center or mid-center or an object representing the left, right, top, bottom values to position the toast on page + ]; + + /** + * register asset + */ + public function run() + { + $view = $this->getView(); + JqueryToastPluginAsset::register($view); + parent::run(); + } + + /** + * @param $options + * @return string + */ + public function getNotification($options) + { + $options['icon'] = $this->type; + $options['text'] = $this->getMessageWithTitle(); + $options = Json::encode($options); + + return "$.toast($options);"; + } +}