| <?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="chatTabItem" extends="view" |
| width="240" > |
| |
| <attribute name="user_id" value="0" type="number" /> |
| <attribute name="username" value="" type="string" /> |
| <attribute name="usertime" value="" type="string" /> |
| <attribute name="usercolor" value="0" type="string" /> |
| <attribute name="cbtext" value="" type="string" /> |
| |
| <handler name="oninit"> |
| <![CDATA[ |
| if($debug) Debug.write("chatTabItem/WIDTH: "+this.width); |
| if($debug) Debug.write("chatTab Item on init"); |
| var downloadurl = canvas.getUrl() + 'DownloadHandler?fileName=CHAT' |
| +'&moduleName=chat&parentPath=&room_id=' |
| +'&remoteUserid='+this.user_id |
| +'&sid='+canvas.sessionId; |
| //Debug.write("downloadurl "+downloadurl); |
| this._userpic.setAttribute('src',downloadurl); |
| |
| if(canvas.isrtl == 'true'){ |
| this.header_user.stAttribute('textalign', 'right'); |
| this.header_time.setAttribute('align', 'left'); |
| this.multi.setAttribute('textalign', 'right'); |
| } |
| |
| |
| |
| |
| //Debug.write("TIME: "+this.usertime); |
| ]]> |
| </handler> |
| |
| <image name="_userpic" /> |
| |
| |
| <text text="$once{ parent.username }" x="40" resize="false" fontsize="10" |
| width="$once{ parent.width - 40 }" bgcolor="$once{ parent.usercolor }" |
| selectable="true" name="header_user"> |
| |
| </text> |
| <text text="$once{ parent.usertime }" align="right" fontsize="10" selectable="true" name="header_time" > |
| |
| </text> |
| |
| |
| |
| <text multiline="true" x="40" y="20" fontsize="10" text="$once{ parent.cbtext }" |
| width="220" selectable="true" name="multi"> |
| |
| </text> |
| |
| </class> |
| |
| </library> |