Author: solomax
Date: Tue Nov 24 12:16:00 2015
New Revision: 1716117

URL: http://svn.apache.org/viewvc?rev=1716117&view=rev
Log:
[OPENMEETINGS-1279] chat emotions are displayed and able to be selected

Modified:
    
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/chat/emotIconsSelector.lzx
    
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/chat/chatTabItemEmoticons.lzx

Modified: 
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/chat/emotIconsSelector.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/chat/emotIconsSelector.lzx?rev=1716117&r1=1716116&r2=1716117&view=diff
==============================================================================
--- 
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/chat/emotIconsSelector.lzx
 (original)
+++ 
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/chat/emotIconsSelector.lzx
 Tue Nov 24 12:16:00 2015
@@ -52,27 +52,29 @@
        this.getAllPublicEmoticons.doCall();
     </handler>
     
-        <netRemoteCallHib name="getAllPublicEmoticons" 
funcname="chatservice.getAllPublicEmoticons" 
-                       remotecontext="$once{ canvas.thishib }" > 
-            <handler name="ondata" args="value">
-               <![CDATA[
-                       //The onResult-Handler will be called be the 
rtmpconnection
-                                       if($debug) 
Debug.write("emotIconsSelector/getAllPublicEmoticons : ",value);
-                                       for (var i=0;i<value.length;i++){
-                                               var swfurl = canvas.getUrl() + 
'public/emoticons/'+value[i][0];
-                                               var iconlabel = value[i][1];
-                                               if (value[i].length>4){
-                                                       iconlabel += ", 
"+value[i][2];                                                  
-                                               }
-                                               
-                                               if ($debug) Debug.write("swfurl 
"+swfurl);
-                                               
-                                               var m = new 
lz._chatInnerSmilyIcon(parent.inn.inn,{iconvalue:value[i][1],iconlabel:iconlabel});
-                                               m.setSource(swfurl);            
                                
-                                       }
-                ]]>
-            </handler>   
-        </netRemoteCallHib>    
+       <netRemoteCallHib name="getAllPublicEmoticons" 
funcname="chatservice.getAllPublicEmoticons" remotecontext="$once{ 
canvas.thishib }" >
+               <handler name="ondata" args="value">
+               <![CDATA[
+                       //The onResult-Handler will be called be the 
rtmpconnection
+                       if ($debug) 
Debug.write("emotIconsSelector/getAllPublicEmoticons : ", value);
+                       for (var i = 0; i < value.length; ++i) {
+                               var swfurl = canvas.getUrl() + 
'public/emoticons/' + value[i][0];
+                               var iconlabel = value[i][1];
+                               if (value[i].length > 4) {
+                                       iconlabel += ", " + value[i][2];
+                               }
+                               
+                               var m = new 
lz._chatInnerSmilyIcon(parent.inn.inn
+                                       , {     imgUrl: swfurl
+                                               , iconvalue: value[i][1]
+                                               , iconlabel: iconlabel
+                                       });
+                               //m.sprite.setSource(swfurl);
+                               if ($debug) Debug.write("swfurl ", swfurl, m);
+                       }
+               ]]>
+               </handler>
+       </netRemoteCallHib>    
 
     <view bgcolor="0xFFFFFF" width="$once{ parent.width-2 }" opacity="0.8"
          height="$once{ parent.height-2 }" x="1" y="1" />
@@ -101,9 +103,39 @@
 </class>       
 
 <!--- private class of emotIconsSelector.class. resource view of chat smily 
icons. it shows icons and label tooltips.-->
-<class name="_chatInnerSmilyIcon" extends="view" onmouseover="" onmouseout="">
+<class name="_chatInnerSmilyIcon" extends="view" onmouseover="" onmouseout="" 
width="16" height="16">
+       <switch>
+               <when property="$as3">
+                       <passthrough>
+                               import flash.net.*;
+                               import flash.display.*;
+                       </passthrough>
+               </when>
+       </switch>
        <attribute name="iconlabel" value="" type="string" />
        <attribute name="iconvalue" value="" type="string" />
+       <attribute name="imgUrl" value="" type="string" />
+       <handler name="oninit">
+               this.sprite.resource = imgUrl;
+               if (! this.sprite.imgLoader) {
+                       if (this.sprite.resourceContainer) {
+                               // unload previous internal image-resource
+                               this.sprite.unload();
+                       }
+                       this.sprite.imgLoader = new Loader();
+                       this.sprite.imgLoader.mouseEnabled = false;// @devnote: 
see LPP-7022
+                       this.sprite.imgLoader.mouseChildren = false;
+                       this.sprite.resourceContainer = this.sprite.imgLoader;
+                       this.sprite.addChild(this.sprite.imgLoader);
+               }
+               var res:Loader = this.sprite.imgLoader;
+               if (res) {
+                       res.scaleX = res.scaleY = 1.0;
+               }
+               
+               this.sprite.imgLoader.load(new URLRequest(imgUrl), 
LzSprite.loaderContext);
+       </handler>
+       
        <handler name="onclick">
                var messageBox = parent.parent.parent.btnRef.message;
                messageBox.setText(messageBox.getText()+" "+iconvalue+"  ");

Modified: 
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/chat/chatTabItemEmoticons.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/chat/chatTabItemEmoticons.lzx?rev=1716117&r1=1716116&r2=1716117&view=diff
==============================================================================
--- 
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/chat/chatTabItemEmoticons.lzx
 (original)
+++ 
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/chat/chatTabItemEmoticons.lzx
 Tue Nov 24 12:16:00 2015
@@ -68,7 +68,7 @@
                                //if ($debug) Debug.write("Text :1: 
",items[i][1]);
                                t += items[i][1];
                        } else {
-                               t += "<img src='" + canvas.getUrl() + 
"public/emoticons/" + items[i][1] + "' alt='" + items[i][3] + "' width='16' 
height='16' />";
+                               t += "<center><img src='" + canvas.getUrl() + 
"public/emoticons/" + items[i][1] + "' alt='" + items[i][3] + "' width='16' 
height='16'/></center>";
                        }
                }
                


Reply via email to