diff --git a/src/messenger/webim/js/compiled/users/collection_views/threads_collection.js b/src/messenger/webim/js/compiled/users/collection_views/threads_collection.js index 5eaf6d1c..8bba6423 100644 --- a/src/messenger/webim/js/compiled/users/collection_views/threads_collection.js +++ b/src/messenger/webim/js/compiled/users/collection_views/threads_collection.js @@ -5,8 +5,8 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(d,h,j,k){d.Views.ThreadsCollection=h.Marionette.CompositeView.extend({template:j.templates.threads_collection,itemView:d.Views.QueuedThread,itemViewContainer:"#threads-container",emptyView:d.Views.NoThreads,className:"threads-collection",collectionEvents:{sort:"renderCollection","sort:field":"createSortField",add:"threadAdded"},itemViewOptions:function(a){return{tagName:d.Objects.Models.page.get("threadTag"),collection:a.get("controls")}},initialize:function(){window.setInterval(k.bind(this.renderCollection, -this),2E3);this.on("itemview:before:render",this.updateStyles,this)},updateStyles:function(a){var b=this.collection,c=a.model,d=this;if(c.id){var e=this.getQueueCode(c),f=!1,g=!1,b=b.filter(function(a){return d.getQueueCode(a)==e});0d?"0"+d:d);c.push(10>b?"0"+b:b);return c.join(":")})})(Handlebars); diff --git a/src/messenger/webim/js/compiled/users/init.js b/src/messenger/webim/js/compiled/users/init.js index 205315cc..8fdea46f 100644 --- a/src/messenger/webim/js/compiled/users/init.js +++ b/src/messenger/webim/js/compiled/users/init.js @@ -5,4 +5,4 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a){a.Regions={};a.Popup={};a.Popup.open=function(b,a,c){b=window.open(b,a,c);b.focus();b.opener=window}})(Mibew); +(function(a,e){a.Regions={};a.Popup={};a.Popup.open=function(b,a,g){b=window.open(b,a,g);b.focus();b.opener=window};a.Utils.updateTimers=function(a,f){a.find(f).each(function(){var a=e(this).data("timestamp");if(a){var c=Math.round((new Date).getTime()/1E3)-a,a=c%60,b=Math.floor(c/60)%60,c=Math.floor(c/3600),d=[];0b?"0"+b:b);d.push(10>a?"0"+a:a);e(this).html(d.join(":"))}})}})(Mibew,jQuery); diff --git a/src/messenger/webim/js/compiled/users_app.js b/src/messenger/webim/js/compiled/users_app.js index c187a850..a731e956 100644 --- a/src/messenger/webim/js/compiled/users_app.js +++ b/src/messenger/webim/js/compiled/users_app.js @@ -4,20 +4,13 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(){var a=Handlebars.template,b=Handlebars.templates=Handlebars.templates||{};b.agent=a(function(a,b,c,d,e){function m(a,b){return"away"}function n(a,b){return"online"}function o(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.away",{hash:{}}):i.call(a,"L10n","pending.status.away",{hash:{}}),j(d)}function p(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.online",{hash:{}}):i.call(a,"L10n","pending.status.online",{hash:{}}),j(d)}function q(a,b){return","}c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression,k=this,l="function";f+='',h=c.name,h?g=h.call(b,{hash:{}}):(g=b.name,g=typeof g===l?g():g),f+=j(g),g=b.isLast,g=c.unless.call(b,g,{hash:{},inverse:k.noop,fn:k.program(9,q,e)});if(g||g===0)f+=g;return f}),b.no_threads=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression;return f+='',h=c.L10n,g=h?h.call(b,"clients.no_clients",{hash:{}}):i.call(b,"L10n","clients.no_clients",{hash:{}}),f+=j(g)+"",f}),b.no_visitors=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression;return f+='',h=c.L10n,g=h?h.call(b,"visitors.no_visitors",{hash:{}}):i.call(b,"L10n","visitors.no_visitors",{hash:{}}),f+=j(g)+"",f}),b.queued_thread=a(function(a,b,c,d,e){function m(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.table.speak",{hash:{}}):i.call(a,"L10n","pending.table.speak",{hash:{}}),j(d)}function n(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.table.view",{hash:{}}):i.call(a,"L10n","pending.table.view",{hash:{}}),j(d)}function o(a,b){var d="",e,f;return f=c.L10n,e=f?f.call(a,"chat.client.spam.prefix",{hash:{}}):i.call(a,"L10n","chat.client.spam.prefix",{hash:{}}),d+=j(e)+" ",d}function p(a,b){var d="",e,f;return d+='",d}function q(a,b){var d="",e,f;return d+='\n
\n ',d}function r(a,b){var d="",e,f;return d+='\n
\n ',d}function s(a,b){var d="",e,f;return d+='\n
\n ',d}function t(a,b){var d="",e,f;return d+='\n
\n ',d}function u(a,b){var d="",e,f;return d+='',f=c.remote,f?e=f.call(a,{hash:{}}):(e=a.remote,e=typeof e===k?e():e),d+=j(e)+"",d}function v(a,b){var d,e;return e=c.remote,e?d=e.call(a,{hash:{}}):(d=a.remote,d=typeof d===k?d():d),j(d)}function w(a,b){var d,e;return d=a.waitingTime,e=c.formatTimeSince,d=e?e.call(a,d,{hash:{}}):i.call(a,"formatTimeSince",d,{hash:{}}),j(d)}function x(a,b){return"-"}function y(a,b){var c;return c=a.ban,c=c==null||c===!1?c:c.reason,c=typeof c===k?c():c,j(c)}function z(a,b){var d,e;return e=c.userAgent,e?d=e.call(a,{hash:{}}):(d=a.userAgent,d=typeof d===k?d():d),j(d)}c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression,k="function",l=this;f+='\n
',g=b.ban,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(5,o,e)});if(g||g===0)f+=g;h=c.userName,h?g=h.call(b,{hash:{}}):(g=b.userName,g=typeof g===k?g():g),f+=j(g)+"
\n ",g=b.firstMessage,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(7,p,e)});if(g||g===0)f+=g;f+='\n\n\n
\n ',g=b.canOpen,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(9,q,e)});if(g||g===0)f+=g;f+="\n ",g=b.canView,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(11,r,e)});if(g||g===0)f+=g;f+="\n ",g=b.tracked,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(13,s,e)});if(g||g===0)f+=g;f+="\n ",g=b.canBan,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(15,t,e)});if(g||g===0)f+=g;f+='\n
\n
\n\n',g=b.userIp,g=c["if"].call(b,g,{hash:{},inverse:l.program(19,v,e),fn:l.program(17,u,e)});if(g||g===0)f+=g;f+='\n',h=c.stateDesc,h?g=h.call(b,{hash:{}}):(g=b.stateDesc,g=typeof g===k?g():g),f+=j(g)+'\n',h=c.agentName,h?g=h.call(b,{hash:{}}):(g=b.agentName,g=typeof g===k?g():g),f+=j(g)+'\n',g=b.totalTime,h=c.formatTimeSince,g=h?h.call(b,g,{hash:{}}):i.call(b,"formatTimeSince",g,{hash:{}}),f+=j(g)+'\n',g=b.chatting,g=c.unless.call(b,g,{hash:{},inverse:l.program(23,x,e),fn:l.program(21,w,e)});if(g||g===0)f+=g;f+='\n',g=b.ban,g=c["if"].call(b,g,{hash:{},inverse:l.program(27,z,e),fn:l.program(25,y,e)});if(g||g===0)f+=g;return f+="",f}),b.status_panel=a(function(a,b,c,d,e){function m(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.away",{hash:{}}):i.call(a,"L10n","pending.status.away",{hash:{}}),j(d)}function n(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.online",{hash:{}}):i.call(a,"L10n","pending.status.online",{hash:{}}),j(d)}function o(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.setonline",{hash:{}}):i.call(a,"L10n","pending.status.setonline",{hash:{}}),j(d)}function p(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.setaway",{hash:{}}):i.call(a,"L10n","pending.status.setaway",{hash:{}}),j(d)}c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression,k="function",l=this;f+='
',h=c.message,h?g=h.call(b,{hash:{}}):(g=b.message,g=typeof g===k?g():g),f+=j(g),g=b.agent,g=g==null||g===!1?g:g.away,g=c["if"].call(b,g,{hash:{},inverse:l.program(3,n,e),fn:l.program(1,m,e)});if(g||g===0)f+=g;f+='
",f}),b.threads_collection=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression;return f+='\n\n\n \n \n \n \n \n \n \n \n\n\n\n\n\n
',h=c.L10n,g=h?h.call(b,"pending.table.head.name",{hash:{}}):i.call(b,"L10n","pending.table.head.name",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.actions",{hash:{}}):i.call(b,"L10n","pending.table.head.actions",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.contactid",{hash:{}}):i.call(b,"L10n","pending.table.head.contactid",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.state",{hash:{}}):i.call(b,"L10n","pending.table.head.state",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.operator",{hash:{}}):i.call(b,"L10n","pending.table.head.operator",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.total",{hash:{}}):i.call(b,"L10n","pending.table.head.total",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.waittime",{hash:{}}):i.call(b,"L10n","pending.table.head.waittime",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.etc",{hash:{}}):i.call(b,"L10n","pending.table.head.etc",{hash:{}}),f+=j(g)+'
',f}),b.visitor=a(function(a,b,c,d,e){function m(a,b){var d="",e,f;return d+='',f=c.userName,f?e=f.call(a,{hash:{}}):(e=a.userName,e=typeof e===k?e():e),d+=j(e)+"",d}function n(a,b){var d,e;return e=c.userName,e?d=e.call(a,{hash:{}}):(d=a.userName,d=typeof d===k?d():d),j(d)}function o(a,b){var d="",e,f;return d+='',f=c.remote,f?e=f.call(a,{hash:{}}):(e=a.remote,e=typeof e===k?e():e),d+=j(e)+"",d}function p(a,b){var d,e;return e=c.remote,e?d=e.call(a,{hash:{}}):(d=a.remote,d=typeof d===k?d():d),j(d)}function q(a,b){var c;return c=a.invitationInfo,c=c==null||c===!1?c:c.agentName,c=typeof c===k?c():c,j(c)}function r(a,b){return"-"}function s(a,b){var d,e;return d=a.invitationInfo,d=d==null||d===!1?d:d.time,e=c.formatTimeSince,d=e?e.call(a,d,{hash:{}}):i.call(a,"formatTimeSince",d,{hash:{}}),j(d)}function t(a,b){return"-"}c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression,k="function",l=this;f+='\n ',g=b.invitationInfo,g=c.unless.call(b,g,{hash:{},inverse:l.program(3,n,e),fn:l.program(1,m,e)});if(g||g===0)f+=g;f+='\n\n\n
\n
\n
\n
\n\n',g=b.userIp,g=c["if"].call(b,g,{hash:{},inverse:l.program(7,p,e),fn:l.program(5,o,e)});if(g||g===0)f+=g;f+='\n',g=b.firstTime,h=c.formatTimeSince,g=h?h.call(b,g,{hash:{}}):i.call(b,"formatTimeSince",g,{hash:{}}),f+=j(g)+'\n',g=b.lastTime,h=c.formatTimeSince,g=h?h.call(b,g,{hash:{}}):i.call(b,"formatTimeSince",g,{hash:{}}),f+=j(g)+'\n',g=b.invitationInfo,g=c["if"].call(b,g,{hash:{},inverse:l.program(11,r,e),fn:l.program(9,q,e)});if(g||g===0)f+=g;f+='\n',g=b.invitationInfo,g=c["if"].call(b,g,{hash:{},inverse:l.program(15,t,e),fn:l.program(13,s,e)});if(g||g===0)f+=g;return f+='\n',h=c.invitations,h?g=h.call(b,{hash:{}}):(g=b.invitations,g=typeof g===k?g():g),f+=j(g)+" / ",h=c.chats,h?g=h.call(b,{hash:{}}):(g=b.chats,g=typeof g===k?g():g),f+=j(g)+'\n',h=c.userAgent,h?g=h.call(b,{hash:{}}):(g=b.userAgent,g=typeof g===k?g():g),f+=j(g)+"",f}),b.visitors_collection=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression;return f+='\n\n\n \n \n \n \n \n \n \n \n \n\n\n\n\n
',h=c.L10n,g=h?h.call(b,"visitors.table.head.name",{hash:{}}):i.call(b,"L10n","visitors.table.head.name",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.actions",{hash:{}}):i.call(b,"L10n","visitors.table.head.actions",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.contactid",{hash:{}}):i.call(b,"L10n","visitors.table.head.contactid",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.firsttimeonsite",{hash:{}}):i.call(b,"L10n","visitors.table.head.firsttimeonsite",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.lasttimeonsite",{hash:{}}):i.call(b,"L10n","visitors.table.head.lasttimeonsite",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.invited.by",{hash:{}}):i.call(b,"L10n","visitors.table.head.invited.by",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.invitationtime",{hash:{}}):i.call(b,"L10n","visitors.table.head.invitationtime",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.invitations",{hash:{}}):i.call(b,"L10n","visitors.table.head.invitations",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.etc",{hash:{}}):i.call(b,"L10n","visitors.table.head.etc",{hash:{}}),f+=j(g)+'
',f})})();/* +(function(){var a=Handlebars.template,b=Handlebars.templates=Handlebars.templates||{};b.agent=a(function(a,b,c,d,e){function m(a,b){return"away"}function n(a,b){return"online"}function o(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.away",{hash:{}}):i.call(a,"L10n","pending.status.away",{hash:{}}),j(d)}function p(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.online",{hash:{}}):i.call(a,"L10n","pending.status.online",{hash:{}}),j(d)}function q(a,b){return","}c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression,k=this,l="function";f+='',h=c.name,h?g=h.call(b,{hash:{}}):(g=b.name,g=typeof g===l?g():g),f+=j(g),g=b.isLast,g=c.unless.call(b,g,{hash:{},inverse:k.noop,fn:k.program(9,q,e)});if(g||g===0)f+=g;return f}),b.no_threads=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression;return f+='',h=c.L10n,g=h?h.call(b,"clients.no_clients",{hash:{}}):i.call(b,"L10n","clients.no_clients",{hash:{}}),f+=j(g)+"",f}),b.no_visitors=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression;return f+='',h=c.L10n,g=h?h.call(b,"visitors.no_visitors",{hash:{}}):i.call(b,"L10n","visitors.no_visitors",{hash:{}}),f+=j(g)+"",f}),b.status_panel=a(function(a,b,c,d,e){function m(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.away",{hash:{}}):i.call(a,"L10n","pending.status.away",{hash:{}}),j(d)}function n(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.online",{hash:{}}):i.call(a,"L10n","pending.status.online",{hash:{}}),j(d)}function o(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.setonline",{hash:{}}):i.call(a,"L10n","pending.status.setonline",{hash:{}}),j(d)}function p(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.setaway",{hash:{}}):i.call(a,"L10n","pending.status.setaway",{hash:{}}),j(d)}c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression,k="function",l=this;f+='
',h=c.message,h?g=h.call(b,{hash:{}}):(g=b.message,g=typeof g===k?g():g),f+=j(g),g=b.agent,g=g==null||g===!1?g:g.away,g=c["if"].call(b,g,{hash:{},inverse:l.program(3,n,e),fn:l.program(1,m,e)});if(g||g===0)f+=g;f+='
",f}),b.threads_collection=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression;return f+='\n\n\n \n \n \n \n \n \n \n \n\n\n\n\n\n
',h=c.L10n,g=h?h.call(b,"pending.table.head.name",{hash:{}}):i.call(b,"L10n","pending.table.head.name",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.actions",{hash:{}}):i.call(b,"L10n","pending.table.head.actions",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.contactid",{hash:{}}):i.call(b,"L10n","pending.table.head.contactid",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.state",{hash:{}}):i.call(b,"L10n","pending.table.head.state",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.operator",{hash:{}}):i.call(b,"L10n","pending.table.head.operator",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.total",{hash:{}}):i.call(b,"L10n","pending.table.head.total",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.waittime",{hash:{}}):i.call(b,"L10n","pending.table.head.waittime",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.etc",{hash:{}}):i.call(b,"L10n","pending.table.head.etc",{hash:{}}),f+=j(g)+'
',f}),b.visitors_collection=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression;return f+='\n\n\n \n \n \n \n \n \n \n \n \n\n\n\n\n
',h=c.L10n,g=h?h.call(b,"visitors.table.head.name",{hash:{}}):i.call(b,"L10n","visitors.table.head.name",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.actions",{hash:{}}):i.call(b,"L10n","visitors.table.head.actions",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.contactid",{hash:{}}):i.call(b,"L10n","visitors.table.head.contactid",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.firsttimeonsite",{hash:{}}):i.call(b,"L10n","visitors.table.head.firsttimeonsite",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.lasttimeonsite",{hash:{}}):i.call(b,"L10n","visitors.table.head.lasttimeonsite",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.invited.by",{hash:{}}):i.call(b,"L10n","visitors.table.head.invited.by",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.invitationtime",{hash:{}}):i.call(b,"L10n","visitors.table.head.invitationtime",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.invitations",{hash:{}}):i.call(b,"L10n","visitors.table.head.invitations",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.etc",{hash:{}}):i.call(b,"L10n","visitors.table.head.etc",{hash:{}}),f+=j(g)+'
',f}),b.visitor=a(function(a,b,c,d,e){function m(a,b){var d="",e,f;return d+='',f=c.userName,f?e=f.call(a,{hash:{}}):(e=a.userName,e=typeof e===k?e():e),d+=j(e)+"",d}function n(a,b){var d,e;return e=c.userName,e?d=e.call(a,{hash:{}}):(d=a.userName,d=typeof d===k?d():d),j(d)}function o(a,b){var d="",e,f;return d+='',f=c.remote,f?e=f.call(a,{hash:{}}):(e=a.remote,e=typeof e===k?e():e),d+=j(e)+"",d}function p(a,b){var d,e;return e=c.remote,e?d=e.call(a,{hash:{}}):(d=a.remote,d=typeof d===k?d():d),j(d)}function q(a,b){var c;return c=a.invitationInfo,c=c==null||c===!1?c:c.agentName,c=typeof c===k?c():c,j(c)}function r(a,b){return"-"}function s(a,b){var c="",d;return c+='',c}function t(a,b){return"-"}c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression,k="function",l=this;f+='\n ',g=b.invitationInfo,g=c.unless.call(b,g,{hash:{},inverse:l.program(3,n,e),fn:l.program(1,m,e)});if(g||g===0)f+=g;f+='\n\n\n
\n
\n
\n
\n\n',g=b.userIp,g=c["if"].call(b,g,{hash:{},inverse:l.program(7,p,e),fn:l.program(5,o,e)});if(g||g===0)f+=g;f+='\n\n\n',g=b.invitationInfo,g=c["if"].call(b,g,{hash:{},inverse:l.program(11,r,e),fn:l.program(9,q,e)});if(g||g===0)f+=g;f+='\n',g=b.invitationInfo,g=c["if"].call(b,g,{hash:{},inverse:l.program(15,t,e),fn:l.program(13,s,e)});if(g||g===0)f+=g;return f+='\n',h=c.invitations,h?g=h.call(b,{hash:{}}):(g=b.invitations,g=typeof g===k?g():g),f+=j(g)+" / ",h=c.chats,h?g=h.call(b,{hash:{}}):(g=b.chats,g=typeof g===k?g():g),f+=j(g)+'\n',h=c.userAgent,h?g=h.call(b,{hash:{}}):(g=b.userAgent,g=typeof g===k?g():g),f+=j(g)+"",f}),b.queued_thread=a(function(a,b,c,d,e){function m(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.table.speak",{hash:{}}):i.call(a,"L10n","pending.table.speak",{hash:{}}),j(d)}function n(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.table.view",{hash:{}}):i.call(a,"L10n","pending.table.view",{hash:{}}),j(d)}function o(a,b){var d="",e,f;return f=c.L10n,e=f?f.call(a,"chat.client.spam.prefix",{hash:{}}):i.call(a,"L10n","chat.client.spam.prefix",{hash:{}}),d+=j(e)+" ",d}function p(a,b){var d="",e,f;return d+='",d}function q(a,b){var d="",e,f;return d+='\n
\n ',d}function r(a,b){var d="",e,f;return d+='\n
\n ',d}function s(a,b){var d="",e,f;return d+='\n
\n ',d}function t(a,b){var d="",e,f;return d+='\n
\n ',d}function u(a,b){var d="",e,f;return d+='',f=c.remote,f?e=f.call(a,{hash:{}}):(e=a.remote,e=typeof e===k?e():e),d+=j(e)+"",d}function v(a,b){var d,e;return e=c.remote,e?d=e.call(a,{hash:{}}):(d=a.remote,d=typeof d===k?d():d),j(d)}function w(a,b){var d="",e,f;return d+='',d}function x(a,b){return"-"}function y(a,b){var c;return c=a.ban,c=c==null||c===!1?c:c.reason,c=typeof c===k?c():c,j(c)}function z(a,b){var d,e;return e=c.userAgent,e?d=e.call(a,{hash:{}}):(d=a.userAgent,d=typeof d===k?d():d),j(d)}c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression,k="function",l=this;f+='\n
',g=b.ban,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(5,o,e)});if(g||g===0)f+=g;h=c.userName,h?g=h.call(b,{hash:{}}):(g=b.userName,g=typeof g===k?g():g),f+=j(g)+"
\n ",g=b.firstMessage,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(7,p,e)});if(g||g===0)f+=g;f+='\n\n\n
\n ',g=b.canOpen,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(9,q,e)});if(g||g===0)f+=g;f+="\n ",g=b.canView,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(11,r,e)});if(g||g===0)f+=g;f+="\n ",g=b.tracked,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(13,s,e)});if(g||g===0)f+=g;f+="\n ",g=b.canBan,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(15,t,e)});if(g||g===0)f+=g;f+='\n
\n
\n\n',g=b.userIp,g=c["if"].call(b,g,{hash:{},inverse:l.program(19,v,e),fn:l.program(17,u,e)});if(g||g===0)f+=g;f+='\n',h=c.stateDesc,h?g=h.call(b,{hash:{}}):(g=b.stateDesc,g=typeof g===k?g():g),f+=j(g)+'\n',h=c.agentName,h?g=h.call(b,{hash:{}}):(g=b.agentName,g=typeof g===k?g():g),f+=j(g)+'\n\n',g=b.chatting,g=c.unless.call(b,g,{hash:{},inverse:l.program(23,x,e),fn:l.program(21,w,e)});if(g||g===0)f+=g;f+='\n',g=b.ban,g=c["if"].call(b,g,{hash:{},inverse:l.program(27,z,e),fn:l.program(25,y,e)});if(g||g===0)f+=g;return f+="",f})})();/* 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.Popup={};a.Popup.open=function(b,a,c){b=window.open(b,a,c);b.focus();b.opener=window}})(Mibew); -/* - 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(e){e.registerHelper("formatTimeSince",function(b){var a=Math.round((new Date).getTime()/1E3)-b;b=a%60;var d=Math.floor(a/60)%60,a=Math.floor(a/3600),c=[];0d?"0"+d:d);c.push(10>b?"0"+b:b);return c.join(":")})})(Handlebars); +(function(a,e){a.Regions={};a.Popup={};a.Popup.open=function(b,a,g){b=window.open(b,a,g);b.focus();b.opener=window};a.Utils.updateTimers=function(a,f){a.find(f).each(function(){var a=e(this).data("timestamp");if(a){var c=Math.round((new Date).getTime()/1E3)-a,a=c%60,b=Math.floor(c/60)%60,c=Math.floor(c/3600),d=[];0b?"0"+b:b);d.push(10>a?"0"+a:a);e(this).html(d.join(":"))}})}})(Mibew,jQuery); /* This file is part of Mibew Messenger project. http://mibew.org @@ -138,19 +131,19 @@ showTrack:function(){var b=this.model.id,c=a.Objects.Models.page;a.Popup.open(c. Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(d,h,j,k){d.Views.ThreadsCollection=h.Marionette.CompositeView.extend({template:j.templates.threads_collection,itemView:d.Views.QueuedThread,itemViewContainer:"#threads-container",emptyView:d.Views.NoThreads,className:"threads-collection",collectionEvents:{sort:"renderCollection","sort:field":"createSortField",add:"threadAdded"},itemViewOptions:function(a){return{tagName:d.Objects.Models.page.get("threadTag"),collection:a.get("controls")}},initialize:function(){window.setInterval(k.bind(this.renderCollection, -this),2E3);this.on("itemview:before:render",this.updateStyles,this)},updateStyles:function(a){var b=this.collection,c=a.model,d=this;if(c.id){var e=this.getQueueCode(c),f=!1,g=!1,b=b.filter(function(a){return d.getQueueCode(a)==e});0 0) { - result.push(hours); - } - result.push(minutes < 10 ? '0' + minutes : minutes); - result.push(seconds < 10 ? '0' + seconds : seconds); - // Build result string - return result.join(':'); - }); -})(Handlebars); \ No newline at end of file diff --git a/src/messenger/webim/js/source/users/init.js b/src/messenger/webim/js/source/users/init.js index 78149e74..ac79ce69 100644 --- a/src/messenger/webim/js/source/users/init.js +++ b/src/messenger/webim/js/source/users/init.js @@ -6,7 +6,7 @@ * License: http://mibew.org/license.php */ -(function(Mibew){ +(function(Mibew, $){ /** * @namespace Holds application region constructors @@ -30,4 +30,34 @@ newWindow.opener = window; } -})(Mibew); \ No newline at end of file + /** + * Update time in timers + * @param {Object} $el jQuery DOM object + * @param {String} selector Selector string + */ + Mibew.Utils.updateTimers = function($el, selector) { + $el.find(selector).each(function(){ + // Get timestamp + var timestamp = $(this).data('timestamp'); + if (! timestamp) { + return; + } + // Get time diff + var diff = Math.round((new Date()).getTime() / 1000) - timestamp; + // Get time parts + var seconds = diff % 60; + var minutes = Math.floor(diff / 60) % 60; + var hours = Math.floor(diff / (60 * 60)); + // Get result parts + var result = []; + if (hours > 0) { + result.push(hours); + } + result.push(minutes < 10 ? '0' + minutes : minutes); + result.push(seconds < 10 ? '0' + seconds : seconds); + // Build result string + $(this).html(result.join(':')); + }); + } + +})(Mibew, jQuery); \ No newline at end of file diff --git a/src/messenger/webim/js/templates/compiled/users_app.tpl.js b/src/messenger/webim/js/templates/compiled/users_app.tpl.js index 7e99baf6..32e98367 100644 --- a/src/messenger/webim/js/templates/compiled/users_app.tpl.js +++ b/src/messenger/webim/js/templates/compiled/users_app.tpl.js @@ -4,4 +4,4 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(){var a=Handlebars.template,b=Handlebars.templates=Handlebars.templates||{};b.agent=a(function(a,b,c,d,e){function m(a,b){return"away"}function n(a,b){return"online"}function o(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.away",{hash:{}}):i.call(a,"L10n","pending.status.away",{hash:{}}),j(d)}function p(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.online",{hash:{}}):i.call(a,"L10n","pending.status.online",{hash:{}}),j(d)}function q(a,b){return","}c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression,k=this,l="function";f+='',h=c.name,h?g=h.call(b,{hash:{}}):(g=b.name,g=typeof g===l?g():g),f+=j(g),g=b.isLast,g=c.unless.call(b,g,{hash:{},inverse:k.noop,fn:k.program(9,q,e)});if(g||g===0)f+=g;return f}),b.no_threads=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression;return f+='',h=c.L10n,g=h?h.call(b,"clients.no_clients",{hash:{}}):i.call(b,"L10n","clients.no_clients",{hash:{}}),f+=j(g)+"",f}),b.no_visitors=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression;return f+='',h=c.L10n,g=h?h.call(b,"visitors.no_visitors",{hash:{}}):i.call(b,"L10n","visitors.no_visitors",{hash:{}}),f+=j(g)+"",f}),b.queued_thread=a(function(a,b,c,d,e){function m(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.table.speak",{hash:{}}):i.call(a,"L10n","pending.table.speak",{hash:{}}),j(d)}function n(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.table.view",{hash:{}}):i.call(a,"L10n","pending.table.view",{hash:{}}),j(d)}function o(a,b){var d="",e,f;return f=c.L10n,e=f?f.call(a,"chat.client.spam.prefix",{hash:{}}):i.call(a,"L10n","chat.client.spam.prefix",{hash:{}}),d+=j(e)+" ",d}function p(a,b){var d="",e,f;return d+='",d}function q(a,b){var d="",e,f;return d+='\n
\n ',d}function r(a,b){var d="",e,f;return d+='\n
\n ',d}function s(a,b){var d="",e,f;return d+='\n
\n ',d}function t(a,b){var d="",e,f;return d+='\n
\n ',d}function u(a,b){var d="",e,f;return d+='',f=c.remote,f?e=f.call(a,{hash:{}}):(e=a.remote,e=typeof e===k?e():e),d+=j(e)+"",d}function v(a,b){var d,e;return e=c.remote,e?d=e.call(a,{hash:{}}):(d=a.remote,d=typeof d===k?d():d),j(d)}function w(a,b){var d,e;return d=a.waitingTime,e=c.formatTimeSince,d=e?e.call(a,d,{hash:{}}):i.call(a,"formatTimeSince",d,{hash:{}}),j(d)}function x(a,b){return"-"}function y(a,b){var c;return c=a.ban,c=c==null||c===!1?c:c.reason,c=typeof c===k?c():c,j(c)}function z(a,b){var d,e;return e=c.userAgent,e?d=e.call(a,{hash:{}}):(d=a.userAgent,d=typeof d===k?d():d),j(d)}c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression,k="function",l=this;f+='\n \n ",g=b.firstMessage,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(7,p,e)});if(g||g===0)f+=g;f+='\n\n\n
\n ',g=b.canOpen,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(9,q,e)});if(g||g===0)f+=g;f+="\n ",g=b.canView,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(11,r,e)});if(g||g===0)f+=g;f+="\n ",g=b.tracked,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(13,s,e)});if(g||g===0)f+=g;f+="\n ",g=b.canBan,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(15,t,e)});if(g||g===0)f+=g;f+='\n
\n
\n\n',g=b.userIp,g=c["if"].call(b,g,{hash:{},inverse:l.program(19,v,e),fn:l.program(17,u,e)});if(g||g===0)f+=g;f+='\n',h=c.stateDesc,h?g=h.call(b,{hash:{}}):(g=b.stateDesc,g=typeof g===k?g():g),f+=j(g)+'\n',h=c.agentName,h?g=h.call(b,{hash:{}}):(g=b.agentName,g=typeof g===k?g():g),f+=j(g)+'\n',g=b.totalTime,h=c.formatTimeSince,g=h?h.call(b,g,{hash:{}}):i.call(b,"formatTimeSince",g,{hash:{}}),f+=j(g)+'\n',g=b.chatting,g=c.unless.call(b,g,{hash:{},inverse:l.program(23,x,e),fn:l.program(21,w,e)});if(g||g===0)f+=g;f+='\n',g=b.ban,g=c["if"].call(b,g,{hash:{},inverse:l.program(27,z,e),fn:l.program(25,y,e)});if(g||g===0)f+=g;return f+="",f}),b.status_panel=a(function(a,b,c,d,e){function m(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.away",{hash:{}}):i.call(a,"L10n","pending.status.away",{hash:{}}),j(d)}function n(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.online",{hash:{}}):i.call(a,"L10n","pending.status.online",{hash:{}}),j(d)}function o(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.setonline",{hash:{}}):i.call(a,"L10n","pending.status.setonline",{hash:{}}),j(d)}function p(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.setaway",{hash:{}}):i.call(a,"L10n","pending.status.setaway",{hash:{}}),j(d)}c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression,k="function",l=this;f+='
',h=c.message,h?g=h.call(b,{hash:{}}):(g=b.message,g=typeof g===k?g():g),f+=j(g),g=b.agent,g=g==null||g===!1?g:g.away,g=c["if"].call(b,g,{hash:{},inverse:l.program(3,n,e),fn:l.program(1,m,e)});if(g||g===0)f+=g;f+='
",f}),b.threads_collection=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression;return f+='\n\n\n \n \n \n \n \n \n \n \n\n\n\n\n\n
',h=c.L10n,g=h?h.call(b,"pending.table.head.name",{hash:{}}):i.call(b,"L10n","pending.table.head.name",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.actions",{hash:{}}):i.call(b,"L10n","pending.table.head.actions",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.contactid",{hash:{}}):i.call(b,"L10n","pending.table.head.contactid",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.state",{hash:{}}):i.call(b,"L10n","pending.table.head.state",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.operator",{hash:{}}):i.call(b,"L10n","pending.table.head.operator",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.total",{hash:{}}):i.call(b,"L10n","pending.table.head.total",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.waittime",{hash:{}}):i.call(b,"L10n","pending.table.head.waittime",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.etc",{hash:{}}):i.call(b,"L10n","pending.table.head.etc",{hash:{}}),f+=j(g)+'
',f}),b.visitor=a(function(a,b,c,d,e){function m(a,b){var d="",e,f;return d+='',f=c.userName,f?e=f.call(a,{hash:{}}):(e=a.userName,e=typeof e===k?e():e),d+=j(e)+"",d}function n(a,b){var d,e;return e=c.userName,e?d=e.call(a,{hash:{}}):(d=a.userName,d=typeof d===k?d():d),j(d)}function o(a,b){var d="",e,f;return d+='',f=c.remote,f?e=f.call(a,{hash:{}}):(e=a.remote,e=typeof e===k?e():e),d+=j(e)+"",d}function p(a,b){var d,e;return e=c.remote,e?d=e.call(a,{hash:{}}):(d=a.remote,d=typeof d===k?d():d),j(d)}function q(a,b){var c;return c=a.invitationInfo,c=c==null||c===!1?c:c.agentName,c=typeof c===k?c():c,j(c)}function r(a,b){return"-"}function s(a,b){var d,e;return d=a.invitationInfo,d=d==null||d===!1?d:d.time,e=c.formatTimeSince,d=e?e.call(a,d,{hash:{}}):i.call(a,"formatTimeSince",d,{hash:{}}),j(d)}function t(a,b){return"-"}c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression,k="function",l=this;f+='\n ',g=b.invitationInfo,g=c.unless.call(b,g,{hash:{},inverse:l.program(3,n,e),fn:l.program(1,m,e)});if(g||g===0)f+=g;f+='\n\n\n
\n
\n
\n
\n\n',g=b.userIp,g=c["if"].call(b,g,{hash:{},inverse:l.program(7,p,e),fn:l.program(5,o,e)});if(g||g===0)f+=g;f+='\n',g=b.firstTime,h=c.formatTimeSince,g=h?h.call(b,g,{hash:{}}):i.call(b,"formatTimeSince",g,{hash:{}}),f+=j(g)+'\n',g=b.lastTime,h=c.formatTimeSince,g=h?h.call(b,g,{hash:{}}):i.call(b,"formatTimeSince",g,{hash:{}}),f+=j(g)+'\n',g=b.invitationInfo,g=c["if"].call(b,g,{hash:{},inverse:l.program(11,r,e),fn:l.program(9,q,e)});if(g||g===0)f+=g;f+='\n',g=b.invitationInfo,g=c["if"].call(b,g,{hash:{},inverse:l.program(15,t,e),fn:l.program(13,s,e)});if(g||g===0)f+=g;return f+='\n',h=c.invitations,h?g=h.call(b,{hash:{}}):(g=b.invitations,g=typeof g===k?g():g),f+=j(g)+" / ",h=c.chats,h?g=h.call(b,{hash:{}}):(g=b.chats,g=typeof g===k?g():g),f+=j(g)+'\n',h=c.userAgent,h?g=h.call(b,{hash:{}}):(g=b.userAgent,g=typeof g===k?g():g),f+=j(g)+"",f}),b.visitors_collection=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression;return f+='\n\n\n \n \n \n \n \n \n \n \n \n\n\n\n\n
',h=c.L10n,g=h?h.call(b,"visitors.table.head.name",{hash:{}}):i.call(b,"L10n","visitors.table.head.name",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.actions",{hash:{}}):i.call(b,"L10n","visitors.table.head.actions",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.contactid",{hash:{}}):i.call(b,"L10n","visitors.table.head.contactid",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.firsttimeonsite",{hash:{}}):i.call(b,"L10n","visitors.table.head.firsttimeonsite",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.lasttimeonsite",{hash:{}}):i.call(b,"L10n","visitors.table.head.lasttimeonsite",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.invited.by",{hash:{}}):i.call(b,"L10n","visitors.table.head.invited.by",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.invitationtime",{hash:{}}):i.call(b,"L10n","visitors.table.head.invitationtime",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.invitations",{hash:{}}):i.call(b,"L10n","visitors.table.head.invitations",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.etc",{hash:{}}):i.call(b,"L10n","visitors.table.head.etc",{hash:{}}),f+=j(g)+'
',f})})(); \ No newline at end of file +(function(){var a=Handlebars.template,b=Handlebars.templates=Handlebars.templates||{};b.agent=a(function(a,b,c,d,e){function m(a,b){return"away"}function n(a,b){return"online"}function o(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.away",{hash:{}}):i.call(a,"L10n","pending.status.away",{hash:{}}),j(d)}function p(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.online",{hash:{}}):i.call(a,"L10n","pending.status.online",{hash:{}}),j(d)}function q(a,b){return","}c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression,k=this,l="function";f+='',h=c.name,h?g=h.call(b,{hash:{}}):(g=b.name,g=typeof g===l?g():g),f+=j(g),g=b.isLast,g=c.unless.call(b,g,{hash:{},inverse:k.noop,fn:k.program(9,q,e)});if(g||g===0)f+=g;return f}),b.no_threads=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression;return f+='',h=c.L10n,g=h?h.call(b,"clients.no_clients",{hash:{}}):i.call(b,"L10n","clients.no_clients",{hash:{}}),f+=j(g)+"",f}),b.no_visitors=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression;return f+='',h=c.L10n,g=h?h.call(b,"visitors.no_visitors",{hash:{}}):i.call(b,"L10n","visitors.no_visitors",{hash:{}}),f+=j(g)+"",f}),b.status_panel=a(function(a,b,c,d,e){function m(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.away",{hash:{}}):i.call(a,"L10n","pending.status.away",{hash:{}}),j(d)}function n(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.online",{hash:{}}):i.call(a,"L10n","pending.status.online",{hash:{}}),j(d)}function o(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.setonline",{hash:{}}):i.call(a,"L10n","pending.status.setonline",{hash:{}}),j(d)}function p(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.status.setaway",{hash:{}}):i.call(a,"L10n","pending.status.setaway",{hash:{}}),j(d)}c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression,k="function",l=this;f+='
',h=c.message,h?g=h.call(b,{hash:{}}):(g=b.message,g=typeof g===k?g():g),f+=j(g),g=b.agent,g=g==null||g===!1?g:g.away,g=c["if"].call(b,g,{hash:{},inverse:l.program(3,n,e),fn:l.program(1,m,e)});if(g||g===0)f+=g;f+='
",f}),b.threads_collection=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression;return f+='\n\n\n \n \n \n \n \n \n \n \n\n\n\n\n\n
',h=c.L10n,g=h?h.call(b,"pending.table.head.name",{hash:{}}):i.call(b,"L10n","pending.table.head.name",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.actions",{hash:{}}):i.call(b,"L10n","pending.table.head.actions",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.contactid",{hash:{}}):i.call(b,"L10n","pending.table.head.contactid",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.state",{hash:{}}):i.call(b,"L10n","pending.table.head.state",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.operator",{hash:{}}):i.call(b,"L10n","pending.table.head.operator",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.total",{hash:{}}):i.call(b,"L10n","pending.table.head.total",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.waittime",{hash:{}}):i.call(b,"L10n","pending.table.head.waittime",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"pending.table.head.etc",{hash:{}}):i.call(b,"L10n","pending.table.head.etc",{hash:{}}),f+=j(g)+'
',f}),b.visitors_collection=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression;return f+='\n\n\n \n \n \n \n \n \n \n \n \n\n\n\n\n
',h=c.L10n,g=h?h.call(b,"visitors.table.head.name",{hash:{}}):i.call(b,"L10n","visitors.table.head.name",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.actions",{hash:{}}):i.call(b,"L10n","visitors.table.head.actions",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.contactid",{hash:{}}):i.call(b,"L10n","visitors.table.head.contactid",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.firsttimeonsite",{hash:{}}):i.call(b,"L10n","visitors.table.head.firsttimeonsite",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.lasttimeonsite",{hash:{}}):i.call(b,"L10n","visitors.table.head.lasttimeonsite",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.invited.by",{hash:{}}):i.call(b,"L10n","visitors.table.head.invited.by",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.invitationtime",{hash:{}}):i.call(b,"L10n","visitors.table.head.invitationtime",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.invitations",{hash:{}}):i.call(b,"L10n","visitors.table.head.invitations",{hash:{}}),f+=j(g)+"",h=c.L10n,g=h?h.call(b,"visitors.table.head.etc",{hash:{}}):i.call(b,"L10n","visitors.table.head.etc",{hash:{}}),f+=j(g)+'
',f}),b.visitor=a(function(a,b,c,d,e){function m(a,b){var d="",e,f;return d+='',f=c.userName,f?e=f.call(a,{hash:{}}):(e=a.userName,e=typeof e===k?e():e),d+=j(e)+"",d}function n(a,b){var d,e;return e=c.userName,e?d=e.call(a,{hash:{}}):(d=a.userName,d=typeof d===k?d():d),j(d)}function o(a,b){var d="",e,f;return d+='',f=c.remote,f?e=f.call(a,{hash:{}}):(e=a.remote,e=typeof e===k?e():e),d+=j(e)+"",d}function p(a,b){var d,e;return e=c.remote,e?d=e.call(a,{hash:{}}):(d=a.remote,d=typeof d===k?d():d),j(d)}function q(a,b){var c;return c=a.invitationInfo,c=c==null||c===!1?c:c.agentName,c=typeof c===k?c():c,j(c)}function r(a,b){return"-"}function s(a,b){var c="",d;return c+='',c}function t(a,b){return"-"}c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression,k="function",l=this;f+='\n ',g=b.invitationInfo,g=c.unless.call(b,g,{hash:{},inverse:l.program(3,n,e),fn:l.program(1,m,e)});if(g||g===0)f+=g;f+='\n\n\n
\n
\n
\n
\n\n',g=b.userIp,g=c["if"].call(b,g,{hash:{},inverse:l.program(7,p,e),fn:l.program(5,o,e)});if(g||g===0)f+=g;f+='\n\n\n',g=b.invitationInfo,g=c["if"].call(b,g,{hash:{},inverse:l.program(11,r,e),fn:l.program(9,q,e)});if(g||g===0)f+=g;f+='\n',g=b.invitationInfo,g=c["if"].call(b,g,{hash:{},inverse:l.program(15,t,e),fn:l.program(13,s,e)});if(g||g===0)f+=g;return f+='\n',h=c.invitations,h?g=h.call(b,{hash:{}}):(g=b.invitations,g=typeof g===k?g():g),f+=j(g)+" / ",h=c.chats,h?g=h.call(b,{hash:{}}):(g=b.chats,g=typeof g===k?g():g),f+=j(g)+'\n',h=c.userAgent,h?g=h.call(b,{hash:{}}):(g=b.userAgent,g=typeof g===k?g():g),f+=j(g)+"",f}),b.queued_thread=a(function(a,b,c,d,e){function m(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.table.speak",{hash:{}}):i.call(a,"L10n","pending.table.speak",{hash:{}}),j(d)}function n(a,b){var d,e;return e=c.L10n,d=e?e.call(a,"pending.table.view",{hash:{}}):i.call(a,"L10n","pending.table.view",{hash:{}}),j(d)}function o(a,b){var d="",e,f;return f=c.L10n,e=f?f.call(a,"chat.client.spam.prefix",{hash:{}}):i.call(a,"L10n","chat.client.spam.prefix",{hash:{}}),d+=j(e)+" ",d}function p(a,b){var d="",e,f;return d+='",d}function q(a,b){var d="",e,f;return d+='\n
\n ',d}function r(a,b){var d="",e,f;return d+='\n
\n ',d}function s(a,b){var d="",e,f;return d+='\n
\n ',d}function t(a,b){var d="",e,f;return d+='\n
\n ',d}function u(a,b){var d="",e,f;return d+='',f=c.remote,f?e=f.call(a,{hash:{}}):(e=a.remote,e=typeof e===k?e():e),d+=j(e)+"",d}function v(a,b){var d,e;return e=c.remote,e?d=e.call(a,{hash:{}}):(d=a.remote,d=typeof d===k?d():d),j(d)}function w(a,b){var d="",e,f;return d+='',d}function x(a,b){return"-"}function y(a,b){var c;return c=a.ban,c=c==null||c===!1?c:c.reason,c=typeof c===k?c():c,j(c)}function z(a,b){var d,e;return e=c.userAgent,e?d=e.call(a,{hash:{}}):(d=a.userAgent,d=typeof d===k?d():d),j(d)}c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression,k="function",l=this;f+='\n \n ",g=b.firstMessage,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(7,p,e)});if(g||g===0)f+=g;f+='\n\n\n
\n ',g=b.canOpen,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(9,q,e)});if(g||g===0)f+=g;f+="\n ",g=b.canView,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(11,r,e)});if(g||g===0)f+=g;f+="\n ",g=b.tracked,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(13,s,e)});if(g||g===0)f+=g;f+="\n ",g=b.canBan,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(15,t,e)});if(g||g===0)f+=g;f+='\n
\n
\n\n',g=b.userIp,g=c["if"].call(b,g,{hash:{},inverse:l.program(19,v,e),fn:l.program(17,u,e)});if(g||g===0)f+=g;f+='\n',h=c.stateDesc,h?g=h.call(b,{hash:{}}):(g=b.stateDesc,g=typeof g===k?g():g),f+=j(g)+'\n',h=c.agentName,h?g=h.call(b,{hash:{}}):(g=b.agentName,g=typeof g===k?g():g),f+=j(g)+'\n\n',g=b.chatting,g=c.unless.call(b,g,{hash:{},inverse:l.program(23,x,e),fn:l.program(21,w,e)});if(g||g===0)f+=g;f+='\n',g=b.ban,g=c["if"].call(b,g,{hash:{},inverse:l.program(27,z,e),fn:l.program(25,y,e)});if(g||g===0)f+=g;return f+="",f})})(); \ No newline at end of file diff --git a/src/messenger/webim/js/templates/source/users/queued_thread.handlebars b/src/messenger/webim/js/templates/source/users/queued_thread.handlebars index d3e82c1b..339994e4 100644 --- a/src/messenger/webim/js/templates/source/users/queued_thread.handlebars +++ b/src/messenger/webim/js/templates/source/users/queued_thread.handlebars @@ -22,6 +22,6 @@ {{#if userIp}}{{remote}}{{else}}{{remote}}{{/if}} {{stateDesc}} {{agentName}} -{{formatTimeSince totalTime}} -{{#unless chatting}}{{formatTimeSince waitingTime}}{{else}}-{{/unless}} + +{{#unless chatting}}{{else}}-{{/unless}} {{#if ban}}{{ban.reason}}{{else}}{{userAgent}}{{/if}} \ No newline at end of file diff --git a/src/messenger/webim/js/templates/source/users/visitor.handlebars b/src/messenger/webim/js/templates/source/users/visitor.handlebars index 0f831313..7d5b0132 100644 --- a/src/messenger/webim/js/templates/source/users/visitor.handlebars +++ b/src/messenger/webim/js/templates/source/users/visitor.handlebars @@ -8,9 +8,9 @@
{{#if userIp}}{{remote}}{{else}}{{remote}}{{/if}} -{{formatTimeSince firstTime}} -{{formatTimeSince lastTime}} + + {{#if invitationInfo}}{{invitationInfo.agentName}}{{else}}-{{/if}} -{{#if invitationInfo}}{{formatTimeSince invitationInfo.time}}{{else}}-{{/if}} +{{#if invitationInfo}}{{else}}-{{/if}} {{invitations}} / {{chats}} {{userAgent}} \ No newline at end of file