Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/conference/whiteboard/whiteboardBarMenu.lzx URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/conference/whiteboard/whiteboardBarMenu.lzx?rev=1235410&r1=1235409&r2=1235410&view=diff ============================================================================== --- incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/conference/whiteboard/whiteboardBarMenu.lzx (original) +++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/conference/whiteboard/whiteboardBarMenu.lzx Tue Jan 24 18:58:51 2012 @@ -1,87 +1,106 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<library> - -<class name="whiteboardBarMenu" extends="view" width="${ parent.width }" x="0" y="21" - height="20" layout="axis:x;spacing:1;inset:2" bgcolor="$once{ canvas.baseMousecolorizer }"> - - <attribute name="staticwidth" type="number" value="120" /> - <attribute name="currentBtn" value="null" /> - - <method name="getCurrentSize"> - <![CDATA[ - if ( ((this.subviews.length+1)*(this.staticwidth+1)) <= this.width) { - return this.staticwidth; - } else { - var newwidth = Math.round((this.width-this.subviews.length)/(this.subviews.length+1)); - for (var i=0;i<this.subviews.length;i++) { - this.subviews[i].setAttribute('width',newwidth); - } - return newwidth; - } - ]]> - </method> - - <handler name="onwidth"> - <![CDATA[ - if ( ((this.subviews.length)*(this.staticwidth+1)) <= this.width) { - for (var i=0;i<this.subviews.length;i++) { - this.subviews[i].setAttribute('width',this.staticwidth); - } - } else { - var newwidth = Math.round((this.width-this.subviews.length)/(this.subviews.length)); - for (var i=0;i<this.subviews.length;i++) { - this.subviews[i].setAttribute('width',newwidth); - } - } - ]]> - </handler> - - <method name="removeObject" args="btn"> - var whiteboardId = btn.objRef.whiteboardId; - this.removeObjectSynced(btn); - parent.sendRemoveWindow(whiteboardId); - </method> - - <method name="removeObjectSynced" args="btn"> - var removeCurrent = false; - if (this.currentBtn == btn){ - removeCurrent = true; - } - btn.objRef.destroy(); - btn.destroy(); - if (this.subviews.length != 0) { - if (removeCurrent) { - this.sendActiveWindowSynced(this.subviews[this.subviews.length-1]); - } - } - parent.addNewItemButton.updatePosition(); - </method> - - - <method name="sendActiveWindow" args="btn,win"> - if ($debug) Debug.write("sendActiveWindow: ",btn,win); - this.sendActiveWindowSynced(btn); - this.currentBtn.objRef.sendActiveWindow(); - </method> - - <method name="sendActiveWindowSynced" args="btn"> - <![CDATA[ - if (this.currentBtn != null){ - this.currentBtn.isactive=false; - ////if ($debug) //Debug.write("sendActiveWindow1: ",this.currentBtn); - this.currentBtn._minimizebtn_mo.setAttribute('visibility','hidden'); - this.currentBtn._minimizebtn_dn.setAttribute('visibility','hidden'); - } - this.currentBtn = btn; - this.currentBtn.objRef.setAttribute("visibility","visible"); - this.currentBtn.objRef.bringToFront(); - ////if ($debug) //Debug.write("sendActiveWindow2: ",this.currentBtn); - this.currentBtn._minimizebtn_mo.setAttribute('visibility','hidden'); - this.currentBtn._minimizebtn_dn.setAttribute('visibility','visible'); - this.currentBtn.isactive=true; - ]]> - </method> - -</class> - -</library> +<?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="whiteboardBarMenu" extends="view" width="${ parent.width }" x="0" y="21" + height="20" layout="axis:x;spacing:1;inset:2" bgcolor="$once{ canvas.baseMousecolorizer }"> + + <attribute name="staticwidth" type="number" value="120" /> + <attribute name="currentBtn" value="null" /> + + <method name="getCurrentSize"> + <![CDATA[ + if ( ((this.subviews.length+1)*(this.staticwidth+1)) <= this.width) { + return this.staticwidth; + } else { + var newwidth = Math.round((this.width-this.subviews.length)/(this.subviews.length+1)); + for (var i=0;i<this.subviews.length;i++) { + this.subviews[i].setAttribute('width',newwidth); + } + return newwidth; + } + ]]> + </method> + + <handler name="onwidth"> + <![CDATA[ + if ( ((this.subviews.length)*(this.staticwidth+1)) <= this.width) { + for (var i=0;i<this.subviews.length;i++) { + this.subviews[i].setAttribute('width',this.staticwidth); + } + } else { + var newwidth = Math.round((this.width-this.subviews.length)/(this.subviews.length)); + for (var i=0;i<this.subviews.length;i++) { + this.subviews[i].setAttribute('width',newwidth); + } + } + ]]> + </handler> + + <method name="removeObject" args="btn"> + var whiteboardId = btn.objRef.whiteboardId; + this.removeObjectSynced(btn); + parent.sendRemoveWindow(whiteboardId); + </method> + + <method name="removeObjectSynced" args="btn"> + var removeCurrent = false; + if (this.currentBtn == btn){ + removeCurrent = true; + } + btn.objRef.destroy(); + btn.destroy(); + if (this.subviews.length != 0) { + if (removeCurrent) { + this.sendActiveWindowSynced(this.subviews[this.subviews.length-1]); + } + } + parent.addNewItemButton.updatePosition(); + </method> + + + <method name="sendActiveWindow" args="btn,win"> + if ($debug) Debug.write("sendActiveWindow: ",btn,win); + this.sendActiveWindowSynced(btn); + this.currentBtn.objRef.sendActiveWindow(); + </method> + + <method name="sendActiveWindowSynced" args="btn"> + <![CDATA[ + if (this.currentBtn != null){ + this.currentBtn.isactive=false; + ////if ($debug) //Debug.write("sendActiveWindow1: ",this.currentBtn); + this.currentBtn._minimizebtn_mo.setAttribute('visibility','hidden'); + this.currentBtn._minimizebtn_dn.setAttribute('visibility','hidden'); + } + this.currentBtn = btn; + this.currentBtn.objRef.setAttribute("visibility","visible"); + this.currentBtn.objRef.bringToFront(); + ////if ($debug) //Debug.write("sendActiveWindow2: ",this.currentBtn); + this.currentBtn._minimizebtn_mo.setAttribute('visibility','hidden'); + this.currentBtn._minimizebtn_dn.setAttribute('visibility','visible'); + this.currentBtn.isactive=true; + ]]> + </method> + +</class> + +</library>
Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/conference/whiteboard/whiteboardMiniButton.lzx URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/conference/whiteboard/whiteboardMiniButton.lzx?rev=1235410&r1=1235409&r2=1235410&view=diff ============================================================================== --- incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/conference/whiteboard/whiteboardMiniButton.lzx (original) +++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/conference/whiteboard/whiteboardMiniButton.lzx Tue Jan 24 18:58:51 2012 @@ -1,156 +1,175 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<library> - -<class name="whiteboardMiniButton" extends="view" width="250" height="18" y="2" - bgcolor="$once{ canvas.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> - - <method name="activateSynced"> - this.parent.sendActiveWindowSynced(this,win); - </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" /> - - - <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)" > - <handler name="onclick"> - <![CDATA[ - this.setAttribute('frame',2); - if (canvas.ismoderator || canvas.isAllowedToDraw) { - new lz.confirmationSingle(canvas,{ - refObj:this, - labeliderror:1313, - showCheckBox:false - }); - } else { - new lz.errorDialog(canvas,{ - labelid:1366, - errortext:canvas.getLabelName(1365) - }); - } - ]]> - </handler> - <method name="sendConfirmation" args="bool,askAgain"> - if (bool) { - this.parent.parent.removeObject(this.parent); - } - </method> - <labelTooltip labelid="1364" /> - </view> - - <text y="1" name="_long" text="..." fgcolor="0xFFFFFF" - x="${ parent.width-28 }" fontsize="$once{ canvas.defaultFontSize }" /> - - <labelTooltip text="${ parent.btnName }" /> -</class> - -</library> +<?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="whiteboardMiniButton" extends="view" width="250" height="18" y="2" + bgcolor="$once{ canvas.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> + + <method name="activateSynced"> + this.parent.sendActiveWindowSynced(this,win); + </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" /> + + + <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)" > + <handler name="onclick"> + <![CDATA[ + this.setAttribute('frame',2); + if (canvas.ismoderator || canvas.isAllowedToDraw) { + new lz.confirmationSingle(canvas,{ + refObj:this, + labeliderror:1313, + showCheckBox:false + }); + } else { + new lz.errorDialog(canvas,{ + labelid:1366, + errortext:canvas.getLabelName(1365) + }); + } + ]]> + </handler> + <method name="sendConfirmation" args="bool,askAgain"> + if (bool) { + this.parent.parent.removeObject(this.parent); + } + </method> + <labelTooltip labelid="1364" /> + </view> + + <text y="1" name="_long" text="..." fgcolor="0xFFFFFF" + x="${ parent.width-28 }" fontsize="$once{ canvas.defaultFontSize }" /> + + <labelTooltip text="${ parent.btnName }" /> +</class> + +</library> Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/fileexplorer/dragItemFileExplorer.lzx URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/fileexplorer/dragItemFileExplorer.lzx?rev=1235410&r1=1235409&r2=1235410&view=diff ============================================================================== --- incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/fileexplorer/dragItemFileExplorer.lzx (original) +++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/fileexplorer/dragItemFileExplorer.lzx Tue Jan 24 18:58:51 2012 @@ -1,236 +1,255 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<library> - -<class name="dragItemFileExplorer" extends="view"> - - <attribute name="refObj" value="null"/> - - <attribute name="dragItemResource" value="" type="string"/> - - <attribute name="overItem" value="null"/> - - <attribute name="alreadySent" value="false" type="boolean" /> - - <attribute name="fileExplorerItemId" value="0" type="number" /> - <attribute name="newParentFileExplorerItemId" value="0" type="number" /> - <attribute name="isOwner" value="false" type="boolean" /> - <attribute name="moveToHome" value="false" type="boolean" /> - - <handler name="oninit"> - lz.Track.activate(canvas.currentImagesListdraw.currentTrackGroupName); - canvas.currentImagesListdraw.currentDragItem = this; - lz.Cursor.showHandCursor(false); - lz.ModeManager.globalLockMouseEvents(); - this.dragger.apply(); - </handler> - - <method name="sendOverItem" args="itemRef"> - <![CDATA[ - if (this.refObj != itemRef) { - - if (this.refObj.isFolder) { - if (!itemRef.isTrashCan && !itemRef.isFolder) { - //No Folders to the whiteboard please - return; - } - } - - this.overItem = itemRef; - this._dragIcon.setAttribute("frame",2); - } - ]]> - </method> - - <method name="sendOutItem" args="itemRef"> - this.overItem = null; - this._dragIcon.setAttribute("frame",1); - </method> - - <handler name="onmouseup" reference="lz.GlobalMouse" args="who"> - this.close(); - </handler> - - <method name="close"> - //This can happen when the confirmation pops up - if (this.alreadySent) { - return; - } - this.alreadySent = true; - if ($debug) Debug.write("close Drag Item"); - lz.Cursor.showHandCursor(true); - lz.Track.deactivate(canvas.currentImagesListdraw.currentTrackGroupName); - lz.ModeManager.globalUnlockMouseEvents(); - canvas.currentImagesListdraw.currentDragItem = null; - this.dragger.remove(); - - if (this.overItem != null) { - - if ($debug) Debug.write("this.overItem ",this.overItem); - - if (this.overItem.isTrashCan) { - if ($debug) Debug.write("SEND TO GARBAGE"); - this.fileExplorerItemId = this.refObj.fileExplorerItemId; - new lz.confirmationSingle(canvas,{ - refObj:this, - labelid:710, - labeliderror:713, - showCheckBox:false - }); - } else if (this.overItem.isFolder){ - if ($debug) Debug.write("MOVE ITEM",this.refObj.fileExplorerItemId); - if ($debug) Debug.write("MOVE TO PARENT",this.overItem.fileExplorerItemId); - this.fileExplorerItemId = this.refObj.fileExplorerItemId; - this.newParentFileExplorerItemId = this.overItem.fileExplorerItemId; - if (this.overItem.fileExplorerItemId == 0) { - this.isOwner = this.overItem.isOwner; - } - - //check if this is a home folder or not - var checkForOwer = this.overItem.checkForIsOwner(); - if ($debug) Debug.write("checkForOwer ::",checkForOwer); - this.moveToHome = checkForOwer; - - //check that the file is not moved inside itself - if (this.overItem.checkForIsChild(this.refObj.fileExplorerItemId)) { - new lz.labelerrorPopup(canvas,{errorlabelid:922}); - this.destroy(); - return; - } - - this.moveFile(); - } else { - if ($debug) Debug.warn("Drag to whiteboard !!! "); - if (this.refObj.isVideo) { - this.refObj.playVideo(); - } else if (this.refObj.isPresentation) { - this.refObj.loadDocumentToWhiteboard(); - } else if (this.refObj.isImage) { - this.refObj.loadImageToWhiteboard(); - } else { - if ($debug) Debug.warn("Should never happen dragItemFileExplorer unhandled case"); - } - this.destroy(); - } - } else { - this.destroy(); - } - - </method> - - <method name="sendConfirmation" args="bool,askAgain"> - if (bool) { - this.deleteFileOrFolder(); - } else { - this.destroy(); - } - </method> - - <method name="deleteFileOrFolder"> - <![CDATA[ - if ($debug) Debug.write("deleteFileOrFolder HTTP 2: "); - //this.getFileExplorerByRoom.doCall(); - var downloadurl = canvas.protocol + '://'+canvas.rtmphostlocal+':'+canvas.red5httpport - +canvas.httpRootKey+'services/FileService/deleteFileOrFolderSelf?' - +'SID='+canvas.sessionId - +'&fileExplorerItemId='+this.fileExplorerItemId; - - this.deleteFileOrFolderSelf.setAttribute("src",downloadurl); - if ($debug) Debug.write("deleteFileOrFolderSelf doRequest ",downloadurl); - this.deleteFileOrFolderSelf.doRequest(); - ]]> - </method> - - <dataset name="deleteFileOrFolderSelf" type="http" > - <handler name="ondata" args="d"> - <![CDATA[ - //if ($debug) Debug.write("ondata ",d); - if ($debug) Debug.write("deleteFileOrFolder: ",d); - parent.refObj.parent.parent.doOpen(); - parent.destroy(); - ]]> - </handler> - </dataset> - - <!-- - <netRemoteCallHib name="deleteFileOrFolder" funcname="fileservice.deleteFileOrFolder" - remotecontext="$once{ canvas.thishib }" > - <netparam><method name="getValue">return canvas.sessionId;</method></netparam> - <netparam><method name="getValue">return parent.fileExplorerItemId;</method></netparam> - <handler name="ondata" args="value"> - if ($debug) Debug.write("deleteFileOrFolder: ",value); - parent.refObj.parent.parent.doOpen(); - parent.destroy(); - </handler> - </netRemoteCallHib> - --> - - <!-- - public Long moveFileSelf(String SID, Long fileExplorerItemId, - Long newParentFileExplorerItemId, Long room_id, Boolean isOwner, - Boolean moveToHome) - --> - - <method name="moveFile"> - <![CDATA[ - if ($debug) Debug.write("moveFile HTTP 1: "); - //this.getFileExplorerByRoom.doCall(); - var downloadurl = canvas.protocol + '://'+canvas.rtmphostlocal+':'+canvas.red5httpport - +canvas.httpRootKey+'services/FileService/moveFileSelfInternal?' - +'SID='+canvas.sessionId - +'&fileExplorerItemId='+this.fileExplorerItemId - +'&newParentFileExplorerItemId='+this.newParentFileExplorerItemId - +'&roomId='+hib.currentroomid - +'&isOwner='+this.isOwner - +'&moveToHome='+this.moveToHome; - - this.moveFileSelf.setAttribute("src",downloadurl); - if ($debug) Debug.write("moveFileSelf doRequest ",downloadurl); - this.moveFileSelf.doRequest(); - ]]> - </method> - - <dataset name="moveFileSelf" type="http" > - <handler name="ondata" args="d"> - <![CDATA[ - //if ($debug) Debug.write("ondata ",d); - if ($debug) Debug.write("moveFileSelf: ",d); - parent.overItem.doOpen(); - parent.refObj.parent.parent.doOpen(); - parent.destroy(); - ]]> - </handler> - </dataset> - - <!-- - <netRemoteCallHib name="moveFile" funcname="fileservice.moveFile" - remotecontext="$once{ canvas.thishib }" > - - <attribute name="fileExplorerItemId" value="0" type="number" /> - - - <netparam><method name="getValue">return canvas.sessionId;</method></netparam> - <netparam><method name="getValue">return parent.fileExplorerItemId;</method></netparam> - <netparam><method name="getValue">return parent.newParentFileExplorerItemId;</method></netparam> - <netparam><method name="getValue">return hib.currentroomid;</method></netparam> - <netparam><method name="getValue">return parent.isOwner;</method></netparam> - <netparam><method name="getValue">return parent.moveToHome;</method></netparam> - - <handler name="ondata" args="value"> - if ($debug) Debug.write("moveFile: ",value); - parent.overItem.doOpen(); - parent.refObj.parent.parent.doOpen(); - parent.destroy(); - </handler> - </netRemoteCallHib> - --> - - <view name="_dragFileSymbol" x="10" y="10" - resource="$once{ parent.dragItemResource }" /> - - <view name="_dragIcon" x="18" y="14" - resource="drag_n_drop_rsc" frame="1" /> - - <dragstate name="dragger"/> -</class> - -</library> \ No newline at end of file +<?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="dragItemFileExplorer" extends="view"> + + <attribute name="refObj" value="null"/> + + <attribute name="dragItemResource" value="" type="string"/> + + <attribute name="overItem" value="null"/> + + <attribute name="alreadySent" value="false" type="boolean" /> + + <attribute name="fileExplorerItemId" value="0" type="number" /> + <attribute name="newParentFileExplorerItemId" value="0" type="number" /> + <attribute name="isOwner" value="false" type="boolean" /> + <attribute name="moveToHome" value="false" type="boolean" /> + + <handler name="oninit"> + lz.Track.activate(canvas.currentImagesListdraw.currentTrackGroupName); + canvas.currentImagesListdraw.currentDragItem = this; + lz.Cursor.showHandCursor(false); + lz.ModeManager.globalLockMouseEvents(); + this.dragger.apply(); + </handler> + + <method name="sendOverItem" args="itemRef"> + <![CDATA[ + if (this.refObj != itemRef) { + + if (this.refObj.isFolder) { + if (!itemRef.isTrashCan && !itemRef.isFolder) { + //No Folders to the whiteboard please + return; + } + } + + this.overItem = itemRef; + this._dragIcon.setAttribute("frame",2); + } + ]]> + </method> + + <method name="sendOutItem" args="itemRef"> + this.overItem = null; + this._dragIcon.setAttribute("frame",1); + </method> + + <handler name="onmouseup" reference="lz.GlobalMouse" args="who"> + this.close(); + </handler> + + <method name="close"> + //This can happen when the confirmation pops up + if (this.alreadySent) { + return; + } + this.alreadySent = true; + if ($debug) Debug.write("close Drag Item"); + lz.Cursor.showHandCursor(true); + lz.Track.deactivate(canvas.currentImagesListdraw.currentTrackGroupName); + lz.ModeManager.globalUnlockMouseEvents(); + canvas.currentImagesListdraw.currentDragItem = null; + this.dragger.remove(); + + if (this.overItem != null) { + + if ($debug) Debug.write("this.overItem ",this.overItem); + + if (this.overItem.isTrashCan) { + if ($debug) Debug.write("SEND TO GARBAGE"); + this.fileExplorerItemId = this.refObj.fileExplorerItemId; + new lz.confirmationSingle(canvas,{ + refObj:this, + labelid:710, + labeliderror:713, + showCheckBox:false + }); + } else if (this.overItem.isFolder){ + if ($debug) Debug.write("MOVE ITEM",this.refObj.fileExplorerItemId); + if ($debug) Debug.write("MOVE TO PARENT",this.overItem.fileExplorerItemId); + this.fileExplorerItemId = this.refObj.fileExplorerItemId; + this.newParentFileExplorerItemId = this.overItem.fileExplorerItemId; + if (this.overItem.fileExplorerItemId == 0) { + this.isOwner = this.overItem.isOwner; + } + + //check if this is a home folder or not + var checkForOwer = this.overItem.checkForIsOwner(); + if ($debug) Debug.write("checkForOwer ::",checkForOwer); + this.moveToHome = checkForOwer; + + //check that the file is not moved inside itself + if (this.overItem.checkForIsChild(this.refObj.fileExplorerItemId)) { + new lz.labelerrorPopup(canvas,{errorlabelid:922}); + this.destroy(); + return; + } + + this.moveFile(); + } else { + if ($debug) Debug.warn("Drag to whiteboard !!! "); + if (this.refObj.isVideo) { + this.refObj.playVideo(); + } else if (this.refObj.isPresentation) { + this.refObj.loadDocumentToWhiteboard(); + } else if (this.refObj.isImage) { + this.refObj.loadImageToWhiteboard(); + } else { + if ($debug) Debug.warn("Should never happen dragItemFileExplorer unhandled case"); + } + this.destroy(); + } + } else { + this.destroy(); + } + + </method> + + <method name="sendConfirmation" args="bool,askAgain"> + if (bool) { + this.deleteFileOrFolder(); + } else { + this.destroy(); + } + </method> + + <method name="deleteFileOrFolder"> + <![CDATA[ + if ($debug) Debug.write("deleteFileOrFolder HTTP 2: "); + //this.getFileExplorerByRoom.doCall(); + var downloadurl = canvas.protocol + '://'+canvas.rtmphostlocal+':'+canvas.red5httpport + +canvas.httpRootKey+'services/FileService/deleteFileOrFolderSelf?' + +'SID='+canvas.sessionId + +'&fileExplorerItemId='+this.fileExplorerItemId; + + this.deleteFileOrFolderSelf.setAttribute("src",downloadurl); + if ($debug) Debug.write("deleteFileOrFolderSelf doRequest ",downloadurl); + this.deleteFileOrFolderSelf.doRequest(); + ]]> + </method> + + <dataset name="deleteFileOrFolderSelf" type="http" > + <handler name="ondata" args="d"> + <![CDATA[ + //if ($debug) Debug.write("ondata ",d); + if ($debug) Debug.write("deleteFileOrFolder: ",d); + parent.refObj.parent.parent.doOpen(); + parent.destroy(); + ]]> + </handler> + </dataset> + + <!-- + <netRemoteCallHib name="deleteFileOrFolder" funcname="fileservice.deleteFileOrFolder" + remotecontext="$once{ canvas.thishib }" > + <netparam><method name="getValue">return canvas.sessionId;</method></netparam> + <netparam><method name="getValue">return parent.fileExplorerItemId;</method></netparam> + <handler name="ondata" args="value"> + if ($debug) Debug.write("deleteFileOrFolder: ",value); + parent.refObj.parent.parent.doOpen(); + parent.destroy(); + </handler> + </netRemoteCallHib> + --> + + <!-- + public Long moveFileSelf(String SID, Long fileExplorerItemId, + Long newParentFileExplorerItemId, Long room_id, Boolean isOwner, + Boolean moveToHome) + --> + + <method name="moveFile"> + <![CDATA[ + if ($debug) Debug.write("moveFile HTTP 1: "); + //this.getFileExplorerByRoom.doCall(); + var downloadurl = canvas.protocol + '://'+canvas.rtmphostlocal+':'+canvas.red5httpport + +canvas.httpRootKey+'services/FileService/moveFileSelfInternal?' + +'SID='+canvas.sessionId + +'&fileExplorerItemId='+this.fileExplorerItemId + +'&newParentFileExplorerItemId='+this.newParentFileExplorerItemId + +'&roomId='+hib.currentroomid + +'&isOwner='+this.isOwner + +'&moveToHome='+this.moveToHome; + + this.moveFileSelf.setAttribute("src",downloadurl); + if ($debug) Debug.write("moveFileSelf doRequest ",downloadurl); + this.moveFileSelf.doRequest(); + ]]> + </method> + + <dataset name="moveFileSelf" type="http" > + <handler name="ondata" args="d"> + <![CDATA[ + //if ($debug) Debug.write("ondata ",d); + if ($debug) Debug.write("moveFileSelf: ",d); + parent.overItem.doOpen(); + parent.refObj.parent.parent.doOpen(); + parent.destroy(); + ]]> + </handler> + </dataset> + + <!-- + <netRemoteCallHib name="moveFile" funcname="fileservice.moveFile" + remotecontext="$once{ canvas.thishib }" > + + <attribute name="fileExplorerItemId" value="0" type="number" /> + + + <netparam><method name="getValue">return canvas.sessionId;</method></netparam> + <netparam><method name="getValue">return parent.fileExplorerItemId;</method></netparam> + <netparam><method name="getValue">return parent.newParentFileExplorerItemId;</method></netparam> + <netparam><method name="getValue">return hib.currentroomid;</method></netparam> + <netparam><method name="getValue">return parent.isOwner;</method></netparam> + <netparam><method name="getValue">return parent.moveToHome;</method></netparam> + + <handler name="ondata" args="value"> + if ($debug) Debug.write("moveFile: ",value); + parent.overItem.doOpen(); + parent.refObj.parent.parent.doOpen(); + parent.destroy(); + </handler> + </netRemoteCallHib> + --> + + <view name="_dragFileSymbol" x="10" y="10" + resource="$once{ parent.dragItemResource }" /> + + <view name="_dragIcon" x="18" y="14" + resource="drag_n_drop_rsc" frame="1" /> + + <dragstate name="dragger"/> +</class> + +</library> Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/fileexplorer/dynamicFileName.lzx URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/fileexplorer/dynamicFileName.lzx?rev=1235410&r1=1235409&r2=1235410&view=diff ============================================================================== --- incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/fileexplorer/dynamicFileName.lzx (original) +++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/fileexplorer/dynamicFileName.lzx Tue Jan 24 18:58:51 2012 @@ -1,140 +1,159 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<library> - -<class name="dynamicFileName" extends="customInputtext" - fontsize="10" bgcolor="0xFFFFFF"> - - <attribute name="isNew" value="false" type="boolean" /> - - <!-- Only used in case its an update --> - <attribute name="fileExplorerItemId" value="0" type="number" /> - - <attribute name="parentFileExplorerItemId" value="0" type="number" /> - <attribute name="isOwner" value="false" type="boolean" /> - - <attribute name="refObj" value="null" /> - - <handler name="onblur"> - lz.ModeManager.release(this); - if ($debug) Debug.write("Store and Destroy ",this.parentFileExplorerItemId); - if (this.isNew) { - this.addFolder(); - } else { - this.updateFileOrFolderName(); - } - </handler> - - <handler name="onkeydown" args="k"> - <![CDATA[ - if (k == 13 || k == 27) { - this.onblur.sendEvent(); - } - ]]> - </handler> - - <!-- - public Long addFolderSelf(String SID, Long parentFileExplorerItemId, - String fileName, Long room_id, Boolean isOwner) - --> - - <method name="addFolder"> - <![CDATA[ - if ($debug) Debug.write("moveFile HTTP 1: "); - //this.getFileExplorerByRoom.doCall(); - var downloadurl = canvas.protocol + '://'+canvas.rtmphostlocal+':'+canvas.red5httpport - +canvas.httpRootKey+'services/FileService/addFolderSelfInternal?' - +'SID='+canvas.sessionId - +'&parentFileExplorerItemId='+this.parentFileExplorerItemId - +'&fileName='+this.text - +'&roomId='+hib.currentroomid - +'&isOwner='+this.isOwner; - - this.addFolderSelf.setAttribute("src",downloadurl); - if ($debug) Debug.write("addFolderSelf doRequest ",downloadurl); - this.addFolderSelf.doRequest(); - ]]> - </method> - - <dataset name="addFolderSelf" type="http" > - <handler name="ondata" args="d"> - <![CDATA[ - //if ($debug) Debug.write("ondata ",d); - if ($debug) Debug.write("addFolderSelf: ",d); - parent.completed(); - ]]> - </handler> - </dataset> - - <!-- - <netRemoteCallHib name="addFolder" funcname="fileservice.addFolder" - remotecontext="$once{ canvas.thishib }" > - <netparam><method name="getValue">return canvas.sessionId;</method></netparam> - <netparam><method name="getValue">return parent.parent.parentFileExplorerItemId;</method></netparam> - <netparam><method name="getValue">return parent.parent.text;</method></netparam> - <netparam><method name="getValue">return hib.currentroomid;</method></netparam> - <netparam><method name="getValue">return parent.parent.isOwner;</method></netparam> - <handler name="ondata" args="value"> - if ($debug) Debug.write("addFolder: ",value); - parent.completed(value); - </handler> - </netRemoteCallHib> - --> - - <!-- - public Long updateFileOrFolderNameSelf(String SID, Long fileExplorerItemId, - String fileName) - --> - <method name="updateFileOrFolderName"> - <![CDATA[ - if ($debug) Debug.write("moveFile HTTP 1: "); - //this.getFileExplorerByRoom.doCall(); - var downloadurl = canvas.protocol + '://'+canvas.rtmphostlocal+':'+canvas.red5httpport - +canvas.httpRootKey+'services/FileService/updateFileOrFolderNameSelf?' - +'SID='+canvas.sessionId - +'&fileExplorerItemId='+this.fileExplorerItemId - +'&fileName='+this.text; - - this.updateFileOrFolderNameSelf.setAttribute("src",downloadurl); - if ($debug) Debug.write("updateFileOrFolderNameSelf doRequest ",downloadurl); - this.updateFileOrFolderNameSelf.doRequest(); - ]]> - </method> - - <dataset name="updateFileOrFolderNameSelf" type="http" > - <handler name="ondata" args="d"> - <![CDATA[ - //if ($debug) Debug.write("ondata ",d); - if ($debug) Debug.write("updateFileOrFolderNameSelf: ",d); - parent.completedRename(); - ]]> - </handler> - </dataset> - - <!-- - <netRemoteCallHib name="updateFileOrFolderName" funcname="fileservice.updateFileOrFolderName" - remotecontext="$once{ canvas.thishib }" > - <netparam><method name="getValue">return canvas.sessionId;</method></netparam> - <netparam><method name="getValue">return parent.parent.fileExplorerItemId;</method></netparam> - <netparam><method name="getValue">return parent.parent.text;</method></netparam> - <handler name="ondata" args="value"> - if ($debug) Debug.write("updateFileOrFolderName: ",parent.fileExplorerItemId); - parent.completedRename(); - </handler> - </netRemoteCallHib> - --> - - <method name="completed"> - //this.refObj.fileExplorerItemId = fileExplorerItemId; - this.refObj.setAttribute("fileName",this.getText()); - this.refObj.parent.parent.doOpen(); - this.destroy(); - </method> - - <method name="completedRename"> - this.refObj.setAttribute("fileName",this.getText()); - this.destroy(); - </method> - -</class> - -</library> \ No newline at end of file +<?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="dynamicFileName" extends="customInputtext" + fontsize="10" bgcolor="0xFFFFFF"> + + <attribute name="isNew" value="false" type="boolean" /> + + <!-- Only used in case its an update --> + <attribute name="fileExplorerItemId" value="0" type="number" /> + + <attribute name="parentFileExplorerItemId" value="0" type="number" /> + <attribute name="isOwner" value="false" type="boolean" /> + + <attribute name="refObj" value="null" /> + + <handler name="onblur"> + lz.ModeManager.release(this); + if ($debug) Debug.write("Store and Destroy ",this.parentFileExplorerItemId); + if (this.isNew) { + this.addFolder(); + } else { + this.updateFileOrFolderName(); + } + </handler> + + <handler name="onkeydown" args="k"> + <![CDATA[ + if (k == 13 || k == 27) { + this.onblur.sendEvent(); + } + ]]> + </handler> + + <!-- + public Long addFolderSelf(String SID, Long parentFileExplorerItemId, + String fileName, Long room_id, Boolean isOwner) + --> + + <method name="addFolder"> + <![CDATA[ + if ($debug) Debug.write("moveFile HTTP 1: "); + //this.getFileExplorerByRoom.doCall(); + var downloadurl = canvas.protocol + '://'+canvas.rtmphostlocal+':'+canvas.red5httpport + +canvas.httpRootKey+'services/FileService/addFolderSelfInternal?' + +'SID='+canvas.sessionId + +'&parentFileExplorerItemId='+this.parentFileExplorerItemId + +'&fileName='+this.text + +'&roomId='+hib.currentroomid + +'&isOwner='+this.isOwner; + + this.addFolderSelf.setAttribute("src",downloadurl); + if ($debug) Debug.write("addFolderSelf doRequest ",downloadurl); + this.addFolderSelf.doRequest(); + ]]> + </method> + + <dataset name="addFolderSelf" type="http" > + <handler name="ondata" args="d"> + <![CDATA[ + //if ($debug) Debug.write("ondata ",d); + if ($debug) Debug.write("addFolderSelf: ",d); + parent.completed(); + ]]> + </handler> + </dataset> + + <!-- + <netRemoteCallHib name="addFolder" funcname="fileservice.addFolder" + remotecontext="$once{ canvas.thishib }" > + <netparam><method name="getValue">return canvas.sessionId;</method></netparam> + <netparam><method name="getValue">return parent.parent.parentFileExplorerItemId;</method></netparam> + <netparam><method name="getValue">return parent.parent.text;</method></netparam> + <netparam><method name="getValue">return hib.currentroomid;</method></netparam> + <netparam><method name="getValue">return parent.parent.isOwner;</method></netparam> + <handler name="ondata" args="value"> + if ($debug) Debug.write("addFolder: ",value); + parent.completed(value); + </handler> + </netRemoteCallHib> + --> + + <!-- + public Long updateFileOrFolderNameSelf(String SID, Long fileExplorerItemId, + String fileName) + --> + <method name="updateFileOrFolderName"> + <![CDATA[ + if ($debug) Debug.write("moveFile HTTP 1: "); + //this.getFileExplorerByRoom.doCall(); + var downloadurl = canvas.protocol + '://'+canvas.rtmphostlocal+':'+canvas.red5httpport + +canvas.httpRootKey+'services/FileService/updateFileOrFolderNameSelf?' + +'SID='+canvas.sessionId + +'&fileExplorerItemId='+this.fileExplorerItemId + +'&fileName='+this.text; + + this.updateFileOrFolderNameSelf.setAttribute("src",downloadurl); + if ($debug) Debug.write("updateFileOrFolderNameSelf doRequest ",downloadurl); + this.updateFileOrFolderNameSelf.doRequest(); + ]]> + </method> + + <dataset name="updateFileOrFolderNameSelf" type="http" > + <handler name="ondata" args="d"> + <![CDATA[ + //if ($debug) Debug.write("ondata ",d); + if ($debug) Debug.write("updateFileOrFolderNameSelf: ",d); + parent.completedRename(); + ]]> + </handler> + </dataset> + + <!-- + <netRemoteCallHib name="updateFileOrFolderName" funcname="fileservice.updateFileOrFolderName" + remotecontext="$once{ canvas.thishib }" > + <netparam><method name="getValue">return canvas.sessionId;</method></netparam> + <netparam><method name="getValue">return parent.parent.fileExplorerItemId;</method></netparam> + <netparam><method name="getValue">return parent.parent.text;</method></netparam> + <handler name="ondata" args="value"> + if ($debug) Debug.write("updateFileOrFolderName: ",parent.fileExplorerItemId); + parent.completedRename(); + </handler> + </netRemoteCallHib> + --> + + <method name="completed"> + //this.refObj.fileExplorerItemId = fileExplorerItemId; + this.refObj.setAttribute("fileName",this.getText()); + this.refObj.parent.parent.doOpen(); + this.destroy(); + </method> + + <method name="completedRename"> + this.refObj.setAttribute("fileName",this.getText()); + this.destroy(); + </method> + +</class> + +</library>
