Author: solomax
Date: Thu Nov 24 15:07:56 2016
New Revision: 1771162

URL: http://svn.apache.org/viewvc?rev=1771162&view=rev
Log:
[OPENMEETINGS-1366] basic work for WB tab renaming

Added:
    
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/dynamicFileName.lzx
      - copied, changed from r1771127, 
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/dynamicFileName.lzx
Modified:
    
openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java
    
openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObject.java
    
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/dynamicFileName.lzx
    
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/whiteboardMiniButton.lzx
    
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java
    
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObject.java
    
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/library.lzx
    
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/whiteboardMiniButton.lzx
    
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java
    
openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObject.java

Modified: 
openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java?rev=1771162&r1=1771161&r2=1771162&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java
 (original)
+++ 
openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java
 Thu Nov 24 15:07:56 2016
@@ -137,6 +137,10 @@ public class WhiteBoardService implement
                return null;
        }
 
+       public void rename(Long wbId, String name) {
+               //
+       }
+
        /**
         * change the draw status of a user, allow disallow him to draw anybody
         * besides the Moderator to draw on the whiteboard, only a Moderator is

Modified: 
openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObject.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObject.java?rev=1771162&r1=1771161&r2=1771162&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObject.java
 (original)
+++ 
openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObject.java
 Thu Nov 24 15:07:56 2016
@@ -24,7 +24,6 @@ import java.util.List;
 import java.util.Map;
 
 public class WhiteboardObject {
-
        private long whiteBoardId;
        private Integer x = 0;
        private Integer y = 0;
@@ -33,9 +32,10 @@ public class WhiteboardObject {
        @SuppressWarnings("rawtypes")
        private Map<String, List> roomItems = new HashMap<String, List>();
        private Date created = new Date();
+       private String name;
 
        public WhiteboardObject() {}
-       
+
        public long getWhiteBoardId() {
                return whiteBoardId;
        }
@@ -94,4 +94,11 @@ public class WhiteboardObject {
                this.fullFit = fullFit;
        }
 
+       public String getName() {
+               return name;
+       }
+
+       public void setName(String name) {
+               this.name = name;
+       }
 }

Modified: 
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/dynamicFileName.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/dynamicFileName.lzx?rev=1771162&r1=1771161&r2=1771162&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/dynamicFileName.lzx
 (original)
+++ 
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/dynamicFileName.lzx
 Thu Nov 24 15:07:56 2016
@@ -28,16 +28,21 @@
                        </passthrough>
                </when>
        </switch>
-       
+
        <attribute name="refObj" value="null" />
-       
+       <attribute name="onBlurFunc" value="null" />
+
        <handler name="onblur">
                lz.ModeManager.release(this);
                if ($debug) Debug.write("Store and Destroy ", 
this.refObj.parentId);
-               if (this.refObj.fileId == 0) {
-                   canvas.currentFileExplorer.createFile(this.text, null, 
this, this.refObj);
+               if (!!onBlurFunc) {
+                       onBlurFunc();
                } else {
-                       this.rename();
+                       if (this.refObj.fileId == 0) {
+                               
canvas.currentFileExplorer.createFile(this.text, null, this, this.refObj);
+                       } else {
+                               this.rename();
+                       }
                }
        </handler>
        

Modified: 
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/whiteboardMiniButton.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/whiteboardMiniButton.lzx?rev=1771162&r1=1771161&r2=1771162&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/whiteboardMiniButton.lzx
 (original)
+++ 
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/whiteboardMiniButton.lzx
 Thu Nov 24 15:07:56 2016
@@ -9,7 +9,7 @@
   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
@@ -21,125 +21,162 @@
 <library>
 
 <class name="whiteboardMiniButton" extends="view" width="250" height="18" y="2"
-    bgcolor="$once{ canvas.getThemeColor('basebgcolorizer') }">
-     
-    <attribute name="btnName" value="" type="string" />
-    <attribute name="objRef" value="null" />
-
-    <attribute name="zielx" value="200" type="number" />
-    <attribute name="zielwidth" value="100" type="number" />    
-    
-    <attribute name="isactive" value="true" type="boolean" />
-    
-    <attribute name="isHidden" value="false" type="boolean" />
-    
-    <handler name="oninit">
-        this.calcTextWidth();
-        parent.onwidth.sendEvent();
-    </handler>
-    
-    <handler name="onwidth">
-        if (this.isinited){
-            this.calcTextWidth();
-        }
-    </handler>
-    
-    <method name="disableItem">
-        //if ($debug) Debug.write("disableItem :: set visibility to hidden");
-        this.isHidden = true;
-        this.setAttribute("visibility","hidden");
-        //this.destroy();
-    </method>
-    
-    <method name="enableItem">
-        this.setAttribute("visibility","visible");
-        this.isHidden = false;
-    </method>
-    
-    <method name="calcTextWidth">
-        <![CDATA[
-            if (this.isHidden) {
-                return;
-            }
-            //if ($debug) Debug.write(this, this._text, 
this._text.getTextWidth());
-            if (this._text.getTextWidth() > (this.width-24)) {
-                this._long.setAttribute('visibility','visible');
-                this._text.setAttribute('width',this.width-26);
-            } else {
-                this._long.setAttribute('visibility','hidden');
-                this._text.setAttribute('width',this.width-18);
-            }
-        ]]>        
-    </method>
-        
-    <handler name="onclick">
-        if (this.isHidden) {
-            return;
-        }
-        this._minimizebtn_mo.setAttribute('visibility','visible');
-        this._minimizebtn_dn.setAttribute('visibility','hidden');
-        if ($debug) Debug.write(" :: onclick :: ");
-        this.sendActiveWindow(this.objRef);
-    </handler>
-    
-    <handler name="onmouseover">
-        if (this.isHidden) {
-            return;
-        }
-        this._minimizebtn_mo.setAttribute('visibility','visible');
-        this._minimizebtn_dn.setAttribute('visibility','hidden');
-    </handler>
-    <handler name="onmouseout">
-        if (this.isHidden) {
-            return;
-        }
-        if (this.isactive) {
-            this._minimizebtn_mo.setAttribute('visibility','hidden');
-            this._minimizebtn_dn.setAttribute('visibility','visible');
-        } else {
-            this._minimizebtn_mo.setAttribute('visibility','hidden');
-            this._minimizebtn_dn.setAttribute('visibility','hidden');
-        }        
-    </handler>
-    <handler name="onmousedown">
-        if (this.isHidden) {
-            return;
-        }        
-        this._minimizebtn_mo.setAttribute('visibility','hidden');
-        this._minimizebtn_dn.setAttribute('visibility','visible');
-    </handler>
-    <handler name="onmouseup">
-        if (this.isHidden) {
-            return;
-        }        
-        this._minimizebtn_mo.setAttribute('visibility','visible');
-        this._minimizebtn_dn.setAttribute('visibility','hidden');
-    </handler>
-    
-    <method name="sendActiveWindow" args="win">
-        this.parent.sendActiveWindow(this,win);
-    </method>    
+               bgcolor="$once{ canvas.getThemeColor('basebgcolorizer') }">
+       <switch>
+               <when property="$as3">
+                       <passthrough>
+                               import flash.net.*;
+                       </passthrough>
+               </when>
+       </switch>
+
+       <attribute name="btnName" value="" type="string" />
+       <attribute name="objRef" value="null" />
+       <attribute name="isactive" value="true" type="boolean" />
+       <attribute name="isHidden" value="false" type="boolean" />
+
+       <handler name="oninit">
+               this.calcTextWidth();
+               parent.onwidth.sendEvent();
+       </handler>
+
+       <handler name="onwidth">
+               if (this.isinited){
+                       this.calcTextWidth();
+               }
+       </handler>
+
+       <method name="disableItem">
+               //if ($debug) Debug.write("disableItem :: set visibility to 
hidden");
+               this.isHidden = true;
+               this.setAttribute("visibility","hidden");
+               //this.destroy();
+       </method>
+
+       <method name="enableItem">
+               this.setAttribute("visibility","visible");
+               this.isHidden = false;
+       </method>
+
+       <method name="calcTextWidth">
+       <![CDATA[
+                       if (this.isHidden) {
+                               return;
+                       }
+                       //if ($debug) Debug.write(this, this._text, 
this._text.getTextWidth());
+                       if (this._text.getTextWidth() > (this.width-24)) {
+                               this._long.setAttribute('visibility','visible');
+                               this._text.setAttribute('width',this.width-26);
+                       } else {
+                               this._long.setAttribute('visibility','hidden');
+                               this._text.setAttribute('width',this.width-18);
+                       }
+       ]]>
+       </method>
+
+       <handler name="onclick">
+       <![CDATA[
+               if (this.isHidden) {
+                       return;
+               }
+               if (this.isactive && canvas.ismoderator) {
+                       var tWidth = this._text.width;
+                       var _y = this._text.getAttributeRelative("y", canvas);
+                       var _x = this._text.getAttributeRelative("x", canvas);
+
+                       var t = new lz.dynamicFileName(canvas, {
+                                       text: this._text.text
+                                       , refObj: this
+                                       , width: tWidth + 10
+                                       , onBlurFunc: function () {
+                                               if ($debug) Debug.write("WB 
blur:: ", objRef);
+                                               canvas.thishib._nc.call(
+                                                               
"whiteboardservice.rename"
+                                                               , new Responder(
+                                                                               
function ():void {
+                                                                               
        if ($debug) Debug.write("WB blur:: complete");
+                                                                               
        t.destroy();
+                                                                               
}, function ():void {
+                                                                               
        if ($debug) Debug.write("WB blur:: error");
+                                                                               
        t.destroy()
+                                                                               
})
+                                                               , 
objRef.whiteboardId
+                                                               , t.text
+                                                       );
+                                       }
+                                       , x: _x
+                                       , y: _y
+                               });
+                       lz.Focus.setFocus(t, true);
+                       lz.ModeManager.makeModal(t);
+               }
+               this._minimizebtn_mo.setAttribute('visibility','visible');
+               this._minimizebtn_dn.setAttribute('visibility','hidden');
+               if ($debug) Debug.write(" :: onclick :: ");
+               this.sendActiveWindow(this.objRef);
+       ]]>
+       </handler>
+
+       <handler name="onmouseover">
+               if (this.isHidden) {
+                       return;
+               }
+               this._minimizebtn_mo.setAttribute('visibility','visible');
+               this._minimizebtn_dn.setAttribute('visibility','hidden');
+       </handler>
+
+       <handler name="onmouseout">
+               if (this.isHidden) {
+                       return;
+               }
+               if (this.isactive) {
+                       
this._minimizebtn_mo.setAttribute('visibility','hidden');
+                       
this._minimizebtn_dn.setAttribute('visibility','visible');
+               } else {
+                       
this._minimizebtn_mo.setAttribute('visibility','hidden');
+                       
this._minimizebtn_dn.setAttribute('visibility','hidden');
+               }
+       </handler>
+
+       <handler name="onmousedown">
+               if (this.isHidden) {
+                       return;
+               }
+               this._minimizebtn_mo.setAttribute('visibility','hidden');
+               this._minimizebtn_dn.setAttribute('visibility','visible');
+       </handler>
+
+       <handler name="onmouseup">
+               if (this.isHidden) {
+                       return;
+               }
+               this._minimizebtn_mo.setAttribute('visibility','visible');
+               this._minimizebtn_dn.setAttribute('visibility','hidden');
+       </handler>
+
+       <method name="sendActiveWindow" args="win">
+               this.parent.sendActiveWindow(this,win);
+       </method>
 
        <method name="activateSynced">
                this.parent.sendActiveWindowSynced(this);
        </method>
-    
-    <view name="_minimizebtn_mo" width="${ parent.width-2 }" height="16"
-        bgcolor="white" opacity="0.3" visibility="hidden" x="1" y="1" />
-
-    <view name="_minimizebtn_dn" width="${ parent.width-2 }" height="16"
-        bgcolor="black" opacity="0.3" visibility="hidden" x="1" y="1" />
-    
+
+       <view name="_minimizebtn_mo" width="${ parent.width-2 }" height="16"
+                       bgcolor="white" opacity="0.3" visibility="hidden" x="1" 
y="1" />
+
+       <view name="_minimizebtn_dn" width="${ parent.width-2 }" height="16"
+                       bgcolor="black" opacity="0.3" visibility="hidden" x="1" 
y="1" />
 
        <text text="${ parent.btnName }" fgcolor="0xFFFFFF" resize="false" 
x="1" fontsize="10" name="_text" />
-       
+
        <view y="1" x="${ parent.width-18 }" name="_close"
-               resource="btn_presenter_close"
-               opacity="${ ((canvas.ismoderator) ? 1 : 
((canvas.isAllowedToDraw) ? 1 : 0.5 )) }"
-               onmouseover="this.setAttribute('frame',2)"
-               onmouseout="this.setAttribute('frame',1)"
-               onmousedown="this.setAttribute('frame',3)"
-               onmouseup="this.setAttribute('frame',1)" >
+                       resource="btn_presenter_close"
+                       opacity="${ ((canvas.ismoderator) ? 1 : 
((canvas.isAllowedToDraw) ? 1 : 0.5 )) }"
+                       onmouseover="this.setAttribute('frame',2)"
+                       onmouseout="this.setAttribute('frame',1)"
+                       onmousedown="this.setAttribute('frame',3)"
+                       onmouseup="this.setAttribute('frame',1)" >
                <handler name="onclick">
                <![CDATA[
                        this.setAttribute('frame',2);
@@ -156,21 +193,20 @@
                        }
                ]]>
                </handler>
-               
+
                <method name="closeWhiteboardConfirmMethod" 
args="bool,sharedObjectData">
                        if ($debug) Debug.write("confirm closeWhiteboard:", 
bool);
                        if (bool) {
                                parent.parent.removeObject(parent);
                        }
                </method>
-        
                <labelTooltip labelid="1364" />
-       </view>  
-        
-    <text y="1" name="_long" text="..." fgcolor="0xFFFFFF"
-        x="${ parent.width-28 }" fontsize="10" />
+       </view>
 
-    <labelTooltip text="${ parent.btnName }" />
+       <text y="1" name="_long" text="..." fgcolor="0xFFFFFF" x="${ 
parent.width-28 }" fontsize="10" />
+
+       <labelTooltip text="${ parent.btnName }" />
 </class>
 
 </library>
+

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java?rev=1771162&r1=1771161&r2=1771162&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java
 Thu Nov 24 15:07:56 2016
@@ -138,6 +138,10 @@ public class WhiteBoardService implement
                return null;
        }
 
+       public void rename(Long wbId, String name) {
+               //
+       }
+
        /**
         * change the draw status of a user, allow disallow him to draw anybody
         * besides the Moderator to draw on the whiteboard, only a Moderator is

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObject.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObject.java?rev=1771162&r1=1771161&r2=1771162&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObject.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObject.java
 Thu Nov 24 15:07:56 2016
@@ -40,9 +40,10 @@ public class WhiteboardObject {
        private Map<String, List<Object>> roomItems = new ConcurrentHashMap<>();
        private Date created = new Date();
        private int zIndex = 1;
+       private String name;
 
        public WhiteboardObject() {}
-       
+
        public long getWhiteBoardId() {
                return whiteBoardId;
        }
@@ -173,4 +174,12 @@ public class WhiteboardObject {
                */
                roomItems.remove(oid);
        }
