diff --git a/src/messenger/webim/client.php b/src/messenger/webim/client.php index 8ce25924..ca17820f 100644 --- a/src/messenger/webim/client.php +++ b/src/messenger/webim/client.php @@ -162,7 +162,7 @@ if( !isset($_GET['token']) || !isset($_GET['thread']) ) { $token = verifyparam( "token", "/^\d{1,8}$/"); $threadid = verifyparam( "thread", "/^\d{1,8}$/"); -$level = verifyparam( "level", "/^(ajaxed|simple|old)$/"); +$level = verifyparam( "level", "/^(ajaxed|old)$/"); $thread = Thread::load($threadid, $token); if (! $thread) { @@ -178,11 +178,9 @@ if( $pparam == "mailthread" ) { // Load JavaScript plugins and JavaScripts, CSS files required by them $page['additional_css'] = get_additional_css('chatWindow'); $page['additional_js'] = get_additional_js('chatWindow'); - $page['js_plugins'] = get_js_plugins('chatWindow'); + $page['js_plugin_options'] = get_js_plugin_options('chatWindow'); // Expand page expand("styles/dialogs", getchatstyle(), "chat.tpl"); -} else if( $level == "simple" ) { - expand("styles/dialogs", getchatstyle(), "chatsimple.tpl"); } else if( $level == "old" ) { expand("styles/dialogs", getchatstyle(), "nochat.tpl"); } diff --git a/src/messenger/webim/js/compiled/chat/app.js b/src/messenger/webim/js/compiled/chat/app.js new file mode 100644 index 00000000..3f9f54e4 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/app.js @@ -0,0 +1,12 @@ +/* + 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,j){var f=new j.Marionette.Application;f.addRegions({controlsRegion:"#controls-region",avatarRegion:"#avatar-region",messagesRegion:a.Regions.Messages,statusRegion:"#status-region",messageFormRegion:"#message-form-region",soundRegion:"#sound-region"});f.addInitializer(function(d){var g=a.Objects,c=a.Objects.Models,b=a.Objects.Models.Controls,h=a.Objects.Models.Status;g.server=new a.Server(d.server);g.thread=new a.Thread(d.thread);c.user=new a.Models.User(d.user);c.page=new a.Models.Page(d.page); +var e=new a.Collections.Controls;c.user.get("isAgent")||(b.userName=new a.Models.UserNameControl({weight:220}),e.push(b.userName),b.sendMail=new a.Models.SendMailControl({weight:200,link:d.links.mailLink}),e.push(b.sendMail));c.user.get("isAgent")&&(b.redirect=new a.Models.RedirectControl({weight:200,link:d.links.redirectLink}),e.push(b.redirect),b.history=new a.Models.HistoryControl({weight:180,link:d.links.historyLink}),e.push(b.history));b.sound=new a.Models.SoundControl({weight:160});e.push(b.sound); +b.refresh=new a.Models.RefreshControl({weight:140});e.push(b.refresh);d.links.sslLink&&(b.secureMode=new a.Models.SecureModeControl({weight:120,link:d.links.sslLink}),e.push(b.secureMode));b.close=new a.Models.CloseControl({weight:100});e.push(b.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}));c.user.get("isAgent")||(c.avatar=new a.Models.Avatar,f.avatarRegion.show(new a.Views.Avatar({model:c.avatar})));g.Collections.messages=new a.Collections.Messages;c.messageForm=new a.Models.MessageForm(d.messageForm);f.messageFormRegion.show(new a.Views.MessageForm({model:c.messageForm}));f.messagesRegion.show(new a.Views.MessagesCollection({collection:g.Collections.messages}));c.sound=new a.Models.Sound; +f.soundRegion.show(new a.Views.Sound({model:c.sound}));g.server.runUpdater()});a.Application=f})(Mibew,Backbone); diff --git a/src/messenger/webim/js/compiled/chat/collections/controls.js b/src/messenger/webim/js/compiled/chat/collections/controls.js new file mode 100644 index 00000000..c55dad13 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/collections/controls.js @@ -0,0 +1,8 @@ +/* + 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,b){a.Collections.Controls=b.Collection.extend({comparator:function(a){return a.get("weight")}})})(Mibew,Backbone); diff --git a/src/messenger/webim/js/compiled/chat/collections/messages.js b/src/messenger/webim/js/compiled/chat/collections/messages.js new file mode 100644 index 00000000..9dc2a9ca --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/collections/messages.js @@ -0,0 +1,10 @@ +/* + 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(b,d,c){b.Collections.Messages=d.Collection.extend({model:b.Models.Message,initialize:function(){b.Objects.server.callFunctionsPeriodically(c.bind(this.updateFunctionBuilder,this),c.bind(this.updateChatState,this));b.Objects.server.registerFunction("updateMessages",c.bind(this.apiUpdateMessages,this))},apiUpdateMessages:function(a){a.lastId&&(b.Objects.thread.lastId=a.lastId);for(var e=[],c=0,d=a.messages.length;c$2");a=a.replace(/<span class="(.*?)">(.*?)<\/span>/g,'$2');return new b.SafeString(a)})})(Handlebars); diff --git a/src/messenger/webim/js/compiled/pluginmanager.js b/src/messenger/webim/js/compiled/chat/init.js similarity index 56% rename from src/messenger/webim/js/compiled/pluginmanager.js rename to src/messenger/webim/js/compiled/chat/init.js index adc4449f..40f43ff0 100644 --- a/src/messenger/webim/js/compiled/pluginmanager.js +++ b/src/messenger/webim/js/compiled/chat/init.js @@ -5,4 +5,4 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -var PluginManager=function(){var b={};this.addPlugin=function(a,c){b[a]=c};this.getPlugin=function(a){return b[a]?b[a]:!1}}; \ No newline at end of file +(function(a){a.Regions={};a.Objects.Models.Controls={};a.Objects.Models.Status={}})(Mibew); diff --git a/src/messenger/webim/js/compiled/chat/models/avatar.js b/src/messenger/webim/js/compiled/chat/models/avatar.js new file mode 100644 index 00000000..d11f33a0 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/models/avatar.js @@ -0,0 +1,8 @@ +/* + 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,b){a.Models.Avatar=a.Models.Base.extend({defaults:{imageLink:!1},initialize:function(){a.Objects.server.registerFunction("setupAvatar",b.bind(this.apiSetupAvatar,this))},apiSetupAvatar:function(a){a.imageLink&&this.set({imageLink:a.imageLink})}})})(Mibew,_); diff --git a/src/messenger/webim/js/compiled/chat/models/controls/base_control.js b/src/messenger/webim/js/compiled/chat/models/controls/base_control.js new file mode 100644 index 00000000..6e6f0b1b --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/models/controls/base_control.js @@ -0,0 +1,8 @@ +/* + 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.Control=a.Models.Base.extend({defaults:{title:"",weight:0}})})(Mibew); diff --git a/src/messenger/webim/js/compiled/chat/models/controls/close.js b/src/messenger/webim/js/compiled/chat/models/controls/close.js new file mode 100644 index 00000000..149f48fa --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/models/controls/close.js @@ -0,0 +1,8 @@ +/* + 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.CloseControl=a.Models.Control.extend({getModelType:function(){return"CloseControl"},closeThread:function(){var b=a.Objects.thread;a.Objects.server.callFunctions([{"function":"close",arguments:{references:{},"return":{closed:"closed"},threadId:b.threadId,token:b.token,lastId:b.lastId,user:!a.Objects.Models.user.get("isAgent")}}],function(b){b.closed?window.close():a.Objects.Models.Status.message.setMessage(b.errorMessage||"Cannot close")},!0)}})})(Mibew); diff --git a/src/messenger/webim/js/compiled/chat/models/controls/history.js b/src/messenger/webim/js/compiled/chat/models/controls/history.js new file mode 100644 index 00000000..8752d723 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/models/controls/history.js @@ -0,0 +1,8 @@ +/* + 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,b){a.Models.HistoryControl=a.Models.Control.extend({defaults:b.extend({},a.Models.Control.prototype.defaults,{link:!1}),getModelType:function(){return"HistoryControl"}})})(Mibew,_); diff --git a/src/messenger/webim/js/compiled/chat/models/controls/redirect.js b/src/messenger/webim/js/compiled/chat/models/controls/redirect.js new file mode 100644 index 00000000..cba685b1 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/models/controls/redirect.js @@ -0,0 +1,8 @@ +/* + 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,b){a.Models.RedirectControl=a.Models.Control.extend({defaults:b.extend({},a.Models.Control.prototype.defaults,{link:!1}),getModelType:function(){return"RedirectControl"}})})(Mibew,_); diff --git a/src/messenger/webim/js/compiled/chat/models/controls/refresh.js b/src/messenger/webim/js/compiled/chat/models/controls/refresh.js new file mode 100644 index 00000000..c479d3d1 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/models/controls/refresh.js @@ -0,0 +1,8 @@ +/* + 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.RefreshControl=a.Models.Control.extend({getModelType:function(){return"RefreshControl"},refresh:function(){a.Objects.server.restartUpdater()}})})(Mibew); diff --git a/src/messenger/webim/js/compiled/chat/models/controls/secure_mode.js b/src/messenger/webim/js/compiled/chat/models/controls/secure_mode.js new file mode 100644 index 00000000..36d12bf1 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/models/controls/secure_mode.js @@ -0,0 +1,8 @@ +/* + 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,b){a.Models.SecureModeControl=a.Models.Control.extend({defaults:b.extend({},a.Models.Control.prototype.defaults,{link:!1}),getModelType:function(){return"SecureModeControl"}})})(Mibew,_); diff --git a/src/messenger/webim/js/compiled/chat/models/controls/send_mail.js b/src/messenger/webim/js/compiled/chat/models/controls/send_mail.js new file mode 100644 index 00000000..9721dbcb --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/models/controls/send_mail.js @@ -0,0 +1,8 @@ +/* + 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,b){a.Models.SendMailControl=a.Models.Control.extend({defaults:b.extend({},a.Models.Control.prototype.defaults,{link:!1}),getModelType:function(){return"SendMailControl"}})})(Mibew,_); diff --git a/src/messenger/webim/js/compiled/chat/models/controls/sound.js b/src/messenger/webim/js/compiled/chat/models/controls/sound.js new file mode 100644 index 00000000..2ff089a9 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/models/controls/sound.js @@ -0,0 +1,8 @@ +/* + 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,b){a.Models.SoundControl=a.Models.Control.extend({defaults:b.extend({},a.Models.Control.prototype.defaults,{enabled:!0}),getModelType:function(){return"SoundControl"}})})(Mibew,_); diff --git a/src/messenger/webim/js/compiled/chat/models/controls/user_name.js b/src/messenger/webim/js/compiled/chat/models/controls/user_name.js new file mode 100644 index 00000000..8a7bf02e --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/models/controls/user_name.js @@ -0,0 +1,8 @@ +/* + 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(b){b.Models.UserNameControl=b.Models.Control.extend({getModelType:function(){return"UserNameControl"},changeName:function(a){var c=b.Objects.Models.user,d=b.Objects.thread,e=c.get("name");a&&e!=a&&(b.Objects.server.callFunctions([{"function":"rename",arguments:{references:{},"return":{},threadId:d.threadId,token:d.token,name:a}}],function(a){a.errorCode&&(b.Objects.Models.Status.message.setMessage(a.errorMessage||"Cannot rename"),c.set({name:e}))},!0),c.set({name:a}))}})})(Mibew); diff --git a/src/messenger/webim/js/compiled/chat/models/messages/message.js b/src/messenger/webim/js/compiled/chat/models/messages/message.js new file mode 100644 index 00000000..e30787e4 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/models/messages/message.js @@ -0,0 +1,8 @@ +/* + 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.Message=a.Models.Base.extend({defaults:{message:""}})})(Mibew); diff --git a/src/messenger/webim/js/compiled/chat/models/messages/message_form.js b/src/messenger/webim/js/compiled/chat/models/messages/message_form.js new file mode 100644 index 00000000..e7f482e0 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/models/messages/message_form.js @@ -0,0 +1,8 @@ +/* + 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.MessageForm=a.Models.Base.extend({defaults:{predefinedAnswers:[],ignoreCtrl:!1},postMessage:function(e){var b=a.Objects.thread,c=a.Objects.Models.user;if(c.get("canPost")){this.trigger("before:post",this);var d=this;a.Objects.server.callFunctions([{"function":"post",arguments:{references:{},"return":{},message:e,threadId:b.threadId,token:b.token,user:!c.get("isAgent")}}],function(){d.trigger("after:post",d)},!0)}}})})(Mibew); diff --git a/src/messenger/webim/js/compiled/chat/models/status/base_status.js b/src/messenger/webim/js/compiled/chat/models/status/base_status.js new file mode 100644 index 00000000..9c6a142f --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/models/status/base_status.js @@ -0,0 +1,8 @@ +/* + 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(b,c){b.Models.Status=b.Models.Base.extend({defaults:{visible:!0,weight:0,hideTimeout:4E3,title:""},initialize:function(){this.hideTimer=null},autoHide:function(a){a=a||this.get("hideTimeout");this.hideTimer&&clearTimeout(this.hideTimer);this.hideTimer=setTimeout(c.bind(function(){this.set({visible:!1})},this),a)}})})(Mibew,_); diff --git a/src/messenger/webim/js/compiled/chat/models/status/message.js b/src/messenger/webim/js/compiled/chat/models/status/message.js new file mode 100644 index 00000000..1bd30bd5 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/models/status/message.js @@ -0,0 +1,8 @@ +/* + 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,b){a.Models.StatusMessage=a.Models.Status.extend({defaults:b.extend({},a.Models.Status.prototype.defaults,{message:"",visible:!1}),getModelType:function(){return"StatusMessage"},setMessage:function(a){this.set({message:a,visible:!0});this.autoHide()}})})(Mibew,_); diff --git a/src/messenger/webim/js/compiled/chat/models/status/typing.js b/src/messenger/webim/js/compiled/chat/models/status/typing.js new file mode 100644 index 00000000..15da787b --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/models/status/typing.js @@ -0,0 +1,8 @@ +/* + 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,b){a.Models.StatusTyping=a.Models.Status.extend({defaults:b.extend({},a.Models.Status.prototype.defaults,{visible:!1,hideTimeout:2E3}),getModelType:function(){return"StatusTyping"},show:function(){this.set({visible:!0});this.autoHide()}})})(Mibew,_); diff --git a/src/messenger/webim/js/compiled/chat/regions/messages.js b/src/messenger/webim/js/compiled/chat/regions/messages.js new file mode 100644 index 00000000..ca17f73f --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/regions/messages.js @@ -0,0 +1,8 @@ +/* + 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,b){a.Regions.Messages=b.Marionette.Region.extend({el:"#messages-region",onShow:function(a){a.on("after:item:added",this.scrollToBottom,this)},scrollToBottom:function(){this.$el.scrollTop(this.$el.prop("scrollHeight"))}})})(Mibew,Backbone); diff --git a/src/messenger/webim/js/compiled/chat/views/avatar.js b/src/messenger/webim/js/compiled/chat/views/avatar.js new file mode 100644 index 00000000..9b00491b --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/views/avatar.js @@ -0,0 +1,8 @@ +/* + 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,b,c){a.Views.Avatar=b.Marionette.ItemView.extend({template:c.templates.avatar,className:"avatar",modelEvents:{change:"render"}})})(Mibew,Backbone,Handlebars); diff --git a/src/messenger/webim/js/compiled/chat/views/controls/base_control.js b/src/messenger/webim/js/compiled/chat/views/controls/base_control.js new file mode 100644 index 00000000..21aaa4ae --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/views/controls/base_control.js @@ -0,0 +1,9 @@ +/* + 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(b,c,d){b.Views.Control=c.Marionette.ItemView.extend({template:d.templates.control,modelEvents:{change:"render"},events:{mouseover:"mouseOver",mouseleave:"mouseLeave"},attributes:function(){var a=[];a.push("control");this.className&&(a.push(this.className),this.className="");var b=this.getDashedControlType();b&&a.push(b);return{"class":a.join(" ")}},mouseOver:function(){var a=this.getDashedControlType();this.$el.addClass("active"+(a?"-"+a:""))},mouseLeave:function(){var a=this.getDashedControlType(); +this.$el.removeClass("active"+(a?"-"+a:""))},getDashedControlType:function(){"undefined"==typeof this.dashedControlType&&(this.dashedControlType=b.Utils.toDashFormat(this.model.getModelType())||"");return this.dashedControlType}})})(Mibew,Backbone,Handlebars); diff --git a/src/messenger/webim/js/compiled/chat/views/controls/close.js b/src/messenger/webim/js/compiled/chat/views/controls/close.js new file mode 100644 index 00000000..2717dac7 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/views/controls/close.js @@ -0,0 +1,8 @@ +/* + 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,c,d){a.Views.CloseControl=a.Views.Control.extend({template:c.templates.close_control,events:d.extend({},a.Views.Control.prototype.events,{click:"close"}),close:function(){var b=a.Localization.get("chat.close.confirmation");(!1===b||confirm(b))&&this.model.closeThread()}})})(Mibew,Handlebars,_); diff --git a/src/messenger/webim/js/compiled/chat/views/controls/controls_collection.js b/src/messenger/webim/js/compiled/chat/views/controls/controls_collection.js new file mode 100644 index 00000000..4ea84359 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/views/controls/controls_collection.js @@ -0,0 +1,8 @@ +/* + 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.Views.ControlsCollection=a.Views.CollectionBase.extend({itemView:a.Views.Control,className:"controls-collection"})})(Mibew); diff --git a/src/messenger/webim/js/compiled/chat/views/controls/history.js b/src/messenger/webim/js/compiled/chat/views/controls/history.js new file mode 100644 index 00000000..d6851438 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/views/controls/history.js @@ -0,0 +1,8 @@ +/* + 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(b,d,e){b.Views.HistoryControl=b.Views.Control.extend({template:d.templates.history_control,events:e.extend({},b.Views.Control.prototype.events,{click:"showHistory"}),showHistory:function(){var c=b.Objects.Models.user,a=this.model.get("link");c.get("isAgent")&&a&&(c=this.$el.find(".control-config").eq(0).data("win-params"),a=a.replace("&","&","g"),a=window.open(a,"UserHistory",c),null!==a&&(a.focus(),a.opener=window))}})})(Mibew,Handlebars,_); diff --git a/src/messenger/webim/js/compiled/chat/views/controls/redirect.js b/src/messenger/webim/js/compiled/chat/views/controls/redirect.js new file mode 100644 index 00000000..dc425879 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/views/controls/redirect.js @@ -0,0 +1,9 @@ +/* + 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,d,e){a.Views.RedirectControl=a.Views.Control.extend({template:d.templates.redirect_control,events:e.extend({},a.Views.Control.prototype.events,{click:"redirect"}),initialize:function(){a.Objects.Models.user.on("change",this.render,this)},serializeData:function(){var b=this.model.toJSON();b.user=a.Objects.Models.user.toJSON();return b},redirect:function(){var b=a.Objects.Models.user;if(b.get("isAgent")&&b.get("canPost")&&(b=this.model.get("link"))){var c=a.Objects.Models.page.get("style"); +window.location.href=b.replace(/\&\;/g,"&")+(c?"&style="+c:"")}}})})(Mibew,Handlebars,_); diff --git a/src/messenger/webim/js/compiled/chat/views/controls/refresh.js b/src/messenger/webim/js/compiled/chat/views/controls/refresh.js new file mode 100644 index 00000000..0b35088e --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/views/controls/refresh.js @@ -0,0 +1,8 @@ +/* + 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,b,c){a.Views.RefreshControl=a.Views.Control.extend({template:b.templates.refresh_control,events:c.extend({},a.Views.Control.prototype.events,{click:"refresh"}),refresh:function(){this.model.refresh()}})})(Mibew,Handlebars,_); diff --git a/src/messenger/webim/js/compiled/chat/views/controls/secure_mode.js b/src/messenger/webim/js/compiled/chat/views/controls/secure_mode.js new file mode 100644 index 00000000..81f57712 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/views/controls/secure_mode.js @@ -0,0 +1,8 @@ +/* + 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,d,e){a.Views.SecureModeControl=a.Views.Control.extend({template:d.templates.secure_mode_control,events:e.extend({},a.Views.Control.prototype.events,{click:"secure"}),secure:function(){var b=this.model.get("link");if(b){var c=a.Objects.Models.page.get("style");window.location.href=b.replace(/\&\;/g,"&")+(c?"&style="+c:"")}}})})(Mibew,Handlebars,_); diff --git a/src/messenger/webim/js/compiled/chat/views/controls/send_mail.js b/src/messenger/webim/js/compiled/chat/views/controls/send_mail.js new file mode 100644 index 00000000..7cc9e7e8 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/views/controls/send_mail.js @@ -0,0 +1,8 @@ +/* + 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(b,c,e){b.Views.SendMailControl=b.Views.Control.extend({template:c.templates.send_mail_control,events:e.extend({},b.Views.Control.prototype.events,{click:"sendMail"}),sendMail:function(){var a=this.model.get("link");if(a){var c=this.$el.find(".control-config").eq(0).data("win-params"),d=b.Objects.Models.page.get("style"),a=a.replace(/\&\;/g,"&")+(d?"&style="+d:""),a=window.open(a,"ForwardMail",c);null!==a&&(a.focus(),a.opener=window)}}})})(Mibew,Handlebars,_); diff --git a/src/messenger/webim/js/compiled/chat/views/controls/sound.js b/src/messenger/webim/js/compiled/chat/views/controls/sound.js new file mode 100644 index 00000000..251d0196 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/views/controls/sound.js @@ -0,0 +1,8 @@ +/* + 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,b,c){a.Views.SoundControl=a.Views.Control.extend({template:b.templates.sound_control,events:c.extend({},a.Views.Control.prototype.events,{click:"toggle"}),toggle:function(){this.model.set({enabled:!this.model.get("enabled")})}})})(Mibew,Handlebars,_); diff --git a/src/messenger/webim/js/compiled/chat/views/controls/user_name.js b/src/messenger/webim/js/compiled/chat/views/controls/user_name.js new file mode 100644 index 00000000..4db5a437 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/views/controls/user_name.js @@ -0,0 +1,9 @@ +/* + 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(b,c,d){b.Views.UserNameControl=b.Views.Control.extend({template:c.templates.user_name_control,events:d.extend({},b.Views.Control.prototype.events,{"click .user-name-control-set":"changeName","click .user-name-control-change":"showNameInput","keydown #user-name-control-input":"inputKeyDown"}),ui:{nameInput:"#user-name-control-input"},initialize:function(){b.Objects.Models.user.on("change:name",this.hideNameInput,this);this.nameInput=b.Objects.Models.user.get("defaultName")},serializeData:function(){var a= +this.model.toJSON();a.user=b.Objects.Models.user.toJSON();a.nameInput=this.nameInput;return a},inputKeyDown:function(a){a=a.which;(13==a||10==a)&&this.changeName()},hideNameInput:function(){this.nameInput=!1;this.render()},showNameInput:function(){this.nameInput=!0;this.render()},changeName:function(){var a=this.ui.nameInput.val();this.model.changeName(a)}})})(Mibew,Handlebars,_); diff --git a/src/messenger/webim/js/compiled/chat/views/messages/message.js b/src/messenger/webim/js/compiled/chat/views/messages/message.js new file mode 100644 index 00000000..8c4c63e8 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/views/messages/message.js @@ -0,0 +1,9 @@ +/* + 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(c,d,e){var f={"<":"<",">":">","&":"&",'"':""","'":"'","`":"`"},g=/[&<>'"`]/g;c.Views.Message=d.Marionette.ItemView.extend({template:e.templates.message,className:"message",modelEvents:{change:"render"},serializeData:function(){var a=this.model.toJSON(),b=this.model.get("kind");a.allowFormatting=b!=this.KIND_USER&&b!=this.KIND_AGENT;a.kindName=this.kindToString(b);a.message=this.escapeString(a.message);return a},kindToString:function(a){return a==this.KIND_USER?"user": +a==this.KIND_AGENT?"agent":a==this.KIND_FOR_AGENT?"hidden":a==this.KIND_INFO?"inf":a==this.KIND_CONN?"conn":a==this.KIND_EVENTS?"event":""},escapeString:function(a){return a.replace(g,function(a){return f[a]||"&"})},KIND_USER:1,KIND_AGENT:2,KIND_FOR_AGENT:3,KIND_INFO:4,KIND_CONN:5,KIND_EVENTS:6,KIND_AVATAR:7})})(Mibew,Backbone,Handlebars); diff --git a/src/messenger/webim/js/compiled/chat/views/messages/message_form.js b/src/messenger/webim/js/compiled/chat/views/messages/message_form.js new file mode 100644 index 00000000..33bcaeef --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/views/messages/message_form.js @@ -0,0 +1,11 @@ +/* + 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(b,d,e){b.Views.MessageForm=d.Marionette.ItemView.extend({template:e.templates.message_form,events:{"click #send-message":"postMessage","keydown #message-input":"messageKeyDown","keyup #message-input":"checkUserTyping","change #message-input":"checkUserTyping","change #predefined":"selectPredefinedAnswer","focus #message-input":"setFocus","blur #message-input":"dropFocus"},modelEvents:{change:"render"},ui:{message:"#message-input",send:"#send-message",predefinedAnswer:"#predefined"},initialize:function(){b.Objects.Models.user.on("change:canPost", +this.render,this)},serializeData:function(){var a=this.model.toJSON();a.user=b.Objects.Models.user.toJSON();return a},postMessage:function(){var a=this.ui.message.val();""!=a&&(this.disableInput(),this.model.postMessage(a));b.Objects.Collections.messages.on("multiple:add",this.postMessageComplete,this)},messageKeyDown:function(a){var c=a.which;a=a.ctrlKey;(13==c&&(a||this.model.get("ignoreCtrl"))||10==c)&&this.postMessage()},enableInput:function(){this.ui.message.removeAttr("disabled")},disableInput:function(){this.ui.message.attr("disabled", +"disabled")},clearInput:function(){this.ui.message.val("").change()},postMessageComplete:function(){this.clearInput();this.enableInput();this.focused&&this.ui.focus();b.Objects.Collections.messages.off("multiple:add",this.postMessageComplete,this)},selectPredefinedAnswer:function(){var a=this.ui.message,c=this.ui.predefinedAnswer,b=c.get(0).selectedIndex;b&&(a.val(this.model.get("predefinedAnswers")[b-1].full).change(),a.focus(),c.get(0).selectedIndex=0)},checkUserTyping:function(){var a=b.Objects.Models.user, +c=""!=this.ui.message.val();c!=a.get("typing")&&a.set({typing:c})},setFocus:function(){this.focused=!0},dropFocus:function(){this.focused=!1}})})(Mibew,Backbone,Handlebars); diff --git a/src/messenger/webim/js/compiled/chat/views/messages/messages_collection.js b/src/messenger/webim/js/compiled/chat/views/messages/messages_collection.js new file mode 100644 index 00000000..66fd8151 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/views/messages/messages_collection.js @@ -0,0 +1,9 @@ +/* + 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.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+ +"/sounds/new_message.wav")}this.skipNextSound=!1}})})(Mibew); diff --git a/src/messenger/webim/js/compiled/chat/views/status/base_status.js b/src/messenger/webim/js/compiled/chat/views/status/base_status.js new file mode 100644 index 00000000..d49244b5 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/views/status/base_status.js @@ -0,0 +1,8 @@ +/* + 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,b,c){a.Views.Status=b.Marionette.ItemView.extend({template:c.templates.status,className:"status",modelEvents:{change:"render"},onBeforeRender:function(){this.model.get("visible")?this.$el.show():this.$el.hide()}})})(Mibew,Backbone,Handlebars); diff --git a/src/messenger/webim/js/compiled/chat/views/status/message.js b/src/messenger/webim/js/compiled/chat/views/status/message.js new file mode 100644 index 00000000..04a2bc1f --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/views/status/message.js @@ -0,0 +1,8 @@ +/* + 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,b){a.Views.StatusMessage=a.Views.Status.extend({template:b.templates.status_message})})(Mibew,Handlebars); diff --git a/src/messenger/webim/js/compiled/chat/views/status/status_collection.js b/src/messenger/webim/js/compiled/chat/views/status/status_collection.js new file mode 100644 index 00000000..f8b97b6a --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/views/status/status_collection.js @@ -0,0 +1,8 @@ +/* + 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.Views.StatusCollection=a.Views.CollectionBase.extend({itemView:a.Views.Status,className:"status-collection"})})(Mibew); diff --git a/src/messenger/webim/js/compiled/chat/views/status/typing.js b/src/messenger/webim/js/compiled/chat/views/status/typing.js new file mode 100644 index 00000000..b3606320 --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/views/status/typing.js @@ -0,0 +1,8 @@ +/* + 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,b){a.Views.StatusTyping=a.Views.Status.extend({template:b.templates.status_typing})})(Mibew,Handlebars); diff --git a/src/messenger/webim/js/compiled/chat_app.js b/src/messenger/webim/js/compiled/chat_app.js new file mode 100644 index 00000000..7a77365a --- /dev/null +++ b/src/messenger/webim/js/compiled/chat_app.js @@ -0,0 +1,106 @@ +/* + 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.Regions={};a.Objects.Models.Controls={};a.Objects.Models.Status={}})(Mibew); +(function(b){b.registerHelper("allowTags",function(a){a=a.replace(/<(span|strong)>(.*?)<\/\1>/g,"<$1>$2");a=a.replace(/<span class="(.*?)">(.*?)<\/span>/g,'$2');return new b.SafeString(a)})})(Handlebars); +(function(a){a.Models.Control=a.Models.Base.extend({defaults:{title:"",weight:0}})})(Mibew); +(function(b,c){b.Models.Status=b.Models.Base.extend({defaults:{visible:!0,weight:0,hideTimeout:4E3,title:""},initialize:function(){this.hideTimer=null},autoHide:function(a){a=a||this.get("hideTimeout");this.hideTimer&&clearTimeout(this.hideTimer);this.hideTimer=setTimeout(c.bind(function(){this.set({visible:!1})},this),a)}})})(Mibew,_); +(function(a,b){a.Models.Avatar=a.Models.Base.extend({defaults:{imageLink:!1},initialize:function(){a.Objects.server.registerFunction("setupAvatar",b.bind(this.apiSetupAvatar,this))},apiSetupAvatar:function(a){a.imageLink&&this.set({imageLink:a.imageLink})}})})(Mibew,_); +(function(a){a.Models.CloseControl=a.Models.Control.extend({getModelType:function(){return"CloseControl"},closeThread:function(){var b=a.Objects.thread;a.Objects.server.callFunctions([{"function":"close",arguments:{references:{},"return":{closed:"closed"},threadId:b.threadId,token:b.token,lastId:b.lastId,user:!a.Objects.Models.user.get("isAgent")}}],function(b){b.closed?window.close():a.Objects.Models.Status.message.setMessage(b.errorMessage||"Cannot close")},!0)}})})(Mibew); +(function(a,b){a.Models.HistoryControl=a.Models.Control.extend({defaults:b.extend({},a.Models.Control.prototype.defaults,{link:!1}),getModelType:function(){return"HistoryControl"}})})(Mibew,_); +(function(a,b){a.Models.RedirectControl=a.Models.Control.extend({defaults:b.extend({},a.Models.Control.prototype.defaults,{link:!1}),getModelType:function(){return"RedirectControl"}})})(Mibew,_); +(function(a){a.Models.RefreshControl=a.Models.Control.extend({getModelType:function(){return"RefreshControl"},refresh:function(){a.Objects.server.restartUpdater()}})})(Mibew); +(function(a,b){a.Models.SecureModeControl=a.Models.Control.extend({defaults:b.extend({},a.Models.Control.prototype.defaults,{link:!1}),getModelType:function(){return"SecureModeControl"}})})(Mibew,_); +(function(a,b){a.Models.SendMailControl=a.Models.Control.extend({defaults:b.extend({},a.Models.Control.prototype.defaults,{link:!1}),getModelType:function(){return"SendMailControl"}})})(Mibew,_); +(function(a,b){a.Models.SoundControl=a.Models.Control.extend({defaults:b.extend({},a.Models.Control.prototype.defaults,{enabled:!0}),getModelType:function(){return"SoundControl"}})})(Mibew,_); +(function(b){b.Models.UserNameControl=b.Models.Control.extend({getModelType:function(){return"UserNameControl"},changeName:function(a){var c=b.Objects.Models.user,d=b.Objects.thread,e=c.get("name");a&&e!=a&&(b.Objects.server.callFunctions([{"function":"rename",arguments:{references:{},"return":{},threadId:d.threadId,token:d.token,name:a}}],function(a){a.errorCode&&(b.Objects.Models.Status.message.setMessage(a.errorMessage||"Cannot rename"),c.set({name:e}))},!0),c.set({name:a}))}})})(Mibew); +(function(a){a.Models.Message=a.Models.Base.extend({defaults:{message:""}})})(Mibew); +(function(a){a.Models.MessageForm=a.Models.Base.extend({defaults:{predefinedAnswers:[],ignoreCtrl:!1},postMessage:function(e){var b=a.Objects.thread,c=a.Objects.Models.user;if(c.get("canPost")){this.trigger("before:post",this);var d=this;a.Objects.server.callFunctions([{"function":"post",arguments:{references:{},"return":{},message:e,threadId:b.threadId,token:b.token,user:!c.get("isAgent")}}],function(){d.trigger("after:post",d)},!0)}}})})(Mibew); +(function(a,b){a.Models.StatusMessage=a.Models.Status.extend({defaults:b.extend({},a.Models.Status.prototype.defaults,{message:"",visible:!1}),getModelType:function(){return"StatusMessage"},setMessage:function(a){this.set({message:a,visible:!0});this.autoHide()}})})(Mibew,_); +(function(a,b){a.Models.StatusTyping=a.Models.Status.extend({defaults:b.extend({},a.Models.Status.prototype.defaults,{visible:!1,hideTimeout:2E3}),getModelType:function(){return"StatusTyping"},show:function(){this.set({visible:!0});this.autoHide()}})})(Mibew,_); +(function(a,b){a.Collections.Controls=b.Collection.extend({comparator:function(a){return a.get("weight")}})})(Mibew,Backbone); +(function(b,d,c){b.Collections.Messages=d.Collection.extend({model:b.Models.Message,initialize:function(){b.Objects.server.callFunctionsPeriodically(c.bind(this.updateFunctionBuilder,this),c.bind(this.updateChatState,this));b.Objects.server.registerFunction("updateMessages",c.bind(this.apiUpdateMessages,this))},apiUpdateMessages:function(a){a.lastId&&(b.Objects.thread.lastId=a.lastId);for(var e=[],c=0,d=a.messages.length;c":">","&":"&",'"':""","'":"'","`":"`"},g=/[&<>'"`]/g;c.Views.Message=d.Marionette.ItemView.extend({template:e.templates.message,className:"message",modelEvents:{change:"render"},serializeData:function(){var a=this.model.toJSON(),b=this.model.get("kind");a.allowFormatting=b!=this.KIND_USER&&b!=this.KIND_AGENT;a.kindName=this.kindToString(b);a.message=this.escapeString(a.message);return a},kindToString:function(a){return a==this.KIND_USER?"user": +a==this.KIND_AGENT?"agent":a==this.KIND_FOR_AGENT?"hidden":a==this.KIND_INFO?"inf":a==this.KIND_CONN?"conn":a==this.KIND_EVENTS?"event":""},escapeString:function(a){return a.replace(g,function(a){return f[a]||"&"})},KIND_USER:1,KIND_AGENT:2,KIND_FOR_AGENT:3,KIND_INFO:4,KIND_CONN:5,KIND_EVENTS:6,KIND_AVATAR:7})})(Mibew,Backbone,Handlebars); +(function(b,d,e){b.Views.MessageForm=d.Marionette.ItemView.extend({template:e.templates.message_form,events:{"click #send-message":"postMessage","keydown #message-input":"messageKeyDown","keyup #message-input":"checkUserTyping","change #message-input":"checkUserTyping","change #predefined":"selectPredefinedAnswer","focus #message-input":"setFocus","blur #message-input":"dropFocus"},modelEvents:{change:"render"},ui:{message:"#message-input",send:"#send-message",predefinedAnswer:"#predefined"},initialize:function(){b.Objects.Models.user.on("change:canPost", +this.render,this)},serializeData:function(){var a=this.model.toJSON();a.user=b.Objects.Models.user.toJSON();return a},postMessage:function(){var a=this.ui.message.val();""!=a&&(this.disableInput(),this.model.postMessage(a));b.Objects.Collections.messages.on("multiple:add",this.postMessageComplete,this)},messageKeyDown:function(a){var c=a.which;a=a.ctrlKey;(13==c&&(a||this.model.get("ignoreCtrl"))||10==c)&&this.postMessage()},enableInput:function(){this.ui.message.removeAttr("disabled")},disableInput:function(){this.ui.message.attr("disabled", +"disabled")},clearInput:function(){this.ui.message.val("").change()},postMessageComplete:function(){this.clearInput();this.enableInput();this.focused&&this.ui.focus();b.Objects.Collections.messages.off("multiple:add",this.postMessageComplete,this)},selectPredefinedAnswer:function(){var a=this.ui.message,c=this.ui.predefinedAnswer,b=c.get(0).selectedIndex;b&&(a.val(this.model.get("predefinedAnswers")[b-1].full).change(),a.focus(),c.get(0).selectedIndex=0)},checkUserTyping:function(){var a=b.Objects.Models.user, +c=""!=this.ui.message.val();c!=a.get("typing")&&a.set({typing:c})},setFocus:function(){this.focused=!0},dropFocus:function(){this.focused=!1}})})(Mibew,Backbone,Handlebars); +(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+ +"/sounds/new_message.wav")}this.skipNextSound=!1}})})(Mibew); +(function(a,b){a.Views.StatusMessage=a.Views.Status.extend({template:b.templates.status_message})})(Mibew,Handlebars); +(function(a){a.Views.StatusCollection=a.Views.CollectionBase.extend({itemView:a.Views.Status,className:"status-collection"})})(Mibew); +(function(a,b){a.Views.StatusTyping=a.Views.Status.extend({template:b.templates.status_typing})})(Mibew,Handlebars); +(function(a){a.Models.Control=a.Models.Base.extend({defaults:{title:"",weight:0}})})(Mibew); +(function(b,c){b.Models.Status=b.Models.Base.extend({defaults:{visible:!0,weight:0,hideTimeout:4E3,title:""},initialize:function(){this.hideTimer=null},autoHide:function(a){a=a||this.get("hideTimeout");this.hideTimer&&clearTimeout(this.hideTimer);this.hideTimer=setTimeout(c.bind(function(){this.set({visible:!1})},this),a)}})})(Mibew,_); +(function(b,c,d){b.Views.Control=c.Marionette.ItemView.extend({template:d.templates.control,modelEvents:{change:"render"},events:{mouseover:"mouseOver",mouseleave:"mouseLeave"},attributes:function(){var a=[];a.push("control");this.className&&(a.push(this.className),this.className="");var b=this.getDashedControlType();b&&a.push(b);return{"class":a.join(" ")}},mouseOver:function(){var a=this.getDashedControlType();this.$el.addClass("active"+(a?"-"+a:""))},mouseLeave:function(){var a=this.getDashedControlType(); +this.$el.removeClass("active"+(a?"-"+a:""))},getDashedControlType:function(){"undefined"==typeof this.dashedControlType&&(this.dashedControlType=b.Utils.toDashFormat(this.model.getModelType())||"");return this.dashedControlType}})})(Mibew,Backbone,Handlebars); +(function(a,b,c){a.Views.Status=b.Marionette.ItemView.extend({template:c.templates.status,className:"status",modelEvents:{change:"render"},onBeforeRender:function(){this.model.get("visible")?this.$el.show():this.$el.hide()}})})(Mibew,Backbone,Handlebars); +(function(a,b){a.Collections.Controls=b.Collection.extend({comparator:function(a){return a.get("weight")}})})(Mibew,Backbone); +(function(b,d,c){b.Collections.Messages=d.Collection.extend({model:b.Models.Message,initialize:function(){b.Objects.server.callFunctionsPeriodically(c.bind(this.updateFunctionBuilder,this),c.bind(this.updateChatState,this));b.Objects.server.registerFunction("updateMessages",c.bind(this.apiUpdateMessages,this))},apiUpdateMessages:function(a){a.lastId&&(b.Objects.thread.lastId=a.lastId);for(var e=[],c=0,d=a.messages.length;c":">","&":"&",'"':""","'":"'","`":"`"},g=/[&<>'"`]/g;c.Views.Message=d.Marionette.ItemView.extend({template:e.templates.message,className:"message",modelEvents:{change:"render"},serializeData:function(){var a=this.model.toJSON(),b=this.model.get("kind");a.allowFormatting=b!=this.KIND_USER&&b!=this.KIND_AGENT;a.kindName=this.kindToString(b);a.message=this.escapeString(a.message);return a},kindToString:function(a){return a==this.KIND_USER?"user": +a==this.KIND_AGENT?"agent":a==this.KIND_FOR_AGENT?"hidden":a==this.KIND_INFO?"inf":a==this.KIND_CONN?"conn":a==this.KIND_EVENTS?"event":""},escapeString:function(a){return a.replace(g,function(a){return f[a]||"&"})},KIND_USER:1,KIND_AGENT:2,KIND_FOR_AGENT:3,KIND_INFO:4,KIND_CONN:5,KIND_EVENTS:6,KIND_AVATAR:7})})(Mibew,Backbone,Handlebars); +(function(b,d,e){b.Views.MessageForm=d.Marionette.ItemView.extend({template:e.templates.message_form,events:{"click #send-message":"postMessage","keydown #message-input":"messageKeyDown","keyup #message-input":"checkUserTyping","change #message-input":"checkUserTyping","change #predefined":"selectPredefinedAnswer","focus #message-input":"setFocus","blur #message-input":"dropFocus"},modelEvents:{change:"render"},ui:{message:"#message-input",send:"#send-message",predefinedAnswer:"#predefined"},initialize:function(){b.Objects.Models.user.on("change:canPost", +this.render,this)},serializeData:function(){var a=this.model.toJSON();a.user=b.Objects.Models.user.toJSON();return a},postMessage:function(){var a=this.ui.message.val();""!=a&&(this.disableInput(),this.model.postMessage(a));b.Objects.Collections.messages.on("multiple:add",this.postMessageComplete,this)},messageKeyDown:function(a){var c=a.which;a=a.ctrlKey;(13==c&&(a||this.model.get("ignoreCtrl"))||10==c)&&this.postMessage()},enableInput:function(){this.ui.message.removeAttr("disabled")},disableInput:function(){this.ui.message.attr("disabled", +"disabled")},clearInput:function(){this.ui.message.val("").change()},postMessageComplete:function(){this.clearInput();this.enableInput();this.focused&&this.ui.focus();b.Objects.Collections.messages.off("multiple:add",this.postMessageComplete,this)},selectPredefinedAnswer:function(){var a=this.ui.message,c=this.ui.predefinedAnswer,b=c.get(0).selectedIndex;b&&(a.val(this.model.get("predefinedAnswers")[b-1].full).change(),a.focus(),c.get(0).selectedIndex=0)},checkUserTyping:function(){var a=b.Objects.Models.user, +c=""!=this.ui.message.val();c!=a.get("typing")&&a.set({typing:c})},setFocus:function(){this.focused=!0},dropFocus:function(){this.focused=!1}})})(Mibew,Backbone,Handlebars); +(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+ +"/sounds/new_message.wav")}this.skipNextSound=!1}})})(Mibew); +(function(a,b){a.Views.StatusMessage=a.Views.Status.extend({template:b.templates.status_message})})(Mibew,Handlebars); +(function(a){a.Views.StatusCollection=a.Views.CollectionBase.extend({itemView:a.Views.Status,className:"status-collection"})})(Mibew); +(function(a,b){a.Views.StatusTyping=a.Views.Status.extend({template:b.templates.status_typing})})(Mibew,Handlebars); +(function(a,j){var f=new j.Marionette.Application;f.addRegions({controlsRegion:"#controls-region",avatarRegion:"#avatar-region",messagesRegion:a.Regions.Messages,statusRegion:"#status-region",messageFormRegion:"#message-form-region",soundRegion:"#sound-region"});f.addInitializer(function(d){var g=a.Objects,c=a.Objects.Models,b=a.Objects.Models.Controls,h=a.Objects.Models.Status;g.server=new a.Server(d.server);g.thread=new a.Thread(d.thread);c.user=new a.Models.User(d.user);c.page=new a.Models.Page(d.page); +var e=new a.Collections.Controls;c.user.get("isAgent")||(b.userName=new a.Models.UserNameControl({weight:220}),e.push(b.userName),b.sendMail=new a.Models.SendMailControl({weight:200,link:d.links.mailLink}),e.push(b.sendMail));c.user.get("isAgent")&&(b.redirect=new a.Models.RedirectControl({weight:200,link:d.links.redirectLink}),e.push(b.redirect),b.history=new a.Models.HistoryControl({weight:180,link:d.links.historyLink}),e.push(b.history));b.sound=new a.Models.SoundControl({weight:160});e.push(b.sound); +b.refresh=new a.Models.RefreshControl({weight:140});e.push(b.refresh);d.links.sslLink&&(b.secureMode=new a.Models.SecureModeControl({weight:120,link:d.links.sslLink}),e.push(b.secureMode));b.close=new a.Models.CloseControl({weight:100});e.push(b.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}));c.user.get("isAgent")||(c.avatar=new a.Models.Avatar,f.avatarRegion.show(new a.Views.Avatar({model:c.avatar})));g.Collections.messages=new a.Collections.Messages;c.messageForm=new a.Models.MessageForm(d.messageForm);f.messageFormRegion.show(new a.Views.MessageForm({model:c.messageForm}));f.messagesRegion.show(new a.Views.MessagesCollection({collection:g.Collections.messages}));c.sound=new a.Models.Sound; +f.soundRegion.show(new a.Views.Sound({model:c.sound}));g.server.runUpdater()});a.Application=f})(Mibew,Backbone); diff --git a/src/messenger/webim/js/compiled/chatcontroller.js b/src/messenger/webim/js/compiled/chatcontroller.js deleted file mode 100644 index 60da9859..00000000 --- a/src/messenger/webim/js/compiled/chatcontroller.js +++ /dev/null @@ -1,16 +0,0 @@ -/* - This file is part of Mibew Messenger project. - http://mibew.org - - Copyright (c) 2005-2011 Mibew Messenger Community - License: http://mibew.org/license.php -*/ -ChatController=Class.create(); -ChatController.prototype={options:{},thread:null,server:null,view:null,cansend:!0,skipNextSound:!0,focused:!0,message:null,ownThread:null,initialize:function(a,b,c,d){this.options=d;this.thread=c;this.server=a;this.view=b;this.message=$("msgwnd");this.ownThread=null!=this.message;this.message&&(this.message.onkeydown=this.handleKeyDown.bind(this),this.message.onfocus=function(){this.focused=!0}.bind(this),this.message.onblur=function(){this.focused=!1}.bind(this));this.server.callFunctionsPeriodically(this.updateFunctionBuilder.bind(this),this.updateChatState.bind(this)); -this.server.registerFunction("updateMessages",this.updateMessages.bind(this));this.server.registerFunction("setupAvatar",this.setupAvatar.bind(this));this.server.runUpdater()},handleException:function(){this.view.setStatus("offline, reconnecting");this.view.enableInput(!0)},handleTimeout:function(){this.view.setStatus("timeout, reconnecting");this.view.enableInput(!0)},refresh:function(){this.server.restartUpdater()},postMessage:function(a){""!=a&&this.cansend&&(this.cansend=!1,this.skipNextSound= -!0,"opera"!=myRealAgent&&this.view.enableInput(!1),this.server.callFunctions([{"function":"post",arguments:{references:{},"return":{},message:a,threadId:this.thread.threadid,token:this.thread.token,user:this.thread.user}}],function(){this.view.enableInput(!0);this.cansend=!0;this.view.clearInput()}.bind(this),!0))},changeName:function(a){this.skipNextSound=!0;this.server.callFunctions([{"function":"rename",arguments:{references:{},"return":{},threadId:this.thread.threadid,token:this.thread.token, -name:a}}],function(a){a.errorCode&&this.handleError(a,"cannot rename")}.bind(this),!0)},closeThread:function(){(!this.view.getLocaleString("closeConfirmation")||confirm(this.view.getLocaleString("closeConfirmation")))&&this.server.callFunctions([{"function":"close",arguments:{references:{},"return":{closed:"closed"},threadId:this.thread.threadid,token:this.thread.token,lastId:this.thread.lastid,user:this.thread.user}}],this.onThreadClosed.bind(this),!0)},onThreadClosed:function(a){a.closed?window.close(): -this.handleError(a,"cannot close")},setupAvatar:function(a){$("avatarwnd")&&this.thread.user&&this.view.updateAvatar(this.options.webimRoot,a.imageLink)},updateMessages:function(a){a.lastId&&(this.thread.lastid=a.lastId);this.view.displayMessages(a.messages);this.view.clearStatus();0");this.options.cssfile&&b.write('');b.write("");b.write("
"); -b.write("");b.close();a.onload=function(){a.myHtml&&(FrameUtils.getDocument(a).getElementById("content").innerHTML+=a.myHtml,FrameUtils.scrollDown(a))}},insertIntoFrame:function(a,b){var c=this.getDocument(a).getElementById("content");null==c?(a.myHtml||(a.myHtml=""),a.myHtml+=b):c.innerHTML+=b},scrollDown:function(a){var b=this.getDocument(a).getElementById("bottom");if("opera"==myAgent)try{a.contentWindow.scrollTo(0,this.getDocument(a).getElementById("content").clientHeight)}catch(c){}b&& -b.scrollIntoView(!1)}};ChatView=Class.create(); -ChatView.prototype={statusTimeout:null,localizedStrings:{},predefinedAnswers:[],messageContainer:null,messageView:null,initialize:function(a,b,c){this.localizedStrings=b||{};this.predefinedAnswers=c||[];this.messageView=a;this.messageContainer="safari"==myRealAgent?self.frames[0]:$("chatwnd");FrameUtils.initFrame(this.messageContainer)},getLocaleString:function(a){return"undefined"==typeof this.localizedStrings[a]?!1:this.localizedStrings[a]},enableInput:function(a){var b=$("msgwnd");b&&(b.disabled= -!a)},clearInput:function(){var a=$("msgwnd");a&&(a.value="",a.focus())},showStatusDiv:function(a){$("engineinfo")&&($("engineinfo").style.display="inline",$("engineinfo").innerHTML=a)},setStatus:function(a){this.statusTimeout&&clearTimeout(this.statusTimeout);this.showStatusDiv(a);this.statusTimeout=setTimeout(this.clearStatus.bind(this),4E3)},clearStatus:function(){$("engineinfo").style.display="none"},showTyping:function(a){$("typingdiv")&&($("typingdiv").style.display=a?"inline":"none")},updateAvatar:function(a, -b){var c="";""!=b&&(c='');$("avatarwnd").innerHTML=c},displayMessages:function(a){for(var b=0;b$1'))});a.registerHelper("nl2br",function(c){return new a.SafeString(c.replace(/\n/g,"
"))});a.registerHelper("L10n",function(a){return e.Localization.get(a)||""})})(Mibew,Handlebars); diff --git a/src/messenger/webim/js/compiled/default/init.js b/src/messenger/webim/js/compiled/default/init.js new file mode 100644 index 00000000..8ea74616 --- /dev/null +++ b/src/messenger/webim/js/compiled/default/init.js @@ -0,0 +1,8 @@ +/* + This file is part of Mibew Messenger project. + http://mibew.org + + Copyright (c) 2005-2011 Mibew Messenger Community + License: http://mibew.org/license.php +*/ +var Mibew={};(function(a,b){b.Marionette.TemplateCache.prototype.compileTemplate=function(a){return Handlebars.compile(a)};a.Models={};a.Collections={};a.Views={};a.Objects={};a.Objects.Models={};a.Objects.Collections={}})(Mibew,Backbone); diff --git a/src/messenger/webim/js/compiled/default/localization.js b/src/messenger/webim/js/compiled/default/localization.js new file mode 100644 index 00000000..117016c7 --- /dev/null +++ b/src/messenger/webim/js/compiled/default/localization.js @@ -0,0 +1,8 @@ +/* + 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(b,d){b.Localization={};var c={};b.Localization.get=function(a){return!c.hasOwnProperty(a)?!1:c[a]};b.Localization.set=function(a){d.extend(c,a)}})(Mibew,_); diff --git a/src/messenger/webim/js/compiled/default/models/base.js b/src/messenger/webim/js/compiled/default/models/base.js new file mode 100644 index 00000000..5c9156ad --- /dev/null +++ b/src/messenger/webim/js/compiled/default/models/base.js @@ -0,0 +1,8 @@ +/* + 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,b){a.Models.Base=b.Model.extend({getModelType:function(){return""}})})(Mibew,Backbone); diff --git a/src/messenger/webim/js/compiled/default/models/page.js b/src/messenger/webim/js/compiled/default/models/page.js new file mode 100644 index 00000000..59b9a3fc --- /dev/null +++ b/src/messenger/webim/js/compiled/default/models/page.js @@ -0,0 +1,8 @@ +/* + 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,b){a.Models.Page=b.Model.extend()})(Mibew,Backbone); diff --git a/src/messenger/webim/js/compiled/default/models/sound.js b/src/messenger/webim/js/compiled/default/models/sound.js new file mode 100644 index 00000000..86783c43 --- /dev/null +++ b/src/messenger/webim/js/compiled/default/models/sound.js @@ -0,0 +1,8 @@ +/* + 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,b){a.Models.Sound=b.Model.extend({play:function(a){this.set({file:a});this.trigger("sound:play",this)}})})(Mibew,Backbone); diff --git a/src/messenger/webim/js/compiled/default/models/user.js b/src/messenger/webim/js/compiled/default/models/user.js new file mode 100644 index 00000000..3f276a80 --- /dev/null +++ b/src/messenger/webim/js/compiled/default/models/user.js @@ -0,0 +1,8 @@ +/* + 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,b){a.Models.User=b.Model.extend({defaults:{isAgent:!1,canPost:!0,typing:!1,name:"",canChangeName:!1,dafaultName:!0}})})(Mibew,Backbone); diff --git a/src/messenger/webim/js/compiled/default/server.js b/src/messenger/webim/js/compiled/default/server.js new file mode 100644 index 00000000..a599a18c --- /dev/null +++ b/src/messenger/webim/js/compiled/default/server.js @@ -0,0 +1,14 @@ +/* + 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(b,f,g,c){b.Server=function(a){this.updateTimer=null;this.options=c.extend({url:"",requestsFrequency:2,reconnectPause:1,onTimeout:function(){},onTransportError:function(){},onCallError:function(){},onUpdateError:function(){},onResponseError:function(){}},a);this.callbacks={};this.callPeriodically=[];this.ajaxRequest=null;this.buffer=[];this.functions={};this.mibewAPI=new f(new MibewAPICoreInteraction)};b.Server.prototype.callFunctions=function(a,e,b){try{if(!(a instanceof Array))throw Error("The first arguments must be an array"); +for(var d in a)a.hasOwnProperty(d)&&this.mibewAPI.checkFunction(a[d],!1);var c=this.generateToken();this.callbacks[c]=e;this.buffer.push({token:c,functions:a});b&&this.update()}catch(f){return this.options.onCallError(f),!1}return!0};b.Server.prototype.callFunctionsPeriodically=function(a,e){this.callPeriodically.push({functionsListBuilder:a,callbackFunction:e})};b.Server.prototype.generateToken=function(){var a;do a="wnd"+(new Date).getTime().toString()+Math.round(50*Math.random()).toString();while(a in +this.callbacks);return a};b.Server.prototype.processRequest=function(a){var e=new MibewAPIExecutionContext,b=this.mibewAPI.getResultFunction(a.functions,this.callbacks.hasOwnProperty(a.token));if(null===b)for(var d in a.functions)a.functions.hasOwnProperty(d)&&(this.processFunction(a.functions[d],e),this.buffer.push(this.mibewAPI.buildResult(e.getResults(),a.token)));else this.callbacks.hasOwnProperty(a.token)&&(this.callbacks[a.token](b.arguments),delete this.callbacks[a.token])};b.Server.prototype.processFunction= +function(a,e){if(this.functions.hasOwnProperty(a["function"])){var b=e.getArgumentsList(a),d={},f;for(f in this.functions[a["function"]])this.functions[a["function"]].hasOwnProperty(f)&&(d=c.extend(d,this.functions[a["function"]][f](b)));e.storeFunctionResults(a,d)}};b.Server.prototype.sendRequests=function(a){this.ajaxRequest=g.ajax({url:this.options.url,timeout:5E3,async:!0,cache:!1,type:"POST",dataType:"text",data:{data:this.mibewAPI.encodePackage(a)},success:c.bind(this.receiveResponse,this), +error:c.bind(this.onError,this)})};b.Server.prototype.runUpdater=function(){null==this.updateTimer&&this.update();this.updateTimer=setTimeout(c.bind(this.update,this),1E3*this.options.requestsFrequency)};b.Server.prototype.restartUpdater=function(){this.updateTimer&&clearTimeout(this.updateTimer);this.ajaxRequest&&this.ajaxRequest.abort();this.update();this.updateTimer=setTimeout(c.bind(this.update,this),1E3*this.options.reconnectPause)};b.Server.prototype.update=function(){this.updateTimer&&clearTimeout(this.updateTimer); +for(var a=0;a$1'))});a.registerHelper("nl2br",function(c){return new a.SafeString(c.replace(/\n/g,"
"))});a.registerHelper("L10n",function(a){return e.Localization.get(a)||""})})(Mibew,Handlebars); +(function(b,d){b.Localization={};var c={};b.Localization.get=function(a){return!c.hasOwnProperty(a)?!1:c[a]};b.Localization.set=function(a){d.extend(c,a)}})(Mibew,_); +(function(b,f,g,c){b.Server=function(a){this.updateTimer=null;this.options=c.extend({url:"",requestsFrequency:2,reconnectPause:1,onTimeout:function(){},onTransportError:function(){},onCallError:function(){},onUpdateError:function(){},onResponseError:function(){}},a);this.callbacks={};this.callPeriodically=[];this.ajaxRequest=null;this.buffer=[];this.functions={};this.mibewAPI=new f(new MibewAPICoreInteraction)};b.Server.prototype.callFunctions=function(a,e,b){try{if(!(a instanceof Array))throw Error("The first arguments must be an array"); +for(var d in a)a.hasOwnProperty(d)&&this.mibewAPI.checkFunction(a[d],!1);var c=this.generateToken();this.callbacks[c]=e;this.buffer.push({token:c,functions:a});b&&this.update()}catch(f){return this.options.onCallError(f),!1}return!0};b.Server.prototype.callFunctionsPeriodically=function(a,e){this.callPeriodically.push({functionsListBuilder:a,callbackFunction:e})};b.Server.prototype.generateToken=function(){var a;do a="wnd"+(new Date).getTime().toString()+Math.round(50*Math.random()).toString();while(a in +this.callbacks);return a};b.Server.prototype.processRequest=function(a){var e=new MibewAPIExecutionContext,b=this.mibewAPI.getResultFunction(a.functions,this.callbacks.hasOwnProperty(a.token));if(null===b)for(var d in a.functions)a.functions.hasOwnProperty(d)&&(this.processFunction(a.functions[d],e),this.buffer.push(this.mibewAPI.buildResult(e.getResults(),a.token)));else this.callbacks.hasOwnProperty(a.token)&&(this.callbacks[a.token](b.arguments),delete this.callbacks[a.token])};b.Server.prototype.processFunction= +function(a,e){if(this.functions.hasOwnProperty(a["function"])){var b=e.getArgumentsList(a),d={},f;for(f in this.functions[a["function"]])this.functions[a["function"]].hasOwnProperty(f)&&(d=c.extend(d,this.functions[a["function"]][f](b)));e.storeFunctionResults(a,d)}};b.Server.prototype.sendRequests=function(a){this.ajaxRequest=g.ajax({url:this.options.url,timeout:5E3,async:!0,cache:!1,type:"POST",dataType:"text",data:{data:this.mibewAPI.encodePackage(a)},success:c.bind(this.receiveResponse,this), +error:c.bind(this.onError,this)})};b.Server.prototype.runUpdater=function(){null==this.updateTimer&&this.update();this.updateTimer=setTimeout(c.bind(this.update,this),1E3*this.options.requestsFrequency)};b.Server.prototype.restartUpdater=function(){this.updateTimer&&clearTimeout(this.updateTimer);this.ajaxRequest&&this.ajaxRequest.abort();this.update();this.updateTimer=setTimeout(c.bind(this.update,this),1E3*this.options.reconnectPause)};b.Server.prototype.update=function(){this.updateTimer&&clearTimeout(this.updateTimer); +for(var a=0;a$1'))});Handlebars.registerHelper("nl2br",function(b){return new Handlebars.SafeString(b.replace(/\n/g,"
"))}); \ No newline at end of file diff --git a/src/messenger/webim/js/compiled/messageview.js b/src/messenger/webim/js/compiled/messageview.js deleted file mode 100644 index 027e1aa1..00000000 --- a/src/messenger/webim/js/compiled/messageview.js +++ /dev/null @@ -1,10 +0,0 @@ -/* - This file is part of Mibew Messenger project. - http://mibew.org - - Copyright (c) 2005-2011 Mibew Messenger Community - License: http://mibew.org/license.php -*/ -var MessageView=function(){var b={"<":"<",">":">","&":"&",'"':""","'":"'","`":"`"},c=/[&<>'"`]/g;this.kindToString=function(a){return a==this.KIND_USER?"user":a==this.KIND_AGENT?"agent":a==this.KIND_FOR_AGENT?"hidden":a==this.KIND_INFO?"inf":a==this.KIND_CONN?"conn":a==this.KIND_EVENTS?"event":""};this.escapeString=function(a){return a.replace(c,function(a){return b[a]||"&"})};this.themeMessage=function(a){if(!Handlebars.templates.message)throw Error("There is no template for message loaded!"); -if(a.kind==this.KIND_AVATAR)throw Error("KIND_AVATAR message kind is deprecated at window!");a.allowFormating=a.kind!=this.KIND_USER&&a.kind!=this.KIND_AGENT;a.kindName=this.kindToString(a.kind);a.message=this.escapeString(a.message);return Handlebars.templates.message(a)}};MessageView.prototype.KIND_USER=1;MessageView.prototype.KIND_AGENT=2;MessageView.prototype.KIND_FOR_AGENT=3;MessageView.prototype.KIND_INFO=4;MessageView.prototype.KIND_CONN=5;MessageView.prototype.KIND_EVENTS=6; -MessageView.prototype.KIND_AVATAR=7;Handlebars.registerHelper("allowTags",function(b){b=b.replace(/<(span|strong)>(.*?)<\/\1>/g,"<$1>$2");b=b.replace(/<span class="(.*?)">(.*?)<\/span>/g,'$2');return new Handlebars.SafeString(b)}); \ No newline at end of file diff --git a/src/messenger/webim/js/libs/backbone-min.js b/src/messenger/webim/js/libs/backbone-min.js new file mode 100644 index 00000000..c1c0d4ff --- /dev/null +++ b/src/messenger/webim/js/libs/backbone-min.js @@ -0,0 +1,38 @@ +// Backbone.js 0.9.2 + +// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc. +// Backbone may be freely distributed under the MIT license. +// For all details and documentation: +// http://backbonejs.org +(function(){var l=this,y=l.Backbone,z=Array.prototype.slice,A=Array.prototype.splice,g;g="undefined"!==typeof exports?exports:l.Backbone={};g.VERSION="0.9.2";var f=l._;!f&&"undefined"!==typeof require&&(f=require("underscore"));var i=l.jQuery||l.Zepto||l.ender;g.setDomLibrary=function(a){i=a};g.noConflict=function(){l.Backbone=y;return this};g.emulateHTTP=!1;g.emulateJSON=!1;var p=/\s+/,k=g.Events={on:function(a,b,c){var d,e,f,g,j;if(!b)return this;a=a.split(p);for(d=this._callbacks||(this._callbacks= +{});e=a.shift();)f=(j=d[e])?j.tail:{},f.next=g={},f.context=c,f.callback=b,d[e]={tail:g,next:j?j.next:f};return this},off:function(a,b,c){var d,e,h,g,j,q;if(e=this._callbacks){if(!a&&!b&&!c)return delete this._callbacks,this;for(a=a?a.split(p):f.keys(e);d=a.shift();)if(h=e[d],delete e[d],h&&(b||c))for(g=h.tail;(h=h.next)!==g;)if(j=h.callback,q=h.context,b&&j!==b||c&&q!==c)this.on(d,j,q);return this}},trigger:function(a){var b,c,d,e,f,g;if(!(d=this._callbacks))return this;f=d.all;a=a.split(p);for(g= +z.call(arguments,1);b=a.shift();){if(c=d[b])for(e=c.tail;(c=c.next)!==e;)c.callback.apply(c.context||this,g);if(c=f){e=c.tail;for(b=[b].concat(g);(c=c.next)!==e;)c.callback.apply(c.context||this,b)}}return this}};k.bind=k.on;k.unbind=k.off;var o=g.Model=function(a,b){var c;a||(a={});b&&b.parse&&(a=this.parse(a));if(c=n(this,"defaults"))a=f.extend({},c,a);b&&b.collection&&(this.collection=b.collection);this.attributes={};this._escapedAttributes={};this.cid=f.uniqueId("c");this.changed={};this._silent= +{};this._pending={};this.set(a,{silent:!0});this.changed={};this._silent={};this._pending={};this._previousAttributes=f.clone(this.attributes);this.initialize.apply(this,arguments)};f.extend(o.prototype,k,{changed:null,_silent:null,_pending:null,idAttribute:"id",initialize:function(){},toJSON:function(){return f.clone(this.attributes)},get:function(a){return this.attributes[a]},escape:function(a){var b;if(b=this._escapedAttributes[a])return b;b=this.get(a);return this._escapedAttributes[a]=f.escape(null== +b?"":""+b)},has:function(a){return null!=this.get(a)},set:function(a,b,c){var d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c||(c={});if(!d)return this;d instanceof o&&(d=d.attributes);if(c.unset)for(e in d)d[e]=void 0;if(!this._validate(d,c))return!1;this.idAttribute in d&&(this.id=d[this.idAttribute]);var b=c.changes={},h=this.attributes,g=this._escapedAttributes,j=this._previousAttributes||{};for(e in d){a=d[e];if(!f.isEqual(h[e],a)||c.unset&&f.has(h,e))delete g[e],(c.silent?this._silent: +b)[e]=!0;c.unset?delete h[e]:h[e]=a;!f.isEqual(j[e],a)||f.has(h,e)!=f.has(j,e)?(this.changed[e]=a,c.silent||(this._pending[e]=!0)):(delete this.changed[e],delete this._pending[e])}c.silent||this.change(c);return this},unset:function(a,b){(b||(b={})).unset=!0;return this.set(a,null,b)},clear:function(a){(a||(a={})).unset=!0;return this.set(f.clone(this.attributes),a)},fetch:function(a){var a=a?f.clone(a):{},b=this,c=a.success;a.success=function(d,e,f){if(!b.set(b.parse(d,f),a))return!1;c&&c(b,d)}; +a.error=g.wrapError(a.error,b,a);return(this.sync||g.sync).call(this,"read",this,a)},save:function(a,b,c){var d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c=c?f.clone(c):{};if(c.wait){if(!this._validate(d,c))return!1;e=f.clone(this.attributes)}a=f.extend({},c,{silent:!0});if(d&&!this.set(d,c.wait?a:c))return!1;var h=this,i=c.success;c.success=function(a,b,e){b=h.parse(a,e);if(c.wait){delete c.wait;b=f.extend(d||{},b)}if(!h.set(b,c))return false;i?i(h,a):h.trigger("sync",h,a,c)};c.error=g.wrapError(c.error, +h,c);b=this.isNew()?"create":"update";b=(this.sync||g.sync).call(this,b,this,c);c.wait&&this.set(e,a);return b},destroy:function(a){var a=a?f.clone(a):{},b=this,c=a.success,d=function(){b.trigger("destroy",b,b.collection,a)};if(this.isNew())return d(),!1;a.success=function(e){a.wait&&d();c?c(b,e):b.trigger("sync",b,e,a)};a.error=g.wrapError(a.error,b,a);var e=(this.sync||g.sync).call(this,"delete",this,a);a.wait||d();return e},url:function(){var a=n(this,"urlRoot")||n(this.collection,"url")||t(); +return this.isNew()?a:a+("/"==a.charAt(a.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(a){return a},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},change:function(a){a||(a={});var b=this._changing;this._changing=!0;for(var c in this._silent)this._pending[c]=!0;var d=f.extend({},a.changes,this._silent);this._silent={};for(c in d)this.trigger("change:"+c,this,this.get(c),a);if(b)return this;for(;!f.isEmpty(this._pending);){this._pending= +{};this.trigger("change",this,a);for(c in this.changed)!this._pending[c]&&!this._silent[c]&&delete this.changed[c];this._previousAttributes=f.clone(this.attributes)}this._changing=!1;return this},hasChanged:function(a){return!arguments.length?!f.isEmpty(this.changed):f.has(this.changed,a)},changedAttributes:function(a){if(!a)return this.hasChanged()?f.clone(this.changed):!1;var b,c=!1,d=this._previousAttributes,e;for(e in a)if(!f.isEqual(d[e],b=a[e]))(c||(c={}))[e]=b;return c},previous:function(a){return!arguments.length|| +!this._previousAttributes?null:this._previousAttributes[a]},previousAttributes:function(){return f.clone(this._previousAttributes)},isValid:function(){return!this.validate(this.attributes)},_validate:function(a,b){if(b.silent||!this.validate)return!0;var a=f.extend({},this.attributes,a),c=this.validate(a,b);if(!c)return!0;b&&b.error?b.error(this,c,b):this.trigger("error",this,c,b);return!1}});var r=g.Collection=function(a,b){b||(b={});b.model&&(this.model=b.model);b.comparator&&(this.comparator=b.comparator); +this._reset();this.initialize.apply(this,arguments);a&&this.reset(a,{silent:!0,parse:b.parse})};f.extend(r.prototype,k,{model:o,initialize:function(){},toJSON:function(a){return this.map(function(b){return b.toJSON(a)})},add:function(a,b){var c,d,e,g,i,j={},k={},l=[];b||(b={});a=f.isArray(a)?a.slice():[a];c=0;for(d=a.length;c=b))this.iframe=i(' - - - - - - - - - -${if:canpost} - - - - - - - ${if:isOpera95} - - ${else:isOpera95} - - ${endif:isOpera95} -
- -
- - - -${endif:canpost} - - - - - - - - - - - - - - - -
- - - - -${if:agent}${if:canpost} - -${endif:canpost}${endif:agent} - -
- -
-
${msg:chat.window.poweredby} mibew.org - -${if:canpost} - - - - -
${msg:chat.window.send_message_short,send_shortcut}
-${endif:canpost} -
- - - - - - - - - - - - - - - - - diff --git a/src/messenger/webim/styles/dialogs/default/templates/chatsimple.tpl b/src/messenger/webim/styles/dialogs/default/templates/chatsimple.tpl deleted file mode 100644 index 9dd3b896..00000000 --- a/src/messenger/webim/styles/dialogs/default/templates/chatsimple.tpl +++ /dev/null @@ -1,223 +0,0 @@ - - - -${msg:chat.window.title.user} - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - - - - - - - - - - -
${if:ct.company.chatLogoURL}${page:ct.company.name}${endif:ct.company.chatLogoURL}
${page:ct.company.name}
-
- - - - - - - - -
- - - - - - - - - - -
${msg:chat.window.product_name} - - - - -
${msg:site.title}
-
${msg:chat.window.close_title}
- -
- - - - - - - - - - - - - - - - - - - - -
${msg:chat.client.name}>>Mail - Refresh
- -
-
-
- - - - - - - - - - - - - - - -
History - - - - - - - - - - - - -
- -
-
Message - - - - - - - - - - - - -
-
- - - -
-
-
- -
- - - - - - -
- - - - - -
-
${msg:chat.window.poweredby} mibew.org - - - - - - - -
-
- ${msg:chat.window.send_message_short,send_shortcut}
-
-
-
- -
- - - - diff --git a/src/messenger/webim/styles/dialogs/default/templates/error.tpl b/src/messenger/webim/styles/dialogs/default/templates/error.tpl deleted file mode 100644 index fd59f3a9..00000000 --- a/src/messenger/webim/styles/dialogs/default/templates/error.tpl +++ /dev/null @@ -1,70 +0,0 @@ - - - -${msg:chat.error_page.title} - - - - - - - - - -
- - - - - -
- ${if:ct.company.chatLogoURL} - ${if:webimHost} - - - - ${else:webimHost} - - ${endif:webimHost} - ${else:ct.company.chatLogoURL} - ${if:webimHost} - - - - ${else:webimHost} - - ${endif:webimHost} - ${endif:ct.company.chatLogoURL} - ${msg:leavemessage.title}
- - - - - - - - ${harderrors} -
- - \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/default/templates/leavemessage.tpl b/src/messenger/webim/styles/dialogs/default/templates/leavemessage.tpl deleted file mode 100644 index 8ea24a1c..00000000 --- a/src/messenger/webim/styles/dialogs/default/templates/leavemessage.tpl +++ /dev/null @@ -1,180 +0,0 @@ - - - -${msg:leavemessage.title} - - - - - - - - - - - - - -
- - -
- - - -${ifnot:groups}${if:formgroupid}${endif:formgroupid}${endif:groups} - - - - - - - - - - -
- - - - - -
- ${if:ct.company.chatLogoURL} - ${if:webimHost} - - - - ${else:webimHost} - - ${endif:webimHost} - ${else:ct.company.chatLogoURL} - ${if:webimHost} - - - - ${else:webimHost} - - ${endif:webimHost} - ${endif:ct.company.chatLogoURL} - ${if:formgroupname}${form:groupname}: ${endif:formgroupname}${msg:leavemessage.title}
- - - - - - -
-${if:errors} - - - - - - -
- ${errors} -
-${endif:errors} - - - - - - - - - - -${if:groups} - - - - - - - - -${endif:groups} - - - - - -${if:showcaptcha} - - - - -${endif:showcaptcha} - - - -
${msg:form.field.email}:
${msg:form.field.name}:
${msg:form.field.department} - -
${msg:form.field.department.description}${page:default.department.description}
${msg:form.field.message}: - -
- - - - -
${msg:mailthread.perform}
-
- - - - - -
- ${msg:chat.window.poweredby} mibew.org -
-
-
-
- -
- - diff --git a/src/messenger/webim/styles/dialogs/default/templates/leavemessagesent.tpl b/src/messenger/webim/styles/dialogs/default/templates/leavemessagesent.tpl deleted file mode 100644 index d41e6149..00000000 --- a/src/messenger/webim/styles/dialogs/default/templates/leavemessagesent.tpl +++ /dev/null @@ -1,68 +0,0 @@ - - - -${msg:leavemessage.sent.title} - - - - - - - - - -
- - - - - -
- ${if:ct.company.chatLogoURL} - ${if:webimHost} - - - - ${else:webimHost} - - ${endif:webimHost} - ${else:ct.company.chatLogoURL} - ${if:webimHost} - - - - ${else:webimHost} - - ${endif:webimHost} - ${endif:ct.company.chatLogoURL} - ${msg:leavemessage.sent.title}
- - - - - - -
- - \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/default/templates/mail.tpl b/src/messenger/webim/styles/dialogs/default/templates/mail.tpl deleted file mode 100644 index a8c22166..00000000 --- a/src/messenger/webim/styles/dialogs/default/templates/mail.tpl +++ /dev/null @@ -1,143 +0,0 @@ - - - -${msg:chat.window.title.user} - - - - - - - - - -
- -
- - - - - - - -
- ${if:ct.company.chatLogoURL} - ${if:webimHost} - - - - ${else:webimHost} - - ${endif:webimHost} - ${else:ct.company.chatLogoURL} - ${if:webimHost} - - - - ${else:webimHost} - - ${endif:webimHost} - ${endif:ct.company.chatLogoURL} - ${msg:mailthread.title}
-${if:errors} - - - - - - -
- ${errors} -
-${endif:errors} - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
- -
- -
-
- - diff --git a/src/messenger/webim/styles/dialogs/default/templates/mailsent.tpl b/src/messenger/webim/styles/dialogs/default/templates/mailsent.tpl deleted file mode 100644 index f7f1b30f..00000000 --- a/src/messenger/webim/styles/dialogs/default/templates/mailsent.tpl +++ /dev/null @@ -1,68 +0,0 @@ - - - -${msg:chat.window.title.user} - - - - - - - - - -
- - - - - -
- ${if:ct.company.chatLogoURL} - ${if:webimHost} - - - - ${else:webimHost} - - ${endif:webimHost} - ${else:ct.company.chatLogoURL} - ${if:webimHost} - - - - ${else:webimHost} - - ${endif:webimHost} - ${endif:ct.company.chatLogoURL} - ${msg:chat.mailthread.sent.title}
- - - - - - -
- - \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/default/templates/nochat.tpl b/src/messenger/webim/styles/dialogs/default/templates/nochat.tpl deleted file mode 100644 index fb90fc66..00000000 --- a/src/messenger/webim/styles/dialogs/default/templates/nochat.tpl +++ /dev/null @@ -1,71 +0,0 @@ - - - -${msg:chat.window.title.user} - - - - - - - - - -
- - - - - -
- ${if:ct.company.chatLogoURL} - ${if:webimHost} - - - - ${else:webimHost} - - ${endif:webimHost} - ${else:ct.company.chatLogoURL} - ${if:webimHost} - - - - ${else:webimHost} - - ${endif:webimHost} - ${endif:ct.company.chatLogoURL} - ${msg:page.chat.old_browser.title}
- - - - - - - - ${msg:page.chat.old_browser.list} - -
- - \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/default/templates/redirect.tpl b/src/messenger/webim/styles/dialogs/default/templates/redirect.tpl deleted file mode 100644 index 0b0e07cc..00000000 --- a/src/messenger/webim/styles/dialogs/default/templates/redirect.tpl +++ /dev/null @@ -1,125 +0,0 @@ - - - -${msg:chat.window.title.agent} - - - - - - - - - -
- - - - - - - - - - - - -
- - - - - -
- ${if:ct.company.chatLogoURL} - ${if:webimHost} - - - - ${else:webimHost} - - ${endif:webimHost} - ${else:ct.company.chatLogoURL} - ${if:webimHost} - - - - ${else:webimHost} - - ${endif:webimHost} - ${endif:ct.company.chatLogoURL} - ${msg:chat.redirect.title}
- - - - - - -
- - - - - -
-${if:redirectToAgent} - ${msg:chat.redirect.operator}
-
    - ${page:redirectToAgent} -
-${endif:redirectToAgent} -
-${if:redirectToGroup} - ${msg:chat.redirect.group}
-
    - ${page:redirectToGroup} -
-${endif:redirectToGroup} -
- -
- ${pagination} -
- - -
- - diff --git a/src/messenger/webim/styles/dialogs/default/templates/redirected.tpl b/src/messenger/webim/styles/dialogs/default/templates/redirected.tpl deleted file mode 100644 index 49bfb6b4..00000000 --- a/src/messenger/webim/styles/dialogs/default/templates/redirected.tpl +++ /dev/null @@ -1,68 +0,0 @@ - - - -${msg:chat.window.title.user} - - - - - - - - - -
- - - - - -
- ${if:ct.company.chatLogoURL} - ${if:webimHost} - - - - ${else:webimHost} - - ${endif:webimHost} - ${else:ct.company.chatLogoURL} - ${if:webimHost} - - - - ${else:webimHost} - - ${endif:webimHost} - ${endif:ct.company.chatLogoURL} - ${msg:chat.redirected.title}
- - - - - - -
- - \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/default/templates/survey.tpl b/src/messenger/webim/styles/dialogs/default/templates/survey.tpl deleted file mode 100644 index bfee7364..00000000 --- a/src/messenger/webim/styles/dialogs/default/templates/survey.tpl +++ /dev/null @@ -1,189 +0,0 @@ - - - -${msg:presurvey.title} - - - - - - - - - - - - -
- - -
- - - - -${ifnot:showemail}${endif:showemail} -${ifnot:groups}${if:formgroupid}${endif:formgroupid}${endif:groups} -${ifnot:showmessage}${endif:showmessage} - - - - - - - - - - -
- - - - - -
- ${if:ct.company.chatLogoURL} - ${if:webimHost} - - - - ${else:webimHost} - - ${endif:webimHost} - ${else:ct.company.chatLogoURL} - ${if:webimHost} - - - - ${else:webimHost} - - ${endif:webimHost} - ${endif:ct.company.chatLogoURL} - ${msg:presurvey.title}
- - - - - - -
-${if:errors} - - - - - - -
- ${errors} -
-${endif:errors} - - -${if:groups} - - - - - - - - -${endif:groups} - - - - - - -${if:showemail} - - - - -${endif:showemail} - -${if:showmessage} - - - - -${endif:showmessage} - - - -
${msg:form.field.department} - -
${msg:form.field.department.description}${page:default.department.description}
${msg:presurvey.name}
${msg:presurvey.mail}
${msg:presurvey.question}: - -
- - - - -
${msg:presurvey.submit}
-
- - - - - -
- ${msg:chat.window.poweredby} mibew.org -
-
-
-
- - -
- - diff --git a/src/messenger/webim/styles/dialogs/original/chat.css b/src/messenger/webim/styles/dialogs/original/chat.css deleted file mode 100644 index c934e164..00000000 --- a/src/messenger/webim/styles/dialogs/original/chat.css +++ /dev/null @@ -1,202 +0,0 @@ -a { - text-decoration: underline; -} - -a:hover { - text-decoration: none; -} - -a img { - font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; - font-size: 11px; -} - -form { - margin-bottom: 0px; - margin-top: 0px; -} - -div#typingdiv, div#engineinfo { - border: 0px solid gray; - font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; - font-size: 11px; - padding-right: 10px; - padding-left: 10px; - background: #fafafa; - color: #B11E23; -} - -.bgcn { - background-position: center; - background-repeat: no-repeat; -} - -.bgrn { - background-position: right; - background-repeat: no-repeat; -} - -.bgcy { - background-position: center; - background-repeat: repeat-y; -} - -.bgry { - background-position: right; - background-repeat: repeat-y; -} - -.bgly { - background-position: left; - background-repeat: repeat-y; -} - -.bgbx { - background-position: bottom; - background-repeat: repeat-x; -} - -.window { - font-family: Arial, Helvetica, sans-serif; - font-size: 12px; - color: #000000; -} - -.window a { - color: #880000; -} - -.window h1 { - margin-top: 0px; - margin-bottom: 0px; - font-size: 18px; - color: #000000; - font-weight: normal; -} - -.window h2 { - margin-top: 0px; - margin-bottom: 0px; - font-size: 12px; - color: #000000; -} - -.text { - font-family: Arial, Helvetica, sans-serif; - font-size: 12px; - color: #000000; -} - -.text span.grey { - color: #787878; -} - -.www a { - font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; - font-size: 10px; - color: #FFFFFF; - text-decoration: none; -} - -.message { - font-family: Arial, Helvetica, sans-serif; - font-size: 12px; - color: #4F4F4F; - padding-left: 3px; - padding-top: 3px; - padding-bottom: 3px; - padding-right: 3px; - line-height: 17px; -} - -.message span.time { - color: #000000; -} - -.message span.nuser { - color: #B11E23; - font-weight: bold; -} - -.message span.nagent { - font-weight: bold; -} - -.message span.minf { - color: #1E48B1; - font-size: 11px; -} - -.message span.mevent { - color: #A1A1A1; - font-size: 11px; -} - -.message span.mhidden { - color: #A1A1A1; - font-size: 11px; -} - -.message span.mconn { - color: #A1A1A1; - font-size: 11px; -} - -textarea.message { - width: 100%; - height: 100%; - border: 0px solid Blue; - overflow: auto; - margin-left: 3px; - margin-top: 3px; - margin-bottom: 3px; - margin-right: 5px; -} - -.field { - font-family: Arial, Helvetica, sans-serif; - font-size: 12px; - color: #383838; - padding-left: 3px; -} - -input.field { - border: 1px solid #878787; -} - -textarea.field { - border: 0px; - margin: 0px; - padding: 0px 3px; - overflow: auto; -} - -.answer { - font-family: Arial, Helvetica, sans-serif; - font-size: 11px; - color: #575757; - width: 170px; -} - -.submit a { - font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; - font-size: 11px; - color: #000000; - text-decoration: none; -} - -.button a { - font-family: Arial, Helvetica, sans-serif; - font-size: 11px; - color: #666666; -} - -.copyr { - font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; - font-size: 10px; - color: #929292; -} - -.copyr a { - color: #929292; -} \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/original/images/banner.png b/src/messenger/webim/styles/dialogs/original/images/banner.png deleted file mode 100644 index af68c505..00000000 Binary files a/src/messenger/webim/styles/dialogs/original/images/banner.png and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/original/images/bg.gif b/src/messenger/webim/styles/dialogs/original/images/bg.gif deleted file mode 100644 index 999524df..00000000 Binary files a/src/messenger/webim/styles/dialogs/original/images/bg.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/original/images/buttondiv.gif b/src/messenger/webim/styles/dialogs/original/images/buttondiv.gif deleted file mode 100644 index 733b66f3..00000000 Binary files a/src/messenger/webim/styles/dialogs/original/images/buttondiv.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/original/images/buttons/close.gif b/src/messenger/webim/styles/dialogs/original/images/buttons/close.gif deleted file mode 100644 index af27951e..00000000 Binary files a/src/messenger/webim/styles/dialogs/original/images/buttons/close.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/original/images/buttons/closewin.gif b/src/messenger/webim/styles/dialogs/original/images/buttons/closewin.gif deleted file mode 100644 index 4cf148e0..00000000 Binary files a/src/messenger/webim/styles/dialogs/original/images/buttons/closewin.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/original/images/buttons/email.gif b/src/messenger/webim/styles/dialogs/original/images/buttons/email.gif deleted file mode 100644 index 77fa334f..00000000 Binary files a/src/messenger/webim/styles/dialogs/original/images/buttons/email.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/original/images/buttons/exec.gif b/src/messenger/webim/styles/dialogs/original/images/buttons/exec.gif deleted file mode 100644 index 654704cf..00000000 Binary files a/src/messenger/webim/styles/dialogs/original/images/buttons/exec.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/original/images/buttons/refresh.gif b/src/messenger/webim/styles/dialogs/original/images/buttons/refresh.gif deleted file mode 100644 index aa2c536a..00000000 Binary files a/src/messenger/webim/styles/dialogs/original/images/buttons/refresh.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/original/images/buttons/tracked.gif b/src/messenger/webim/styles/dialogs/original/images/buttons/tracked.gif deleted file mode 100644 index b7250b1c..00000000 Binary files a/src/messenger/webim/styles/dialogs/original/images/buttons/tracked.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/original/images/winbg.gif b/src/messenger/webim/styles/dialogs/original/images/winbg.gif deleted file mode 100644 index bed9c31a..00000000 Binary files a/src/messenger/webim/styles/dialogs/original/images/winbg.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/original/images/wmchat.png b/src/messenger/webim/styles/dialogs/original/images/wmchat.png deleted file mode 100644 index 71f0d76d..00000000 Binary files a/src/messenger/webim/styles/dialogs/original/images/wmchat.png and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/original/images/wmfrm.png b/src/messenger/webim/styles/dialogs/original/images/wmfrm.png deleted file mode 100644 index 15a33620..00000000 Binary files a/src/messenger/webim/styles/dialogs/original/images/wmfrm.png and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/original/js/compiled/message.tpl.js b/src/messenger/webim/styles/dialogs/original/js/compiled/message.tpl.js deleted file mode 100644 index 9c9a4b7e..00000000 --- a/src/messenger/webim/styles/dialogs/original/js/compiled/message.tpl.js +++ /dev/null @@ -1,55 +0,0 @@ -(function() { - var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; -templates['message'] = template(function (Handlebars,depth0,helpers,partials,data) { - helpers = helpers || Handlebars.helpers; - var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression, helperMissing=helpers.helperMissing, self=this; - -function program1(depth0,data) { - - var buffer = "", stack1, foundHelper; - buffer += ""; - foundHelper = helpers.name; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + ": "; - return buffer;} - -function program3(depth0,data) { - - var stack1, foundHelper; - stack1 = depth0.message; - foundHelper = helpers.apply; - stack1 = foundHelper ? foundHelper.call(depth0, stack1, "urlReplace, nl2br, allowTags", {hash:{}}) : helperMissing.call(depth0, "apply", stack1, "urlReplace, nl2br, allowTags", {hash:{}}); - return escapeExpression(stack1);} - -function program5(depth0,data) { - - var stack1, foundHelper; - stack1 = depth0.message; - foundHelper = helpers.apply; - stack1 = foundHelper ? foundHelper.call(depth0, stack1, "urlReplace, nl2br", {hash:{}}) : helperMissing.call(depth0, "apply", stack1, "urlReplace, nl2br", {hash:{}}); - return escapeExpression(stack1);} - - buffer += ""; - stack1 = depth0.created; - foundHelper = helpers.formatTime; - stack1 = foundHelper ? foundHelper.call(depth0, stack1, {hash:{}}) : helperMissing.call(depth0, "formatTime", stack1, {hash:{}}); - buffer += escapeExpression(stack1) + " \r\n"; - stack1 = depth0.name; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\r\n"; - stack1 = depth0.allowFormating; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(5, program5, data),fn:self.program(3, program3, data)}); - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "
"; - return buffer;}); -})(); \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/original/js/source/.htaccess b/src/messenger/webim/styles/dialogs/original/js/source/.htaccess deleted file mode 100644 index 14249c50..00000000 --- a/src/messenger/webim/styles/dialogs/original/js/source/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/original/js/source/message.handlebars b/src/messenger/webim/styles/dialogs/original/js/source/message.handlebars deleted file mode 100644 index 1cb729d2..00000000 --- a/src/messenger/webim/styles/dialogs/original/js/source/message.handlebars +++ /dev/null @@ -1,3 +0,0 @@ -{{formatTime created}} -{{#if name}}{{name}}: {{/if}} -{{#if allowFormating}}{{apply message "urlReplace, nl2br, allowTags"}}{{else}}{{apply message "urlReplace, nl2br"}}{{/if}}
\ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/original/templates/.htaccess b/src/messenger/webim/styles/dialogs/original/templates/.htaccess deleted file mode 100644 index 14249c50..00000000 --- a/src/messenger/webim/styles/dialogs/original/templates/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/original/templates/agentchat.tpl b/src/messenger/webim/styles/dialogs/original/templates/agentchat.tpl deleted file mode 100644 index 9b720b3f..00000000 --- a/src/messenger/webim/styles/dialogs/original/templates/agentchat.tpl +++ /dev/null @@ -1 +0,0 @@ -${include:chat.tpl} \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/original/templates/agentrochat.tpl b/src/messenger/webim/styles/dialogs/original/templates/agentrochat.tpl deleted file mode 100644 index 9b720b3f..00000000 --- a/src/messenger/webim/styles/dialogs/original/templates/agentrochat.tpl +++ /dev/null @@ -1 +0,0 @@ -${include:chat.tpl} \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/original/templates/chat.tpl b/src/messenger/webim/styles/dialogs/original/templates/chat.tpl deleted file mode 100644 index 1151aa0e..00000000 --- a/src/messenger/webim/styles/dialogs/original/templates/chat.tpl +++ /dev/null @@ -1,358 +0,0 @@ - - - -${msg:chat.window.title.agent} - - -${page:additional_css} - - - - - - -${page:additional_js} - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - - - - - - - - ${ifnot:ct.company.chatLogoURL} - - - - ${endif:ct.company.chatLogoURL} -
- ${if:ct.company.chatLogoURL} - ${if:webimHost} - - - - ${else:webimHost} - - ${endif:webimHost} - ${endif:ct.company.chatLogoURL} -
- ${if:webimHost} - ${page:ct.company.name} - ${else:webimHost} - ${page:ct.company.name} - ${endif:webimHost} -
-
- - - - - - - - - - - - - -
- - - - - - - - - - -
${msg:chat.window.product_name} - - - - -
${msg:site.title}
-
${msg:chat.window.close_title}
- -
- - - -${if:agent} - -${endif:agent} -${if:user} - ${if:canChangeName} - - ${else:canChangeName} - - ${endif:canChangeName} -${endif:user} -${if:agent} - - -${endif:agent} - - -${if:user} - -${endif:user} -${if:agent} -${if:canpost} - -${endif:canpost} -${if:historyParams} - -${endif:historyParams} -${if:trackedParams} - -${endif:trackedParams} -${endif:agent} - - - -${if:sslLink} - -${endif:sslLink} - - -
- ${if:historyParams} - ${msg:chat.window.chatting_with} - ${page:ct.user.name} - ${else:historyParams} - ${msg:chat.window.chatting_with} ${page:ct.user.name} - ${endif:historyParams} - -
- - - - - - -
${msg:chat.client.name}>>
-
-
- - - - -
${page:ct.user.name}
-
-
- ${msg:chat.client.name} ${page:ct.user.name} - - ${msg:chat.window.close_title}Mail  - Redirect History Tracked path  - Sound  - Refresh  - SSL 
- -
- - -
-
-
- - - - - - -${if:canpost} - - - - - - - ${if:isOpera95} - - - -${endif:canpost} -
- - - - - - - - - - - - -
- -
-
- ${else:isOpera95} - - ${endif:isOpera95} -
- -
-
- -
- - - - - - -
- - - - -${if:agent}${if:canpost} - -${endif:canpost}${endif:agent} - -
- -
-
${msg:chat.window.poweredby} mibew.org - -${if:canpost} - - - - - - - - -
-
- ${msg:chat.window.send_message_short,send_shortcut}
-
-${endif:canpost} -
-
- -
- - - - diff --git a/src/messenger/webim/styles/dialogs/original/templates/chatsimple.tpl b/src/messenger/webim/styles/dialogs/original/templates/chatsimple.tpl deleted file mode 100644 index ef86df4c..00000000 --- a/src/messenger/webim/styles/dialogs/original/templates/chatsimple.tpl +++ /dev/null @@ -1,223 +0,0 @@ - - - -${msg:chat.window.title.user} - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - - - - - - - - - - -
${if:ct.company.chatLogoURL}${page:ct.company.name}${endif:ct.company.chatLogoURL}
${page:ct.company.name}
-
- - - - - - - - -
- - - - - - - - - - -
${msg:chat.window.product_name} - - - - -
${msg:site.title}
-
${msg:chat.window.close_title}
- -
- - - - - - - - - - - - - - - - - - - - -
${msg:chat.client.name}>>Mail - Refresh
- -
-
-
- - - - - - - - - - - - - - - -
History - - - - - - - - - - - - -
- -
-
Message - - - - - - - - - - - - -
-
- - - -
-
-
- -
- - - - - - -
- - - - - -
-
${msg:chat.window.poweredby} mibew.org - - - - - - - -
-
- ${msg:chat.window.send_message_short,send_shortcut}
-
-
-
- -
- - - - diff --git a/src/messenger/webim/styles/dialogs/original/templates/error.tpl b/src/messenger/webim/styles/dialogs/original/templates/error.tpl deleted file mode 100644 index b6500a29..00000000 --- a/src/messenger/webim/styles/dialogs/original/templates/error.tpl +++ /dev/null @@ -1,94 +0,0 @@ - - - -${msg:chat.error_page.title} - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
-

${msg:chat.error_page.head}

-
- - - - - - - - - - - -
- - ${harderrors} - - -
- -
- - - - - -
- - - - - - -
${msg:chat.error_page.close}
-
- -
- -
- - - diff --git a/src/messenger/webim/styles/dialogs/original/templates/leavemessage.tpl b/src/messenger/webim/styles/dialogs/original/templates/leavemessage.tpl deleted file mode 100644 index 044edac7..00000000 --- a/src/messenger/webim/styles/dialogs/original/templates/leavemessage.tpl +++ /dev/null @@ -1,176 +0,0 @@ - - - -${msg:leavemessage.title} - - - - - - - - - - - - -
- -
- - - -${ifnot:groups}${if:formgroupid}${endif:formgroupid}${endif:groups} - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

${if:formgroupname}${form:groupname}: ${endif:formgroupname}${msg:leavemessage.title}

-
-${if:errors} - - - - - - -
- ${errors} -
-${endif:errors} -
- -
- - - - - - - - - - - - - - - - -${if:groups} - - - - - - - - - - - - -${endif:groups} - - - - - - - -${if:showcaptcha} - - - - - - -${endif:showcaptcha} -
${msg:leavemessage.descr}
${msg:form.field.email}:
${msg:form.field.name}:
${msg:form.field.department} - -
${msg:form.field.department.description}${page:default.department.description}
${msg:form.field.message}:
- -
- -
- - - - - - - - - -
- - - - - - -
-
- ${msg:leavemessage.perform}
-
-
${msg:chat.window.poweredby} mibew.org - - - - - - -
${msg:leavemessage.close}
-
- -
- -
- -
- - diff --git a/src/messenger/webim/styles/dialogs/original/templates/leavemessagesent.tpl b/src/messenger/webim/styles/dialogs/original/templates/leavemessagesent.tpl deleted file mode 100644 index 6d1e4ca2..00000000 --- a/src/messenger/webim/styles/dialogs/original/templates/leavemessagesent.tpl +++ /dev/null @@ -1,99 +0,0 @@ - - - -${msg:leavemessage.sent.title} - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
-

${msg:leavemessage.sent.title}

-
- - - - - - - - - - - - - - - - - - - -
- - ${msg:leavemessage.sent.message}
-
- -
- - - - - -
- - - - - - -
${msg:chat.mailthread.sent.close}
-
- -
- -
- - \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/original/templates/mail.tpl b/src/messenger/webim/styles/dialogs/original/templates/mail.tpl deleted file mode 100644 index 22aa34b3..00000000 --- a/src/messenger/webim/styles/dialogs/original/templates/mail.tpl +++ /dev/null @@ -1,122 +0,0 @@ - - - -${msg:chat.window.title.user} - - - - - - - - - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

${msg:mailthread.title}

-
-${if:errors} - - - - - - -
- ${errors} -
-${endif:errors} -
- -
- - - - - -
${msg:mailthread.enter_email}
- -
- - - - - - -
- - - - - - -
-
- ${msg:mailthread.perform}
-
-
- - - - - - -
${msg:mailthread.close}
-
- -
- -
- - - -
- - - diff --git a/src/messenger/webim/styles/dialogs/original/templates/mailsent.tpl b/src/messenger/webim/styles/dialogs/original/templates/mailsent.tpl deleted file mode 100644 index 15601663..00000000 --- a/src/messenger/webim/styles/dialogs/original/templates/mailsent.tpl +++ /dev/null @@ -1,102 +0,0 @@ - - - -${msg:chat.window.title.user} - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
-

${msg:chat.mailthread.sent.title}

-
- - - - - - - - - - - - - - - - - - - -
- - ${msg:chat.mailthread.sent.content,email}
- ${msg:chat.mailthread.sent.closewindow} - -
- -
- - - - - -
- - - - - - -
${msg:chat.mailthread.sent.close}
-
- -
- -
- - - diff --git a/src/messenger/webim/styles/dialogs/original/templates/nochat.tpl b/src/messenger/webim/styles/dialogs/original/templates/nochat.tpl deleted file mode 100644 index aff91f94..00000000 --- a/src/messenger/webim/styles/dialogs/original/templates/nochat.tpl +++ /dev/null @@ -1,94 +0,0 @@ - - - -${msg:page.chat.old_browser.title} - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - -
- - ${msg:page.chat.old_browser.problem} - ${msg:page.chat.old_browser.list} - -
- -
- - - - - -
- - - - - - -
${msg:page.chat.old_browser.close}
-
- -
- - -
- - - diff --git a/src/messenger/webim/styles/dialogs/original/templates/redirect.tpl b/src/messenger/webim/styles/dialogs/original/templates/redirect.tpl deleted file mode 100644 index 9a59f949..00000000 --- a/src/messenger/webim/styles/dialogs/original/templates/redirect.tpl +++ /dev/null @@ -1,139 +0,0 @@ - - - -${msg:chat.window.title.agent} - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -

${msg:chat.redirect.title}

-

${msg:chat.redirect.choose}

-
-
-
- - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - - -
-${if:redirectToAgent} - ${msg:chat.redirect.operator}
-
    - ${page:redirectToAgent} -
-${endif:redirectToAgent} -
-${if:redirectToGroup} - ${msg:chat.redirect.group}
-
    - ${page:redirectToGroup} -
-${endif:redirectToGroup} -
- -
- -
- -
- - - - - - -
- ${pagination} - - - - - - - -
${msg:chat.redirect.back}
-
- -
- -
- - - diff --git a/src/messenger/webim/styles/dialogs/original/templates/redirected.tpl b/src/messenger/webim/styles/dialogs/original/templates/redirected.tpl deleted file mode 100644 index 0d1c1e20..00000000 --- a/src/messenger/webim/styles/dialogs/original/templates/redirected.tpl +++ /dev/null @@ -1,102 +0,0 @@ - - - -${msg:chat.window.title.agent} - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
-

${msg:chat.redirected.title}

-
- - - - - - - - - - - - - - - - - - - -
- - ${page:message}
- ${msg:chat.redirected.closewindow} - -
- -
- - - - - -
- - - - - - -
${msg:chat.redirected.close}
-
- -
- -
- - - diff --git a/src/messenger/webim/styles/dialogs/original/templates/survey.tpl b/src/messenger/webim/styles/dialogs/original/templates/survey.tpl deleted file mode 100644 index 940f349a..00000000 --- a/src/messenger/webim/styles/dialogs/original/templates/survey.tpl +++ /dev/null @@ -1,185 +0,0 @@ - - - -${msg:presurvey.title} - - - - - - - - - - - - -
- -
- - - - -${ifnot:showemail}${endif:showemail} -${ifnot:groups}${if:formgroupid}${endif:formgroupid}${endif:groups} -${ifnot:showmessage}${endif:showmessage} - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

${msg:presurvey.title}

-
-${if:errors} - - - - - - -
- ${errors} -
-${endif:errors} -
- -
- - - - - - -${if:groups} - - - - - - - - - - - - -${endif:groups} - - - - - - - - -${if:showemail} - - - - - - -${endif:showemail} - -${if:showmessage} - - - - - - -${endif:showmessage} - -
${msg:presurvey.intro}
${msg:form.field.department} - -
${msg:form.field.department.description}${page:default.department.description}
${msg:presurvey.name}
${msg:presurvey.mail}
${msg:presurvey.question}
- -
- -
- - - - - - - - - -
- - - - - - -
-
- ${msg:presurvey.submit}
-
-
${msg:chat.window.poweredby} mibew.org - - - - - - -
${msg:leavemessage.close}
-
- -
- -
- -
- - diff --git a/src/messenger/webim/styles/dialogs/silver/chat.css b/src/messenger/webim/styles/dialogs/silver/chat.css index 50dd32fb..649759cf 100644 --- a/src/messenger/webim/styles/dialogs/silver/chat.css +++ b/src/messenger/webim/styles/dialogs/silver/chat.css @@ -1,469 +1,457 @@ html, body { - height: 100%; + height: 100%; } body { - margin: 0; - padding: 0; - font: normal 11px Tahoma; - line-height: 1; - background: transparent !important; -} -.body { - min-width: 500px; + margin: 0; + padding: 0; + font: normal 11px Tahoma; + line-height: 1; + min-width: 500px; + background-color: #F1F2F2; } a { - text-decoration: underline; - color: #008AD9; + text-decoration: underline; + color: #008AD9; } a:hover { - text-decoration: none; + text-decoration: none; } img { - vertical-align: bottom; - border: 0 none; + vertical-align: bottom; + border: 0 none; } .clear { - clear: both; - height: 0; - font-size: 0; - line-height: 0; + clear: both; + height: 0; + font-size: 0; + line-height: 0; + display: block; + visibility: hidden; } /* layout chat */ #top { - position: relative; - padding: 5px 14px; - background: #FFF url("images/topbg.gif") scroll repeat-x 0 100%; - _zoom:1; /* IE6 fix */ + position: relative; + padding: 5px 14px; + background: #FFF url("images/topbg.gif") scroll repeat-x 0 100%; + _zoom:1; /* IE6 fix */ } -#chatheader { - position: relative; - padding: 0 10px; - background: #F1F2F2 url("images/chatheaderbg.gif") scroll repeat-x 0 0; - _zoom:1; /* IE6 fix */ +#chat-header { + position: relative; + padding: 0 10px; + background: #F1F2F2 url("images/chatheaderbg.gif") scroll repeat-x 0 0; + _zoom:1; /* IE6 fix */ } #chat { - padding: 0 10px; - background: #F1F2F2; + padding: 0 10px; + background: #F1F2F2; } #message { - padding: 0 10px; - background: #F1F2F2; + padding: 0 10px; + background: #F1F2F2; } #send { - padding: 0 10px 5px; - background: #FFF url("images/bottombg.gif") scroll repeat-x 0 0; + padding: 0 10px 5px; + background: #FFF url("images/bottombg.gif") scroll repeat-x 0 0; } #footer { - width: 400px; - margin: 0 auto; - padding-top: 5px; - text-align: center; - color: #999; + width: 400px; + margin: 0 auto; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + color: #999; } #footer a { - color: #999; + color: #999; } /* ----------- */ /* #chatheader */ -#chatheader .bgc { - background: #FFF url("images/chatheaderbgc.gif") scroll repeat-x 0 0; +#chat-header .bgc { + background: #FFF url("images/chatheaderbgc.gif") scroll repeat-x 0 0; } -#chatheader .bgl { - background: transparent url("images/chatheaderbgl.gif") scroll no-repeat 0 0; - _zoom:1; /* IE6 fix */ +#chat-header .bgl { + background: transparent url("images/chatheaderbgl.gif") scroll no-repeat 0 0; + _zoom:1; /* IE6 fix */ } -#chatheader .bgr { - height: 42px; - background: transparent url("images/chatheaderbgr.gif") scroll no-repeat 100% 0; +#chat-header .bgr { + height: 42px; + background: transparent url("images/chatheaderbgr.gif") scroll no-repeat 100% 0; } #logo { - font: normal 17px Arial; - color: #495151; + font: normal 17px Arial; + color: #495151; } #logo a { - float: left; - text-decoration: none; + float: left; + text-decoration: none; } #page-title { - position: absolute; - right: 14px; - bottom: 5px; - text-align: right; + position: absolute; + right: 14px; + bottom: 5px; + text-align: right; } /* ----------- */ -/* buttons & username */ -.buttons { - position: absolute; - top: 15px; - right: 25px; +/* controls */ +#controls-region { + padding-right: 25px; } -.tplimage { - width: 16px; - height: 16px; - margin: 0 0 0 11px; - background: transparent url("images/buttons.gif") scroll no-repeat 0 0; +.control { + display: inline-block; + margin: 15px 0 0 11px; + cursor: pointer; + float: right; } -.empty { - width: 2px; - height: 16px; - margin: 0 0 0 11px; +.control-config { + display: none; } -.fontreduce { - background-position: -160px -16px; +.tpl-image { + width: 16px; + height: 16px; + background: transparent url("images/buttons.gif") scroll no-repeat 0 0; } -a:hover .fontreduce { - background-position: -160px 0; +.close-control .tpl-image { + background-position: -128px -16px; } -.fontenlarge { - background-position: -176px -16px; +.active-close-control .tpl-image { + background-position: -128px 0; } -a:hover .fontenlarge { - background-position: -176px 0; +.refresh-control .tpl-image { + background-position: -80px -16px; } -.iemail { - background-position: -32px -16px; +.active-refresh-control .tpl-image { + background-position: -80px 0; } -a:hover .iemail { - background-position: -32px 0; +.secure-mode-control .tpl-image { + background-position: -144px -16px; } -.isend { - background-position: -96px -16px; +.active-secure-mode-control .tpl-image { + background-position: -144px 0; } -a:hover .isend { - background-position: -96px 0; +.history-control .tpl-image { + background-position: -112px -16px; } -.ihistory { - background-position: -112px -16px; +.active-history-control .tpl-image { + background-position: -112px 0; } -a:hover .ihistory { - background-position: -112px 0; +.sound-control .sound-control-on { + background-position: -48px -16px; } -.isound { - background-position: -48px -16px; +.active-sound-control .sound-control-on { + background-position: -48px 0; } -a:hover .isound { - background-position: -48px 0; +.sound-control .sound-control-off { + background-position: -64px -16px; } -.inosound { - background-position: -64px -16px; +.active-sound-control .sound-control-off { + background-position: -64px 0; } -a:hover .inosound { - background-position: -64px 0; +.send-mail-control .tpl-image { + background-position: -32px -16px; } -.irefresh { - background-position: -80px -16px; +.active-send-mail-control .tpl-image { + background-position: -32px 0; } -a:hover .irefresh { - background-position: -80px 0; +.redirect-control .tpl-image { + background-position: -96px -16px; } -.issl { - background-position: -144px -16px; +.active-redirect-control .tpl-image { + background-position: -96px 0; } -a:hover .issl { - background-position: -144px 0; +.user-name-control { + font-size: 14px; + cursor: auto; + float: left; + line-height: 22px; + margin-top: 12px; } -.iclosewin { - background-position: -128px -16px; +.user-name-control-set { + display: inline-block; + vertical-align: middle; + background-position: 0 -16px; } -a:hover .iclosewin { - background-position: -128px 0; +.user-name-control-set:hover { + background-position: 0 0; } -.iexec { - background-position: 0 -16px; +.user-name-control-change { + display: inline-block; + vertical-align: middle; + background-position: -16px -16px; } -a:hover .iexec { - background-position: 0 0; +.user-name-control-change:hover { + background-position: -16px 0; } -.ichangeuser { - background-position: -16px -16px; +.user-name-control-input-bg { + width: 95px; + height: 16px; + padding: 3px; + background: #FFF url("images/input_name.gif") scroll no-repeat 0 0; + display: inline-block; + _background-color: transparent; } -a:hover .ichangeuser { - background-position: -16px 0; +#user-name-control-input { + width: 95px; + height: 16px; + margin: 0; + padding: 0; + border: 0 none; + font: normal 12px Tahoma; } -#changename1 { - position: absolute; - top: 12px; - left: 25px; - height: 24px; - padding: 0 0 0 35px; - font-size: 14px; -} -.input-name { - width: 95px; - height: 16px; - padding: 3px; - background: #FFF url("images/input_name.gif") scroll no-repeat 0 0; - _background-color: transparent; -} -#uname { - width: 95px; - height: 16px; - margin: 0; - padding: 0; - border: 0 none; - font: normal 12px Tahoma; -} -.changename { - position: absolute; - top: 3px; - right: -27px; -} -#changename2 { - position: absolute; - top: 12px; - left: 25px; - height: 24px; - padding-top: 2px; - font-size: 14px; -} -#unamelink { - margin-left: 35px; - font: normal 12px Tahoma; -} -.you { - position: absolute; - bottom: 6px; - left: 0; -} -.you2 { - position: absolute; - bottom: 8px; - left: 0; +.user-name-control-prefix { + padding-right: 10px; } + /* ------------------ */ /* #chat */ #chat .bgl { - background: #FFF url("images/chatbgl.gif") scroll repeat-y 0 0; + background: #FFF url("images/chatbgl.gif") scroll repeat-y 0 0; } #chat .bgr { - background: transparent url("images/chatbgr.gif") scroll repeat-y 100% 0; + background: transparent url("images/chatbgr.gif") scroll repeat-y 100% 0; } #chat .sdwbgc { - background: transparent url("images/sdwbgc.png") scroll repeat-x 0 100%; + background: transparent url("images/sdwbgc.png") scroll repeat-x 0 100%; } #chat .sdwbgl { - background: transparent url("images/sdwbgl.png") scroll no-repeat 0 100%; + background: transparent url("images/sdwbgl.png") scroll no-repeat 0 100%; } #chat .sdwbgr { - position: relative; - padding: 0 4px 38px; - background: transparent url("images/sdwbgr.png") scroll no-repeat 100% 100%; - _zoom:1; /* IE6 fix */ + position: relative; + padding: 0 4px 40px; + background: transparent url("images/sdwbgr.png") scroll no-repeat 100% 100%; + _zoom:1; /* IE6 fix */ } -#inf { - position: absolute; - bottom: 20px; - left: 14px; - font-size: 12px; - color: #333; +#status-region { + position: absolute; + bottom: 20px; + left: 14px; + font-size: 12px; + color: #333; } -#avatar-wrapper { - position: absolute; - top: 0; - right: 4px; - width: 120px; - background: #EEE url("images/avatarbg.gif") scroll repeat-y 100% 0; +.status { + float: left; + padding-right: 10px; } -#avatarwnd { - width: 100px; - height: 100px; - margin: 10px auto 0 auto; - text-align: center; - background: transparent url("images/avatar.jpg") scroll no-repeat 50% 10px; - line-height: 0; - font-size: 0; +#avatar-region { + float: right; + height: 200px; + background: #EEE url("images/avatarbg.gif") scroll repeat-y 100% 0; } -#content { - padding: 10px; - font: normal 10px Tahoma; - line-height: 1.8em; - color: #999; +.avatar { + width: 100px; + height: 100px; + margin: 10px 10px 0 10px; + text-align: center; + line-height: 0; + font-size: 0; + overflow: hidden; } -#content .minf { - font-size: 1.1em; - color: #7BAA0F; +.default-avatar { + background: transparent url("images/avatar.jpg") scroll no-repeat 50% 10px; + width: 100px; + height: 100px; } -#content .mhidden, -#content .mevent { - font-size: 1.1em; +.avatar img { + max-width: 100px; + border: none; } -#content .nagent { - font-size: 1.1em; - font-weight: bold; - color: #000; +#messages-region { + height: 200px; + min-height: 150px; + overflow-y: auto; + padding: 10px 10px 0; + font: normal 10px Tahoma; + line-height: 1.8em; + color: #999; } -#content .nuser { - font-size: 1.1em; - font-weight: bold; - color: #DA251D; +#messages-region .minf { + font-size: 1.1em; + color: #7BAA0F; } -#content .magent, -#content .muser { - font-size: 1.1em; - color: #000; +#messages-region .mhidden, +#messages-region .mevent { + font-size: 1.1em; +} +#messages-region .nagent { + font-size: 1.1em; + font-weight: bold; + color: #000; +} +#messages-region .nuser { + font-size: 1.1em; + font-weight: bold; + color: #DA251D; +} +#messages-region .magent, +#messages-region .muser { + font-size: 1.1em; + color: #000; } /* ----- */ /* #message */ #message .bgc { - background: #FFF url("images/message.png") scroll repeat-x 0 -95px; + background: #FFF url("images/message.png") scroll repeat-x 0 -95px; } #message .bgl { - background: transparent url("images/message.png") scroll no-repeat 0 0; + background: transparent url("images/message.png") scroll no-repeat 0 0; } #message .bgr { - height: 58px; - padding: 14px 14px 23px; - background: transparent url("images/message.png") scroll no-repeat 100% -190px; + height: 58px; + padding: 14px 14px 23px; + background: transparent url("images/message.png") scroll no-repeat 100% -190px; } -#msgwnd { - overflow: auto; - width: 100%; - height: 100%; - margin: 0; - padding: 0; - font: normal 12px Tahoma; - border: 0 none; - background: transparent; - resize: none; /* disable resize textarea in google chrome, safari and firefox 4 */ +#message-input { + overflow: auto; + width: 100%; + height: 100%; + margin: 0; + padding: 0; + font: normal 12px Tahoma; + border: 0 none; + background: transparent; + resize: none; /* disable resize textarea in google chrome, safari and firefox 4 */ } /* -------- */ /* #send */ #postmessage { } -#sndmessagelnk { - float: right; - width: 190px; - height: 33px; - font: normal 17px Arial; - line-height: 30px; - text-align: center; - text-decoration: none; - color: #495151; - background: url("images/submit.gif") no-repeat 0 0 transparent; +#send-message { + float: right; + width: 190px; + height: 33px; + font: normal 17px Arial; + line-height: 30px; + text-align: center; + text-decoration: none; + color: #495151; + background: url("images/submit.gif") no-repeat 0 0 transparent; } -#sndmessagelnk:hover { - color: #000; - background: url("images/submit.gif") no-repeat -190px 0 transparent; +#send-message:hover { + color: #000; + background: url("images/submit.gif") no-repeat -190px 0 transparent; } #predefined-wrapper { - float: left; - padding: 5px 0 0 3px; + float: left; + padding: 5px 0 0 3px; } #predefined { - width: 200px; + width: 200px; } /* ----- */ /* error.tpl */ #top2 { - position: relative; - padding: 5px 14px; - background: #FFF url("images/logobg.gif") scroll repeat-x 0 100%; - _zoom:1; /* IE6 fix */ + position: relative; + padding: 5px 14px; + background: #FFF url("images/logobg.gif") scroll repeat-x 0 100%; + _zoom:1; /* IE6 fix */ } .bgbody { - background: #FFF !important; + background: #FFF !important; } .wndb { - background: #FFF url("images/wndb.gif") scroll repeat-x 0 100%; + background: #FFF url("images/wndb.gif") scroll repeat-x 0 100%; } .wndl { - background: transparent url("images/chatbgl.gif") scroll repeat-y 0 0; + background: transparent url("images/chatbgl.gif") scroll repeat-y 0 0; } .wndr { - background: transparent url("images/chatbgr.gif") scroll repeat-y 100% 0; + background: transparent url("images/chatbgr.gif") scroll repeat-y 100% 0; } .wndt { - background: transparent url("images/wndt.gif") scroll repeat-x 0 0; + background: transparent url("images/wndt.gif") scroll repeat-x 0 0; } .wndtl { - background: transparent url("images/wndtl.gif") scroll no-repeat 0 0; + background: transparent url("images/wndtl.gif") scroll no-repeat 0 0; } .wndtr { - background: transparent url("images/wndtr.gif") scroll no-repeat 100% 0; + background: transparent url("images/wndtr.gif") scroll no-repeat 100% 0; } .wndbl { - background: transparent url("images/wndbl.gif") scroll no-repeat 0 100%; + background: transparent url("images/wndbl.gif") scroll no-repeat 0 100%; } .wndbr { - position: relative; - padding: 14px; - background: transparent url("images/wndbr.gif") scroll no-repeat 100% 100%; + position: relative; + padding: 14px; + background: transparent url("images/wndbr.gif") scroll no-repeat 100% 100%; } .wndbr .buttons { - top: 14px; + top: 14px; } #headers { - padding: 0 10px; - background: #F1F2F2; + padding: 0 10px; + background: #F1F2F2; } #content-wrapper { - padding: 10px 14px 50px; - background: transparent url("images/content.gif") scroll repeat-x 0 -2px; + padding: 10px 14px 50px; + background: transparent url("images/content.gif") scroll repeat-x 0 -2px; } #content-wrapper { - font: normal 13px Arial; + font: normal 13px Arial; } .messagetxt { - padding: 0 60px 0 0; - font: normal 13px Arial; + padding: 0 60px 0 0; + font: normal 13px Arial; } /* --------- */ /* redirect.tpl */ .left { - float: left; - width: 49%; + float: left; + width: 49%; } .right { - float: right; - width: 49%; + float: right; + width: 49%; } .center { - padding-top: 30px; - text-align: center; + padding-top: 30px; + text-align: center; } ul { - margin: 10px 0; - padding: 0 0 0 10px; - list-style: none outside none; + margin: 10px 0; + padding: 0 0 0 10px; + list-style: none outside none; } ul li { - margin: 0 0 4px; - padding: 0 0 0 10px; - list-style: none outside none; - background: transparent url("images/list.gif") scroll no-repeat 0 5px; + margin: 0 0 4px; + padding: 0 0 0 10px; + list-style: none outside none; + background: transparent url("images/list.gif") scroll no-repeat 0 5px; } /* ------------ */ /* other */ .form { - margin: 0; - padding: 0; - border: 0; - border-collapse: collapse; - vertical-align: top; + margin: 0; + padding: 0; + border: 0; + border-collapse: collapse; + vertical-align: top; } .form td { - margin: 0; - padding: 5px; - border: 0; - border-collapse: collapse; - vertical-align: top; + margin: 0; + padding: 5px; + border: 0; + border-collapse: collapse; + vertical-align: top; } -#content-wrapper #sndmessagelnk { - float: left; - margin-top: 10px; +#content-wrapper #send-message { + float: left; + margin-top: 10px; } -#content-wrapper input, -#content-wrapper textarea, +#content-wrapper input, +#content-wrapper textarea, .wndbr input { - border: 1px solid #BBC4C4; + border: 1px solid #BBC4C4; +} +#sound-region { + display: none; } /* ----- */ \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/silver/chat_ie7.css b/src/messenger/webim/styles/dialogs/silver/chat_ie7.css new file mode 100644 index 00000000..a371f329 --- /dev/null +++ b/src/messenger/webim/styles/dialogs/silver/chat_ie7.css @@ -0,0 +1,10 @@ +/* controls */ +.control, +.user-name-control-set, +.user-name-control-change, +.user-name-control-input-bg +{ + display: inline; + zoom: 1; +} +/* ------------------ */ \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/silver/handlebars_templates/avatar.handlebars b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/avatar.handlebars new file mode 100644 index 00000000..2a679aa6 --- /dev/null +++ b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/avatar.handlebars @@ -0,0 +1 @@ +{{#if imageLink}}{{else}}
{{/if}} \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/silver/handlebars_templates/close_control.handlebars b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/close_control.handlebars new file mode 100644 index 00000000..48912a68 --- /dev/null +++ b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/close_control.handlebars @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/silver/handlebars_templates/control.handlebars b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/control.handlebars new file mode 100644 index 00000000..fcdc3061 --- /dev/null +++ b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/control.handlebars @@ -0,0 +1 @@ +{{title}} \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/silver/handlebars_templates/history_control.handlebars b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/history_control.handlebars new file mode 100644 index 00000000..ceba6c11 --- /dev/null +++ b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/history_control.handlebars @@ -0,0 +1,3 @@ +
+{{! Use div with ".control-config" class and its data-* attributes to pass data to the JavaScript app}} +
\ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/silver/handlebars_templates/message.handlebars b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/message.handlebars new file mode 100644 index 00000000..5ceeeac6 --- /dev/null +++ b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/message.handlebars @@ -0,0 +1,3 @@ +{{formatTime created}} +{{#if name}}{{name}}: {{/if}} +{{#if allowFormatting}}{{apply message "urlReplace, nl2br, allowTags"}}{{else}}{{apply message "urlReplace, nl2br"}}{{/if}}
\ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/silver/handlebars_templates/message_form.handlebars b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/message_form.handlebars new file mode 100644 index 00000000..2aff7496 --- /dev/null +++ b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/message_form.handlebars @@ -0,0 +1,26 @@ +
+{{#if user.canPost}} +
+ +
+{{/if}} +
+ +
+{{#if user.canPost}} +
+
+ {{#if user.isAgent}} + + {{/if}} +
+ {{L10n "chat.window.send_message_short_and_shortcut"}} +
+{{/if}} +
+
\ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/silver/handlebars_templates/redirect_control.handlebars b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/redirect_control.handlebars new file mode 100644 index 00000000..3208d443 --- /dev/null +++ b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/redirect_control.handlebars @@ -0,0 +1,3 @@ +{{#if user.canPost}} +
+{{/if}} \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/silver/handlebars_templates/refresh_control.handlebars b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/refresh_control.handlebars new file mode 100644 index 00000000..ee01aa8d --- /dev/null +++ b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/refresh_control.handlebars @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/silver/handlebars_templates/secure_mode_control.handlebars b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/secure_mode_control.handlebars new file mode 100644 index 00000000..aa11fd6d --- /dev/null +++ b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/secure_mode_control.handlebars @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/silver/handlebars_templates/send_mail_control.handlebars b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/send_mail_control.handlebars new file mode 100644 index 00000000..d7e199c3 --- /dev/null +++ b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/send_mail_control.handlebars @@ -0,0 +1,3 @@ +
+{{! Use div with ".control-config" class and its data-* attributes to pass data to the JavaScript app}} +
\ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/silver/handlebars_templates/sound.handlebars b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/sound.handlebars new file mode 100644 index 00000000..88f9a984 --- /dev/null +++ b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/sound.handlebars @@ -0,0 +1,5 @@ +{{#if file}} + +{{/if}} \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/silver/handlebars_templates/sound_control.handlebars b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/sound_control.handlebars new file mode 100644 index 00000000..4b059ca8 --- /dev/null +++ b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/sound_control.handlebars @@ -0,0 +1,5 @@ +{{#if enabled}} +
+{{else}} +
+{{/if}} \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/silver/handlebars_templates/status.handlebars b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/status.handlebars new file mode 100644 index 00000000..25c25d51 --- /dev/null +++ b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/status.handlebars @@ -0,0 +1 @@ +{{title}} \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/silver/handlebars_templates/status_message.handlebars b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/status_message.handlebars new file mode 100644 index 00000000..bd62cd6d --- /dev/null +++ b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/status_message.handlebars @@ -0,0 +1 @@ +{{message}} \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/silver/handlebars_templates/status_typing.handlebars b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/status_typing.handlebars new file mode 100644 index 00000000..91728f51 --- /dev/null +++ b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/status_typing.handlebars @@ -0,0 +1 @@ +{{L10n "typing.remote"}} \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/silver/handlebars_templates/user_name_control.handlebars b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/user_name_control.handlebars new file mode 100644 index 00000000..3b7a3b01 --- /dev/null +++ b/src/messenger/webim/styles/dialogs/silver/handlebars_templates/user_name_control.handlebars @@ -0,0 +1,12 @@ +{{#if user.canChangeName}} + {{L10n "chat.client.name"}} + {{#if nameInput}} +
+ + {{else}} + {{user.name}} + + {{/if}} +{{else}} +{{L10n "chat.client.name"}} {{user.name}} +{{/if}} \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/silver/js/compiled/message.tpl.js b/src/messenger/webim/styles/dialogs/silver/js/compiled/message.tpl.js deleted file mode 100644 index 9c9a4b7e..00000000 --- a/src/messenger/webim/styles/dialogs/silver/js/compiled/message.tpl.js +++ /dev/null @@ -1,55 +0,0 @@ -(function() { - var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; -templates['message'] = template(function (Handlebars,depth0,helpers,partials,data) { - helpers = helpers || Handlebars.helpers; - var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression, helperMissing=helpers.helperMissing, self=this; - -function program1(depth0,data) { - - var buffer = "", stack1, foundHelper; - buffer += ""; - foundHelper = helpers.name; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + ": "; - return buffer;} - -function program3(depth0,data) { - - var stack1, foundHelper; - stack1 = depth0.message; - foundHelper = helpers.apply; - stack1 = foundHelper ? foundHelper.call(depth0, stack1, "urlReplace, nl2br, allowTags", {hash:{}}) : helperMissing.call(depth0, "apply", stack1, "urlReplace, nl2br, allowTags", {hash:{}}); - return escapeExpression(stack1);} - -function program5(depth0,data) { - - var stack1, foundHelper; - stack1 = depth0.message; - foundHelper = helpers.apply; - stack1 = foundHelper ? foundHelper.call(depth0, stack1, "urlReplace, nl2br", {hash:{}}) : helperMissing.call(depth0, "apply", stack1, "urlReplace, nl2br", {hash:{}}); - return escapeExpression(stack1);} - - buffer += ""; - stack1 = depth0.created; - foundHelper = helpers.formatTime; - stack1 = foundHelper ? foundHelper.call(depth0, stack1, {hash:{}}) : helperMissing.call(depth0, "formatTime", stack1, {hash:{}}); - buffer += escapeExpression(stack1) + " \r\n"; - stack1 = depth0.name; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\r\n"; - stack1 = depth0.allowFormating; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(5, program5, data),fn:self.program(3, program3, data)}); - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "
"; - return buffer;}); -})(); \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/silver/js/compiled/scripts.js b/src/messenger/webim/styles/dialogs/silver/js/compiled/scripts.js new file mode 100644 index 00000000..46d40239 --- /dev/null +++ b/src/messenger/webim/styles/dialogs/silver/js/compiled/scripts.js @@ -0,0 +1,2 @@ +(function(a){var c=null,g=null,b,f=function(){null==c&&(c=a("#messages-region"),g=a("#avatar-region"));if(0!=c.size()){var d,e=0;a("body > *").not("#chat").each(function(){e+=a(this).outerHeight(!0)});e+=a("#chat").outerHeight(!0)-a("#messages-region").innerHeight();d=a(window).height()-e;var b=parseInt(c.css("minHeight"));b>=d&&(d=b);c.innerHeight(d);g.innerHeight(d)}};a(document).ready(f);a(window).load(function(){f();a("#messages-region").scrollTop(a("#messages-region").prop("scrollHeight"))}).resize(function(){b&& +clearTimeout(b);b=setTimeout(f,0)})})($); diff --git a/src/messenger/webim/styles/dialogs/silver/js/compiled/templates.js b/src/messenger/webim/styles/dialogs/silver/js/compiled/templates.js new file mode 100644 index 00000000..7cddf12f --- /dev/null +++ b/src/messenger/webim/styles/dialogs/silver/js/compiled/templates.js @@ -0,0 +1 @@ +(function(){var a=Handlebars.template,b=Handlebars.templates=Handlebars.templates||{};b.sound_control=a(function(a,b,c,d,e){function j(a,b){var d="",e,f;return d+='\n
\n',d}function k(a,b){var d="",e,f;return d+='\n
\n',d}c=c||a.helpers;var f,g=c.helperMissing,h=this.escapeExpression,i=this;return f=b.enabled,f=c["if"].call(b,f,{hash:{},inverse:i.program(3,k,e),fn:i.program(1,j,e)}),f||f===0?f:""}),b.user_name_control=a(function(a,b,c,d,e){function k(a,b){var d="",e,f;d+='\n ',f=c.L10n,e=f?f.call(a,"chat.client.name",{hash:{}}):i.call(a,"L10n","chat.client.name",{hash:{}}),d+=h(e)+"\n ",e=a.nameInput,e=c["if"].call(a,e,{hash:{},inverse:j.program(4,m,b),fn:j.program(2,l,b)});if(e||e===0)d+=e;return d+="\n",d}function l(a,b){var d="",e,f;return d+='\n
\n \n ',d}function m(a,b){var d="",e,f;return d+='\n ',e=a.user,e=e==null||e===!1?e:e.name,e=typeof e===g?e():e,d+=h(e)+'\n \n ',d}function n(a,b){var d="",e,f;return d+="\n",f=c.L10n,e=f?f.call(a,"chat.client.name",{hash:{}}):i.call(a,"L10n","chat.client.name",{hash:{}}),d+=h(e)+" ",e=a.user,e=e==null||e===!1?e:e.name,e=typeof e===g?e():e,d+=h(e)+"\n",d}c=c||a.helpers;var f,g="function",h=this.escapeExpression,i=c.helperMissing,j=this;return f=b.user,f=f==null||f===!1?f:f.canChangeName,f=c["if"].call(b,f,{hash:{},inverse:j.program(6,n,e),fn:j.program(1,k,e)}),f||f===0?f:""}),b.status=a(function(a,b,c,d,e){c=c||a.helpers;var f,g,h="function",i=this.escapeExpression;return g=c.title,g?f=g.call(b,{hash:{}}):(f=b.title,f=typeof f===h?f():f),i(f)}),b.message_form=a(function(a,b,c,d,e){function l(a,b){return'\n
\n \n
\n'}function m(a,b){var d="",e,f;d+='\n
\n
\n ',e=a.user,e=e==null||e===!1?e:e.isAgent,e=c["if"].call(a,e,{hash:{},inverse:k.noop,fn:k.program(4,n,b)});if(e||e===0)d+=e;return d+='\n
\n ',f=c.L10n,e=f?f.call(a,"chat.window.send_message_short_and_shortcut",{hash:{}}):j.call(a,"L10n","chat.window.send_message_short_and_shortcut",{hash:{}}),d+=i(e)+"\n
\n",d}function n(a,b){var d="",e,f;d+='\n \n ",d}function o(a,b){var c="",d;return c+="\n \n ",c}c=c||a.helpers;var f="",g,h="function",i=this.escapeExpression,j=c.helperMissing,k=this;f+='
\n',g=b.user,g=g==null||g===!1?g:g.canPost,g=c["if"].call(b,g,{hash:{},inverse:k.noop,fn:k.program(1,l,e)});if(g||g===0)f+=g;f+='\n
\n\n
\n',g=b.user,g=g==null||g===!1?g:g.canPost,g=c["if"].call(b,g,{hash:{},inverse:k.noop,fn:k.program(3,m,e)});if(g||g===0)f+=g;return f+='\n
\n
',f}),b.control=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i="function",j=this.escapeExpression;return f+="",h=c.title,h?g=h.call(b,{hash:{}}):(g=b.title,g=typeof g===i?g():g),f+=j(g)+"",f}),b.status_typing=a(function(a,b,c,d,e){c=c||a.helpers;var f,g,h=c.helperMissing,i=this.escapeExpression;return g=c.L10n,f=g?g.call(b,"typing.remote",{hash:{}}):h.call(b,"L10n","typing.remote",{hash:{}}),i(f)}),b.status_message=a(function(a,b,c,d,e){c=c||a.helpers;var f,g,h="function",i=this.escapeExpression;return g=c.message,g?f=g.call(b,{hash:{}}):(f=b.message,f=typeof f===h?f():f),i(f)}),b.sound=a(function(a,b,c,d,e){function j(a,b){var d="",e,f;return d+='\n\n',d}c=c||a.helpers;var f,g="function",h=this.escapeExpression,i=this;return f=b.file,f=c["if"].call(b,f,{hash:{},inverse:i.noop,fn:i.program(1,j,e)}),f||f===0?f:""}),b.message=a(function(a,b,c,d,e){function m(a,b){var d="",e,f;return d+="",f=c.name,f?e=f.call(a,{hash:{}}):(e=a.name,e=typeof e===i?e():e),d+=j(e)+": ",d}function n(a,b){var d,e;return d=a.message,e=c.apply,d=e?e.call(a,d,"urlReplace, nl2br, allowTags",{hash:{}}):k.call(a,"apply",d,"urlReplace, nl2br, allowTags",{hash:{}}),j(d)}function o(a,b){var d,e;return d=a.message,e=c.apply,d=e?e.call(a,d,"urlReplace, nl2br",{hash:{}}):k.call(a,"apply",d,"urlReplace, nl2br",{hash:{}}),j(d)}c=c||a.helpers;var f="",g,h,i="function",j=this.escapeExpression,k=c.helperMissing,l=this;f+="",g=b.created,h=c.formatTime,g=h?h.call(b,g,{hash:{}}):k.call(b,"formatTime",g,{hash:{}}),f+=j(g)+" \n",g=b.name,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(1,m,e)});if(g||g===0)f+=g;f+="\n",g=b.allowFormatting,g=c["if"].call(b,g,{hash:{},inverse:l.program(5,o,e),fn:l.program(3,n,e)});if(g||g===0)f+=g;return f+="
",f}),b.history_control=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression;return f+='
\n',f+='\n
',f}),b.avatar=a(function(a,b,c,d,e){function j(a,b){var d="",e,f;return d+='',d}function k(a,b){return'
'}c=c||a.helpers;var f,g="function",h=this.escapeExpression,i=this;return f=b.imageLink,f=c["if"].call(b,f,{hash:{},inverse:i.program(3,k,e),fn:i.program(1,j,e)}),f||f===0?f:""}),b.send_mail_control=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression;return f+='
\n',f+='\n
',f}),b.secure_mode_control=a(function(a,b,c,d,e){return c=c||a.helpers,'
'}),b.refresh_control=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression;return f+='
',f}),b.close_control=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression;return f+='
',f}),b.redirect_control=a(function(a,b,c,d,e){function j(a,b){var d="",e,f;return d+='\n
\n',d}c=c||a.helpers;var f,g=c.helperMissing,h=this.escapeExpression,i=this;return f=b.user,f=f==null||f===!1?f:f.canPost,f=c["if"].call(b,f,{hash:{},inverse:i.noop,fn:i.program(1,j,e)}),f||f===0?f:""})})() \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/silver/js/source/message.handlebars b/src/messenger/webim/styles/dialogs/silver/js/source/message.handlebars deleted file mode 100644 index 1cb729d2..00000000 --- a/src/messenger/webim/styles/dialogs/silver/js/source/message.handlebars +++ /dev/null @@ -1,3 +0,0 @@ -{{formatTime created}} -{{#if name}}{{name}}: {{/if}} -{{#if allowFormating}}{{apply message "urlReplace, nl2br, allowTags"}}{{else}}{{apply message "urlReplace, nl2br"}}{{/if}}
\ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/silver/js/source/resize.js b/src/messenger/webim/styles/dialogs/silver/js/source/resize.js new file mode 100644 index 00000000..323d2991 --- /dev/null +++ b/src/messenger/webim/styles/dialogs/silver/js/source/resize.js @@ -0,0 +1,55 @@ +(function($){ + + var $msgRegion = null; + var $avatarRegion = null; + var t; + + var getHeight = function() { + var elementsHeight = 0; + $('body > *').not('#chat').each(function () { + elementsHeight += $(this).outerHeight(true); + }); + + elementsHeight += ($('#chat').outerHeight(true) + - $('#messages-region').innerHeight()); + + return ($(window).height() - elementsHeight); + } + + var updateHeight = function() { + if ($msgRegion == null) { + $msgRegion = $('#messages-region'); + $avatarRegion = $('#avatar-region'); + } + if ($msgRegion.size() == 0) { + return; + } + var newHeight = getHeight(); + var minHeight = parseInt($msgRegion.css('minHeight')); + + if (minHeight >= newHeight) { + newHeight = minHeight; + } + $msgRegion.innerHeight(newHeight); + $avatarRegion.innerHeight(newHeight); + } + + var updateHeightWrapper = function() { + if (t) { + clearTimeout(t); + } + t = setTimeout(updateHeight, 0); + } + + $(document).ready(updateHeight); + $(window) + .load(function() { + updateHeight(); + // Scroll messages region to bottom + $('#messages-region').scrollTop( + $('#messages-region').prop('scrollHeight') + ); + }) + .resize(updateHeightWrapper); + +})($); \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/silver/templates/chat.tpl b/src/messenger/webim/styles/dialogs/silver/templates/chat.tpl index 9de06bcf..650b7df0 100644 --- a/src/messenger/webim/styles/dialogs/silver/templates/chat.tpl +++ b/src/messenger/webim/styles/dialogs/silver/templates/chat.tpl @@ -1,203 +1,155 @@ - - - ${msg:chat.window.title.agent} - - + + + ${msg:chat.window.title.agent} + + + ${page:additional_css} - - - - - - - ${page:additional_js} - - - - -
- -
-
-
- ${if:agent} -
- ${if:historyParams} - ${msg:chat.window.chatting_with} - ${page:ct.user.name} - ${else:historyParams} - ${msg:chat.window.chatting_with} ${page:ct.user.name} - ${endif:historyParams} -
- ${endif:agent} - ${if:user} - ${if:canChangeName} -
-
${msg:chat.client.name}
-
- >> -
-
-
${msg:chat.client.name}
- ${page:ct.user.name} - -
- ${else:canChangeName} -
${msg:chat.client.name} ${page:ct.user.name}
- ${endif:canChangeName} - ${endif:user} -
- Reduce font  - Enlarge font  - - ${if:user} - Mail  - ${endif:user} - ${if:agent} - ${if:canpost} - Redirect  - ${endif:canpost} - ${if:historyParams} - History  - ${endif:historyParams} - ${endif:agent} - Sound  - Refresh  - ${if:sslLink} - SSL  - ${endif:sslLink} - ${msg:chat.window.close_title} -
-
-
-
-
- -
- - -
- ${if:user} -
-
 
-
- ${endif:user} -
-
-
- ${if:canpost} -
- -
- ${endif:canpost} -
-
- ${if:canpost} -
-
- ${if:agent} - - ${endif:agent} -
- ${msg:chat.window.send_message_short,send_shortcut} -
 
-
- ${endif:canpost} - -
- + + + + + + + + + + + + + + + + + + + + ${page:additional_js} + + + + + + + + + +
+ +
+ + +
+
+ +
+
+
+ + +
+
+ ${if:user} +
+ ${endif:user} + +
+ +
+
+
+ + +
+ + + + + +
+ + \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/simplicity/chat.css b/src/messenger/webim/styles/dialogs/simplicity/chat.css deleted file mode 100644 index b90caee5..00000000 --- a/src/messenger/webim/styles/dialogs/simplicity/chat.css +++ /dev/null @@ -1,203 +0,0 @@ -BODY { - margin: 0px; - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 10px; - background: #FFFFFF; - color: #666666; -} - -FORM { - margin-bottom: 0px; - margin-top: 0px; -} - -TABLE { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 11px; - color: #666666; -} - -A, A:active, A:link, A:visited { - text-decoration: none; - color: #BB0000; -} - -A:hover { - text-decoration: underline; - color: #BB0000; -} - -H1 { - margin-top: 0px; - margin-bottom: 5px; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - color: #000000; - font-weight: bold; -} - -H2 { - margin-top: 0px; - margin-bottom: 0px; - font-family: Arial, Helvetica, sans-serif; - font-size: 14px; - color: #000000; - font-weight: bold; -} - -H3 { - margin-top: 0px; - margin-bottom: 0px; - font-family: Arial, Helvetica, sans-serif; - font-size: 12px; - color: #000000; - font-weight: bold; -} - -UL { - margin-top: 0px; - margin-bottom: 0px; -} - -#greybg { - background: #EFEFEF; -} - -#whitebg { - background: #FFFFFF; -} - -#toolbar { - background: #E3E3E3 url('images/toolbar_bg.jpg') repeat-x; - border-bottom: solid 1px #CCCCCC; -} - -#typingdiv, #engineinfo { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 11px; - color: #BB0000; - margin: 0px 3px; -} - -.chathistory { - width: 100%; - height: 300px; - border: solid 1px #CCCCCC; - overflow:auto; -} - -TEXTAREA.message { - margin: 0px; - border: solid 1px #CCCCCC; - padding: 0px 3px; - width: 100%; - height: 50px; - overflow: auto; -} - -.message { - font-family: Arial, Helvetica, sans-serif; - font-size: 11px; - color: #666666; - padding: 3px; - line-height: 15px; -} - -.message span.time { - color: #000000; -} - -.message span.nuser { - color: #B11E23; - font-weight: bold; -} - -.message span.nagent { - font-weight: bold; -} - -.message span.minf { - color: #1E48B1; - font-size: 11px; -} - -.message span.mevent { - color: #A1A1A1; - font-size: 11px; -} - -.message span.mhidden { - color: #A1A1A1; - font-size: 11px; -} - -.message span.mconn { - color: #A1A1A1; - font-size: 11px; -} - -.submit { - padding-top: 1px; -} - -.text { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 11px; - color: #4C4C4C; -} - -.text span.grey { - color: #666666; -} - -#form { - width: 100%; - background: #EFEFEF; - border: solid 1px #CCCCCC; -} - -#form TD.text { - width: 1%; - white-space: nowrap; -} - -#errorimage { - margin-right: 5px; -} - -.field { - border: 1px solid #CCCCCC; - font-family: Arial, Helvetica, sans-serif; - font-size: 11px; - color: #666666; - padding-left: 3px; -} - -textarea.field { - margin: 0px; - padding: 0px 3px; - overflow: auto; -} - -.dropdown { - font-family: Arial, Helvetica, sans-serif; - font-size: 11px; - color: #666666; -} - -.button A { - font-family: Arial, Helvetica, sans-serif; - font-size: 11px; - color: #666666; -} - -#footer { - text-align: center; - font-size: 10px; - color: #999999; -} - -#footer A { - color: #999999; - text-decoration: underline; -} \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/back.gif b/src/messenger/webim/styles/dialogs/simplicity/images/buttons/back.gif deleted file mode 100644 index 8e934ab5..00000000 Binary files a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/back.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/change.gif b/src/messenger/webim/styles/dialogs/simplicity/images/buttons/change.gif deleted file mode 100644 index ec7036e6..00000000 Binary files a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/change.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/close.gif b/src/messenger/webim/styles/dialogs/simplicity/images/buttons/close.gif deleted file mode 100644 index e936e8b7..00000000 Binary files a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/close.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/closewin.gif b/src/messenger/webim/styles/dialogs/simplicity/images/buttons/closewin.gif deleted file mode 100644 index e936e8b7..00000000 Binary files a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/closewin.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/email.gif b/src/messenger/webim/styles/dialogs/simplicity/images/buttons/email.gif deleted file mode 100644 index 00d50c67..00000000 Binary files a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/email.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/exec.gif b/src/messenger/webim/styles/dialogs/simplicity/images/buttons/exec.gif deleted file mode 100644 index fabe3851..00000000 Binary files a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/exec.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/history.gif b/src/messenger/webim/styles/dialogs/simplicity/images/buttons/history.gif deleted file mode 100644 index ec7036e6..00000000 Binary files a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/history.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/nosound.gif b/src/messenger/webim/styles/dialogs/simplicity/images/buttons/nosound.gif deleted file mode 100644 index 4116a8a4..00000000 Binary files a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/nosound.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/redirect.gif b/src/messenger/webim/styles/dialogs/simplicity/images/buttons/redirect.gif deleted file mode 100644 index 0e944576..00000000 Binary files a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/redirect.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/refresh.gif b/src/messenger/webim/styles/dialogs/simplicity/images/buttons/refresh.gif deleted file mode 100644 index 1770acfc..00000000 Binary files a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/refresh.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/send.jpg b/src/messenger/webim/styles/dialogs/simplicity/images/buttons/send.jpg deleted file mode 100644 index 4a7d440c..00000000 Binary files a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/send.jpg and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/sound.gif b/src/messenger/webim/styles/dialogs/simplicity/images/buttons/sound.gif deleted file mode 100644 index e3619295..00000000 Binary files a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/sound.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/ssl.gif b/src/messenger/webim/styles/dialogs/simplicity/images/buttons/ssl.gif deleted file mode 100644 index 33dbdd45..00000000 Binary files a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/ssl.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/tracked.gif b/src/messenger/webim/styles/dialogs/simplicity/images/buttons/tracked.gif deleted file mode 100644 index 42fe9cf9..00000000 Binary files a/src/messenger/webim/styles/dialogs/simplicity/images/buttons/tracked.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/simplicity/images/error.gif b/src/messenger/webim/styles/dialogs/simplicity/images/error.gif deleted file mode 100644 index eddffbdf..00000000 Binary files a/src/messenger/webim/styles/dialogs/simplicity/images/error.gif and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/simplicity/images/toolbar_bg.jpg b/src/messenger/webim/styles/dialogs/simplicity/images/toolbar_bg.jpg deleted file mode 100644 index 582cc701..00000000 Binary files a/src/messenger/webim/styles/dialogs/simplicity/images/toolbar_bg.jpg and /dev/null differ diff --git a/src/messenger/webim/styles/dialogs/simplicity/js/compiled/message.tpl.js b/src/messenger/webim/styles/dialogs/simplicity/js/compiled/message.tpl.js deleted file mode 100644 index 9c9a4b7e..00000000 --- a/src/messenger/webim/styles/dialogs/simplicity/js/compiled/message.tpl.js +++ /dev/null @@ -1,55 +0,0 @@ -(function() { - var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; -templates['message'] = template(function (Handlebars,depth0,helpers,partials,data) { - helpers = helpers || Handlebars.helpers; - var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression, helperMissing=helpers.helperMissing, self=this; - -function program1(depth0,data) { - - var buffer = "", stack1, foundHelper; - buffer += ""; - foundHelper = helpers.name; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + ": "; - return buffer;} - -function program3(depth0,data) { - - var stack1, foundHelper; - stack1 = depth0.message; - foundHelper = helpers.apply; - stack1 = foundHelper ? foundHelper.call(depth0, stack1, "urlReplace, nl2br, allowTags", {hash:{}}) : helperMissing.call(depth0, "apply", stack1, "urlReplace, nl2br, allowTags", {hash:{}}); - return escapeExpression(stack1);} - -function program5(depth0,data) { - - var stack1, foundHelper; - stack1 = depth0.message; - foundHelper = helpers.apply; - stack1 = foundHelper ? foundHelper.call(depth0, stack1, "urlReplace, nl2br", {hash:{}}) : helperMissing.call(depth0, "apply", stack1, "urlReplace, nl2br", {hash:{}}); - return escapeExpression(stack1);} - - buffer += ""; - stack1 = depth0.created; - foundHelper = helpers.formatTime; - stack1 = foundHelper ? foundHelper.call(depth0, stack1, {hash:{}}) : helperMissing.call(depth0, "formatTime", stack1, {hash:{}}); - buffer += escapeExpression(stack1) + " \r\n"; - stack1 = depth0.name; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\r\n"; - stack1 = depth0.allowFormating; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(5, program5, data),fn:self.program(3, program3, data)}); - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "
"; - return buffer;}); -})(); \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/simplicity/js/source/.htaccess b/src/messenger/webim/styles/dialogs/simplicity/js/source/.htaccess deleted file mode 100644 index 14249c50..00000000 --- a/src/messenger/webim/styles/dialogs/simplicity/js/source/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/simplicity/js/source/message.handlebars b/src/messenger/webim/styles/dialogs/simplicity/js/source/message.handlebars deleted file mode 100644 index 1cb729d2..00000000 --- a/src/messenger/webim/styles/dialogs/simplicity/js/source/message.handlebars +++ /dev/null @@ -1,3 +0,0 @@ -{{formatTime created}} -{{#if name}}{{name}}: {{/if}} -{{#if allowFormating}}{{apply message "urlReplace, nl2br, allowTags"}}{{else}}{{apply message "urlReplace, nl2br"}}{{/if}}
\ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/simplicity/templates/.htaccess b/src/messenger/webim/styles/dialogs/simplicity/templates/.htaccess deleted file mode 100644 index 14249c50..00000000 --- a/src/messenger/webim/styles/dialogs/simplicity/templates/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/simplicity/templates/agentchat.tpl b/src/messenger/webim/styles/dialogs/simplicity/templates/agentchat.tpl deleted file mode 100644 index 9b720b3f..00000000 --- a/src/messenger/webim/styles/dialogs/simplicity/templates/agentchat.tpl +++ /dev/null @@ -1 +0,0 @@ -${include:chat.tpl} \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/simplicity/templates/agentrochat.tpl b/src/messenger/webim/styles/dialogs/simplicity/templates/agentrochat.tpl deleted file mode 100644 index 9b720b3f..00000000 --- a/src/messenger/webim/styles/dialogs/simplicity/templates/agentrochat.tpl +++ /dev/null @@ -1 +0,0 @@ -${include:chat.tpl} \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/simplicity/templates/chat.tpl b/src/messenger/webim/styles/dialogs/simplicity/templates/chat.tpl deleted file mode 100644 index e4d293af..00000000 --- a/src/messenger/webim/styles/dialogs/simplicity/templates/chat.tpl +++ /dev/null @@ -1,192 +0,0 @@ - - - -${msg:chat.window.title.agent} - - -${page:additional_css} - - - - - - -${page:additional_js} - - - - - -
- - - - - -
- ${if:agent} - - - -
- ${if:historyParams} - ${msg:chat.window.chatting_with} - ${page:ct.user.name} - ${else:historyParams} - ${msg:chat.window.chatting_with} ${page:ct.user.name} - ${endif:historyParams} - - ${msg:chat.window.close_title} -
- ${endif:agent} - ${if:user} - ${if:canChangeName} -
- - - - - - -
${msg:chat.client.name}${msg:chat.client.changename}
-
-
- - - - - -
${page:ct.user.name}${msg:chat.client.changename}
-
- ${else:canChangeName} -
- ${msg:chat.client.name} ${page:ct.user.name} -
- ${endif:canChangeName} - ${endif:user} -
- - ${if:user} - - ${endif:user} - ${if:agent} - ${if:canpost} - - ${endif:canpost} - ${if:historyParams} - - ${endif:historyParams} - ${if:trackedParams} - - ${endif:trackedParams} - ${endif:agent} - - - ${if:sslLink} - - ${endif:sslLink} - -
- ${msg:chat.window.toolbar.mail_history} - - ${msg:chat.window.toolbar.redirect_user} - - ${msg:page.analysis.userhistory.title} - - ${msg:page.analysis.trackedpath.title} - - ${msg:chat.window.toolbar.mute} - - ${msg:chat.window.toolbar.refresh} - - SSL - - ${msg:chat.window.close_title} -
-
- - - - - - - - - - ${if:canpost} - - - - - - - - - ${endif:canpost} -
- -   -
- - -
-
- - - - - - -
- ${msg:chat.window.send_message_short,send_shortcut} -
-
- ${if:agent} - - ${endif:agent} -
- - - - - -
- - - diff --git a/src/messenger/webim/styles/dialogs/simplicity/templates/chatsimple.tpl b/src/messenger/webim/styles/dialogs/simplicity/templates/chatsimple.tpl deleted file mode 100644 index cfbe3fe5..00000000 --- a/src/messenger/webim/styles/dialogs/simplicity/templates/chatsimple.tpl +++ /dev/null @@ -1,99 +0,0 @@ - - - -${msg:chat.window.title.user} - - - - - -
- - - - - -
- ${if:user} - ${if:canChangeName} - - - - -
${msg:chat.client.name}${msg:chat.client.changename}
- ${else:canChangeName} -
- ${msg:chat.client.name} ${page:ct.user.name} -
- ${endif:canChangeName} - ${endif:user} -
- - - - -
- ${msg:chat.window.toolbar.mail_history} - - ${msg:chat.window.toolbar.refresh} - - ${msg:chat.window.close_title} -
-
- - - - - - - - - -
- -
-
- - - -
-
- - - - -
- ${msg:chat.window.send_message_short,send_shortcut} -
-
- - - - - -
- - - diff --git a/src/messenger/webim/styles/dialogs/simplicity/templates/error.tpl b/src/messenger/webim/styles/dialogs/simplicity/templates/error.tpl deleted file mode 100644 index 65256b3e..00000000 --- a/src/messenger/webim/styles/dialogs/simplicity/templates/error.tpl +++ /dev/null @@ -1,48 +0,0 @@ - - - -${msg:chat.error_page.title} - - - - -
- - - - - - - - - - -
-

${msg:chat.error_page.head}

-
- - - - -
- ${harderrors} -
-
- - - - - -
${msg:chat.error_page.close}${msg:chat.error_page.close}
-
- - - - - -
- - - diff --git a/src/messenger/webim/styles/dialogs/simplicity/templates/leavemessage.tpl b/src/messenger/webim/styles/dialogs/simplicity/templates/leavemessage.tpl deleted file mode 100644 index 6d88761b..00000000 --- a/src/messenger/webim/styles/dialogs/simplicity/templates/leavemessage.tpl +++ /dev/null @@ -1,110 +0,0 @@ - - - -${msg:leavemessage.title} - - - - - - - -
-
- - - - ${ifnot:groups}${if:formgroupid}${endif:formgroupid}${endif:groups} - - - - - - - - - - - -
-

${if:formgroupname}${form:groupname}: ${endif:formgroupname}${msg:leavemessage.title}

-
- - - - - ${if:errors} - - - - ${endif:errors} - - - - - - - - -${if:groups} - - - - - - - - -${endif:groups} - - - - -${if:showcaptcha} - - - - -${endif:showcaptcha} -
- ${msg:leavemessage.descr} -
- - - - - -
${errors}
-
${msg:form.field.email}:
${msg:form.field.name}:
${msg:form.field.department} - -
${msg:form.field.department.description}${page:default.department.description}
${msg:form.field.message}:
-
- - - - - -
${msg:leavemessage.perform}${msg:leavemessage.perform}
-
- - - - - -
${msg:page.chat.old_browser.close}${msg:page.chat.old_browser.close}
-
-
- - - - - -
- - diff --git a/src/messenger/webim/styles/dialogs/simplicity/templates/leavemessagesent.tpl b/src/messenger/webim/styles/dialogs/simplicity/templates/leavemessagesent.tpl deleted file mode 100644 index 1f424ab9..00000000 --- a/src/messenger/webim/styles/dialogs/simplicity/templates/leavemessagesent.tpl +++ /dev/null @@ -1,47 +0,0 @@ - - - -${msg:leavemessage.sent.title} - - - - -
- - - - - - - - - - -
-

${msg:leavemessage.sent.title}

-
- - - - -
- ${msg:leavemessage.sent.message} -
-
- - - - - -
${msg:chat.mailthread.sent.close}${msg:chat.mailthread.sent.close}
-
- - - - - -
- - \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/simplicity/templates/mail.tpl b/src/messenger/webim/styles/dialogs/simplicity/templates/mail.tpl deleted file mode 100644 index 9b650e55..00000000 --- a/src/messenger/webim/styles/dialogs/simplicity/templates/mail.tpl +++ /dev/null @@ -1,73 +0,0 @@ - - - -${msg:chat.window.title.user} - - - - -
-
- - - - - - - - - - - - - - - -
-

${msg:mailthread.title}

-
- - ${if:errors} - - - - ${endif:errors} - - - - -
- - - - - -
${errors}
-
${msg:mailthread.enter_email}
-
- - - - - -
${msg:mailthread.perform}${msg:mailthread.perform}
-
- - - - - -
${msg:mailthread.close}${msg:mailthread.close}
-
-
- - - - - -
- - - diff --git a/src/messenger/webim/styles/dialogs/simplicity/templates/mailsent.tpl b/src/messenger/webim/styles/dialogs/simplicity/templates/mailsent.tpl deleted file mode 100644 index 96f7056b..00000000 --- a/src/messenger/webim/styles/dialogs/simplicity/templates/mailsent.tpl +++ /dev/null @@ -1,48 +0,0 @@ - - - -${msg:chat.window.title.user} - - - - -
- - - - - - - - - - -
-

${msg:chat.mailthread.sent.title}

-
- - - - -
- ${msg:chat.mailthread.sent.content,email} -
-
- - - - - -
${msg:chat.mailthread.sent.close}${msg:chat.mailthread.sent.close}
-
- - - - - -
- - - diff --git a/src/messenger/webim/styles/dialogs/simplicity/templates/nochat.tpl b/src/messenger/webim/styles/dialogs/simplicity/templates/nochat.tpl deleted file mode 100644 index 7be4ee81..00000000 --- a/src/messenger/webim/styles/dialogs/simplicity/templates/nochat.tpl +++ /dev/null @@ -1,44 +0,0 @@ - - - -${msg:page.chat.old_browser.title} - - - - -
- - - - - - - -
- - - - -
- ${msg:page.chat.old_browser.problem} - ${msg:page.chat.old_browser.list} -
-
- - - - - -
${msg:page.chat.old_browser.close}${msg:page.chat.old_browser.close}
-
- - - - - -
- - - diff --git a/src/messenger/webim/styles/dialogs/simplicity/templates/redirect.tpl b/src/messenger/webim/styles/dialogs/simplicity/templates/redirect.tpl deleted file mode 100644 index 16303356..00000000 --- a/src/messenger/webim/styles/dialogs/simplicity/templates/redirect.tpl +++ /dev/null @@ -1,67 +0,0 @@ - - - -${msg:chat.window.title.agent} - - - - -
- - - - - - - - - - - - - - -
-

${msg:chat.redirect.title}

-
-

${msg:chat.redirect.choose}

-
- - - - -
- ${if:redirectToAgent} - ${msg:chat.redirect.operator} -
    - ${page:redirectToAgent} -
- ${endif:redirectToAgent} - ${if:redirectToGroup} - ${msg:chat.redirect.group}
-
    - ${page:redirectToGroup} -
- ${endif:redirectToGroup} -
-
- ${pagination} - - - - - - -
${msg:chat.redirect.back}${msg:chat.redirect.back}
-
- - - - - -
- - - diff --git a/src/messenger/webim/styles/dialogs/simplicity/templates/redirected.tpl b/src/messenger/webim/styles/dialogs/simplicity/templates/redirected.tpl deleted file mode 100644 index 5ad74ffc..00000000 --- a/src/messenger/webim/styles/dialogs/simplicity/templates/redirected.tpl +++ /dev/null @@ -1,48 +0,0 @@ - - - -${msg:chat.window.title.agent} - - - - -
- - - - - - - - - - -
-

${msg:chat.redirected.title}

-
- - - - -
- ${page:message} -
-
- - - - - -
${msg:chat.redirected.close}${msg:chat.redirected.close}
-
- - - - - -
- - - diff --git a/src/messenger/webim/styles/dialogs/simplicity/templates/survey.tpl b/src/messenger/webim/styles/dialogs/simplicity/templates/survey.tpl deleted file mode 100644 index ac5db84b..00000000 --- a/src/messenger/webim/styles/dialogs/simplicity/templates/survey.tpl +++ /dev/null @@ -1,114 +0,0 @@ - - - -${msg:presurvey.title} - - - - - - - -
-
- - - - - ${ifnot:showemail}${endif:showemail} - ${ifnot:groups}${if:formgroupid}${endif:formgroupid}${endif:groups} - ${ifnot:showmessage}${endif:showmessage} - - - - - - - - - - - -
-

${msg:presurvey.title}

-
- - - - - ${if:errors} - - - - ${endif:errors} - ${if:groups} - - - - - - - - - ${endif:groups} - - - - - ${if:showemail} - - - - - ${endif:showemail} - ${if:showmessage} - - - - - ${endif:showmessage} -
- ${msg:presurvey.intro} -
- - - - - -
${errors}
-
${msg:form.field.department}
${msg:form.field.department.description}${page:default.department.description}
${msg:presurvey.name}
${msg:presurvey.mail}
${msg:presurvey.question}
-
- - - - - -
${msg:presurvey.submit}${msg:presurvey.submit}
-
- - - - - -
${msg:page.chat.old_browser.close}${msg:page.chat.old_browser.close}
-
-
- - - - - -
- - diff --git a/src/messenger/webim/view/performance.php b/src/messenger/webim/view/performance.php index b4de5d2d..8984eeb5 100644 --- a/src/messenger/webim/view/performance.php +++ b/src/messenger/webim/view/performance.php @@ -68,15 +68,6 @@ require_once('inc_errors.php');
-
-
-
- -
-
-
-
-