mirror of
				https://github.com/Mibew/java.git
				synced 2025-10-31 02:26:00 +03:00 
			
		
		
		
	typing notifications in chat window
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@70 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
		
							parent
							
								
									4493a47848
								
							
						
					
					
						commit
						43c74fd0d4
					
				| @ -149,6 +149,12 @@ Class.inherit( Ajax.ChatThreadUpdater, Ajax.Base, { | ||||
| 	FrameUtils.insertIntoFrame(_target, destHtml ); | ||||
|   }, | ||||
| 
 | ||||
|   showTyping: function(istyping) { | ||||
|   	if( $("typingdiv") ) { | ||||
| 		$("typingdiv").style.display=istyping ? 'inline' : 'none'; | ||||
|   	}	 | ||||
|   }, | ||||
| 
 | ||||
|   setupAvatar: function(avatar) { | ||||
| 	var imageLink = NodeUtils.getNodeText(avatar); | ||||
| 	if( this._options.avatar && this._options.user ) { | ||||
| @ -164,8 +170,14 @@ Class.inherit( Ajax.ChatThreadUpdater, Ajax.Base, { | ||||
| 
 | ||||
|    	var result_div = this._options.container; | ||||
| 	var _lastid = NodeUtils.getAttrValue(xmlRoot, "lastid"); | ||||
| 	if( _lastid ) | ||||
| 	if( _lastid ) { | ||||
| 		this._options.lastid = _lastid; | ||||
| 	} | ||||
| 		 | ||||
| 	var typing = NodeUtils.getAttrValue(xmlRoot, "typing"); | ||||
| 	if( typing ) { | ||||
| 		this.showTyping(typing == '1'); | ||||
| 	} | ||||
| 
 | ||||
| 	for( var i = 0; i < xmlRoot.childNodes.length; i++ ) { | ||||
| 		var node = xmlRoot.childNodes[i]; | ||||
|  | ||||
| @ -14,7 +14,15 @@ form{ | ||||
| 	margin-bottom : 0px; | ||||
| 	margin-top : 0px; | ||||
| } | ||||
| 
 | ||||
| div#typingdiv { | ||||
| 	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; | ||||
| @ -118,7 +126,7 @@ textarea.message{ | ||||
| 	width : 100%; | ||||
| 	height : 100%; | ||||
| 	border : 0px solid Blue; | ||||
| 	overflow : hidden; | ||||
| 	overflow : auto; | ||||
| 	margin-left : 3px; | ||||
| 	margin-top : 3px; | ||||
| 	margin-bottom : 3px; | ||||
| @ -127,7 +135,7 @@ textarea.message{ | ||||
| 
 | ||||
| .username{ | ||||
| 	font-family : Arial, Helvetica, sans-serif; | ||||
| 	font-size : 11px; | ||||
| 	font-size : 12px; | ||||
| 	color : #383838; | ||||
| 	padding-left : 3px; | ||||
| } | ||||
|  | ||||
| @ -1 +1 @@ | ||||
| var myAgent="";var dj=0;var myRealAgent="";function ej(){var fj=["\u006fp\u0065\162a","m\u0073i\u0065","s\u0061\146\141r\u0069","fi\u0072\145f\157\u0078","\156\145\u0074\163\143\u0061pe","moz\151\u006cla"];var wi=navigator.userAgent.toLowerCase();for(var i=0;i<fj.length;i++){var gj=fj[i];if(wi.indexOf(gj)!=-1){myAgent=gj;if(!window.RegExp)break;var aj=new RegExp(gj+"\133\040\/\u005d\077\050[0\u002d9]+\050\.[0-\u0039\u005d+\051?\051");if(aj.exec(wi)!=null){dj=parseFloat(RegExp.$1);} break;} } myRealAgent=myAgent;if(navigator.product=="G\u0065\143\153\157")myAgent="m\u006f\u007a";} ej();function getEl(name){return document.getElementById(name);}  | ||||
| var myAgent="";var gj=0;var myRealAgent="";function aj(){var bj=["\u006fp\u0065ra","\155\163\151\145","\u0073\u0061f\u0061\u0072\151","f\u0069r\u0065\u0066\u006f\170","\156\u0065tsc\u0061\u0070\u0065","\u006do\172\151\154\u006ca"];var zi=navigator.userAgent.toLowerCase();for(var i=0;i<bj.length;i++){var cj=bj[i];if(zi.indexOf(cj)!=-1){myAgent=cj;if(!window.RegExp)break;var vj=new RegExp(cj+"[ \/\135?\u0028\1330\055\u0039]+(\.\u005b0\u002d9\u005d+)\077\u0029");if(vj.exec(zi)!=null){gj=parseFloat(RegExp.$1);} break;} } myRealAgent=myAgent;if(navigator.product=="Ge\u0063\153o")myAgent="\155oz";} aj();function getEl(name){return document.getElementById(name);}  | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -182,3 +182,4 @@ page_agent.create_new=Here you can create new operator | ||||
| page_agents.agent_commonname=International name | ||||
| page_analysis.full.text.search=User name or message text search: | ||||
| page_search.intro=Search for chat history of a specified user or a specified phrase in a message. | ||||
| typing.remote=Remote user is typing... | ||||
|  | ||||
| @ -182,3 +182,4 @@ page_agent.create_new= | ||||
| page_agents.agent_commonname=Интернациональное имя | ||||
| page_analysis.full.text.search=Поиск по имени посетителя или по тексту сообщения: | ||||
| page_search.intro=На данной странице можно осуществить поиск диалогов по имени пользователя или фразе, встречающейся в сообщении. | ||||
| typing.remote=Âàø ñîáåñåäíèê íàáèðàåò òåêñò... | ||||
|  | ||||
| @ -134,6 +134,16 @@ var threadParams = { servl:"<?php echo $webimroot ?>/thread.php",wroot:"<?php ec | ||||
| 
 | ||||
| 			</td> | ||||
| 			</tr> | ||||
| 
 | ||||
| 			<tr> | ||||
| 		    <td height="15" align="right"> | ||||
| 				<div id="typingdiv" style="display:none;"> | ||||
| 					<?php echo getlocal("typing.remote") ?>
 | ||||
| 				</div> | ||||
| 
 | ||||
| 			</td> | ||||
| 			</tr> | ||||
| 
 | ||||
| 			</table> | ||||
| 		</td> | ||||
| 		</tr> | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user