pentajeu/yii-timeout-dialog
最新稳定版本:1.0.0
Composer 安装命令:
composer require pentajeu/yii-timeout-dialog
包简介
yii-timeout-dialog forked from digitick/yii-timeout-dialog
README 文档
README
Timeout-dialog is a JQuery plugin that displays a timeout popover after a certain period of time. The timeout dialog should be used whenever you want to display to the user that the logged in session is about to expire. It creates a light box with a countdown and options to stay signed in or sign out.
##Requirements
Yii 1.1.x, jQuery.ui core script
##Usage
In your layout view:
[php]
<?php
$this->widget('ext.timeout-dialog.ETimeoutDialog', array(
// Get timeout settings from session settings.
'timeout' => Yii::app()->getSession()->getTimeout(),
// Uncomment to test.
// Dialog should appear 20 sec after page load.
//'timeout' => 80,
'keep_alive_url' => $this->createUrl('/site/keepalive'),
'logout_redirect_url' => $this->createUrl('/site/logout'),
));
?>
In your SiteController:
[php]
/**
* Keep the session alive, called by timeout-dialog.
*/
public function actionKeepAlive()
{
echo 'OK';
Yii::app()->end();
}
##Resources
###Credit timeout-dialog.js was developed by rigoneri.
Version History
- 1.2 — 2013-02-27
- Fix for Yii 1.1.13 jQuery UI update.
- 1.1 — 2012-08-03
- Make the widget inherit from CJuiWidget class for better integration.
- Fixes and updates to CSS.
- 1.0 — 2012-07-05
- Initial release.
统计信息
- 总下载量: 278
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-05-09