Revision #12 has been created by le_top on Nov 22, 2014, 6:47:42 PM with the memo:
The corescript is jquery.ui (not jquery-ui)
« previous (#11) next (#13) »
Changes
Title
unchanged
Checking for "expired" sessions/logins on the client side
Category
unchanged
How-tos
Yii version
unchanged
Tags
unchanged
csrf, login, cookie, UserIdentity, user auth, security, session, allowAutoLogin, Cache-Control
Content
changed
[...]
* Call this somewhere in the page generation process (e.g., in the layout).
*
* @param int $timeout Time between checks in seconds.
*/
public static function MonitorSessionJQueryDialog($timeout=2,$showCloseButton=true) {
Yii::app()->clientScript->registerCoreScript('jquery-.ui');
$title=CJavaScript::encode(Yii::t('app','Session Expired'));
$msg=CJavaScript::encode(CHtml::tag('div',array(),Yii::t('app','Your session expired and this page must be reloaded.')));
$btReload=CJavaScript::encode(Yii::t('app','Reload'));
if($showCloseButton) {
$btClose=CJavaScript::encode(Yii::t('app','Close'));[...]