dev-master
9999999-devSimple Loading
MIT
The Requires
extension yii2 loading
1.0.1
1.0.1.0Simple Loading
MIT
The Requires
extension yii2 loading
1.0.0
1.0.0.0Simple Loading
MIT
The Requires
extension yii2 loading
                         Wallogit.com
                    
                    2017 © Pedro Peláez
                    
                    
                    
                    
                
                
            
Simple Loading
Simple Loading widget for Yii framework 2.0 or later, (*1)
edwinhaq\simpleloading\SimpleLoading widget is a simple way to show a loading screen in your views., (*2)
The preferred way to install this extension is through composer., (*3)
Either run, (*4)
php composer.phar require --prefer-dist edwinhaq/yii2-simple-loading "*"
or add, (*5)
"edwinhaq/yii2-simple-loading": "*"
to the require section of your composer.json file., (*6)
Once the extension is installed, simply use it in your PHP code:, (*7)
// ... use edwinhaq\simpleloading\SimpleLoading; // ... SimpleLoading::widget(); // ...
In javascript call start and stop to control the loading widget, (*8)
/* * start(image type) * Allows to start the loading image and select the image to show * options: [box, clock, default, gears, hourglass, magnify, reload, ring-alt, ring, ripple, rolling] */ SimpleLoading.start('gears'); // Load gears.gif SimpleLoading.start('default'); // Load default.gif SimpleLoading.start(); // Load default.gif /* * * Allows to stop the loading image */ SimpleLoading.stop(); // Example: $.ajax( { 'type':'POST', 'dataType':'json', 'url':'index.php?r=controller/action', 'beforeSend':function(json) { SimpleLoading.start('gears'); }, 'success':function(json){/* ... */}, 'error':function(json,status,errorThrown ){/* ... */}, 'complete':function(json) { SimpleLoading.stop(); }, 'cache':false, 'data':jQuery(this).parents("form").serialize() } );
Simple Loading
MIT
extension yii2 loading
Simple Loading
MIT
extension yii2 loading
Simple Loading
MIT
extension yii2 loading