diff --git a/src/messenger/webim/js/compiled/chat/collection_views/messages_collection.js b/src/messenger/webim/js/compiled/chat/collection_views/messages_collection.js index 66fd8151..9752e6d2 100644 --- a/src/messenger/webim/js/compiled/chat/collection_views/messages_collection.js +++ b/src/messenger/webim/js/compiled/chat/collection_views/messages_collection.js @@ -5,5 +5,5 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a){a.Views.MessagesCollection=a.Views.CollectionBase.extend({itemView:a.Views.Message,className:"messages-collection",initialize:function(){this.collection.on("multiple:add",this.messagesAdded,this);a.Objects.Models.messageForm.on("before:post",this.messagePost,this)},skipNextSound:!0,messagePost:function(){this.skipNextSound=!0},messagesAdded:function(){if(!this.skipNextSound&&a.Objects.Models.Controls.sound.get("enabled")){var b=a.Objects.Models.page.get("webimRoot");b&&a.Objects.Models.sound.play(b+ +(function(a){a.Views.MessagesCollection=a.Views.CollectionBase.extend({itemView:a.Views.Message,className:"messages-collection",initialize:function(){this.collection.on("multiple:add",this.messagesAdded,this);a.Objects.Models.messageForm.on("before:post",this.messagePost,this)},skipNextSound:!0,messagePost:function(){this.skipNextSound=!0},messagesAdded:function(){if(!this.skipNextSound&&a.Objects.Models.Controls.sound.get("enabled")){var b=a.Objects.Models.page.get("webimRoot");b&&a.Utils.playSound(b+ "/sounds/new_message.wav")}this.skipNextSound=!1}})})(Mibew); diff --git a/src/messenger/webim/js/compiled/chat/layouts/chat.js b/src/messenger/webim/js/compiled/chat/layouts/chat.js index 4800a61a..a598d33d 100644 --- a/src/messenger/webim/js/compiled/chat/layouts/chat.js +++ b/src/messenger/webim/js/compiled/chat/layouts/chat.js @@ -5,4 +5,4 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a,c){a.Layouts.Chat=c.Marionette.Layout.extend({template:Handlebars.templates.chat_layout,regions:{controlsRegion:"#controls-region",avatarRegion:"#avatar-region",messagesRegion:{selector:"#messages-region",regionType:a.Regions.Messages},statusRegion:"#status-region",messageFormRegion:"#message-form-region",soundRegion:"#sound-region"},serializeData:function(){var b=a.Objects.Models;return{page:b.page.toJSON(),user:b.user.toJSON()}}})})(Mibew,Backbone); +(function(a,c){a.Layouts.Chat=c.Marionette.Layout.extend({template:Handlebars.templates.chat_layout,regions:{controlsRegion:"#controls-region",avatarRegion:"#avatar-region",messagesRegion:{selector:"#messages-region",regionType:a.Regions.Messages},statusRegion:"#status-region",messageFormRegion:"#message-form-region"},serializeData:function(){var b=a.Objects.Models;return{page:b.page.toJSON(),user:b.user.toJSON()}}})})(Mibew,Backbone); diff --git a/src/messenger/webim/js/compiled/chat/modules/chat.js b/src/messenger/webim/js/compiled/chat/modules/chat.js index 7039ea4d..dd6c470b 100644 --- a/src/messenger/webim/js/compiled/chat/modules/chat.js +++ b/src/messenger/webim/js/compiled/chat/modules/chat.js @@ -5,10 +5,10 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a){a.Objects.Models.Controls={};a.Objects.Models.Status={};var j=[],l=a.Application,k=l.module("Chat",{startWithParent:!1});k.addInitializer(function(b){var g=a.Objects,d=a.Objects.Models,c=a.Objects.Models.Controls,h=a.Objects.Models.Status;b.page&&d.page.set(b.page);d.thread=new a.Models.Thread(b.thread);d.user=new a.Models.ChatUser(b.user);var f=new a.Layouts.Chat;g.chatLayout=f;l.mainRegion.show(f);var e=new a.Collections.Controls;d.user.get("isAgent")||(c.userName=new a.Models.UserNameControl({weight:220}), +(function(a){a.Objects.Models.Controls={};a.Objects.Models.Status={};var j=[],l=a.Application,k=l.module("Chat",{startWithParent:!1});k.addInitializer(function(b){var f=a.Objects,d=a.Objects.Models,c=a.Objects.Models.Controls,h=a.Objects.Models.Status;b.page&&d.page.set(b.page);d.thread=new a.Models.Thread(b.thread);d.user=new a.Models.ChatUser(b.user);var g=new a.Layouts.Chat;f.chatLayout=g;l.mainRegion.show(g);var e=new a.Collections.Controls;d.user.get("isAgent")||(c.userName=new a.Models.UserNameControl({weight:220}), e.add(c.userName),c.sendMail=new a.Models.SendMailControl({weight:200,link:b.links.mail,windowParams:b.windowsParams.mail}),e.add(c.sendMail));d.user.get("isAgent")&&(c.redirect=new a.Models.RedirectControl({weight:200,link:b.links.redirect}),e.add(c.redirect),c.history=new a.Models.HistoryControl({weight:180,link:b.links.history,windowParams:b.windowsParams.history}),e.add(c.history));c.sound=new a.Models.SoundControl({weight:160});e.add(c.sound);c.refresh=new a.Models.RefreshControl({weight:140}); -e.add(c.refresh);b.links.ssl&&(c.secureMode=new a.Models.SecureModeControl({weight:120,link:b.links.ssl}),e.add(c.secureMode));c.close=new a.Models.CloseControl({weight:100});e.add(c.close);g.Collections.controls=e;f.controlsRegion.show(new a.Views.ControlsCollection({collection:e}));h.message=new a.Models.StatusMessage({hideTimeout:5E3});h.typing=new a.Models.StatusTyping({hideTimeout:5E3});g.Collections.status=new a.Collections.Status([h.message,h.typing]);f.statusRegion.show(new a.Views.StatusCollection({collection:g.Collections.status})); -d.user.get("isAgent")||(d.avatar=new a.Models.Avatar,f.avatarRegion.show(new a.Views.Avatar({model:d.avatar})));g.Collections.messages=new a.Collections.Messages;d.messageForm=new a.Models.MessageForm(b.messageForm);f.messageFormRegion.show(new a.Views.MessageForm({model:d.messageForm}));f.messagesRegion.show(new a.Views.MessagesCollection({collection:g.Collections.messages}));d.sound=new a.Models.Sound;f.soundRegion.show(new a.Views.Sound({model:d.sound}));j.push(g.server.callFunctionsPeriodically(function(){var b= -a.Objects.Models.thread,c=a.Objects.Models.user;return[{"function":"update",arguments:{"return":{typing:"typing",canPost:"canPost"},references:{},threadId:b.get("id"),token:b.get("token"),lastId:b.get("lastId"),typed:c.get("typing"),user:!c.get("isAgent")}}]},function(b){b.errorCode?a.Objects.Models.Status.message.setMessage(b.errorMessage||"refresh failed"):(b.typing&&a.Objects.Models.Status.typing.show(),a.Objects.Models.user.set({canPost:b.canPost||!1}))}))});k.on("start",function(){a.Objects.server.restartUpdater()}); -k.addFinalizer(function(){a.Objects.chatLayout.close();for(var b=0;b()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(a)}})(Mibew); +(function(b,c){b.Utils={};b.Utils.toUpperCaseFirst=function(a){return"string"!=typeof a?!1:""===a?a:a.substring(0,1).toUpperCase()+a.substring(1)};b.Utils.toDashFormat=function(a){if("string"!=typeof a)return!1;a=a.match(/((?:[A-Z]?[a-z]+)|(?:[A-Z][a-z]*))/g);for(var b=0;b()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(a)}; +b.Utils.playSound=function(a){c("body").append('')}})(Mibew,$); diff --git a/src/messenger/webim/js/compiled/default_app.js b/src/messenger/webim/js/compiled/default_app.js index dcb5e042..18c94faf 100644 --- a/src/messenger/webim/js/compiled/default_app.js +++ b/src/messenger/webim/js/compiled/default_app.js @@ -4,11 +4,10 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(){var h=Handlebars.template,m=Handlebars.templates=Handlebars.templates||{};m.default_control=h(function(a,b,c,l,g){this.compilerInfo=[2,">= 1.0.0-rc.3"];c=c||a.helpers;g=g||{};l=this.escapeExpression;a="";(c=c.title)?c=c.call(b,{hash:{},data:g}):(c=b.title,c="function"===typeof c?c.apply(b):c);return a+=l(c)+""});m.sound=h(function(a,b,c,l,g){this.compilerInfo=[2,">= 1.0.0-rc.3"];c=c||a.helpers;g=g||{};var d=this.escapeExpression;return(a=c["if"].call(b,b.file,{hash:{}, -inverse:this.noop,fn:this.program(1,function(a,b){var k,f;k='\n\n'},g),data:g}))||0===a?a:""});m.message=h(function(a,b,c,l,g){this.compilerInfo=[2,">= 1.0.0-rc.3"];c=c||a.helpers;g=g||{};var d,j=this.escapeExpression, -h=c.helperMissing;a={hash:{},data:g};a=""+(j((d=c.formatTime,d?d.call(b,b.created,a):h.call(b,"formatTime",b.created,a)))+"\n");if((d=c["if"].call(b,b.name,{hash:{},inverse:this.noop,fn:this.program(1,function(a,f){var b,e;b="";(e=c.name)?e=e.call(a,{hash:{},data:f}):(e=a.name,e="function"===typeof e?e.apply(a):e);return b+=j(e)+": "},g),data:g}))||0===d)a+= -d;a+="\n";if((d=c["if"].call(b,b.allowFormatting,{hash:{},inverse:this.program(5,function(a,b){var d,e;e={hash:{},data:b};return j((d=c.apply,d?d.call(a,a.message,"urlReplace, nl2br",e):h.call(a,"apply",a.message,"urlReplace, nl2br",e)))},g),fn:this.program(3,function(a,b){var d,e;e={hash:{},data:b};return j((d=c.apply,d?d.call(a,a.message,"urlReplace, nl2br, allowTags",e):h.call(a, -"apply",a.message,"urlReplace, nl2br, allowTags",e)))},g),data:g}))||0===d)a+=d;return a+="
"})})(); +(function(){var k=Handlebars.template,l=Handlebars.templates=Handlebars.templates||{};l.default_control=k(function(a,b,e,h,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];e=e||a.helpers;f=f||{};h=this.escapeExpression;a="";(e=e.title)?e=e.call(b,{hash:{},data:f}):(e=b.title,e="function"===typeof e?e.apply(b):e);return a+=h(e)+""});l.message=k(function(a,b,e,h,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];e=e||a.helpers;f=f||{};var c,g=this.escapeExpression,j=e.helperMissing;a={hash:{},data:f}; +a=""+(g((c=e.formatTime,c?c.call(b,b.created,a):j.call(b,"formatTime",b.created,a)))+"\n");if((c=e["if"].call(b,b.name,{hash:{},inverse:this.noop,fn:this.program(1,function(a,c){var b,d;b="";(d=e.name)?d=d.call(a,{hash:{},data:c}):(d=a.name,d="function"===typeof d?d.apply(a):d);return b+=g(d)+": "},f),data:f}))||0===c)a+=c;a+="\n";if((c=e["if"].call(b,b.allowFormatting,{hash:{},inverse:this.program(5,function(a,b){var c,d;d={hash:{},data:b};return g((c=e.apply,c?c.call(a,a.message,"urlReplace, nl2br",d):j.call(a,"apply",a.message,"urlReplace, nl2br",d)))},f),fn:this.program(3,function(a,c){var b,d;d={hash:{},data:c};return g((b=e.apply,b?b.call(a,a.message,"urlReplace, nl2br, allowTags",d):j.call(a,"apply",a.message,"urlReplace, nl2br, allowTags", +d)))},f),data:f}))||0===c)a+=c;return a+="
"})})(); /* This file is part of Mibew Messenger project. http://mibew.org @@ -52,7 +51,8 @@ else try{this.sendRequests(this.buffer),this.buffer=[]}catch(c){this.options.onU Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(b){b.Utils={};b.Utils.toUpperCaseFirst=function(a){return"string"!=typeof a?!1:""===a?a:a.substring(0,1).toUpperCase()+a.substring(1)};b.Utils.toDashFormat=function(a){if("string"!=typeof a)return!1;a=a.match(/((?:[A-Z]?[a-z]+)|(?:[A-Z][a-z]*))/g);for(var b=0;b()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(a)}})(Mibew); +(function(b,c){b.Utils={};b.Utils.toUpperCaseFirst=function(a){return"string"!=typeof a?!1:""===a?a:a.substring(0,1).toUpperCase()+a.substring(1)};b.Utils.toDashFormat=function(a){if("string"!=typeof a)return!1;a=a.match(/((?:[A-Z]?[a-z]+)|(?:[A-Z][a-z]*))/g);for(var b=0;b()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(a)}; +b.Utils.playSound=function(a){c("body").append('')}})(Mibew,$); /* This file is part of Mibew Messenger project. http://mibew.org @@ -87,13 +87,6 @@ else try{this.sendRequests(this.buffer),this.buffer=[]}catch(c){this.options.onU Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a,b){a.Models.Sound=b.Model.extend({play:function(a){this.set({file:a});this.trigger("sound:play",this)}})})(Mibew,Backbone); -/* - This file is part of Mibew Messenger project. - http://mibew.org - Copyright (c) 2005-2011 Mibew Messenger Community - License: http://mibew.org/license.php -*/ (function(a){a.Models.Thread=a.Models.Base.extend({defaults:{id:0,token:0,lastId:0,state:null},STATE_QUEUE:0,STATE_WAITING:1,STATE_CHATTING:2,STATE_CLOSED:3,STATE_LOADING:4,STATE_LEFT:5})})(Mibew); /* This file is part of Mibew Messenger project. @@ -131,13 +124,6 @@ this.$el.removeClass("active"+(a?"-"+a:""))},getDashedControlType:function(){"un Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a,b,c){a.Views.Sound=b.Marionette.ItemView.extend({template:c.templates.sound,className:"sound-player",modelEvents:{"sound:play":"render"}})})(Mibew,Backbone,Handlebars); -/* - This file is part of Mibew Messenger project. - http://mibew.org - Copyright (c) 2005-2011 Mibew Messenger Community - License: http://mibew.org/license.php -*/ (function(d,a,f){var e=function(b,a,c){c=f.extend({model:b},c);return"function"!=typeof b.getModelType?new a(c):(b=b.getModelType())&&d.Views[b]?new d.Views[b](c):new a(c)};d.Views.CollectionBase=a.Marionette.CollectionView.extend({itemView:a.Marionette.ItemView,buildItemView:e});d.Views.CompositeBase=a.Marionette.CompositeView.extend({buildItemView:e})})(Mibew,Backbone,_); /* This file is part of Mibew Messenger project. diff --git a/src/messenger/webim/js/compiled/users/app.js b/src/messenger/webim/js/compiled/users/app.js index cfa8c6bc..075841ca 100644 --- a/src/messenger/webim/js/compiled/users/app.js +++ b/src/messenger/webim/js/compiled/users/app.js @@ -5,6 +5,6 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a,h,j){var d=0,g=function(){d++;10==d&&(alert(a.Localization.get("pending.errors.network")),d=0)},b=new h.Marionette.Application;b.addRegions({agentsRegion:"#agents-region",statusPanelRegion:"#status-panel-region",threadsRegion:"#threads-region",visitorsRegion:"#visitors-region",soundRegion:"#sound-region"});b.addInitializer(function(f){var d=a.Objects,c=a.Objects.Models,e=a.Objects.Collections;d.server=new a.Server(j.extend({interactionType:MibewAPIUsersInteraction,onTimeout:g,onTransportError:g}, -f.server));c.page=new a.Models.Page(f.page);c.agent=new a.Models.Agent(f.agent);e.threads=new a.Collections.Threads;b.threadsRegion.show(new a.Views.ThreadsCollection({collection:e.threads}));f.page.showOnlineOperators&&(e.visitors=new a.Collections.Visitors,b.visitorsRegion.show(new a.Views.VisitorsCollection({collection:e.visitors})));c.statusPanel=new a.Models.StatusPanel;b.statusPanelRegion.show(new a.Views.StatusPanel({model:c.statusPanel}));f.page.showOnlineOperators&&(e.agents=new a.Collections.Agents, -b.agentsRegion.show(new a.Views.AgentsCollection({collection:e.agents})));c.sound=new a.Models.Sound;b.soundRegion.show(new a.Views.Sound({model:c.sound}));d.server.callFunctionsPeriodically(function(){return[{"function":"update",arguments:{"return":{},references:{},agentId:c.agent.id}}]},function(){})});b.on("start",function(){a.Objects.server.runUpdater()});a.Application=b})(Mibew,Backbone,_); +(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(e){var c=a.Objects,f=a.Objects.Models,d=a.Objects.Collections;c.server=new a.Server(j.extend({interactionType:MibewAPIUsersInteraction,onTimeout:g,onTransportError:g},e.server));f.page= +new a.Models.Page(e.page);f.agent=new a.Models.Agent(e.agent);d.threads=new a.Collections.Threads;b.threadsRegion.show(new a.Views.ThreadsCollection({collection:d.threads}));e.page.showOnlineOperators&&(d.visitors=new a.Collections.Visitors,b.visitorsRegion.show(new a.Views.VisitorsCollection({collection:d.visitors})));f.statusPanel=new a.Models.StatusPanel;b.statusPanelRegion.show(new a.Views.StatusPanel({model:f.statusPanel}));e.page.showOnlineOperators&&(d.agents=new a.Collections.Agents,b.agentsRegion.show(new a.Views.AgentsCollection({collection:d.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/collection_views/threads_collection.js b/src/messenger/webim/js/compiled/users/collection_views/threads_collection.js index 8bba6423..edf7557c 100644 --- a/src/messenger/webim/js/compiled/users/collection_views/threads_collection.js +++ b/src/messenger/webim/js/compiled/users/collection_views/threads_collection.js @@ -7,6 +7,6 @@ */ (function(d,h,j,k){d.Views.ThreadsCollection=h.Marionette.CompositeView.extend({template:j.templates.threads_collection,itemView:d.Views.QueuedThread,itemViewContainer:"#threads-container",emptyView:d.Views.NoThreads,className:"threads-collection",collectionEvents:{sort:"renderCollection","sort:field":"createSortField",add:"threadAdded"},itemViewOptions:function(a){return{tagName:d.Objects.Models.page.get("threadTag"),collection:a.get("controls")}},initialize:function(){window.setInterval(k.bind(this.updateTimers, this),2E3);this.on("itemview:before:render",this.updateStyles,this);this.on("render",this.updateTimers,this)},updateStyles:function(a){var b=this.collection,c=a.model,d=this;if(c.id){var e=this.getQueueCode(c),f=!1,g=!1,b=b.filter(function(a){return d.getQueueCode(a)==e});0()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(email); } -})(Mibew); \ No newline at end of file + /** + * Play .wav sound file + * @param {String} file File path + */ + Mibew.Utils.playSound = function (file) { + var soundHTML = ''; + $('body').append(soundHTML); + } + +})(Mibew, $); \ No newline at end of file diff --git a/src/messenger/webim/js/source/users/app.js b/src/messenger/webim/js/source/users/app.js index db56d33e..754429f4 100644 --- a/src/messenger/webim/js/source/users/app.js +++ b/src/messenger/webim/js/source/users/app.js @@ -36,8 +36,7 @@ agentsRegion: '#agents-region', statusPanelRegion: '#status-panel-region', threadsRegion: '#threads-region', - visitorsRegion: '#visitors-region', - soundRegion: '#sound-region' + visitorsRegion: '#visitors-region' }); // Initialize application @@ -92,12 +91,6 @@ })); } - // Initialize sounds - models.sound = new Mibew.Models.Sound(); - App.soundRegion.show(new Mibew.Views.Sound({ - model: models.sound - })); - // Periodically call update function at the server side objs.server.callFunctionsPeriodically( function() { diff --git a/src/messenger/webim/js/source/users/collection_views/threads_collection.js b/src/messenger/webim/js/source/users/collection_views/threads_collection.js index 3ccb15b0..a69940e2 100644 --- a/src/messenger/webim/js/source/users/collection_views/threads_collection.js +++ b/src/messenger/webim/js/source/users/collection_views/threads_collection.js @@ -159,7 +159,7 @@ if (path) { path += '/sounds/new_user.wav'; // Play sound - Mibew.Objects.Models.sound.play(path); + Mibew.Utils.playSound(path); } // Show popup notification if need diff --git a/src/messenger/webim/js/templates/compiled/default_app.tpl.js b/src/messenger/webim/js/templates/compiled/default_app.tpl.js index 34658a45..92aa827f 100644 --- a/src/messenger/webim/js/templates/compiled/default_app.tpl.js +++ b/src/messenger/webim/js/templates/compiled/default_app.tpl.js @@ -4,8 +4,7 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(){var h=Handlebars.template,m=Handlebars.templates=Handlebars.templates||{};m.default_control=h(function(a,b,c,l,g){this.compilerInfo=[2,">= 1.0.0-rc.3"];c=c||a.helpers;g=g||{};l=this.escapeExpression;a="";(c=c.title)?c=c.call(b,{hash:{},data:g}):(c=b.title,c="function"===typeof c?c.apply(b):c);return a+=l(c)+""});m.sound=h(function(a,b,c,l,g){this.compilerInfo=[2,">= 1.0.0-rc.3"];c=c||a.helpers;g=g||{};var d=this.escapeExpression;return(a=c["if"].call(b,b.file,{hash:{}, -inverse:this.noop,fn:this.program(1,function(a,b){var k,f;k='\n\n'},g),data:g}))||0===a?a:""});m.message=h(function(a,b,c,l,g){this.compilerInfo=[2,">= 1.0.0-rc.3"];c=c||a.helpers;g=g||{};var d,j=this.escapeExpression, -h=c.helperMissing;a={hash:{},data:g};a=""+(j((d=c.formatTime,d?d.call(b,b.created,a):h.call(b,"formatTime",b.created,a)))+"\n");if((d=c["if"].call(b,b.name,{hash:{},inverse:this.noop,fn:this.program(1,function(a,f){var b,e;b="";(e=c.name)?e=e.call(a,{hash:{},data:f}):(e=a.name,e="function"===typeof e?e.apply(a):e);return b+=j(e)+": "},g),data:g}))||0===d)a+= -d;a+="\n";if((d=c["if"].call(b,b.allowFormatting,{hash:{},inverse:this.program(5,function(a,b){var d,e;e={hash:{},data:b};return j((d=c.apply,d?d.call(a,a.message,"urlReplace, nl2br",e):h.call(a,"apply",a.message,"urlReplace, nl2br",e)))},g),fn:this.program(3,function(a,b){var d,e;e={hash:{},data:b};return j((d=c.apply,d?d.call(a,a.message,"urlReplace, nl2br, allowTags",e):h.call(a, -"apply",a.message,"urlReplace, nl2br, allowTags",e)))},g),data:g}))||0===d)a+=d;return a+="
"})})(); +(function(){var k=Handlebars.template,l=Handlebars.templates=Handlebars.templates||{};l.default_control=k(function(a,b,e,h,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];e=e||a.helpers;f=f||{};h=this.escapeExpression;a="";(e=e.title)?e=e.call(b,{hash:{},data:f}):(e=b.title,e="function"===typeof e?e.apply(b):e);return a+=h(e)+""});l.message=k(function(a,b,e,h,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];e=e||a.helpers;f=f||{};var c,g=this.escapeExpression,j=e.helperMissing;a={hash:{},data:f}; +a=""+(g((c=e.formatTime,c?c.call(b,b.created,a):j.call(b,"formatTime",b.created,a)))+"\n");if((c=e["if"].call(b,b.name,{hash:{},inverse:this.noop,fn:this.program(1,function(a,c){var b,d;b="";(d=e.name)?d=d.call(a,{hash:{},data:c}):(d=a.name,d="function"===typeof d?d.apply(a):d);return b+=g(d)+": "},f),data:f}))||0===c)a+=c;a+="\n";if((c=e["if"].call(b,b.allowFormatting,{hash:{},inverse:this.program(5,function(a,b){var c,d;d={hash:{},data:b};return g((c=e.apply,c?c.call(a,a.message,"urlReplace, nl2br",d):j.call(a,"apply",a.message,"urlReplace, nl2br",d)))},f),fn:this.program(3,function(a,c){var b,d;d={hash:{},data:c};return g((b=e.apply,b?b.call(a,a.message,"urlReplace, nl2br, allowTags",d):j.call(a,"apply",a.message,"urlReplace, nl2br, allowTags", +d)))},f),data:f}))||0===c)a+=c;return a+="
"})})(); diff --git a/src/messenger/webim/js/templates/source/default/sound.handlebars b/src/messenger/webim/js/templates/source/default/sound.handlebars deleted file mode 100644 index 88f9a984..00000000 --- a/src/messenger/webim/js/templates/source/default/sound.handlebars +++ /dev/null @@ -1,5 +0,0 @@ -{{#if file}} - -{{/if}} \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat_layout.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat_layout.handlebars index afd26b36..9788f417 100644 --- a/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat_layout.handlebars +++ b/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat_layout.handlebars @@ -50,7 +50,4 @@
{{! Footer links}} - - -{{! Hidden region for some sound element}} -
\ No newline at end of file + \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/default/js/compiled/templates.js b/src/messenger/webim/styles/dialogs/default/js/compiled/templates.js index ae7da469..738ff4b6 100644 --- a/src/messenger/webim/styles/dialogs/default/js/compiled/templates.js +++ b/src/messenger/webim/styles/dialogs/default/js/compiled/templates.js @@ -37,24 +37,24 @@ b)))+'\n
 
\n'});s.chat_layout=r(func a='\n
\n \n
\n\n\n
\n
\n \n
\n
\n
\n\n\n
\n
\n '; if((m=f.unless.call(e,(h=e.user,null==h||!1===h?h:h.isAgent),{hash:{},inverse:t.noop,fn:t.program(11,function(){return'\n
\n '},c),data:c}))||0===m)a+=m;c={hash:{},data:c};return a=a+'\n \n
\n \n
\n
\n
\n\n\n
\n\n\n\n\n\n
')});s.secure_mode_control=r(function(){this.compilerInfo=[2,">= 1.0.0-rc.3"];return'
'});s.sound_control=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j=f.helperMissing,k=this.escapeExpression;return(a=f["if"].call(e,e.enabled,{hash:{},inverse:this.program(3, -function(a,b){var c,e;c={hash:{},data:b};return c='\n
\n')},c),fn:this.program(1,function(a,c){var b,e;b={hash:{},data:c};return b='\n
\n')}, -c),data:c}))||0===a?a:""});s.message=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j,k=this.escapeExpression,l=f.helperMissing;a={hash:{},data:c};a=""+(k((j=f.formatTime,j?j.call(e,e.created,a):l.call(e,"formatTime",e.created,a)))+" \n");if((j=f["if"].call(e,e.name,{hash:{},inverse:this.noop,fn:this.program(1,function(a,b){var c,e;c="";(e=f.name)?e=e.call(a,{hash:{},data:b}):(e=a.name,e="function"===typeof e?e.apply(a):e);return c+=k(e)+": "},c),data:c}))||0===j)a+=j;a+="\n";if((j=f["if"].call(e,e.allowFormatting,{hash:{},inverse:this.program(5,function(a,c){var b,e;e={hash:{},data:c};return k((b=f.apply,b?b.call(a,a.message,"urlReplace, nl2br",e):l.call(a,"apply",a.message,"urlReplace, nl2br", -e)))},c),fn:this.program(3,function(a,c){var b,e;e={hash:{},data:c};return k((b=f.apply,b?b.call(a,a.message,"urlReplace, nl2br, allowTags",e):l.call(a,"apply",a.message,"urlReplace, nl2br, allowTags",e)))},c),data:c}))||0===j)a+=j;return a+="
"});s.message_form=r(function(a,e,f,b,c){function j(a,b){var d,g;d={hash:{},data:b};d='\n \n "}function k(a){var b;return a=""+("\n \n ")}this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var l,p="function",h=this.escapeExpression,m= -f.helperMissing,n=this;a='
\n';if((b=f["if"].call(e,(l=e.user,null==l||!1===l?l:l.canPost),{hash:{},inverse:n.noop,fn:n.program(1,function(){return'\n
\n \n
\n'},c),data:c}))||0===b)a+=b;a+='\n
\n\n
\n';if((b=f["if"].call(e,(l=e.user,null==l||!1===l?l:l.canPost),{hash:{},inverse:n.noop,fn:n.program(3, -function(a,b){var d,g,c;d='\n
\n
\n ';if((c=f["if"].call(a,(g=a.user,null==g||!1===g?g:g.isAgent),{hash:{},inverse:n.noop,fn:n.program(4,j,b),data:b}))||0===c)d+=c;c={hash:{},data:b};d=d+'\n
\n ');c={hash:{},data:b};return d+=h((g=f.L10n,g?g.call(a, -"chat.window.send_message_short_and_shortcut",c):m.call(a,"L10n","chat.window.send_message_short_and_shortcut",c)))+"\n
\n"},c),data:c}))||0===b)a+=b;return a+'\n
\n
'});s.send_mail_control=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j;a=f.helperMissing;b=this.escapeExpression;c={hash:{},data:c};return e='
')});s.survey_layout=r(function(a,e,f,b,c){function j(a){var b;return a=""+('\n \n ')}function k(a){var b;return a=""+("\n \n \n \n ')}function l(a){var b;return a=""+("\n \n \n \n ')}function p(a){var b;return a=""+('\n \n ')}this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var h,m,n="function",q=this.escapeExpression,r=this;b=f.helperMissing;a='\n
\n \n
\n\n\n
\n
\n
\n ';m={hash:{},data:c};a+=q((h=f.L10n,h?h.call(e,\n
\n
';m={hash:{},data:c};return a+=q((h=f.L10n,h?h.call(e,"presurvey.intro",m):b.call(e, -"L10n","presurvey.intro",m)))+'
\n
\n
\n\n\n
'});s.leave_message_description=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j,k=f.helperMissing,l=this.escapeExpression;b={hash:{},data:c};a='
\n \n ');b={hash:{},data:c};a+=l((j=f.L10n,j?j.call(e,\n \n
\n
';b={hash:{},data:c};return a+=l((j=f.L10n,j?j.call(e,"leavemessage.descr",b):k.call(e,"L10n","leavemessage.descr",b)))+"
"});s.refresh_control=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{}; -var j;a=f.helperMissing;b=this.escapeExpression;c={hash:{},data:c};return e='
')});s.redirect_control=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j,k=f.helperMissing,l=this.escapeExpression;return(a=f["if"].call(e,(j=e.user,null==j||!1===j?j:j.canPost),{hash:{},inverse:this.noop,fn:this.program(1,function(a,b){var c, -e;c={hash:{},data:b};return c='\n
\n')},c),data:c}))||0===a?a:""});s.status=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};a=this.escapeExpression;(f=f.title)?f=f.call(e,{hash:{},data:c}):(f=e.title,f="function"===typeof f?f.apply(e):f);return a(f)});s.leave_message_sent_description=r(function(a,e,f,b,c){this.compilerInfo= -[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j,k=f.helperMissing,l=this.escapeExpression;b={hash:{},data:c};a='
\n \n ');b={hash:{},data:c};a+=l((j=f.L10n,j?j.call(e,
-\n \n
\n
';b={hash:{},data:c};return a+=l((j=f.L10n,j?j.call(e,"leavemessage.sent.message",b):k.call(e,"L10n","leavemessage.sent.message",b)))+"
"})})(); +"L10n","chat.window.poweredby",c)))+' mibew.org')});s.secure_mode_control=r(function(){this.compilerInfo=[2,">= 1.0.0-rc.3"];return'
'});s.sound_control=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j=f.helperMissing,k=this.escapeExpression;return(a=f["if"].call(e,e.enabled,{hash:{},inverse:this.program(3,function(a,b){var c, +e;c={hash:{},data:b};return c='\n
\n')},c),fn:this.program(1,function(a,c){var b,e;b={hash:{},data:c};return b='\n
\n')},c),data:c}))||0=== +a?a:""});s.message=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j,k=this.escapeExpression,l=f.helperMissing;a={hash:{},data:c};a=""+(k((j=f.formatTime,j?j.call(e,e.created,a):l.call(e,"formatTime",e.created,a)))+" \n");if((j=f["if"].call(e,e.name,{hash:{},inverse:this.noop,fn:this.program(1,function(a,b){var c,e;c="";(e=f.name)? +e=e.call(a,{hash:{},data:b}):(e=a.name,e="function"===typeof e?e.apply(a):e);return c+=k(e)+": "},c),data:c}))||0===j)a+=j;a+="\n";if((j=f["if"].call(e,e.allowFormatting,{hash:{},inverse:this.program(5,function(a,c){var b,e;e={hash:{},data:c};return k((b=f.apply,b?b.call(a,a.message,"urlReplace, nl2br",e):l.call(a,"apply",a.message,"urlReplace, nl2br",e)))},c),fn:this.program(3, +function(a,c){var b,e;e={hash:{},data:c};return k((b=f.apply,b?b.call(a,a.message,"urlReplace, nl2br, allowTags",e):l.call(a,"apply",a.message,"urlReplace, nl2br, allowTags",e)))},c),data:c}))||0===j)a+=j;return a+="
"});s.message_form=r(function(a,e,f,b,c){function j(a,b){var d,g;d={hash:{},data:b};d='\n \n "}function k(a){var b;return a=""+("\n \n ")}this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var l,p="function",h=this.escapeExpression,m=f.helperMissing,n=this;a='
\n';if((b=f["if"].call(e, +(l=e.user,null==l||!1===l?l:l.canPost),{hash:{},inverse:n.noop,fn:n.program(1,function(){return'\n
\n \n
\n'},c),data:c}))||0===b)a+=b;a+='\n
\n\n
\n';if((b=f["if"].call(e,(l=e.user,null==l||!1===l?l:l.canPost),{hash:{},inverse:n.noop,fn:n.program(3,function(a,b){var d,g,c;d='\n
\n
\n '; +if((c=f["if"].call(a,(g=a.user,null==g||!1===g?g:g.isAgent),{hash:{},inverse:n.noop,fn:n.program(4,j,b),data:b}))||0===c)d+=c;c={hash:{},data:b};d=d+'\n
\n ');c={hash:{},data:b};return d+=h((g=f.L10n,g?g.call(a,"chat.window.send_message_short_and_shortcut",c):m.call(a,"L10n","chat.window.send_message_short_and_shortcut", +c)))+"\n
\n"},c),data:c}))||0===b)a+=b;return a+'\n
\n
'});s.send_mail_control=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j;a=f.helperMissing;b=this.escapeExpression;c={hash:{},data:c};return e='
')});s.survey_layout=r(function(a,e,f,b,c){function j(a){var b; +return a=""+('\n \n ')}function k(a){var b;return a=""+("\n \n \n \n ')}function l(a){var b;return a=""+("\n \n \n \n ')} +function p(a){var b;return a=""+('\n \n ')}this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var h,m,n="function",q=this.escapeExpression,r=this;b=f.helperMissing;a='\n
\n \n
\n\n\n
\n
\n
\n ';m={hash:{},data:c};a+=q((h=f.L10n,h?h.call(e,\n
\n
';m={hash:{},data:c};return a+=q((h=f.L10n,h?h.call(e,"presurvey.intro",m):b.call(e,"L10n","presurvey.intro",m)))+'
\n
\n
\n\n\n
'}); +s.leave_message_description=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j,k=f.helperMissing,l=this.escapeExpression;b={hash:{},data:c};a='
\n \n ');
+b={hash:{},data:c};a+=l((j=f.L10n,j?j.call(e,\n \n
\n
';b={hash:{},data:c};return a+=l((j=f.L10n,j?j.call(e,"leavemessage.descr",b):k.call(e,"L10n","leavemessage.descr",b)))+"
"});s.refresh_control=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j;a=f.helperMissing;b=this.escapeExpression;c={hash:{},data:c};return e='
')});s.redirect_control=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j,k=f.helperMissing,l=this.escapeExpression;return(a=f["if"].call(e,(j=e.user,null==j||!1===j?j:j.canPost),{hash:{},inverse:this.noop,fn:this.program(1,function(a,b){var c,e;c={hash:{},data:b};return c='\n
\n')},c),data:c}))||0===a?a:""});s.status=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};a=this.escapeExpression;(f=f.title)?f=f.call(e,{hash:{},data:c}):(f=e.title,f="function"===typeof f?f.apply(e):f);return a(f)});s.leave_message_sent_description=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j,k=f.helperMissing,l=this.escapeExpression;b={hash:{},data:c}; +a='
\n \n ');b={hash:{},data:c};a+=l((j=f.L10n,j?j.call(e,\n \n
\n
'; +b={hash:{},data:c};return a+=l((j=f.L10n,j?j.call(e,"leavemessage.sent.message",b):k.call(e,"L10n","leavemessage.sent.message",b)))+"
"})})(); diff --git a/src/messenger/webim/view/pending_users.php b/src/messenger/webim/view/pending_users.php index c82e469a..e8b2eb6a 100644 --- a/src/messenger/webim/view/pending_users.php +++ b/src/messenger/webim/view/pending_users.php @@ -153,7 +153,7 @@ function tpl_content() { global $page, $webimroot;
-
+