You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2015/07/20 12:35:25 UTC

svn commit: r1691912 - in /openmeetings/branches/3.0.x/WebContent/src: base/hibernate/ modules/conference/ modules/conference/interviewuserlist/ modules/conference/participants/ modules/conference/resources/ modules/conference/restricted/ modules/confe...

Author: solomax
Date: Mon Jul 20 10:35:24 2015
New Revision: 1691912

URL: http://svn.apache.org/r1691912
Log:
[OPENMEETINGS-1101] typing activity indicator is added

Added:
    openmeetings/branches/3.0.x/WebContent/src/modules/conference/resources/base0.png   (with props)
    openmeetings/branches/3.0.x/WebContent/src/modules/conference/resources/base1.png   (with props)
    openmeetings/branches/3.0.x/WebContent/src/modules/conference/resources/base2.png   (with props)
    openmeetings/branches/3.0.x/WebContent/src/modules/conference/resources/base3.png   (with props)
    openmeetings/branches/3.0.x/WebContent/src/modules/conference/typing.lzx
Modified:
    openmeetings/branches/3.0.x/WebContent/src/base/hibernate/hibRtmpConnection.lzx
    openmeetings/branches/3.0.x/WebContent/src/modules/conference/interviewuserlist/interviewUserListItem.lzx
    openmeetings/branches/3.0.x/WebContent/src/modules/conference/library.lzx
    openmeetings/branches/3.0.x/WebContent/src/modules/conference/participants/participantListItem.lzx
    openmeetings/branches/3.0.x/WebContent/src/modules/conference/restricted/restrictedUserListItem.lzx
    openmeetings/branches/3.0.x/WebContent/src/modules/conference/whiteboard/base/baseDraw.lzx
    openmeetings/branches/3.0.x/WebContent/src/modules/conference/whiteboard/base/baseDrawLetter.lzx

Modified: openmeetings/branches/3.0.x/WebContent/src/base/hibernate/hibRtmpConnection.lzx
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/WebContent/src/base/hibernate/hibRtmpConnection.lzx?rev=1691912&r1=1691911&r2=1691912&view=diff
==============================================================================
--- openmeetings/branches/3.0.x/WebContent/src/base/hibernate/hibRtmpConnection.lzx (original)
+++ openmeetings/branches/3.0.x/WebContent/src/base/hibernate/hibRtmpConnection.lzx Mon Jul 20 10:35:24 2015
@@ -1409,6 +1409,9 @@
                         //canvas.currentModApply
                         //if ($debug) Debug.write("audioActivity Client ",value[1],value[2]);
                         canvas._videocontainer.setSpeakingByPos(value[2],value[1]);
