From f96df5ec6157a2c1fd66f9975296029105f8c561 Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Mon, 8 Jul 2013 14:04:31 +0000 Subject: [PATCH] Fix bug with visitors list at operator/users.php page --- src/messenger/webim/js/compiled/users/app.js | 2 +- src/messenger/webim/js/compiled/users_app.js | 2 +- src/messenger/webim/js/source/users/app.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/messenger/webim/js/compiled/users/app.js b/src/messenger/webim/js/compiled/users/app.js index 545d0d8d..0844ef9d 100644 --- a/src/messenger/webim/js/compiled/users/app.js +++ b/src/messenger/webim/js/compiled/users/app.js @@ -6,5 +6,5 @@ http://www.apache.org/licenses/LICENSE-2.0 */ (function(a,h,j){var c=0,g=function(){c++;10==c&&(alert(a.Localization.get("pending.errors.network")),c=0)},b=new h.Marionette.Application;b.addRegions({agentsRegion:"#agents-region",statusPanelRegion:"#status-panel-region",threadsRegion:"#threads-region",visitorsRegion:"#visitors-region"});b.addInitializer(function(d){a.PluginOptions=d.plugins||{};var c=a.Objects,f=a.Objects.Models,e=a.Objects.Collections;c.server=new a.Server(j.extend({interactionType:MibewAPIUsersInteraction,onTimeout:g,onTransportError:g}, -d.server));f.page=new a.Models.Page(d.page);f.agent=new a.Models.Agent(d.agent);e.threads=new a.Collections.Threads;b.threadsRegion.show(new a.Views.ThreadsCollection({collection:e.threads}));d.page.showOnlineOperators&&(e.visitors=new a.Collections.Visitors,b.visitorsRegion.show(new a.Views.VisitorsCollection({collection:e.visitors})));f.statusPanel=new a.Models.StatusPanel;b.statusPanelRegion.show(new a.Views.StatusPanel({model:f.statusPanel}));d.page.showOnlineOperators&&(e.agents=new a.Collections.Agents, +d.server));f.page=new a.Models.Page(d.page);f.agent=new a.Models.Agent(d.agent);e.threads=new a.Collections.Threads;b.threadsRegion.show(new a.Views.ThreadsCollection({collection:e.threads}));d.page.showVisitors&&(e.visitors=new a.Collections.Visitors,b.visitorsRegion.show(new a.Views.VisitorsCollection({collection:e.visitors})));f.statusPanel=new a.Models.StatusPanel;b.statusPanelRegion.show(new a.Views.StatusPanel({model:f.statusPanel}));d.page.showOnlineOperators&&(e.agents=new a.Collections.Agents, b.agentsRegion.show(new a.Views.AgentsCollection({collection:e.agents})));c.server.callFunctionsPeriodically(function(){return[{"function":"update",arguments:{"return":{},references:{},agentId:f.agent.id}}]},function(){})});b.on("start",function(){a.Objects.server.runUpdater()});a.Application=b})(Mibew,Backbone,_); diff --git a/src/messenger/webim/js/compiled/users_app.js b/src/messenger/webim/js/compiled/users_app.js index 9b666a13..7fb34de2 100644 --- a/src/messenger/webim/js/compiled/users_app.js +++ b/src/messenger/webim/js/compiled/users_app.js @@ -179,5 +179,5 @@ this)},updateTimers:function(){a.Utils.updateTimers(this.$el,".timesince")}})})( http://www.apache.org/licenses/LICENSE-2.0 */ (function(a,h,j){var c=0,g=function(){c++;10==c&&(alert(a.Localization.get("pending.errors.network")),c=0)},b=new h.Marionette.Application;b.addRegions({agentsRegion:"#agents-region",statusPanelRegion:"#status-panel-region",threadsRegion:"#threads-region",visitorsRegion:"#visitors-region"});b.addInitializer(function(d){a.PluginOptions=d.plugins||{};var c=a.Objects,f=a.Objects.Models,e=a.Objects.Collections;c.server=new a.Server(j.extend({interactionType:MibewAPIUsersInteraction,onTimeout:g,onTransportError:g}, -d.server));f.page=new a.Models.Page(d.page);f.agent=new a.Models.Agent(d.agent);e.threads=new a.Collections.Threads;b.threadsRegion.show(new a.Views.ThreadsCollection({collection:e.threads}));d.page.showOnlineOperators&&(e.visitors=new a.Collections.Visitors,b.visitorsRegion.show(new a.Views.VisitorsCollection({collection:e.visitors})));f.statusPanel=new a.Models.StatusPanel;b.statusPanelRegion.show(new a.Views.StatusPanel({model:f.statusPanel}));d.page.showOnlineOperators&&(e.agents=new a.Collections.Agents, +d.server));f.page=new a.Models.Page(d.page);f.agent=new a.Models.Agent(d.agent);e.threads=new a.Collections.Threads;b.threadsRegion.show(new a.Views.ThreadsCollection({collection:e.threads}));d.page.showVisitors&&(e.visitors=new a.Collections.Visitors,b.visitorsRegion.show(new a.Views.VisitorsCollection({collection:e.visitors})));f.statusPanel=new a.Models.StatusPanel;b.statusPanelRegion.show(new a.Views.StatusPanel({model:f.statusPanel}));d.page.showOnlineOperators&&(e.agents=new a.Collections.Agents, b.agentsRegion.show(new a.Views.AgentsCollection({collection:e.agents})));c.server.callFunctionsPeriodically(function(){return[{"function":"update",arguments:{"return":{},references:{},agentId:f.agent.id}}]},function(){})});b.on("start",function(){a.Objects.server.runUpdater()});a.Application=b})(Mibew,Backbone,_); diff --git a/src/messenger/webim/js/source/users/app.js b/src/messenger/webim/js/source/users/app.js index e0a90604..64665dbd 100644 --- a/src/messenger/webim/js/source/users/app.js +++ b/src/messenger/webim/js/source/users/app.js @@ -72,7 +72,7 @@ })); // Initialize visitors collection - if (options.page.showOnlineOperators) { + if (options.page.showVisitors) { colls.visitors = new Mibew.Collections.Visitors(); App.visitorsRegion.show(new Mibew.Views.VisitorsCollection({ collection: colls.visitors