Author: solomax
Date: Mon Nov 30 12:28:29 2015
New Revision: 1717240
URL: http://svn.apache.org/viewvc?rev=1717240&view=rev
Log:
[OPENMEETINGS-1279] file move fixed; error in popups is fixed; add file works
better
Modified:
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/upload/uploadWindowExplorer.lzx
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/popups/errorPopup.lzx
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/dragItemFileExplorer.lzx
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/fileExplorer.lzx
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/treeitems/baseFileExplorerItem.lzx
Modified:
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/upload/uploadWindowExplorer.lzx
URL:
http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/upload/uploadWindowExplorer.lzx?rev=1717240&r1=1717239&r2=1717240&view=diff
==============================================================================
---
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/upload/uploadWindowExplorer.lzx
(original)
+++
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/upload/uploadWindowExplorer.lzx
Mon Nov 30 12:28:29 2015
@@ -206,6 +206,20 @@
</handler>
</simpleLabelButton>
+ <method name="formatURL" args="fileHash">
+ <![CDATA[
+ var uploadmoduleimgfolderVar = '/' + fileHash;
+ var downloadurl = canvas.getUrl() + 'DownloadHandler?'
+ + 'fileName=' +
encodeURIComponent(fileHash + ".swf")
+ + '&moduleName=' + 'videoconf1'
+ + '&parentPath=' +
encodeURIComponent(uploadmoduleimgfolderVar + '/')
+ + '&room_id=files'
+ + '&sid=' + canvas.sessionId;
+ //if ($debug) Debug.write("downloadurl: ",downloadurl);
+ return downloadurl;
+ ]]>
+ </method>
+
<method name="createFileComplete" args="event">
if ($debug) Debug.write("createFileComplete::File has
been created!!!!");
//FIXME TODO remove remoteComplete!!!!!
Modified:
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx
URL:
http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx?rev=1717240&r1=1717239&r2=1717240&view=diff
==============================================================================
---
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx
(original)
+++
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx
Mon Nov 30 12:28:29 2015
@@ -210,7 +210,7 @@
new lz.labelerrorPopup(canvas,
{
errorlabelid: 99
- , onCloseFunc: function() {
+ , closeFunc: function() {
if (this.makeModal) {
lz.ModeManager.releaseAll();
}
@@ -223,7 +223,7 @@
} else if (this.showKickMessage) {
new lz.labelerrorPopup(canvas,{
errorlabelid:606
- , onCloseFunc: function() {
+ , closeFunc: function() {
canvas.quit();
}
});
Modified:
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/popups/errorPopup.lzx
URL:
http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/popups/errorPopup.lzx?rev=1717240&r1=1717239&r2=1717240&view=diff
==============================================================================
---
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/popups/errorPopup.lzx
(original)
+++
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/popups/errorPopup.lzx
Mon Nov 30 12:28:29 2015
@@ -8,8 +8,8 @@
"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
-
+ 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
@@ -22,25 +22,25 @@
<class name="errorPopup" extends="labelExplorerBox" labelid="204"
docking="true" resizeable="false" closable="true" y="100"
- x="$once{ parent.width/2 - this.width/2 }" height="160" width="324">
+ x="$once{ parent.width/2 - this.width/2 }" height="160" width="324">
<attribute name="error" value="" type="string" />
<attribute name="makeModal" value="false" type="boolean" />
- <attribute name="onCloseFunc" type="object" value="null"/>
+ <attribute name="closeFunc" value="null"/>
<handler name="oninit">
if ($debug) Debug.write("errorPopup::oninit ");
- if (this.makeModal) {
- lz.ModeManager.makeModal(this);
- }
+ if (this.makeModal) {
+ lz.ModeManager.makeModal(this);
+ }
</handler>
<handler name="onclose">
if (this.makeModal) {
lz.ModeManager.releaseAll();
}
- if (onCloseFunc != null) {
- onCloseFunc();
+ if (closeFunc != null) {
+ this.closeFunc();
}
</handler>
@@ -50,22 +50,22 @@
<text fontsize="10" fontstyle="bold" text="${
parent.parent.error }"
multiline="true" width="$once{ parent.width - 16 }"
selectable="true" />
</view>
-
- <simpleLabelButton labelid="642" width="100" x="$once{ parent.width-105 }"
- y="$once{ parent.height-24 }"
- onclick="this.parent.close();" />
+
+ <simpleLabelButton labelid="642" width="100" x="$once{ parent.width-105
}"
+ y="$once{ parent.height-24 }"
+ onclick="this.parent.close();" />
</class>
<class name="labelerrorPopup" extends="errorPopup">
- <attribute name="errorlabelid" type="number"
setter="setErrorLabelId(errorlabelid)" />
- <method name="setErrorLabelId" args="errorlabelid" >
- this.errorlabelid = errorlabelid;
- this.setAttribute("error",canvas.getLabelName(this.errorlabelid));
- if ($debug) Debug.write("labelerrorPopup:
",canvas.getLabelName(this.errorlabelid));
- </method>
-
+ <attribute name="errorlabelid" type="number"
setter="setErrorLabelId(errorlabelid)" />
+ <method name="setErrorLabelId" args="errorlabelid" >
+ this.errorlabelid = errorlabelid;
+
this.setAttribute("error",canvas.getLabelName(this.errorlabelid));
+ if ($debug) Debug.write("labelerrorPopup:
",canvas.getLabelName(this.errorlabelid));
+ </method>
+
</class>
@@ -88,13 +88,10 @@
<method name="setError" args="error">
- if ( lz.singletonErrorPopupHolder.dialogPresent == 0 )
- {
+ if (lz.singletonErrorPopupHolder.dialogPresent == 0) {
lz.singletonErrorPopupHolder.dialogPresent = 1;
lz.singletonErrorPopupHolder.dialogObject = new
lz.singletonErrorPopup(canvas,{error:error});
- }
- else
- {
+ } else {
lz.singletonErrorPopupHolder.dialogObject.error = error;
}
</method>
Modified:
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/dragItemFileExplorer.lzx
URL:
http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/dragItemFileExplorer.lzx?rev=1717240&r1=1717239&r2=1717240&view=diff
==============================================================================
---
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/dragItemFileExplorer.lzx
(original)
+++
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/dragItemFileExplorer.lzx
Mon Nov 30 12:28:29 2015
@@ -8,8 +8,8 @@
"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
-
+ 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
@@ -33,9 +33,7 @@
<attribute name="overItem" value="null"/>
<attribute name="alreadySent" value="false" type="boolean" />
<attribute name="fileId" 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" />
+ <attribute name="moveToHome" value="false" type="boolean" />
<handler name="oninit">
lz.Track.activate(canvas.currentImagesListdraw.currentTrackGroupName);
@@ -47,114 +45,110 @@
<method name="sendOverItem" args="itemRef">
<![CDATA[
- if (this.refObj != itemRef) {
-
- if (this.refObj.type == 'Folder') {
- if (!itemRef.isTrashCan && itemRef.type !=
'Folder') {
- //No Folders to the whiteboard please
- return;
- }
- }
-
- this.overItem = itemRef;
- this._dragIcon.setAttribute("frame",2);
- }
+ if (this.refObj != itemRef) {
+
+ if (this.refObj.type == 'Folder') {
+ if (!itemRef.isTrashCan && itemRef.type
!= 'Folder') {
+ //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>
+ this.overItem = null;
+ this._dragIcon.setAttribute("frame",1);
+ </method>
<handler name="onmouseup" reference="lz.GlobalMouse" args="who">
- this.close();
- </handler>
-
- <method name="close">
- <![CDATA[
- //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"] && this.overItem.isTrashCan) {
- if ($debug) Debug.write("SEND TO GARBAGE");
- this.fileId = this.refObj.fileId;
- new lz.confirmationSingle(canvas,{
- refObj:this,
- labelid:710,
- labeliderror:713,
- showCheckBox:false,
- refReturnMethod:"sendConfirmation"
- });
- } else if (this.overItem["type"] && this.overItem.type ==
'Folder'){
- if ($debug) Debug.write("MOVE ITEM",this.refObj.fileId);
- if ($debug) Debug.write("MOVE TO
PARENT",this.overItem.fileId);
- this.fileId = this.refObj.fileId;
- this.newParentFileExplorerItemId = this.overItem.fileId;
- if (this.overItem.fileId == 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.fileId)) {
- new
lz.labelerrorPopup(canvas,{errorlabelid:922});
- this.destroy();
- return;
- }
-
- this.moveFile();
- } else {
- if ($debug) Debug.warn("Drag to whiteboard !!! ");
- switch (this.refObj.type) {
- case 'Video':
- this.refObj.playVideo();
- break;
- case 'WmlFile':
- this.refObj.loadWmlFile();
- break;
+ this.close();
+ </handler>
+
+ <method name="close">
+ <![CDATA[
+ //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"] &&
this.overItem.isTrashCan) {
+ if ($debug) Debug.write("SEND TO GARBAGE");
+ this.fileId = this.refObj.fileId;
+ new lz.confirmationSingle(canvas,{
+ refObj:this,
+ labelid:710,
+ labeliderror:713,
+ showCheckBox:false,
+
refReturnMethod:"sendConfirmation"
+ });
+ } else if (this.overItem["type"] && this.overItem.type
== 'Folder'){
+ if ($debug) Debug.write("MOVE
ITEM",this.refObj.fileId);
+ if ($debug) Debug.write("MOVE TO
PARENT",this.overItem.fileId);
+ this.fileId = this.refObj.fileId;
+
+ //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.fileId)) {
+ new
lz.labelerrorPopup(canvas,{errorlabelid:922});
+ this.destroy();
+ return;
+ }
+
+ this.moveFile();
+ } else {
+ if ($debug) Debug.warn("Drag to whiteboard !!!
");
+ switch (this.refObj.type) {
+ case 'Video':
+ this.refObj.playVideo();
+ break;
+ case 'WmlFile':
+ this.refObj.loadWmlFile();
+ break;
case 'Presentation':
this.refObj.loadDocumentToWhiteboard();
- break;
+ break;
case 'Image':
this.refObj.loadImageToWhiteboard();
- break;
- default:
- 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>
-
+ break;
+ default:
+ 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[
var deleteLoader = new RestCall({
@@ -175,46 +169,42 @@
this.refObj.parent.parent.doOpen();
this.destroy();
</method>
-
+
<method name="deleteError" args="event">
if ($debug) Debug.error("drag::deleteError ", event);
this.destroy();
</method>
- <method name="moveFile">
- <![CDATA[
- if ($debug) Debug.write("moveFile HTTP 1: ");
- var downloadurl =
canvas.getUrl()+'services/FileService/moveFileSelfInternal?'
- +'SID='+canvas.sessionId
- +'&fileId='+this.fileId
-
+'&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>
-
- <view name="_dragFileSymbol" x="10" y="10"
- resource="$once{ parent.dragItemResource }" />
+ <method name="moveFile">
+ <![CDATA[
+ if ($debug) Debug.write("moveFile HTTP 1: ");
+ var moveLoader = new RestCall({
+ url: canvas.getUrl() + 'services/file/move/' +
hib.currentroomid + '/' + this.fileId + '/' + this.overItem.fileId
+ , method: URLRequestMethod.POST
+ , errorCallback: deleteError
+ , successCallback: deleteComplete
+ });
+ moveLoader.load('--dummy--');
+ ]]>
+ </method>
+
+ <method name="moveComplete" args="event">
+ var o = JSON.parse(event.target.data);
+ if ($debug) Debug.info("drag::moveComplete ", o);
+ //TODO check return code
+ this.overItem.doOpen();
+ this.refObj.parent.parent.doOpen();
+ this.destroy();
+ </method>
+
+ <method name="moveError" args="event">
+ if ($debug) Debug.error("drag::moveError ", event);
+ this.destroy();
+ </method>
+
+ <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" />
+ <view name="_dragIcon" x="18" y="14" resource="drag_n_drop_rsc"
frame="1" />
<dragstate name="dragger"/>
</class>
Modified:
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/fileExplorer.lzx
URL:
http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/fileExplorer.lzx?rev=1717240&r1=1717239&r2=1717240&view=diff
==============================================================================
---
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/fileExplorer.lzx
(original)
+++
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/fileExplorer.lzx
Mon Nov 30 12:28:29 2015
@@ -172,7 +172,6 @@
, isRoot: true
, ownerId: canvas.userId
, fileIcon: 'file_explorer_folder_home_rsc'
- , refObjListRoot: this
});
userHome.content.setAttribute("visibility", "visible");
userHome.icon_folder_pre.setAttribute("frame", 2);
@@ -187,7 +186,6 @@
, name: '_roomHome'
, isRoot: true
, fileIcon: 'file_explorer_folder_network_rsc'
- , refObjListRoot: this
});
roomHome.content.setAttribute("visibility", "visible");
roomHome.icon_folder_pre.setAttribute("frame", 2);
Modified:
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/treeitems/baseFileExplorerItem.lzx
URL:
http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/treeitems/baseFileExplorerItem.lzx?rev=1717240&r1=1717239&r2=1717240&view=diff
==============================================================================
---
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/treeitems/baseFileExplorerItem.lzx
(original)
+++
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/tabcontent/fileexplorer/treeitems/baseFileExplorerItem.lzx
Mon Nov 30 12:28:29 2015
@@ -28,7 +28,6 @@
</passthrough>
</when>
</switch>
- <attribute name="refObjListRoot" value="null"/>
<attribute name="isRoot" value="false" type="boolean" />
<attribute name="fileIcon" type="string" value="string" />
<attribute name="open" value="false" type="boolean" />
@@ -168,7 +167,7 @@
if ($debug) Debug.info("base::deleteComplete ", o);
//TODO check return code
this.parent.parent.doOpen();
- this.refObjListRoot._selected = null;
+ canvas.currentFileExplorer._selected = null;
</method>
<method name="deleteError" args="event">
@@ -189,8 +188,8 @@
</method>
<method name="addFile">
- this.refObjListRoot.selectItem(this);
- this.refObjListRoot.addFile();
+ canvas.currentFileExplorer.selectItem(this);
+ canvas.currentFileExplorer.addFile();
</method>
<method name="addFolder">
@@ -212,7 +211,6 @@
, roomId: this.roomId
, type: 'Folder'
, fileIcon: 'icon_folder_rsc'
- , refObjListRoot:
this.refObjListRoot
, fileName:
canvas.getLabelName(712)
});
t.addOrUpdateFolderName();
@@ -231,7 +229,7 @@
new lz.labelerrorPopup(canvas,{errorlabelid:1462});
return;
}
- this.refObjListRoot.playVideo(this);
+ canvas.currentFileExplorer.playVideo(this);
]]>
</method>
@@ -251,7 +249,7 @@
new lz.labelerrorPopup(canvas,{errorlabelid:1462});
return;
}
- this.refObjListRoot.loadDocument(this);
+ canvas.currentFileExplorer.loadDocument(this);
]]>
</method>
@@ -261,7 +259,7 @@
new lz.labelerrorPopup(canvas,{errorlabelid:1462});
return;
}
- this.refObjListRoot.loadWmlFile(this);
+ canvas.currentFileExplorer.loadWmlFile(this);
]]>
</method>
@@ -271,7 +269,7 @@
new lz.labelerrorPopup(canvas,{errorlabelid:1462});
return;
}
- this.refObjListRoot.loadChart(this);
+ canvas.currentFileExplorer.loadChart(this);
]]>
</method>
@@ -496,7 +494,6 @@
, type: f.type
, ownerId: f.ownerId
, roomId: f.roomId
- , refObjListRoot:this
});
break;
case 'Image':
@@ -508,7 +505,6 @@
, ownerId: f.ownerId
, roomId: f.roomId
, fileIcon:
'file_explorer_image_rsc'
- , refObjListRoot: this
});
break;
case 'Presentation':
@@ -520,7 +516,6 @@
, ownerId: f.ownerId
, roomId: f.roomId
, fileIcon:
'file_explorer_document_rsc'
- , refObjListRoot: this
});
break;
case 'Video':
@@ -534,7 +529,6 @@
, fileIcon:
'file_explorer_video_rsc'
, flvHeight: f.flvHeight
, flvWidth: f.flvWidth
- , refObjListRoot: this
});
break;
case 'WmlFile':
@@ -546,7 +540,6 @@
, ownerId: f.ownerId
, roomId: f.roomId
, isWmlFile: true
- , refObjListRoot: this
});
break;
case 'PollChart':
@@ -557,7 +550,6 @@
, type: f.type
, ownerId: f.ownerId
, roomId: f.roomId
- , refObjListRoot: this
});
break;
}