methods.lzx
<library>
<method name="handleError">
Debug.write((new Date())+": Request got an error -- sorry.");
</method>
<method name="getWeePee">
var ds=canvas.datasets.weepeeDS;
ds.doRequest();
</method>
<method name="userLogin" args="username,password">
canvas.logindialog.close();
var ds=canvas.datasets.loginDS;
var p=new LzParam();
if (username == undefined) {
username = "";
}
if (password == undefined) {
password = "";
}
p.addValue("username", username,true);
p.addValue("password", password,true);
ds.setQueryString(p);
ds.doRequest();
</method>
<method name="userUpdate" args="password">
var ds=canvas.datasets.loginDS;
var p=new LzParam();
p.addValue("update", "1",true);
p.addValue("sid", canvas.sid,true);
if (password == undefined) {
password = "";
}
p.addValue("password", password,true);
ds.setQueryString(p);
ds.doRequest();
</method>
<method name="userResetUA" args="">
var ds=canvas.datasets.loginDS;
var p=new LzParam();
p.addValue("resetUA", "1",true);
p.addValue("sid", canvas.sid,true);
ds.setQueryString(p);
ds.doRequest();
</method>
<method name="userGetgigasetAP" args="">
var ds=canvas.datasets.loginDS;
var p=new LzParam();
p.addValue("gigaset", "1",true);
p.addValue("sid", canvas.sid,true);
ds.setQueryString(p);
ds.doRequest();
</method>
<method name="userChangePwd" args="oldpassword,newpassword">
var ds=canvas.datasets.changepwdDS;
var p=new LzParam();
if (username == undefined) {
username = "";
}
if (password == undefined) {
password = "";
}
p.addValue("sid", canvas.sid,true);
p.addValue("oldpassword", oldpassword,true);
p.addValue("newpassword", newpassword,true);
ds.setQueryString(p);
ds.doRequest();
</method>
<method name="userChangePin" args="pin">
var ds=canvas.datasets.changepinDS;
var p=new LzParam();
if (pin == undefined) {
pin = "";
}
p.addValue("sid", canvas.sid,true);
p.addValue("pin", pin,true);
ds.setQueryString(p);
ds.doRequest();
</method>
<method name="userChangeEmail" args="email">
var ds=canvas.datasets.changeemailDS;
var p=new LzParam();
if (email == undefined) {
email = "";
}
p.addValue("sid", canvas.sid,true);
p.addValue("email", email,true);
ds.setQueryString(p);
ds.doRequest();
</method>
<method name="userChangeSkype" args="skypename,skypepwd">
var ds=canvas.datasets.changeskypeDS;
var p=new LzParam();
if (skypename == undefined) {
skypename = "";
}
if (skypepwd == undefined) {
skypepwd = "";
}
p.addValue("sid", canvas.sid,true);
p.addValue("skypename", skypename,true);
p.addValue("skypepwd", skypepwd,true);
ds.setQueryString(p);
ds.doRequest();
</method>
<method name="userChangeTwitter" args="twittername">
var ds=canvas.datasets.changetwitterDS;
var p=new LzParam();
if (twittername == undefined) {
twittername = "";
}
p.addValue("sid", canvas.sid,true);
p.addValue("twittername", twittername,true);
ds.setQueryString(p);
ds.doRequest();
</method>
<method name="userChangeDisplayname" args="displayname">
var ds=canvas.datasets.changedisplaynameDS;
var p=new LzParam();
if (displayname == undefined) {
displayname = "";
}
p.addValue("sid", canvas.sid,true);
p.addValue("displayname", displayname,true);
ds.setQueryString(p);
ds.doRequest();
</method>
<method name="userChangeForward" args="forward,timeout">
var ds=canvas.datasets.changeforwardDS;
var p=new LzParam();
if (forward == undefined) {
forward = "";
}
p.addValue("sid", canvas.sid,true);
p.addValue("forward", forward,true);
p.addValue("timeout", timeout,true);
ds.setQueryString(p);
ds.doRequest();
</method>
<method name="weepeeReload">
getLiveData();
lz.Timer.addTimer(canvas.reload_delegate, 120 * 60000);
</method>
<method name="getUserData">
var ds=canvas.datasets.numbersDS;
var p=new LzParam();
p.addValue("sid", canvas.sid,true);
ds.setQueryString(p);
ds.doRequest();
var ds=canvas.datasets.usedvouchersDS;
var p=new LzParam();
p.addValue("sid", canvas.sid,true);
ds.setQueryString(p);
ds.doRequest();
var ds=canvas.datasets.quickdialDS;
var p=new LzParam();
p.addValue("sid", canvas.sid,true);
ds.setQueryString(p);
ds.doRequest();
var ds=canvas.datasets.lastyearDS;
var p=new LzParam();
p.addValue("sid", canvas.sid,true);
ds.setQueryString(p);
ds.doRequest();
var ds=canvas.datasets.conferenceDS;
ds.doRequest();
</method>
<method name="getLiveData">
if (canvas.sid != undefined) {
var ds=canvas.datasets.callsoutDS;
ds.doRequest();
var ds=canvas.datasets.callsinDS;
ds.doRequest();
var ds=canvas.datasets.numbersDS;
ds.doRequest();
var ds=canvas.datasets.usedvouchersDS;
ds.doRequest();
var ds=canvas.datasets.quickdialDS;
ds.doRequest();
var ds=canvas.datasets.lastyearDS;
ds.doRequest();
}
</method>
<method name="checkGridData">
Debug.write("checkGridData");
if (canvas.protocol == "sip") {
sipuserdefault.setAttribute('visible',true);
loading.setAttribute('visible',false);
}
if (canvas.protocol == "iax") {
iaxuserdefault.setAttribute('visible',true);
loading.setAttribute('visible',false);
}
if (canvas.protocol == "siptrunk") {
sippbxuserdefault.setAttribute('visible',true);
loading.setAttribute('visible',false);
}
if (canvas.protocol == "iaxtrunk") {
iaxpbxuserdefault.setAttribute('visible',true);
loading.setAttribute('visible',false);
}
if (canvas.protocol == "cnf") {
conferencedefault.setAttribute('visible',true);
loading.setAttribute('visible',false);
}
if (canvas.protocol == "fax") {
faxdefault.setAttribute('visible',true);
loading.setAttribute('visible',false);
}
if (canvas.protocol == "t38") {
t38default.setAttribute('visible',true);
loading.setAttribute('visible',false);
}
if (canvas.protocol == "fwd") {
fwddefault.setAttribute('visible',true);
loading.setAttribute('visible',false);
}
if (canvas.protocol == "ivr") {
ivrdefault.setAttribute('visible',true);
loading.setAttribute('visible',false);
}
if (canvas.protocol == "sms") {
smsdefault.setAttribute('visible',true);
loading.setAttribute('visible',false);
}
if (canvas.protocol == "sim") {
simdefault.setAttribute('visible',true);
loading.setAttribute('visible',false);
}
</method>
<method name="searchCallsout" args="month,search">
var ds=canvas.datasets.callsoutDS;
var p=new LzParam();
p.addValue("sid", canvas.sid,true);
p.addValue("search", search,true);
p.addValue("month", month,true);
ds.setQueryString(p);
ds.doRequest();
canvas.searchingout.open();
</method>
<method name="searchCallsin" args="month,search">
var ds=canvas.datasets.callsinDS;
var p=new LzParam();
p.addValue("sid", canvas.sid,true);
p.addValue("search", search,true);
p.addValue("month", month,true);
ds.setQueryString(p);
ds.doRequest();
canvas.searchingin.open();
</method>
<method name="activateVoucher" args="code">
canvas.activatevoucher.open();
var ds=canvas.datasets.usedvouchersDS;
var p=new LzParam();
p.addValue("sid", canvas.sid,true);
p.addValue("code", code,true);
ds.setQueryString(p);
ds.doRequest();
</method>
<method name="requestNumber" args="zone">
var ds=canvas.datasets.requestnumberDS;
var p=new LzParam();
p.addValue("sid", canvas.sid,true);
p.addValue("zone", zone,true);
ds.setQueryString(p);
ds.doRequest();
canvas.newnumberdialog.close();
</method>
<method name="transferNumber" args="nr">
var ds=canvas.datasets.transfernumberDS;
var p=new LzParam();
p.addValue("sid", canvas.sid,true);
p.addValue("nr", nr,true);
ds.setQueryString(p);
ds.doRequest();
canvas.transfernumberdialog.close();
</method>
<method name="downloadAgreement">
lz.Browser.loadURL("http://vapi0.weepee.org/api/userdata/getcontractaccount.php?sid=" + canvas.sid, "_blank");
</method>
<method name="requestAgreement">
var ds=canvas.datasets.agreementDS;
var p=new LzParam();
p.addValue("sid", canvas.sid,true);
ds.setQueryString(p);
ds.doRequest();
</method>
<method name="sendSMS" args="to,sms">
smsstatus.setAttribute("text","...sending...");
var ds=canvas.datasets.sendSMSDS;
var p=new LzParam();
p.addValue("sid", canvas.sid,true);
p.addValue("to", to,true);
p.addValue("sms", sms,true);
ds.setQueryString(p);
ds.doRequest();
</method>
<method name="callSkype" args="to">
skypestatus.setAttribute("text","...calling...");
var ds=canvas.datasets.callSkypeDS;
var p=new LzParam();
p.addValue("sid", canvas.sid,true);
p.addValue("to", to,true);
ds.setQueryString(p);
ds.doRequest();
</method>
<method name="quickdialChange" args="short, number, name">
var ds=canvas.datasets.quickdialDS;
var p=new LzParam();
p.addValue("sid", canvas.sid,true);
p.addValue("short", short,true);
p.addValue("number", number,true);
p.addValue("name", name,true);
ds.setQueryString(p);
ds.doRequest();
</method>
<method name="weepeeOnInit">
canvas.changepwddialog.close();
canvas.changeemaildialog.close();
canvas.changepindialog.close();
canvas.newnumberdialog.close();
canvas.transfernumberdialog.close();
</method>
</library>
Cross References
Named Instances