Skip to content

Commit

Permalink
If publish notifications are used we still have to sync back office a…
Browse files Browse the repository at this point in the history
…t less interval than user timeout value
  • Loading branch information
remdex committed Mar 19, 2015
1 parent 3200a87 commit 246aaf9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion nodejshelper/design/nodejshelpertheme/js/customjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@
nodejshelper.socket.emit('join_admin',{instance_id:nodejshelperConfig.instance_id});

try {
angular.element('body').scope().setTimeoutEnabled = false;
angular.element('body').scope().setTimeoutEnabled = false;

setInterval(function(){
nodejshelper.syncbackoffice('snow');
},(nodejshelperConfig.online_timeout-10)*1000);
} catch(err) {
//
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?php if ( (isset($Result['is_sync_required']) && $Result['is_sync_required'] === true) || erLhcoreClassSystem::instance()->SiteAccess == 'site_admin' ) : ?>
<script>
var nodejshelperHostConnect = '<?php echo $nodeJsHelperSettings['host']?><?php echo $nodeJsHelperSettings['port']?>';
var nodejshelperConfig = {use_publish_notifications:<?php echo $nodeJsHelperSettings['use_publish_notifications'] == true ? 'true' : 'false'?>,path:'<?php echo $nodeJsHelperSettings['path']?>',is_admin:<?php echo erLhcoreClassSystem::instance()->SiteAccess == 'site_admin' ? 'true' : 'false'?>,instance_id:'<?php echo $nodeJsHelperSettings['instance_id']?>',secure:<?php echo $nodeJsHelperSettings['secure'] == true ? 'true' : 'false' ?>,'typer':'','sync':<?php echo (isset($Result['chat']) && $Result['chat']->status == erLhcoreClassModelChat::STATUS_PENDING_CHAT) ? 'true' : 'false'?>,'synctimeout':5};
var nodejshelperConfig = {online_timeout:<?php echo (int)erLhcoreClassModelChatConfig::fetch('sync_sound_settings')->data['online_timeout']?>,use_publish_notifications:<?php echo $nodeJsHelperSettings['use_publish_notifications'] == true ? 'true' : 'false'?>,path:'<?php echo $nodeJsHelperSettings['path']?>',is_admin:<?php echo erLhcoreClassSystem::instance()->SiteAccess == 'site_admin' ? 'true' : 'false'?>,instance_id:'<?php echo $nodeJsHelperSettings['instance_id']?>',secure:<?php echo $nodeJsHelperSettings['secure'] == true ? 'true' : 'false' ?>,'typer':'','sync':<?php echo (isset($Result['chat']) && $Result['chat']->status == erLhcoreClassModelChat::STATUS_PENDING_CHAT) ? 'true' : 'false'?>,'synctimeout':5};
<?php if (erLhcoreClassSystem::instance()->SiteAccess == 'site_admin' && erLhcoreClassUser::instance()->isLogged()) :
$currentUser = erLhcoreClassUser::instance();
$userData = $currentUser->getUserData(true); ?>
Expand Down

0 comments on commit 246aaf9

Please sign in to comment.