+                    } else if (value[0]=='typingActivity'){
+                        if ($debug) Debug.write("!!!typingActivity ::", value[1], canvas._videocontainer._participants.getUserListItemByPublicSID(value[2]));
+                        canvas._videocontainer._participants.getUserListItemByPublicSID(value[2]).userTyping(value[1]);
                     } else if (value[0]=='chat'){
                         // Not Used
                         //Debug.warn("Not Used");

Modified: openmeetings/branches/3.0.x/WebContent/src/modules/conference/interviewuserlist/interviewUserListItem.lzx
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/WebContent/src/modules/conference/interviewuserlist/interviewUserListItem.lzx?rev=1691912&r1=1691911&r2=1691912&view=diff
==============================================================================
--- openmeetings/branches/3.0.x/WebContent/src/modules/conference/interviewuserlist/interviewUserListItem.lzx (original)
+++ openmeetings/branches/3.0.x/WebContent/src/modules/conference/interviewuserlist/interviewUserListItem.lzx Mon Jul 20 10:35:24 2015
@@ -114,6 +114,8 @@
         </handler>
     </image>
     
+	<method name="userTyping" args="v">
+	</method>
     <view name="userStatus" align="right" frame="1" 
     	  resource="userstatus_multiframe_rsc" />
     

Modified: openmeetings/branches/3.0.x/WebContent/src/modules/conference/library.lzx
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/WebContent/src/modules/conference/library.lzx?rev=1691912&r1=1691911&r2=1691912&view=diff
==============================================================================
--- openmeetings/branches/3.0.x/WebContent/src/modules/conference/library.lzx (original)
+++ openmeetings/branches/3.0.x/WebContent/src/modules/conference/library.lzx Mon Jul 20 10:35:24 2015
@@ -22,6 +22,14 @@
 	
 	<!-- FamFam Icon Set -->
     <resource name="resyncuser_rsc" src="resources/arrow_refresh_small.png" />
+
+	<!-- Derivative from FamFam Icon Set, author solomax -->
+	<resource name="typing_rsc">
+		<frame src="resources/base0.png" />
+		<frame src="resources/base1.png" />
+		<frame src="resources/base2.png" />
+		<frame src="resources/base3.png" />
+	</resource>
     
     <!-- APL author sebawagner -->
     <resource name="speaking" src="resources/speaking.png" />
@@ -32,6 +40,7 @@
     <include href="commonVideoViewContent.lzx"/>
     <include href="commonVideoComponentAdapter.lzx"/>
     <include href="screenSharingAdapter.lzx" />
+    <include href="typing.lzx" />
 
 	<include href="whiteboard/" /> 
  	

Modified: openmeetings/branches/3.0.x/WebContent/src/modules/conference/participants/participantListItem.lzx
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/WebContent/src/modules/conference/participants/participantListItem.lzx?rev=1691912&r1=1691911&r2=1691912&view=diff
==============================================================================
--- openmeetings/branches/3.0.x/WebContent/src/modules/conference/participants/participantListItem.lzx (original)
+++ openmeetings/branches/3.0.x/WebContent/src/modules/conference/participants/participantListItem.lzx Mon Jul 20 10:35:24 2015
@@ -368,6 +368,11 @@
     <labelText name="_firstName" fontsize="10" x="40" text="${ parent.firstname == null ? '' : parent.firstname }" />
     <labelText name="_lastName" fontsize="10" x="40" y="20" text="${ parent.lastname == null ? '' : parent.lastname }" />
     
+	<typingIcon name="_user_typing" x="132" y="2" width="30" height="16" visible="false"/>
+	<method name="userTyping" args="v">
+		_user_typing.setAttribute("visible", v);
+	</method>
+	    
 	<miniIcons name="_start_private_chat_rsc" x="114" y = "2" width="16" height="16"
 		resource="start_private_chat_rsc" showhandcursor="true"
 		visible="${ (canvas.currentRoomObj.hideChat == null || !canvas.currentRoomObj.hideChat) &amp;&amp; parent.refObj.publicSID != canvas.publicSID }">

Added: openmeetings/branches/3.0.x/WebContent/src/modules/conference/resources/base0.png
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/WebContent/src/modules/conference/resources/base0.png?rev=1691912&view=auto
==============================================================================
Binary file - no diff available.

Propchange: openmeetings/branches/3.0.x/WebContent/src/modules/conference/resources/base0.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: openmeetings/branches/3.0.x/WebContent/src/modules/conference/resources/base1.png
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/WebContent/src/modules/conference/resources/base1.png?rev=1691912&view=auto
==============================================================================
Binary file - no diff available.

Propchange: openmeetings/branches/3.0.x/WebContent/src/modules/conference/resources/base1.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: openmeetings/branches/3.0.x/WebContent/src/modules/conference/resources/base2.png
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/WebContent/src/modules/conference/resources/base2.png?rev=1691912&view=auto
==============================================================================
Binary file - no diff available.

Propchange: openmeetings/branches/3.0.x/WebContent/src/modules/conference/resources/base2.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: openmeetings/branches/3.0.x/WebContent/src/modules/conference/resources/base3.png
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/WebContent/src/modules/conference/resources/base3.png?rev=1691912&view=auto
==============================================================================
Binary file - no diff available.

Propchange: openmeetings/branches/3.0.x/WebContent/src/modules/conference/resources/base3.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: openmeetings/branches/3.0.x/WebContent/src/modules/conference/restricted/restrictedUserListItem.lzx
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/WebContent/src/modules/conference/restricted/restrictedUserListItem.lzx?rev=1691912&r1=1691911&r2=1691912&view=diff
==============================================================================
--- openmeetings/branches/3.0.x/WebContent/src/modules/conference/restricted/restrictedUserListItem.lzx (original)
+++ openmeetings/branches/3.0.x/WebContent/src/modules/conference/restricted/restrictedUserListItem.lzx Mon Jul 20 10:35:24 2015
@@ -111,11 +111,15 @@
     	}
     </method>
 
+	<method name="userTyping" args="v">
+		this._content._user_typing.setAttribute("visible", v);
+	</method>
 	<view name="_content" width="254">
 		<view name="_contentIsCurrent" visible="${ parent.parent.selfItem }" width="254" height="40" bgcolor="0x7CFC00"/>
           
     	<labelText name="_userName" x="2" y="2" text="${ (parent.parent.firstname == null ? '' : parent.parent.firstname) + ' ' + (parent.parent.lastname == null ? '' : parent.parent.lastname) }" />
     		   
