edgardmessias / yii2-nprogress
Slim progress bars for Ajax'y applications. Inspired by Google, YouTube, and Medium for Yii2 Framework.
Installs: 17 065
Dependents: 1
Suggesters: 0
Security: 0
Stars: 7
Watchers: 2
Forks: 5
Open Issues: 1
Type:yii2-extension
Requires
- bower-asset/nprogress: *
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-11-09 17:45:41 UTC
README
Slim progress bars for Ajax'y applications. Inspired by Google, YouTube, and Medium for Yii2 Framework.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist edgardmessias/yii2-nprogress "*"
or add
"edgardmessias/yii2-nprogress": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your view code by :
<?php \edgardmessias\assets\nprogress\NProgressAsset::register($this); ?>
Customization
To change settings, simply add the following code in your configuration
'components' => [ 'assetManager' => [ 'bundles' => [ 'edgardmessias\assets\nprogress\NProgressAsset' => [ 'configuration' => [ 'minimum' => 0.08, 'showSpinner' => true, ], 'page_loading' => false, 'pjax_events' => true, 'jquery_ajax_events' => false, ], ], ], ],
Settings
configuration
: The NProgress Configuration (Default:null
)page_loading
: Show NProgress during page loading (Default:false
)pjax_events
: Show NProgress for pjax:start and pjax:end events (Default:true
)jquery_ajax_events
: Show NProgress for ajaxStart and ajaxComplete events (Default:false
)