blob: 9b66c954dc1c86882d2d372979ffb535e8a1adf9 [file] [log] [blame]
<?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>
<!---
-->
<!-- label: data loading, please wait -->
<class name="invitationQuickLoader" extends="labelExplorerBox" labelid="230"
docking="true" resizeable="false" closable="false" width="324"
x="$once{ canvas.width/2 - this.width/2 }" y="0" height="120">
<attribute name="userlang" value="1" type="number" />
<handler name="oninit">
this.setRoomValues();
if (canvas.thishib.currentInvitation.isPasswordProtected){
if ($debug) Debug.write("Is Password Protected");
this.pass_label.setAttribute('visibility','visible');
this._password.setAttribute('visibility','visible');
this.invitation_pass.setAttribute('visibility','visible');
} else {
this.showLoginStep();
if ($debug) Debug.write("invitationQuickLoader:oninit userlang = [",userlang,"]; canvas.lang = [",canvas.language_id,"]");
if (canvas.language_id > 0) {
this.isRoomFull.doCall();
} else {
this.showLoginStep();
}
}
</handler>
<method name="showLoginStep">
this.pass_label.setAttribute('visibility','hidden');
this._password.setAttribute('visibility','hidden');
this.invitation_pass.setAttribute('visibility','hidden');
this.labellanguages.setAttribute('visibility','visible');
this.languages.setAttribute('visibility','visible');
this.connect.setAttribute('visibility','visible');
</method>
<method name="checkPWD">
this.checkInvitationPass.doCall();
</method>
<netRemoteCallHib name="isRoomFull" funcname="conferenceservice.isRoomFull"
remotecontext="$once{ canvas.thishib }" activeErrorHandler="true" >
<netparam name="pass"><method name="getValue">return canvas.thishib.currentInvitation.room.rooms_id;</method></netparam>
<handler name="ondata" args="value">
<![CDATA[
//The onResult-Handler will be called be the rtmpconnection
if ($debug) Debug.write(canvas.thishib.currentInvitation.room.rooms_id);
if ($debug) Debug.write("isRoomFull: ",value);
if (value) {
new lz.labelerrorPopup(canvas,{errorlabelid:618});
parent.close();
} else {
parent.login();
}
]]>
</handler>
</netRemoteCallHib>
<netRemoteCallHib name="checkInvitationPass" funcname="invitationservice.checkInvitationPass"
remotecontext="$once{ canvas.thishib }" activeErrorHandler="true" >
<netparam name="invitationHash"><method name="getValue">return canvas.invitationHash;</method></netparam>
<netparam name="pass"><method name="getValue">return parent.parent._password.getText();</method></netparam>
<handler name="ondata" args="value">
<![CDATA[
//The onResult-Handler will be called be the rtmpconnection
if ($debug) Debug.write("checkInvitationPass : ",value);
if (value<0){
} else {
parent.showLoginStep();
}
]]>
</handler>
</netRemoteCallHib>
<method name="setRoomValues">
if (canvas.thishib.currentInvitation.room.roomtype.roomtypes_id==1){
canvas.isConference = true;
} else {
canvas.isConference = false;
}
var roomObj = canvas.thishib.currentInvitation.room;
hib.currentroomid = canvas.thishib.currentInvitation.room.rooms_id;
</method>
<method name="login">
this.userlang = Number(this.languages.getValue());
this.labellanguages.setAttribute('visibility','hidden');
this.languages.setAttribute('visibility','hidden');
this.connect.setAttribute('visibility','hidden');
this.labelloading.setAttribute('visibility','visible');
parent.userlang = Number(this.userlang);
var userObject = new Array();
canvas.setAttribute('currentuser',canvas.thishib.currentInvitation.invitedEMail);
canvas.setAttribute('user_id',-1);
canvas.setAttribute('firstName',"");
canvas.setAttribute('lastName',canvas.thishib.currentInvitation.invitedEMail);
canvas.setAttribute('mail',canvas.mail);
canvas.setAttribute('lastLogin','');
canvas.setAttribute('official_code','');
canvas.setAttribute('picture_uri','');
canvas.setAttribute('language','');
userObject["login"] = canvas.thishib.currentInvitation.invitedEMail;
userObject["firstname"] = "";
userObject["lastname"] = canvas.thishib.currentInvitation.invitedEMail;
userObject["adresses"] = new Array();
//userObject["adresses"]["emails"] = new Array();
userObject["adresses"]["email"] = canvas.thishib.currentInvitation.invitedEMail;
//userObject["adresses"]["emails"][0]["mail"] = new Array();
//userObject["adresses"]["emails"][0]["mail"]["email"] = canvas.thishib.currentInvitation.invitedEMail;
hib.userobject = userObject;
hib.userlang = Number(this.userlang);
canvas.thishib.loaderVar = new lz.autoloaderBarOnly(canvas);
canvas.thishib.loaderVar.setProgress();
this.close();
canvas.thishib.loaderVar.getLanguageByIdAndMax.doCall();
</method>
<!-- label: password -->
<labelText name="pass_label" labelid="536" visibility="hidden" width="200" y="30" resize="false" x="10" />
<customEdittext name="_password" password="true" visibility="hidden" width="170" y="30" x="120" />
<!-- label: Check password -->
<simpleLabelButton name="invitation_pass" y="80" x="120" text="start" visibility="hidden" labelid="537"
width="170" height="20" onclick="parent.checkPWD();" />
<!-- label: language -->
<labelText name="labellanguages" labelid="227" visibility="hidden" width="200" y="30" resize="false" x="10" />
<resetCombobox name="languages" width="170" y="30" x="120" visibility="hidden" editable="false">
<netRemoteCallHib name="getLanguages" funcname="languageservice.getLanguages" remotecontext="$once{ canvas.thishib }" >
<handler name="oninit">
this.doCall();
</handler>
<handler name="ondata" args="value">
//The onResult-Handler will be called be the rtmpconnection
<![CDATA[
var selVal = canvas.language_id;
var found = false;
for (var i=0;i<value.length;i++){
this.parent.addItem(value[i].name,value[i].language_id);
if (value[i].language_id == selVal) {
found = true;
}
}
this.parent.selectItem((found) ? selVal : value[0].language_id);
]]>
</handler>
</netRemoteCallHib>
</resetCombobox>
<!-- label: loading -->
<labelText name="labelloading" y="30" x="10" fontstyle="bold" labelid="229" visibility="hidden" />
<!-- label: enter -->
<simpleLabelButton name="connect" y="80" x="120" text="start"
visibility="hidden" labelid="228" width="170" height="20"
onclick="parent.isRoomFull.doCall();" />
</class>
</library>