+		<typingIcon name="_user_typing" x="132" y="2" width="30" height="16" visible="false"/>
 		<miniIcons name="_restartDevice" x="220" y="0" width="16" height="16" resource="resyncuser_rsc" showhandcursor="true"
 				visible="${ parent.parent.clickable &amp;&amp; parent.parent.selfItem &amp;&amp; canvas.isBroadCasting }">
 			<handler name="onclick">

Added: openmeetings/branches/3.0.x/WebContent/src/modules/conference/typing.lzx
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/WebContent/src/modules/conference/typing.lzx?rev=1691912&view=auto
==============================================================================
--- openmeetings/branches/3.0.x/WebContent/src/modules/conference/typing.lzx (added)
+++ openmeetings/branches/3.0.x/WebContent/src/modules/conference/typing.lzx Mon Jul 20 10:35:24 2015
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+  
+      http://www.apache.org/licenses/LICENSE-2.0
+    	  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+  
+-->
+<library>
+
+<class name="typingIcon" extends="view" width="30" height="16" resource="typing_rsc">
+	<attribute name="timerDelegate" value="null"/>
+	<attribute name="frm" value="0" type="number" />
+	          
+    <handler name="oninit">
+		//if ($debug) Debug.write("typingIcon::oninit ");
+    	startTyping();
+    </handler>
+    
+    <handler name="ondestroy">
+		//if ($debug) Debug.write("typingIcon::ondestroy ");
+		stopTyping();
+    </handler>
+    
+	<handler name="onvisible">
+		//if ($debug) Debug.write("typingIcon::onvisible ", this.visible);
+		toggle(this.visible);
+	</handler>
+	
+	<method name="startTyping">
+	<![CDATA[
+		//if ($debug) Debug.write("typingIcon::startTyping ");
+		if (timerDelegate == null && this.visible) {
+			frm = 0;
+			this.timerDelegate = new LzDelegate(this, "changeFrame");
+			lz.Timer.addTimer(this.timerDelegate, 1000);
+		}
+	]]>
+	</method>
+
+	<method name="stopTyping">
+		//if ($debug) Debug.write("typingIcon::stopTyping ");
+		if (timerDelegate != null) {
+			lz.Timer.removeTimer(timerDelegate);
+			timerDelegate = null;
+		}
+	</method>
+	 
+	<method name="toggle" args="v">
+		//if ($debug) Debug.write("typingIcon::toggle ", this.visible);
+		if (v) {
+			startTyping();
+		} else {
+			stopTyping();
+		}
+	</method>
+	
+	<method name="changeFrame" args="ignore=null">
+		//if ($debug) Debug.write("typingIcon::frm ", frm);
+		frm = (++frm) % 4;
+		this.setAttribute('frame', frm + 1);
+		lz.Timer.resetTimer(timerDelegate, 1000);
+		if (frm == 3) {
+			this.setAttribute('visible', false);
+		}
+	</method>
+</class>
+
+</library>

Modified: openmeetings/branches/3.0.x/WebContent/src/modules/conference/whiteboard/base/baseDraw.lzx
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/WebContent/src/modules/conference/whiteboard/base/baseDraw.lzx?rev=1691912&r1=1691911&r2=1691912&view=diff
==============================================================================
--- openmeetings/branches/3.0.x/WebContent/src/modules/conference/whiteboard/base/baseDraw.lzx (original)
+++ openmeetings/branches/3.0.x/WebContent/src/modules/conference/whiteboard/base/baseDraw.lzx Mon Jul 20 10:35:24 2015
@@ -580,11 +580,12 @@
 		}
 		
 		if (canvas.ismoderator || canvas.isAllowedToDraw) {
-			
+			var knownModus = true;
+			var initialBoundingIsActive = this.boundingIsActive;
 			if (this.letterObjectIsActive){
 				this.currentletterObj.drawtoArray();
 				this.setModusWithUpdate("hand");
-				//bool = true;				
+				knownModus = false;
 			}
 			
 			if(this.drawmodus=="drag"){
@@ -635,22 +636,19 @@
 	  	 		this.startx = currentlayer.getMouse('x');
 				this.starty = currentlayer.getMouse('y'); 				
 	            mousetracker_del.register(lz.Idle,'onidle');
-	        }else if (this.drawmodus == 'paste') {
-				//this.startSelect(null);
+	        } else if (this.drawmodus == 'paste') {
 	  	 		var paste_x = parent.getMouse('x');
 				var paste_y = parent.getMouse('y'); 				
-	            //mousetracker_del.register(lz.Idle,'onidle');
 	            this.paste(paste_x, paste_y);
 	            
-	            //this.setModus("hand");
-				
 	            if ($debug) Debug.write("paste mouse down ",this);
-	            //if ($debug) Debug.write("onmousedownMethod Unkown Modus ",this.drawmodus);
 	        } else {
+	        	knownModus = false;
 	        	if ($debug) Debug.write("onmousedownMethod Unkown Modus ",this.drawmodus);
 	        }
-            
-            
+			if (knownModus && !initialBoundingIsActive && !this.letterObjectIsActive) {
+				startTyping();
+			}
         }
         ]]>
 	</method>
