* fix remind in dashboard page not show after refresh.
This commit is contained in:
@@ -105,12 +105,28 @@ config.ordersSaved = '<?php echo $lang->block->ordersSaved; ?>';
|
||||
config.confirmRemoveBlock = '<?php echo $lang->block->confirmRemoveBlock; ?>';
|
||||
var module = '<?php echo $module?>';
|
||||
var useGuest = <?php echo $useGuest ? 'true' : 'false';?>;
|
||||
<?php $remind = $this->loadModel('misc')->getRemind();?>
|
||||
<?php if(!empty($remind)):?>
|
||||
var myModalTrigger = new $.zui.ModalTrigger({title:'<?php echo $lang->misc->remind;?>', custom: function(){return <?php echo json_encode($remind);?>}, width:'600px'});
|
||||
var result = myModalTrigger.show();
|
||||
$('#showAnnual').click(function(){myModalTrigger.close()});
|
||||
<?php endif;?>
|
||||
|
||||
<?php /* Check annual remind */ ?>
|
||||
$(function()
|
||||
{
|
||||
function checkRemind()
|
||||
{
|
||||
$.getJSON(createLink('misc', 'getRemind'), function(response)
|
||||
{
|
||||
if(!response || !response.data) return;
|
||||
|
||||
var myModalTrigger = new $.zui.ModalTrigger(
|
||||
{
|
||||
title: response.data.title,
|
||||
custom: response.data.content,
|
||||
width: 600
|
||||
});
|
||||
myModalTrigger.show();
|
||||
$('#showAnnual').click(function(){myModalTrigger.close()});
|
||||
});
|
||||
}
|
||||
setTimeout(checkRemind, 1000);
|
||||
});
|
||||
</script>
|
||||
<?php if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}?>
|
||||
<?php if(isset($pageJS)) js::execute($pageJS);?>
|
||||
|
||||
+27
-15
@@ -13,7 +13,7 @@ class misc extends control
|
||||
{
|
||||
/**
|
||||
* Ping the server every 5 minutes to keep the session.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -25,7 +25,7 @@ class misc extends control
|
||||
|
||||
/**
|
||||
* Show php info.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -36,7 +36,7 @@ class misc extends control
|
||||
|
||||
/**
|
||||
* Show about info of zentao.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -47,7 +47,7 @@ class misc extends control
|
||||
|
||||
/**
|
||||
* Update nl.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -58,8 +58,8 @@ class misc extends control
|
||||
|
||||
/**
|
||||
* Check current version is latest or not.
|
||||
*
|
||||
* @param string $sn
|
||||
*
|
||||
* @param string $sn
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -83,7 +83,7 @@ class misc extends control
|
||||
|
||||
/**
|
||||
* Check model extension logic
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -95,7 +95,7 @@ class misc extends control
|
||||
|
||||
/**
|
||||
* Down notify.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -134,7 +134,7 @@ class misc extends control
|
||||
|
||||
$result = $archive->add($loginFile, PCLZIP_OPT_REMOVE_ALL_PATH, PCLZIP_OPT_ADD_PATH, 'notify');
|
||||
if($result == 0) die("Error : " . $archive->errorInfo(true));
|
||||
|
||||
|
||||
$zipContent = file_get_contents($packageFile);
|
||||
unlink($loginFile);
|
||||
unlink($packageFile);
|
||||
@@ -143,7 +143,7 @@ class misc extends control
|
||||
|
||||
/**
|
||||
* Create qrcode for mobile login.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -164,7 +164,7 @@ class misc extends control
|
||||
|
||||
/**
|
||||
* Ajax ignore browser.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -206,7 +206,7 @@ class misc extends control
|
||||
|
||||
/**
|
||||
* Check net connect.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -219,9 +219,9 @@ class misc extends control
|
||||
|
||||
/**
|
||||
* Show captcha and save to session.
|
||||
*
|
||||
* @param string $sessionVar
|
||||
* @param string $uuid
|
||||
*
|
||||
* @param string $sessionVar
|
||||
* @param string $uuid
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -235,4 +235,16 @@ class misc extends control
|
||||
$this->session->set($sessionVar, $captcha->getPhrase());
|
||||
$captcha->build()->output();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get annual remind.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getRemind()
|
||||
{
|
||||
$data = array('content' => $this->misc->getRemind(), 'title' => $this->lang->misc->remind);
|
||||
$this->send(array('result' => 'success', 'data' => $data));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ class miscModel extends model
|
||||
|
||||
/**
|
||||
* Get remind.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -63,7 +63,7 @@ class miscModel extends model
|
||||
|
||||
/**
|
||||
* Check one click package.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user