Modified: openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/restricted/restrictedUserListItem.lzx URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/restricted/restrictedUserListItem.lzx?rev=1717911&r1=1717910&r2=1717911&view=diff ============================================================================== --- openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/restricted/restrictedUserListItem.lzx (original) +++ openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/restricted/restrictedUserListItem.lzx Fri Dec 4 08:44:20 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 @@ -24,110 +24,123 @@ <attribute name="connectedSince" value="" type="string" /> - <attribute name="isMod" value="false" type="boolean" /> - - <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="userId" value="0" type="number" /> - <attribute name="refObj" value="null" /> - - <attribute name="isSuperModerator" value="false" type="boolean"/> - - <attribute name="userpicURL" value="" type="string" /> - <attribute name="userpicView" value="null" /> - - <attribute name="selfItem" value="false" type="boolean"/> - - <method name="update" args="obj"> - setAttribute('firstname', obj.firstname); - setAttribute('lastname', obj.lastname); - refObj = obj; - </method> - - <handler name="onisMod"> - <![CDATA[ - if (this.isMod) { - this._content.userStatus.setAttribute("frame",3); - } else if (this.refObj != null && this.refObj.canDraw) { - this._content.userStatus.setAttribute("frame",2); - } else { - this._content.userStatus.setAttribute("frame",1); - } - ]]> - </handler> + <attribute name="isMod" value="false" type="boolean" /> + + <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="userId" value="0" type="number" /> + <attribute name="refObj" value="null" /> + + <attribute name="isSuperModerator" value="false" type="boolean"/> + + <attribute name="userpicURL" value="" type="string" /> + <attribute name="userpicView" value="null" /> + + <method name="update" args="obj, full=true"> + <![CDATA[ + if ($debug) Debug.write("!!!! update ", this.userId); + setAttribute('firstname', obj.firstname); + setAttribute('lastname', obj.lastname); + if (full) { + setAttribute('refObj', obj); + } else { + this.refObj.isMod = obj.isMod; + } + var renderList = parent.parent.parent.parent.renderList; + //if ($debug) Debug.write("!!!! update renderList", renderList); + for (var i = 0; i < renderList.length; ++i) { + if (renderList[i].publicSID == refObj.publicSID) { + if (full) { + renderList[i] = this.refObj; + } else { + renderList[i].isMod = obj.isMod; + } + break; + } + } + + this.isMod = refObj.isMod; + updateUserStatus(); + this._content._iconsModerator.oninit.sendEvent(); + ]]> + </method> + + <method name="updateUserStatus"> + <![CDATA[ + if (this.isMod) { + this._content.userStatus.setAttribute("frame",3); + } else if (this.refObj != null && this.refObj.canDraw) { + this._content.userStatus.setAttribute("frame",2); + } else { + this._content.userStatus.setAttribute("frame",1); + } + ]]> + </method> + + <handler name="onisMod"> + updateUserStatus(); + </handler> - <handler name="onMute" reference="canvas.thishib.switchMicMuted" args="event"> - <![CDATA[ - if ($debug) Debug.write("onMute ", event.publicSID, event.mute); - if(this.refObj.publicSID == event.publicSID) { - this.refObj.micMuted = event.mute; - this.updateModeratorIcons(); - } - ]]> - </handler> + <handler name="onMute" reference="canvas.thishib.switchMicMuted" args="event"> + <![CDATA[ + if ($debug) Debug.write("onMute ", event.publicSID, event.mute); + if(this.refObj.publicSID == event.publicSID) { + this.refObj.micMuted = event.mute; + this.updateModeratorIcons(); + } + ]]> + </handler> <method name="updateIconByMod"> if (this.clickable) { - this.isMod = canvas.getIsModeratorByPublicSID(this.refObj.publicSID); - //if ($debug) Debug.write(" :: updateIconByMod :: ",this.isMod) - if (this.isMod) { - this._content.userStatus.setAttribute("frame",3); - } else if (this.refObj.canDraw) { - this._content.userStatus.setAttribute("frame",2); - } else { - this._content.userStatus.setAttribute("frame",1); - } - } - </method> - - <method name="updateIconByModScroll"> - if (this.clickable) { - if (this.isMod) { - this._content.userStatus.setAttribute("frame",3); - } else if (this.refObj.canDraw) { - this._content.userStatus.setAttribute("frame",2); - } else { - this._content.userStatus.setAttribute("frame",1); - } - } - </method> - - <method name="initModeratorIcons"> - //if ($debug) Debug.write(" :1: initModeratorIcons :: "); - if (canvas.ismoderator) { - //if ($debug) Debug.write(" :2: initModeratorIcons :: "); + this.isMod = canvas.getIsModeratorByPublicSID(this.refObj.publicSID); + //if ($debug) Debug.write(" :: updateIconByMod :: ",this.isMod) + updateUserStatus(); + } + </method> + + <method name="updateIconByModScroll"> + if (this.clickable) { + updateUserStatus(); + } + </method> + + <method name="initModeratorIcons"> + //if ($debug) Debug.write(" :1: initModeratorIcons :: "); + if (canvas.ismoderator) { + //if ($debug) Debug.write(" :2: initModeratorIcons :: "); this._content._iconsModerator.setAttribute("visibility","visible"); this._content._iconsModerator.oninit.sendEvent(); - } - </method> - - <method name="updateModeratorIcons"> + } + </method> + + <method name="updateModeratorIcons"> if (this._content._iconsModerator.visibility == "visible") { - this._content._iconsModerator.oninit.sendEvent(); + this._content._iconsModerator.oninit.sendEvent(); + } + </method> + + <method name="hideModeratorIcons"> + if (this._content._iconsModerator.visibility == "visible") { + this._content._iconsModerator.setAttribute("visibility","hidden"); } - </method> - - <method name="hideModeratorIcons"> - if (this._content._iconsModerator.visibility == "visible") { - this._content._iconsModerator.setAttribute("visibility","hidden"); - } - </method> + </method> <method name="userTyping" args="v"> this._content._user_typing.setAttribute("visible", v); </method> <view name="_content" width="254"> - <view name="_contentIsCurrent" visible="${ parent.parent.selfItem }" width="254" height="40" bgcolor="0x7CFC00"/> - - <labelText name="_userName" x="2" y="2" text="${ (parent.parent.firstname == null ? '' : parent.parent.firstname) + ' ' + (parent.parent.lastname == null ? '' : parent.parent.lastname) }" /> - + <view name="_contentIsCurrent" visible="${ parent.parent.refObj != null && canvas.publicSID == parent.parent.refObj.publicSID }" width="254" height="40" bgcolor="0x7CFC00"/> + + <labelText name="_userName" x="2" y="2" text="${ (parent.parent.firstname == null ? '' : parent.parent.firstname) + ' ' + (parent.parent.lastname == null ? '' : parent.parent.lastname) }" /> + <typingIcon name="_user_typing" x="132" y="2" width="30" height="16" visible="false"/> <miniIcons name="_restartDevice" x="220" y="0" width="16" height="16" resource="resyncuser_rsc" showhandcursor="true" - visible="${ parent.parent.clickable && parent.parent.selfItem && canvas.isBroadCasting }"> + visible="${ parent.parent.clickable && parent.parent.refObj != null && canvas.publicSID == parent.parent.refObj.publicSID && canvas.isBroadCasting }"> <handler name="onclick"> if ($debug) Debug.write("parent.parent.refObj.publicSID: ",parent.parent.refObj.publicSID); canvas.commonVideoViewContent.createEditRecordStream(true, false, -1); @@ -135,8 +148,8 @@ <labelTooltip labelid="610" /> </miniIcons> <view name="userStatus" visible="${ parent.parent.clickable }" x="238" frame="1" resource="userstatus_multiframe_rsc" /> - - <moderationMiniIconRestricted name="_iconsModerator" visibility="hidden"/> + + <moderationMiniIconRestricted name="_iconsModerator" visibility="hidden"/> </view> </class>
