Revision: 4206
Author: solomax666
Date: Tue Sep 6 11:06:13 2011
Log: - Issue 1473
- code cleanup
http://code.google.com/p/openmeetings/source/detail?r=4206
Deleted:
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/eventuserlist/backup
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/eventuserlist/eventUserListItemWithNames.lzx
Modified:
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/eventuserlist/eventUserListInner.lzx
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/eventuserlist/eventUserListItem.lzx
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/eventuserlist/library.lzx
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/interviewuserlist/interviewListInner.lzx
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/interviewuserlist/interviewUserListItem.lzx
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/restricted/restrictedUserListInner.lzx
/trunk/singlewebapp/src/test/org/openmeetings/test/backup/TestStringReplace.java
=======================================
---
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/eventuserlist/eventUserListItemWithNames.lzx
Fri Feb 5 10:19:58 2010
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<library>
-
-<class name="eventUserListItemWithNames" extends="view"
showhandcursor="false"
- bgcolor="0xCCCCCC" width="252" height="42">
-
- <attribute name="connectedSince" value="" type="string" />
- <attribute name="isMod" value="" type="string" />
- <attribute name="streamid" value="" type="string" />
- <attribute name="username" value="" type="string" />
- <attribute name="userroom" value="" type="string" />
- <attribute name="formatedDate" value="" type="string" />
- <attribute name="firstname" value="" type="string" />
- <attribute name="lastname" value="" type="string" />
- <attribute name="user_id" value="0" type="number" />
- <attribute name="refObj" value="null" />
-
- <attribute name="isSuperModerator" value="false" type="boolean"/>
-
- <attribute name="isSelected" value="false" type="boolean" />
-
- <handler name="oninit">
- <![CDATA[
-
- //this._userpic.setAttribute('src',downloadurl);
- //This is a workaround cause in LPS-4.2.x immediatelly loading
does not work
- lz.Timer.addTimer( new LzDelegate( this, "fadeText" ), 1000 );
-
- if (this.isMod) {
- this.userStatus.setAttribute("frame",3);
- }
-
- if (canvas.publicSID == this.refObj.publicSID) {
- //this._userName.setAttribute("fontstyle","bold");
- this.setAttribute("bgcolor",0x00FF00);
- }
-
- this.updateIcons();
- ]]>
- </handler>
-
- <method name="updateIconByMod">
- this.isMod = canvas.getIsModeratorByPublicSID(this.refObj.publicSID);
- if (this.isMod) {
- this.userStatus.setAttribute("frame",3);
- } else if (this.refObj.canDraw) {
- this.userStatus.setAttribute("frame",2);
- } else {
- this.userStatus.setAttribute("frame",1);
- }
-
- if (this.isSelected) {
- this._miniIcons.oninit.sendEvent();
- }
- </method>
-
- <method name="fadeText" args="ignore=null">
- <![CDATA[
-
- //Do Load the Custom Moodle Profilee Picture
- if (this.refObj.externalUserId >= 1 &&
this.refObj.externalUserType == "moodle") {
-
- if (this.refObj.externalUserId == 1) {
- //Means it is a guest
- var downloadurl = canvas.moodleWwwRoot+"/pix/u/f2.png";
- } else {
- var downloadurl =
canvas.moodleWwwRoot+"/user/pix.php/"+ this.refObj.externalUserId
+"/f2.jpg";
- }
-
- } else {
-
- var downloadurl
= 'http://'+canvas.rtmphostlocal+':'+canvas.red5httpport
-
+canvas.httpRootKey+'DownloadHandler?fileName=CHAT'
-
+'&moduleName=chat&parentPath=&room_id='
- +'&remoteUserid='+this.user_id
- +'&sid='+canvas.sessionId;
-
- }
-
- this._userpic.setAttribute('src',downloadurl);
- ]]>
- </method>
-
- <handler name="onmouseover">
- //this.setAttribute('bgcolor',canvas.baseMousecolorizer);
- </handler>
-
- <handler name="onmouseout">
- //this.setAttribute('bgcolor',0xFFFFFF);
- </handler>
-
- <handler name="onclick">
- parent.parent.parent.selectItem(this);
- </handler>
-
- <method name="select">
- if (!this.isSelected) {
- new
lz.moderationMiniIcons(this,{name:'_miniIcons',align:'right',
- isMod:this.isMod,
- isSuperModerator:this.isSuperModerator});
- this.isSelected = true;
- this._userName.text = "";
- this.showItem.doStart();
- }
- </method>
-
- <method name="deselect">
- if (this.isSelected) {
- this._miniIcons.destroy();
- this.isSelected = false;
- this._userName.text = this.firstname+' '+this.lastname;
- this.closeItem.doStart();
- }
- </method>
-
- <image name="_userpic" stretches="both" x="1" y="1">
- <handler name="onload">
- <![CDATA[
- if (this.height > 38) {
- //If bigger then containter then scale it
- var width = this.width/(this.height/38);
- this.setAttribute('height',38);
- this.setAttribute('width',width);
- }
- ]]>
- </handler>
- </image>
-
- <view name="userStatus" align="right" frame="1"
- resource="userstatus_multiframe_rsc" />
-
- <labelText name="_userName" x="41" y="2"
- text="$once{ parent.firstname+' '+parent.lastname }" />
-
- <!--
- <labelTooltip name="_userName" text="$once{
parent.firstname+' '+parent.lastname }" />
- -->
-
- <animatorgroup name="showItem" start="false" process="simultaneous">
- <animator attribute="height" to="62" duration="750" />
- <animator attribute="width" to="252" duration="750" />
- </animatorgroup>
-
- <animatorgroup name="closeItem" start="false" process="simultaneous">
- <animator attribute="height" to="42" duration="750" />
- <animator attribute="width" to="252" duration="750" />
- </animatorgroup>
-
-</class>
-
-</library>
=======================================
---
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/eventuserlist/eventUserListInner.lzx
Thu Jul 15 07:33:49 2010
+++
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/eventuserlist/eventUserListInner.lzx
Tue Sep 6 11:06:13 2011
@@ -62,33 +62,19 @@
lastname += " *";
}
- if (this.listType == "eventUserListTable") {
- new lz.eventUserListItem(this._table.innerList,{
- user_id:object.user_id,
- firstname:object.firstname,
- isSuperModerator:object.isSuperModerator,
- lastname:lastname,
- refObj:object,
- connectedSince:object.connectedSince,
- isMod:object.isMod,
- streamid:object.streamid,
- username:object.username,
- formatedDate:object.formatedDate
- });
- } else if (this.listType == "eventUserListTableWithNames") {
- new lz.eventUserListItemWithNames(this._table.innerList,{
- user_id:object.user_id,
- firstname:object.firstname,
- isSuperModerator:object.isSuperModerator,
- lastname:lastname,
- refObj:object,
- connectedSince:object.connectedSince,
- isMod:object.isMod,
- streamid:object.streamid,
- username:object.username,
- formatedDate:object.formatedDate
- });
- }
+ new lz.eventUserListItem(this._table.innerList,{
+ user_id:object.user_id,
+ firstname:object.firstname,
+ isSuperModerator:object.isSuperModerator,
+ lastname:lastname,
+ refObj:object,
+ connectedSince:object.connectedSince,
+ isMod:object.isMod,
+ streamid:object.streamid,
+ username:object.username,
+ withNames: this.listType == "eventUserListTableWithNames",
+ formatedDate:object.formatedDate
+ });
this.sortUserList();
]]>
@@ -164,21 +150,22 @@
</method>
<method name="selectItem" args="itemObj">
+ <![CDATA[
if ($debug) Debug.write("selectItem ",itemObj);
if (canvas.ismoderator) {
-
- if (this.selectedItem != null) {
+ if (this.selectedItem != null && this.selectedItem != itemObj)
{
this.selectedItem.deselect();
}
- if (this.selectedItem != itemObj) {
- this.selectedItem = itemObj;
- this.selectedItem.select();
- }
-
- }
-
+ this.selectedItem = itemObj;
+ if (this.selectedItem.isSelected) {
+ this.selectedItem.deselect();
+ } else {
+ this.selectedItem.select();
+ }
+ }
+ ]]>
</method>
<view name="userStatus" layout="axis:y">
=======================================
---
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/eventuserlist/eventUserListItem.lzx
Wed Nov 10 05:35:02 2010
+++
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/eventuserlist/eventUserListItem.lzx
Tue Sep 6 11:06:13 2011
@@ -14,17 +14,29 @@
<attribute name="lastname" value="" type="string" />
<attribute name="user_id" value="0" type="number" />
<attribute name="refObj" value="null" />
+ <attribute name="initWidth" value="42" type="number" />
+ <attribute name="maxHeight" value="72" type="number" />
+ <attribute name="maxWidth" value="82" type="number" />
+ <attribute name="withNames" value="false" type="boolean"/>
<attribute name="isSuperModerator" value="false" type="boolean"/>
<attribute name="isSelected" value="false" type="boolean" />
<handler name="oninit">
<![CDATA[
-
- //this._userpic.setAttribute('src',downloadurl);
//This is a workaround cause in LPS-4.2.x immediatelly loading
does not work
lz.Timer.addTimer( new LzDelegate( this, "fadeText" ), 1000 );
-
+
+ if (this.withNames) {
+ this.setAttribute("initWidth", 252);
+ this.setAttribute("maxWidth", 252);
+ this.setAttribute("maxHeight", 62);
+ this._userName = new lz.labelText(this, {x: 41,
y: 2});
+ } else {
+ this._userName = new lz.labelTooltip(this);
+ }
+ this.setAttribute("width", this.initWidth);
+ this._userName.setAttribute("text", firstname + ' ' +
lastname);
if (this.isMod) {
this.userStatus.setAttribute("frame",3);
}
@@ -34,7 +46,7 @@
this.setAttribute("bgcolor",0x00FF00);
}
- this.updateIcons();
+ this.updateIconByMod();
]]>
</handler>
@@ -94,9 +106,12 @@
</handler>
<method name="select">
- new lz.moderationMiniIcons(this,{name:'_miniIcons',
+ var miniIcons = new lz.moderationMiniIcons(this,{name:'_miniIcons',
isMod:this.isMod,
isSuperModerator:this.isSuperModerator});
+ if (this.withNames) {
+ miniIcons.setAttribute("align", "right");
+ }
this.isSelected = true;
this._userName.text = "";
this.showItem.doStart();
@@ -125,16 +140,14 @@
<view name="userStatus" align="right" frame="1"
resource="userstatus_multiframe_rsc" />
- <labelTooltip name="_userName" text="$once{
parent.firstname+' '+parent.lastname }" />
-
<animatorgroup name="showItem" start="false" process="simultaneous">
- <animator attribute="height" to="72" duration="750" />
- <animator attribute="width" to="82" duration="750" />
+ <animator attribute="height" to="${ parent.parent.maxHeight }"
duration="750" />
+ <animator attribute="width" to="${ parent.parent.maxWidth }"
duration="750" />
</animatorgroup>
<animatorgroup name="closeItem" start="false" process="simultaneous">
<animator attribute="height" to="42" duration="750" />
- <animator attribute="width" to="42" duration="750" />
+ <animator attribute="width" to="${ parent.parent.initWidth }"
duration="750" />
</animatorgroup>
</class>
=======================================
---
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/eventuserlist/library.lzx
Tue Oct 12 05:35:54 2010
+++
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/eventuserlist/library.lzx
Tue Sep 6 11:06:13 2011
@@ -22,6 +22,5 @@
<include href="eventUserListInner.lzx" />
<include href="eventUserListItem.lzx" />
<include href="eventUserList.lzx" />
- <include href="eventUserListItemWithNames.lzx" />
</library>
=======================================
---
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/interviewuserlist/interviewListInner.lzx
Sun Mar 14 06:24:28 2010
+++
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/interviewuserlist/interviewListInner.lzx
Tue Sep 6 11:06:13 2011
@@ -128,25 +128,26 @@
]]>
</method>
-
+
<method name="selectItem" args="itemObj">
+ <![CDATA[
if ($debug) Debug.write("selectItem ",itemObj);
if (canvas.ismoderator) {
-
- if (this.selectedItem != null) {
- this.selectedItem.deselect();
- }
-
- if (this.selectedItem != itemObj) {
- this.selectedItem = itemObj;
+ if (this.selectedItem != null && this.selectedItem != itemObj)
{
+ this.selectedItem.deselect();
+ }
+
+ this.selectedItem = itemObj;
+ if (this.selectedItem.isSelected) {
+ this.selectedItem.deselect();
+ } else {
this.selectedItem.select();
- }
-
- }
-
+ }
+ }
+ ]]>
</method>
-
+
<view name="userStatus" layout="axis:y">
<view>
<view resource="userstatus_multiframe_rsc" frame="1" />
=======================================
---
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/interviewuserlist/interviewUserListItem.lzx
Wed Nov 10 05:35:02 2010
+++
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/interviewuserlist/interviewUserListItem.lzx
Tue Sep 6 11:06:13 2011
@@ -35,7 +35,7 @@
this.setAttribute("bgcolor",0x00FF00);
}
- this.updateIcons();
+ this.updateIconByMod();
]]>
</handler>
=======================================
---
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/restricted/restrictedUserListInner.lzx
Tue Oct 12 05:35:54 2010
+++
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/restricted/restrictedUserListInner.lzx
Tue Sep 6 11:06:13 2011
@@ -18,8 +18,6 @@
]]>
</handler>
- <!-- clip="true" -->
-
<view width="$once{ parent.width-2 }" height="${ parent.height-2 }"
x="1" y="1" bgcolor="white" />
@@ -83,46 +81,6 @@
this._table.renderContent();
</method>
- <!--
-
- for (var i=0;i<this._table.innerList.subviews.length;i++) {
- if (this._table.innerList.subviews[i].refObj.publicSID ==
object.publicSID) {
- //if ($debug) Debug.warn("Already on List, do not add
twice");
- return;
- }
- }
-
- if (this.listType == "eventUserListTable") {
- new lz.eventUserListItem(this._table.innerList,{
- user_id:object.user_id,
- firstname:object.firstname,
- isSuperModerator:object.isSuperModerator,
- lastname:lastname,
- refObj:object,
- connectedSince:object.connectedSince,
- isMod:object.isMod,
- streamid:object.streamid,
- username:object.username,
- formatedDate:object.formatedDate
- });
- } else if (this.listType == "eventUserListTableWithNames") {
- new lz.eventUserListItemWithNames(this._table.innerList,{
- user_id:object.user_id,
- firstname:object.firstname,
- isSuperModerator:object.isSuperModerator,
- lastname:lastname,
- refObj:object,
- connectedSince:object.connectedSince,
- isMod:object.isMod,
- streamid:object.streamid,
- username:object.username,
- formatedDate:object.formatedDate
- });
- }
-
- this.sortUserList();
- -->
-
<method name="sortUserList">
<![CDATA[
@@ -190,51 +148,6 @@
if ($debug) Debug.error(" ::
getVideoObjectByPublicSID :: ",publicSID);
</method>
- <!--- get a Objects List Item
- @param string publicSID publicSID
-
- <method name="getVideoObjectByPublicSID" args="publicSID">
- <![CDATA[
- //if ($debug) Debug.write("getVideoObjectByPublicSid
SEARCH: ",publicSID);
-
- //for (var i=0;i<this._videoviewcontent.subviews.length;i++){
- // if ($debug) Debug.write("getVideoObjectByBroadCastId6
broadcastId: ",this._videoviewcontent.subviews[i].broadcastId);
- // if ($debug) Debug.write("getVideoObjectByBroadCastId7
streamid,user_id: ",this._videoviewcontent.subviews[i].clientVars.streamid,this._videoviewcontent.subviews[i].clientVars.user_id);
- //}
-
- for (var i=0;i<this._table.innerList.subviews.length;i++){
- //if ($debug) Debug.write("getVideoObjectByBroadCastId2
broadcastId VIEW: ",this._videoviewcontent.subviews[i].broadcastId);
- //if ($debug) Debug.write("getVideoObjectByBroadCastId3
broadcastId SEARCH: ",broadcastId);
- //if ($debug) Debug.write("getVideoObjectByBroadCastId4
obj: ",this._videoviewcontent.subviews[i]);
- //if ($debug) Debug.write("getVideoObjectByBroadCastId5
streamid,user_id: ",this._videoviewcontent.subviews[i].clientVars.streamid,this._videoviewcontent.subviews[i].clientVars.user_id);
- if
(this._table.innerList.subviews[i].refObj.publicSID==publicSID){
- return this._table.innerList.subviews[i];
- }
- }
-
- return null;
-
- ]]>
- </method>
- -->
-
- <method name="selectItem" args="itemObj">
- if ($debug) Debug.write("selectItem ",itemObj);
-
- if (canvas.ismoderator) {
-
- if (this.selectedItem != null) {
- this.selectedItem.deselect();
- }
-
- if (this.selectedItem != itemObj) {
- this.selectedItem = itemObj;
- this.selectedItem.select();
- }
-
- }
-
- </method>
<view name="userStatus" layout="axis:y">
<view>
@@ -300,24 +213,6 @@
}
</method>
- <!--
- <method name="removeUserByPublicSid" args="refObj">
- <![CDATA[
-
- if ($debug) Debug.write("removeUserByPublicSid
",refObj.itemId);
-
- if ($debug) Debug.write("::
removeUserByPublicSid :1:",this.renderList.length);
-
- this.renderList.splice(refObj.itemId,1);
-
- if ($debug) Debug.write("::
removeUserByPublicSid :2:",this.renderList.length);
-
- this.renderContent();
-
- ]]>
- </method>
- -->
-
<method name="renderByNewUser" args="refObj">
this.renderDelegateStarted = false;
this.renderContent();
@@ -548,10 +443,6 @@
</turnOverListOrderedPaged>
- <!--
- <eventUserListTable name="_table" />
- -->
-
<view name="moderationPanel" clip="true"
height="${ (canvas.ismoderator) ? 40 : 0 }"
y="${ parent.height - this.height - 2 }">
@@ -635,20 +526,6 @@
]]>
</handler>
- <!--
- if (canvas.ismoderator) {
- this.showItem.doStart();
- } else {
- this.setAttribute("height",0);
- }
-
- var vList = parent._table.innerList.subviews;
-
- for (var i=0;i<vList.length;i++) {
- vList[i].updateIconByMod();
- }
- -->
-
<method name="updateIcons">
<![CDATA[
@@ -712,48 +589,6 @@
]]>
</method>
- <!--
- for (var i=0;i<parent._table.renderList.length;i++) {
-
- for (var k=0;k<canvas.currentModeratorList.length;k++)
{
-
- var item = canvas.currentModeratorList[k];
-
- if ($debug)
Debug.info("updateIcons ",item.publicSID);
-
- if (parent._table.renderList[i].publicSID ==
item.publicSID) {
-
- if (parent._table.renderList[i].isMod ==
false) {
- if ($debug) Debug.info("updateIcons Found
RR ",i,item.publicSID);
- parent._table.renderList[i].isMod = true;
-
- var itemView =
this.getItemByPublicSID(item.publicSID);
- if (itemView != null) {
- itemView.setAttribute("isMod",true);
- itemView.updateModeratorIcons();
- }
- }
-
-
- } else {
-
- if (parent._table.renderList[i].isMod == true)
{
- if ($debug) Debug.info("RE updateIcons
Found RR ",i,item.publicSID);
- parent._table.renderList[i].isMod = false;
-
- var itemView =
this.getItemByPublicSID(item.publicSID);
- if (itemView != null) {
- itemView.setAttribute("isMod",false);
- itemView.updateModeratorIcons();
- }
- }
- }
-
- }
-
- }
- -->
-
<method name="getItemByPublicSID" args="publicSID">
<![CDATA[
var vList = parent._table._innerlist._inn._inn.subviews;
@@ -769,11 +604,6 @@
</method>
<labelText labelid="680" width="270" x="0" multiline="true" y="0"
/>
-
- <!--
- <animator name="showItem" attribute="height"
- to="40" duration="1000" start="false" />
- -->
</view>
</class>
=======================================
---
/trunk/singlewebapp/src/test/org/openmeetings/test/backup/TestStringReplace.java
Mon Sep 5 07:51:58 2011
+++
/trunk/singlewebapp/src/test/org/openmeetings/test/backup/TestStringReplace.java
Tue Sep 6 11:06:13 2011
@@ -1,8 +1,7 @@
package org.openmeetings.test.backup;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
import java.util.Iterator;
--
You received this message because you are subscribed to the Google Groups
"OpenMeetings developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/openmeetings-dev?hl=en.