| <?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> |
| |
| <!--- Chat module of the dashboard. The fixed size is 810x280 --> |
| <class name="overAllChat" extends="view" x="2" |
| width="${ parent.width-4 }" height="${ parent.height }" > |
| <!-- 443:Chat --> |
| |
| <handler name="onclose"> |
| if($debug) Debug.write("overAllChat/close(): ",this); |
| canvas._overallchatcontent=null; |
| </handler> |
| |
| <!-- message and buttons area--> |
| <view y="0" x="196" height="${ parent.height }" > |
| <view name="_chatoutputborder" height="${ parent.height-48 }" |
| width="${ parent.parent.width - 196 }" bgcolor="$once{ canvas.getThemeColor('secondBorderColor') }"> |
| <!-- 604 --> |
| <overAllChatOutput name="_chatoutput" x="1" y="1" > |
| <handler name="oninit"> |
| if (canvas._overallchatcontent!=null) canvas._overallchatcontent.parent.parent.parent.close(); |
| canvas._overallchatcontent = this; |
| </handler> |
| </overAllChatOutput> |
| </view> |
| <overAllChatTabBottom name="_chattabbottom" |
| y="${ parent.height-46 }" x="0" width="${ parent.parent.width - 196 }" /> |
| </view> |
| |
| <!-- chat participants area --> |
| <view x="0" y="0" name="_chatparticipants" bgcolor="$once{ canvas.getThemeColor('secondBorderColor') }" |
| height="${ parent.height-2 }" width="190" > |
| <handler name="oninit"> |
| this.getChatOverallUsers.doCall(); |
| </handler> |
| |
| <netRemoteCallHib name="getChatOverallUsers" funcname="chatservice.getChatOverallUsers" |
| remotecontext="$once{ canvas.thishib }" > |
| <handler name="ondata" args="value"> |
| <![CDATA[ |
| //The onResult-Handler will be called be the rtmpconnection |
| if ($debug) Debug.write("getChatOverallUsers : ",value); |
| for (var i=0;i<value.overallList.length;i++){ |
| if ($debug) Debug.write("value.overallList[i].picture_uri",value.overallList[i].picture_uri); |
| parent.addItem(value.overallList[i]) |
| } |
| ]]> |
| </handler> |
| </netRemoteCallHib> |
| |
| <method name="addItem" args="value"> |
| new lz.chatParticipants(this._innerlist._list,{ |
| user_id:value.user_id, |
| publicSID:value.publicSID, |
| picture_uri:value.picture_uri, |
| connectedSince:canvas.getLabelName(1133)+' '+parseDateToStringTimeSeconds(value.connectedSince), |
| username:value.firstname+" "+value.lastname |
| }); |
| </method> |
| |
| <method name="removeItemById" args="user_id"> |
| <![CDATA[ |
| for (var i=0;i<this._innerlist._list.subviews.length;i++) { |
| if (this._innerlist._list.subviews[i].user_id==user_id) { |
| this._innerlist._list.subviews[i].destroy(); |
| } |
| } |
| ]]> |
| </method> |
| |
| <view name="_innerlist" x="1" y="1" width="189" clip="true" |
| height="${ parent.height-1 }" bgcolor="0xFFFFFF"> |
| <view name="_list" width="180" layout="axis:y;spacing:0" /> |
| <om_vscrollbar name="_scroll" /> |
| </view> |
| </view> |
| |
| </class> |
| |
| |
| </library> |