+
+       public String getName() {
+               return name;
+       }
+
+       public void setName(String name) {
+               this.name = name;
+       }
 }

Copied: 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/dynamicFileName.lzx
 (from r1771127, 
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/dynamicFileName.lzx)
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/dynamicFileName.lzx?p2=openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/dynamicFileName.lzx&p1=openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/dynamicFileName.lzx&r1=1771127&r2=1771162&rev=1771162&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/dynamicFileName.lzx
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/dynamicFileName.lzx
 Thu Nov 24 15:07:56 2016
@@ -28,16 +28,21 @@
                        </passthrough>
                </when>
        </switch>
-       
+
        <attribute name="refObj" value="null" />
-       
+       <attribute name="onBlurFunc" value="null" />
+
        <handler name="onblur">
                lz.ModeManager.release(this);
                if ($debug) Debug.write("Store and Destroy ", 
this.refObj.parentId);
-               if (this.refObj.fileId == 0) {
-                   canvas.currentFileExplorer.createFile(this.text, null, 
this, this.refObj);
+               if (!!onBlurFunc) {
+                       onBlurFunc();
                } else {
-                       this.rename();
+                       if (this.refObj.fileId == 0) {
+                               
canvas.currentFileExplorer.createFile(this.text, null, this, this.refObj);
+                       } else {
+                               this.rename();
+                       }
                }
        </handler>
        

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/library.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/library.lzx?rev=1771162&r1=1771161&r2=1771162&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/library.lzx
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/library.lzx
 Thu Nov 24 15:07:56 2016
@@ -43,7 +43,8 @@
        <include href="helper/" />
        
        <include href="panels/" />
-       
+
+       <include href="dynamicFileName.lzx" />
        <include href="interviewVideoBox.lzx" />
        <include href="interviewWhiteboard.lzx" />
        <include href="basePropertyPanelWhiteboard.lzx" />
@@ -52,3 +53,4 @@
        <include href="whiteboardMiniButton.lzx" />
        <include href="whiteboardBarMenu.lzx" />
 </library>
+

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/whiteboardMiniButton.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/whiteboardMiniButton.lzx?rev=1771162&r1=1771161&r2=1771162&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/whiteboardMiniButton.lzx
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/whiteboardMiniButton.lzx
 Thu Nov 24 15:07:56 2016
@@ -9,7 +9,7 @@
   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
@@ -21,125 +21,162 @@
 <library>
 
 <class name="whiteboardMiniButton" extends="view" width="250" height="18" y="2"
-    bgcolor="$once{ canvas.getThemeColor('basebgcolorizer') }">
-     
-    <attribute name="btnName" value="" type="string" />
-    <attribute name="objRef" value="null" />
-
-    <attribute name="zielx" value="200" type="number" />
-    <attribute name="zielwidth" value="100" type="number" />    
-    
-    <attribute name="isactive" value="true" type="boolean" />
-    
-    <attribute name="isHidden" value="false" type="boolean" />
-    
-    <handler name="oninit">
-        this.calcTextWidth();
-        parent.onwidth.sendEvent();
-    </handler>
-    
-    <handler name="onwidth">
-        if (this.isinited){
-            this.calcTextWidth();
-        }
-    </handler>
-    
-    <method name="disableItem">
-        //if ($debug) Debug.write("disableItem :: set visibility to hidden");
-        this.isHidden = true;
-        this.setAttribute("visibility","hidden");
-        //this.destroy();
-    </method>
-    
-    <method name="enableItem">
-        this.setAttribute("visibility","visible");
-        this.isHidden = false;
-    </method>
-    
-    <method name="calcTextWidth">
-        <![CDATA[
-            if (this.isHidden) {
-                return;
-            }
-            //if ($debug) Debug.write(this, this._text, 
this._text.getTextWidth());
-            if (this._text.getTextWidth() > (this.width-24)) {
-                this._long.setAttribute('visibility','visible');
-                this._text.setAttribute('width',this.width-26);
-            } else {
-                this._long.setAttribute('visibility','hidden');
-                this._text.setAttribute('width',this.width-18);
-            }
-        ]]>        
-    </method>
-        
-    <handler name="onclick">
-        if (this.isHidden) {
-            return;
-        }
-        this._minimizebtn_mo.setAttribute('visibility','visible');
-        this._minimizebtn_dn.setAttribute('visibility','hidden');
-        if ($debug) Debug.write(" :: onclick :: ");
-        this.sendActiveWindow(this.objRef);
-    </handler>
-    
-    <handler name="onmouseover">
-        if (this.isHidden) {
-            return;
-        }
-        this._minimizebtn_mo.setAttribute('visibility','visible');
-        this._minimizebtn_dn.setAttribute('visibility','hidden');
-    </handler>
-    <handler name="onmouseout">
-        if (this.isHidden) {
-            return;
-        }
-        if (this.isactive) {
-            this._minimizebtn_mo.setAttribute('visibility','hidden');
-            this._minimizebtn_dn.setAttribute('visibility','visible');
-        } else {
-            this._minimizebtn_mo.setAttribute('visibility','hidden');
-            this._minimizebtn_dn.setAttribute('visibility','hidden');
-        }        
-    </handler>
-    <handler name="onmousedown">
-        if (this.isHidden) {
-            return;
-        }        
-        this._minimizebtn_mo.setAttribute('visibility','hidden');
-        this._minimizebtn_dn.setAttribute('visibility','visible');
-    </handler>
-    <handler name="onmouseup">
-        if (this.isHidden) {
-            return;
-        }        
-        this._minimizebtn_mo.setAttribute('visibility','visible');
-        this._minimizebtn_dn.setAttribute('visibility','hidden');
-    </handler>
-    
-    <method name="sendActiveWindow" args="win">
-        this.parent.sendActiveWindow(this,win);
-    </method>    
+               bgcolor="$once{ canvas.getThemeColor('basebgcolorizer') }">
+       <switch>
+               <when property="$as3">
+                       <passthrough>
+                               import flash.net.*;
+                       </passthrough>
+               </when>
+       </switch>
+
+       <attribute name="btnName" value="" type="string" />
+       <attribute name="objRef" value="null" />
+       <attribute name="isactive" value="true" type="boolean" />
+       <attribute name="isHidden" value="false" type="boolean" />
+
+       <handler name="oninit">
+               this.calcTextWidth();
+               parent.onwidth.sendEvent();
+       </handler>
+
+       <handler name="onwidth">
+               if (this.isinited){
+                       this.calcTextWidth();
+               }
+       </handler>
+
+       <method name="disableItem">
+               //if ($debug) Debug.write("disableItem :: set visibility to 
hidden");
+               this.isHidden = true;
+               this.setAttribute("visibility","hidden");
+               //this.destroy();
+       </method>
+
+       <method name="enableItem">
+               this.setAttribute("visibility","visible");
+               this.isHidden = false;
+       </method>
+
+       <method name="calcTextWidth">
+       <![CDATA[
+                       if (this.isHidden) {
+                               return;
+                       }
+                       //if ($debug) Debug.write(this, this._text, 
this._text.getTextWidth());
+                       if (this._text.getTextWidth() > (this.width-24)) {
+                               this._long.setAttribute('visibility','visible');
+                               this._text.setAttribute('width',this.width-26);
+                       } else {
+                               this._long.setAttribute('visibility','hidden');
+                               this._text.setAttribute('width',this.width-18);
+                       }
+       ]]>
+       </method>
+
+       <handler name="onclick">
+       <![CDATA[
+               if (this.isHidden) {
+                       return;
+               }
+               if (this.isactive && canvas.ismoderator) {
+                       var tWidth = this._text.width;
+                       var _y = this._text.getAttributeRelative("y", canvas);
+                       var _x = this._text.getAttributeRelative("x", canvas);
+
+                       var t = new lz.dynamicFileName(canvas, {
+                                       text: this._text.text
+                                       , refObj: this
+                                       , width: tWidth + 10
+                                       , onBlurFunc: function () {
+                                               if ($debug) Debug.write("WB 
blur:: ", objRef);
+                                               canvas.thishib._nc.call(
+                                                               
"whiteboardservice.rename"
+                                                               , new Responder(
+                                                                               
function ():void {
+                                                                               
        if ($debug) Debug.write("WB blur:: complete");
+                                                                               
        t.destroy();
+                                                                               
}, function ():void {
+                                                                               
        if ($debug) Debug.write("WB blur:: error");
+                                                                               
        t.destroy()
+                                                                               
})
+                                                               , 
objRef.whiteboardId
+                                                               , t.text
+                                                       );
+                                       }
+                                       , x: _x
+                                       , y: _y
+                               });
+                       lz.Focus.setFocus(t, true);
+                       lz.ModeManager.makeModal(t);
+               }
+               this._minimizebtn_mo.setAttribute('visibility','visible');
+               this._minimizebtn_dn.setAttribute('visibility','hidden');
+               if ($debug) Debug.write(" :: onclick :: ");
+               this.sendActiveWindow(this.objRef);
+       ]]>
+       </handler>
+
+       <handler name="onmouseover">
+               if (this.isHidden) {
+                       return;
+               }
+               this._minimizebtn_mo.setAttribute('visibility','visible');
+               this._minimizebtn_dn.setAttribute('visibility','hidden');
+       </handler>
+
+       <handler name="onmouseout">
+               if (this.isHidden) {
+                       return;
+               }
+               if (this.isactive) {
+                       
this._minimizebtn_mo.setAttribute('visibility','hidden');
+                       
this._minimizebtn_dn.setAttribute('visibility','visible');
+               } else {
+                       
this._minimizebtn_mo.setAttribute('visibility','hidden');
+                       
this._minimizebtn_dn.setAttribute('visibility','hidden');
+               }
+       </handler>
+
+       <handler name="onmousedown">
+               if (this.isHidden) {
+                       return;
+               }
+               this._minimizebtn_mo.setAttribute('visibility','hidden');
+               this._minimizebtn_dn.setAttribute('visibility','visible');
+       </handler>
+
+       <handler name="onmouseup">
+               if (this.isHidden) {
+                       return;
+               }
+               this._minimizebtn_mo.setAttribute('visibility','visible');
+               this._minimizebtn_dn.setAttribute('visibility','hidden');
+       </handler>
+
+       <method name="sendActiveWindow" args="win">
+               this.parent.sendActiveWindow(this,win);
+       </method>
 
        <method name="activateSynced">
                this.parent.sendActiveWindowSynced(this);
        </method>
-    
-    <view name="_minimizebtn_mo" width="${ parent.width-2 }" height="16"
-        bgcolor="white" opacity="0.3" visibility="hidden" x="1" y="1" />
-
-    <view name="_minimizebtn_dn" width="${ parent.width-2 }" height="16"
-        bgcolor="black" opacity="0.3" visibility="hidden" x="1" y="1" />
-    
+
+       <view name="_minimizebtn_mo" width="${ parent.width-2 }" height="16"
+                       bgcolor="white" opacity="0.3" visibility="hidden" x="1" 
y="1" />
+
+       <view name="_minimizebtn_dn" width="${ parent.width-2 }" height="16"
+                       bgcolor="black" opacity="0.3" visibility="hidden" x="1" 
y="1" />
 
        <text text="${ parent.btnName }" fgcolor="0xFFFFFF" resize="false" 
x="1" fontsize="10" name="_text" />
-       
+
        <view y="1" x="${ parent.width-18 }" name="_close"
-               resource="btn_presenter_close"
-               opacity="${ ((canvas.ismoderator) ? 1 : 
((canvas.isAllowedToDraw) ? 1 : 0.5 )) }"
-               onmouseover="this.setAttribute('frame',2)"
-               onmouseout="this.setAttribute('frame',1)"
-               onmousedown="this.setAttribute('frame',3)"
-               onmouseup="this.setAttribute('frame',1)" >
+                       resource="btn_presenter_close"
+                       opacity="${ ((canvas.ismoderator) ? 1 : 
((canvas.isAllowedToDraw) ? 1 : 0.5 )) }"
+                       onmouseover="this.setAttribute('frame',2)"
+                       onmouseout="this.setAttribute('frame',1)"
+                       onmousedown="this.setAttribute('frame',3)"
+                       onmouseup="this.setAttribute('frame',1)" >
                <handler name="onclick">
                <![CDATA[
                        this.setAttribute('frame',2);
@@ -156,21 +193,20 @@
                        }
                ]]>
                </handler>
