From 0f86f558ec8d492b5089c94030b0367581ff7325 Mon Sep 17 00:00:00 2001 From: "Fedor A. Fetisov" Date: Fri, 6 Sep 2013 15:33:36 +0400 Subject: [PATCH] Fix HTML attributes markup --- src/messenger/webim/install/index.php | 4 +- src/messenger/webim/js/165/chat.js | 2 +- src/messenger/webim/js/source/chat.js | 48 +++++++++---------- src/messenger/webim/libs/chat.php | 10 ++-- src/messenger/webim/libs/common.php | 2 +- src/messenger/webim/libs/demothread.php | 6 +-- src/messenger/webim/libs/pagination.php | 2 +- src/messenger/webim/locales/ar/properties | 2 +- src/messenger/webim/locales/be/properties | 2 +- src/messenger/webim/locales/bg/properties | 2 +- src/messenger/webim/locales/ca/properties | 2 +- src/messenger/webim/locales/cs/properties | 2 +- src/messenger/webim/locales/da/properties | 2 +- src/messenger/webim/locales/el/properties | 2 +- src/messenger/webim/locales/en/properties | 2 +- src/messenger/webim/locales/he/properties | 2 +- src/messenger/webim/locales/hr/properties | 2 +- src/messenger/webim/locales/hu/properties | 2 +- src/messenger/webim/locales/id/properties | 2 +- src/messenger/webim/locales/it/properties | 2 +- src/messenger/webim/locales/ka/properties | 2 +- src/messenger/webim/locales/nl/properties | 2 +- src/messenger/webim/locales/pl/properties | 2 +- src/messenger/webim/locales/pt-br/properties | 2 +- src/messenger/webim/locales/pt-pt/properties | 2 +- src/messenger/webim/locales/ro/properties | 2 +- src/messenger/webim/locales/ru/properties | 2 +- src/messenger/webim/locales/sp/properties | 2 +- src/messenger/webim/locales/sv/properties | 2 +- src/messenger/webim/locales/th/properties | 2 +- src/messenger/webim/locales/tr/properties | 2 +- src/messenger/webim/locales/ua/properties | 2 +- .../webim/styles/default/templates/chat.tpl | 24 +++++----- .../styles/default/templates/chatsimple.tpl | 46 +++++++++--------- .../webim/styles/default/templates/error.tpl | 2 +- .../styles/default/templates/leavemessage.tpl | 4 +- .../default/templates/leavemessagesent.tpl | 2 +- .../webim/styles/default/templates/mail.tpl | 10 ++-- .../styles/default/templates/mailsent.tpl | 2 +- .../webim/styles/default/templates/nochat.tpl | 2 +- .../styles/default/templates/redirect.tpl | 2 +- .../styles/default/templates/redirected.tpl | 2 +- .../webim/styles/default/templates/survey.tpl | 4 +- .../webim/styles/original/templates/chat.tpl | 26 +++++----- .../styles/original/templates/chatsimple.tpl | 46 +++++++++--------- .../webim/styles/original/templates/error.tpl | 14 +++--- .../original/templates/leavemessage.tpl | 8 ++-- .../original/templates/leavemessagesent.tpl | 14 +++--- .../webim/styles/original/templates/mail.tpl | 8 ++-- .../styles/original/templates/mailsent.tpl | 14 +++--- .../styles/original/templates/nochat.tpl | 14 +++--- .../styles/original/templates/redirect.tpl | 16 +++---- .../styles/original/templates/redirected.tpl | 14 +++--- .../styles/original/templates/survey.tpl | 8 ++-- .../simplicity/templates/chatsimple.tpl | 6 +-- src/messenger/webim/view/agents.php | 4 +- src/messenger/webim/view/confirm.php | 8 ++-- src/messenger/webim/view/inc_errors.php | 2 +- src/messenger/webim/view/inc_menu.php | 34 ++++++------- 59 files changed, 230 insertions(+), 230 deletions(-) diff --git a/src/messenger/webim/install/index.php b/src/messenger/webim/install/index.php index 7969e538..de6e6c4c 100644 --- a/src/messenger/webim/install/index.php +++ b/src/messenger/webim/install/index.php @@ -234,8 +234,8 @@ function check_sound() $page['soundcheck'] = true; $page['done'][] = getlocal2("install.5.text", array( - "" . getlocal("install.5.newvisitor") . "", - "" . getlocal("install.5.newmessage") . "" + "" . getlocal("install.5.newvisitor") . "", + "" . getlocal("install.5.newmessage") . "" )); } diff --git a/src/messenger/webim/js/165/chat.js b/src/messenger/webim/js/165/chat.js index 55b99b36..8980b718 100644 --- a/src/messenger/webim/js/165/chat.js +++ b/src/messenger/webim/js/165/chat.js @@ -5,7 +5,7 @@ Copyright (c) 2005-2013 Mibew Messenger Community License: http://mibew.org/license.php */ -var FrameUtils={getDocument:function(a){return a.contentDocument?a.contentDocument:a.contentWindow?a.contentWindow.document:a.document?a.document:null},initFrame:function(a){var b=this.getDocument(a);b.open();b.write("");b.write('');b.write("");b.write("
"); +var FrameUtils={getDocument:function(a){return a.contentDocument?a.contentDocument:a.contentWindow?a.contentWindow.document:a.document?a.document:null},initFrame:function(a){var b=this.getDocument(a);b.open();b.write("");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)}};Ajax.ChatThreadUpdater=Class.create(); Class.inherit(Ajax.ChatThreadUpdater,Ajax.Base,{initialize:function(a){this.setOptions(a);this._options.onComplete=this.requestComplete.bind(this);this._options.onException=this.handleException.bind(this);this._options.onTimeout=this.handleTimeout.bind(this);this._options.timeout=5E3;this.updater={};this.frequency=this._options.frequency||2;this.lastupdate=0;this.focused=this.skipNextsound=this.cansend=!0;this.ownThread=null!=this._options.message;FrameUtils.initFrame(this._options.container);this._options.message&& diff --git a/src/messenger/webim/js/source/chat.js b/src/messenger/webim/js/source/chat.js index 64d4b643..2eef7a7e 100644 --- a/src/messenger/webim/js/source/chat.js +++ b/src/messenger/webim/js/source/chat.js @@ -24,8 +24,8 @@ var FrameUtils = { doc.open(); doc.write(""); doc.write(""); - doc.write(""); - doc.write("
"); + doc.write(""); + doc.write("
"); doc.write(""); doc.close(); frm.onload = function() { @@ -85,7 +85,7 @@ Class.inherit( Ajax.ChatThreadUpdater, Ajax.Base, { }, handleException: function(_request, ex) { - this.setStatus("offline, reconnecting"); + this.setStatus("offline, reconnecting"); this.stopUpdate(); this.timer = setTimeout(this.update.bind(this), 1000); }, @@ -99,11 +99,11 @@ Class.inherit( Ajax.ChatThreadUpdater, Ajax.Base, { updateOptions: function(act) { this._options.parameters = 'act='+act+'&thread=' + (this._options.threadid || 0) + '&token=' + (this._options.token || 0)+ - '&lastid=' + (this._options.lastid || 0); + '&lastid=' + (this._options.lastid || 0); if( this._options.user ) - this._options.parameters += "&user=true"; + this._options.parameters += "&user=true"; if( act == 'refresh' && this._options.message && this._options.message.value != '' ) - this._options.parameters += "&typed=1"; + this._options.parameters += "&typed=1"; }, enableInput: function(val) { @@ -113,7 +113,7 @@ Class.inherit( Ajax.ChatThreadUpdater, Ajax.Base, { stopUpdate: function() { this.enableInput(true); - if( this.updater._options ) + if( this.updater._options ) this.updater._options.onComplete = undefined; clearTimeout(this.timer); }, @@ -126,13 +126,13 @@ Class.inherit( Ajax.ChatThreadUpdater, Ajax.Base, { requestComplete: function(_response) { try { this.enableInput(true); - this.cansend = true; - var xmlRoot = Ajax.getXml(_response); + this.cansend = true; + var xmlRoot = Ajax.getXml(_response); if( xmlRoot && xmlRoot.tagName == 'thread' ) { this.updateContent( xmlRoot ); - } else { - this.handleError(_response, xmlRoot, 'refresh messages failed'); - } + } else { + this.handleError(_response, xmlRoot, 'refresh messages failed'); + } } catch (e) { } this.skipNextsound = false; @@ -150,21 +150,21 @@ Class.inherit( Ajax.ChatThreadUpdater, Ajax.Base, { var postOptions = {}.extend(this._options); postOptions.parameters += "&message=" + encodeURIComponent(msg); postOptions.onComplete = (function(presponse) { - this.requestComplete( presponse ); - if( this._options.message ) { - this._options.message.value = ''; - this._options.message.focus(); - } + this.requestComplete( presponse ); + if( this._options.message ) { + this._options.message.value = ''; + this._options.message.focus(); + } }).bind(this); if( myRealAgent != 'opera' ) - this.enableInput(false); + this.enableInput(false); this.updater = new Ajax.Request(this._options.servl, postOptions); }, changeName: function(newname) { this.skipNextsound = true; new Ajax.Request(this._options.servl, {parameters:'act=rename&thread=' + (this._options.threadid || 0) + - '&token=' + (this._options.token || 0) + '&name=' + encodeURIComponent(newname)}); + '&token=' + (this._options.token || 0) + '&name=' + encodeURIComponent(newname)}); }, onThreadClosed: function(_response) { @@ -179,7 +179,7 @@ Class.inherit( Ajax.ChatThreadUpdater, Ajax.Base, { closeThread: function() { var _params = 'act=close&thread=' + (this._options.threadid || 0) + '&token=' + (this._options.token || 0); if( this._options.user ) - _params += "&user=true"; + _params += "&user=true"; new Ajax.Request(this._options.servl, {parameters:_params, onComplete: this.onThreadClosed.bind(this)}); }, @@ -189,9 +189,9 @@ Class.inherit( Ajax.ChatThreadUpdater, Ajax.Base, { }, showTyping: function(istyping) { - if( $("typingdiv") ) { + if( $("typingdiv") ) { $("typingdiv").style.display=istyping ? 'inline' : 'none'; - } + } }, setupAvatar: function(avatar) { @@ -207,7 +207,7 @@ Class.inherit( Ajax.ChatThreadUpdater, Ajax.Base, { updateContent: function(xmlRoot) { var haveMessage = false; - var result_div = this._options.container; + var result_div = this._options.container; var _lastid = NodeUtils.getAttrValue(xmlRoot, "lastid"); if( _lastid ) { this._options.lastid = _lastid; @@ -265,7 +265,7 @@ Class.inherit( Ajax.ChatThreadUpdater, Ajax.Base, { isSendkey: function(ctrlpressed, key) { return ((key==13 && (ctrlpressed || this._options.ignorectrl)) || (key==10)); }, - + handleKeyDown: function(k) { if( k ){ ctrl=k.ctrlKey;k=k.which; } else { k=event.keyCode;ctrl=event.ctrlKey; } if( this._options.message && this.isSendkey(ctrl, k) ) { diff --git a/src/messenger/webim/libs/chat.php b/src/messenger/webim/libs/chat.php index 039885b1..969dc318 100644 --- a/src/messenger/webim/libs/chat.php +++ b/src/messenger/webim/libs/chat.php @@ -95,8 +95,8 @@ function message_to_html($msg) $message = "" . date("H:i:s", $msg['created']) . " "; $kind = $kind_to_string{$msg['ikind']}; if ($msg['tname']) - $message .= "" . htmlspecialchars($msg['tname']) . ": "; - $message .= "" . prepare_html_message($msg['tmessage']) . "
"; + $message .= "" . htmlspecialchars($msg['tname']) . ": "; + $message .= "" . prepare_html_message($msg['tmessage']) . "
"; return $message; } @@ -186,15 +186,15 @@ function print_thread_messages($thread, $token, $lastid, $isuser, $format, $agen "\n" . "chat\n" . "\n" . - "" . - "
"); + "" . + "
"); foreach ($output as $msg) { print $msg; } print( - "
" . + "
" . ""); } } diff --git a/src/messenger/webim/libs/common.php b/src/messenger/webim/libs/common.php index b5396519..a325f694 100644 --- a/src/messenger/webim/libs/common.php +++ b/src/messenger/webim/libs/common.php @@ -715,7 +715,7 @@ function print_csrf_token_input() { setcsrftoken(); - echo "\n"; + echo "\n"; } /* print csrf token in url format */ diff --git a/src/messenger/webim/libs/demothread.php b/src/messenger/webim/libs/demothread.php index 1b447a42..4f093447 100644 --- a/src/messenger/webim/libs/demothread.php +++ b/src/messenger/webim/libs/demothread.php @@ -46,8 +46,8 @@ function demo_process_thread($act, $outformat, $lastid, $isuser, $canpost, $isty "\n" . "chat\n" . "\n" . - "" . - "
"); + "" . + "
"); } if ($lastid == 1) { @@ -81,7 +81,7 @@ function demo_process_thread($act, $outformat, $lastid, $isuser, $canpost, $isty print(""); } else { print( - "
" . + "
" . ""); } } diff --git a/src/messenger/webim/libs/pagination.php b/src/messenger/webim/libs/pagination.php index 68ed4b09..46ef2b59 100644 --- a/src/messenger/webim/libs/pagination.php +++ b/src/messenger/webim/libs/pagination.php @@ -105,7 +105,7 @@ function generate_pagination($pagination, $bottom = true) } else { $result .= "
"; } - $result .= "