@@ -659,8 +657,8 @@
         if ($debug) Debug.write("onmouseupMethod this.drawmodus: ",this.drawmodus);
 		<![CDATA[	
 	        if (canvas.ismoderator || canvas.isAllowedToDraw) {
-				//var bool = false;
 				
+				var knownModus = true;
 	        	if(this.drawmodus=="drag"){
 	        		this.isDragging = false;
 	        		this.dragger.remove();
@@ -696,10 +694,6 @@
 					this.endUline();
 					mousetracker_del.unregisterAll();
 				} else if(this.drawmodus=="letter"){
-					//if (!this.letterObjectIsActive && !bool){
-					//	this.currentletterObj = new lz.baseDrawWords(canvas,{refObj:this,x:canvas.getMouse('x'),
-					//		y:canvas.getMouse('y')});
-					//}
 					this.endLetter();
 					mousetracker_del.unregisterAll();
 				} else if (this.drawmodus == 'rectangle') {
@@ -725,15 +719,15 @@
 		        } else if (this.drawmodus == 'hand') {
 					this.endSelect();
 		        	mousetracker_del.unregisterAll();
-		        }else if (this.drawmodus == 'paste') {
-					//this.setModus("hand");
-					//this.setAttribute('drawmodus','hand');
-					//if ($debug) Debug.write("onmouseupMethod paste ",this.drawmodus);
+		        } else if (this.drawmodus == 'paste') {
 		        } else {
+					knownModus = true;
 		        	if ($debug) Debug.write("onmouseupMethod Unkown Modus ",this.drawmodus);
 		        }
+				if (knownModus && !this.boundingIsActive && !this.letterObjectIsActive) {
+					endTyping();
+				}
 	                
-		        ////Debug.write("onmouseup: ",this.letterObjectIsActive,this.currentletterObj);	        
 				this.checkStepLayers();
 	        } else {
 	        	if (!this.restricted) {
@@ -743,6 +737,26 @@
 		]]>
 	</method>  
     
+    <method name="startTyping">
+		if ($debug) Debug.info("Start typing ..... ", canvas.publicSID);
+		var msg = new Array();
+		msg[0] = 'typingActivity';
+		msg[1] = true;
+		msg[2] = canvas.publicSID;
+		canvas.objMessage = msg;
+		canvas.thishib.sendMessage.doCall();
+    </method>
+    
+    <method name="endTyping">
+		if ($debug) Debug.info("..... end typing ", canvas.publicSID);
+		var msg = new Array();
+		msg[0] = 'typingActivity';
+		msg[1] = false;
+		msg[2] = canvas.publicSID;
+		canvas.objMessage = msg;
+		canvas.thishib.sendMessage.doCall();
+    </method>
+    
     <!--
     <handler name="onclick" args="obj">
         //Debug.write("click on whiteBoard ",obj);

Modified: openmeetings/branches/3.0.x/WebContent/src/modules/conference/whiteboard/base/baseDrawLetter.lzx
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/WebContent/src/modules/conference/whiteboard/base/baseDrawLetter.lzx?rev=1691912&r1=1691911&r2=1691912&view=diff
==============================================================================
--- openmeetings/branches/3.0.x/WebContent/src/modules/conference/whiteboard/base/baseDrawLetter.lzx (original)
+++ openmeetings/branches/3.0.x/WebContent/src/modules/conference/whiteboard/base/baseDrawLetter.lzx Mon Jul 20 10:35:24 2015
@@ -316,7 +316,6 @@
 	    this.checkStepLayers();
 	    this.onsharedMessage('draw',actionObject);	
 	</method>
-	
 </class>
 
 </library>