-               
+
                <method name="closeWhiteboardConfirmMethod" 
args="bool,sharedObjectData">
                        if ($debug) Debug.write("confirm closeWhiteboard:", 
bool);
                        if (bool) {
                                parent.parent.removeObject(parent);
                        }
                </method>
-        
                <labelTooltip labelid="1364" />
-       </view>  
-        
-    <text y="1" name="_long" text="..." fgcolor="0xFFFFFF"
-        x="${ parent.width-28 }" fontsize="10" />
+       </view>
 
-    <labelTooltip text="${ parent.btnName }" />
+       <text y="1" name="_long" text="..." fgcolor="0xFFFFFF" x="${ 
parent.width-28 }" fontsize="10" />
+
+       <labelTooltip text="${ parent.btnName }" />
 </class>
 
 </library>
+

Modified: 
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java?rev=1771162&r1=1771161&r2=1771162&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java
 (original)
+++ 
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java
 Thu Nov 24 15:07:56 2016
@@ -138,6 +138,10 @@ public class WhiteBoardService implement
                return null;
        }
 
+       public void rename(Long wbId, String name) {
+               //
+       }
+
        /**
         * change the draw status of a user, allow disallow him to draw anybody
         * besides the Moderator to draw on the whiteboard, only a Moderator is

Modified: 
openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObject.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObject.java?rev=1771162&r1=1771161&r2=1771162&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObject.java
 (original)
+++ 
openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObject.java
 Thu Nov 24 15:07:56 2016
@@ -40,9 +40,10 @@ public class WhiteboardObject {
        private Map<String, List<Object>> roomItems = new ConcurrentHashMap<>();
        private Date created = new Date();
        private int zIndex = 1;
+       private String name;
 
        public WhiteboardObject() {}
-       
+
        public long getWhiteBoardId() {
                return whiteBoardId;
        }
@@ -173,4 +174,12 @@ public class WhiteboardObject {
                */
                roomItems.remove(oid);
        }
+
+       public String getName() {
+               return name;
+       }
+
+       public void setName(String name) {
+               this.name = name;
+       }
 }


Reply via email to