home *** CD-ROM | disk | FTP | other *** search
- var processedauth=false;
- function onIcqSendMsg()
- {
- var user=document.getElementById('icqnumber').getAttribute("value");
- aimIMInvokeIMForm(user);
- }
-
- function onIcqDecline()
- {
- var user=document.getElementById('icqnumber').getAttribute("value");
- var auth_msg=document.getElementById('authMsg').value;
- aimFeedbagManager().RejectAuthorization(user,auth_msg)
- top.window.close();
- }
-
- function onIcqAuthorize()
- {
- var user=document.getElementById('icqnumber').getAttribute("value");
- aimFeedbagManager().AcceptAuthorization(user);
- top.window.close();
- }
-
- function onIcqRequestAuth()
- {
- // Close the request window and open a new window with authorization sent notice
- var user=document.getElementById('icqnumber').getAttribute("value");
- var auth_msg=document.getElementById('reason').value;
- try {
- aimFeedbagManager().SendAuthorizationRequest(user,auth_msg);
- } catch (e) {
- //alert(e);
- }
- if (document.getElementById('preauth').checked)
- aimFeedbagManager().SendPreAuthorizationGrant(user,auth_msg);
- processedauth=true;
- top.window.close();
-
- window.open("chrome://aim/content/icqAuthSent.xul", "", "chrome,titlebar,dialog,modal");
- }
-
- function onIcqCancel()
- {
- top.window.close();
- }
-
- function onIcqCancelAuth()
- {
- // User chose not to send an authorization request after all. Remove the added buddy in this case.
- var user=document.getElementById('icqnumber').getAttribute("value");
- aimBuddyManager().RemoveBuddyAll(user);
- aimFeedbagManager().ClearAuthorization(user);
- top.window.close();
- }
-
- function OnUnloadAuthMsg()
- {
- if (processedauth == false)
- onIcqCancelAuth();
- }
-
-
- function OnLoadAuthRequest()
- {
-
- var icqnumber=document.getElementById('icqnumber');
- if (icqnumber) {
- icqnumber.setAttribute("value",window.arguments[0]);
- icqnumber.setAttribute("disabled","true");
- }
- var auth_msg=document.getElementById('authMsg');
- if (auth_msg && window.arguments[1]) {
- auth_msg.value = window.arguments[1];
- }
-
- //var nickname=document.getElementById('nickname');
- //nickname.setAttribute("value",getNickName(icqnumber));
- //nickname.setAttribute("disabled","true");
- //var email=document.getElementById('email');
- //email.setAttribute("value",getEmail(icqnumber));
- // email.setAttribute("disabled","true");
-
- }
-
- function OnLoadAuthMsg()
- {
- //Get user values - as user obj from one of parameters to window.open?
- var icqnumber=document.getElementById('icqnumber');
- if (icqnumber) {
- icqnumber.setAttribute("value",window.arguments[0]);
- icqnumber.setAttribute("disabled","true");
- }
-
- var isinlist = new Object();
- aimFeedbagManager().IsInAuthList(window.arguments[0], isinlist);
- if (isinlist.value == true) {
- // this is during rerequest at this point , so authrequest has already been processes
- processedauth=true;
- }
-
- //var disp_name=document.getElementById('displayname');
- //disp_name.setAttribute("value",--);
- //var email=document.getElementById('email');
- //email.setAttribute("value",--);
- //email.setAttribute("disabled","true");
- var msg=document.getElementById('reason');
- if (msg) {
- var reason_msg=msg.getAttribute("value");
- //reason_msg=reason_msg+cur_user_data;
- msg.value=reason_msg;
- }
- if (window.arguments[1]) {
- var auth=document.getElementById('authlabel');
- auth.value=window.arguments[1];
- }
- }
-
-
- function OnLoadAuthReject()
- {
-
- var icqnumber=document.getElementById('icqnumber');
- if (icqnumber) {
- icqnumber.setAttribute("value",window.arguments[0]);
- icqnumber.setAttribute("disabled","true");
- }
- var msg=document.getElementById('declineMsg');
- var decline_msg=msg.getAttribute("value");
- if (window.arguments[1])
- msg.value=decline_msg+"\n"+window.arguments[1];
- else
- msg.value=decline_msg;
- //var nickname=document.getElementById('nickname');
- //nickname.setAttribute("value",getNickName(icqnumber));
- //nickname.setAttribute("disabled","true");
- //var email=document.getElementById('email');
- //email.setAttribute("value",getEmail(icqnumber));
- //email.setAttribute("disabled","true");
-
- }
-
- function OnLoadAuthAccept()
- {
-
- var icqnumber=document.getElementById('icqnumber');
- if (icqnumber) {
- icqnumber.setAttribute("value",window.arguments[0]);
- icqnumber.setAttribute("disabled","true");
- }
- var msg=document.getElementById('acceptMsg');
- if (msg) {
- var accept_msg=msg.getAttribute("value");
- msg.value=accept_msg;
- }
-
-
- //var nickname=document.getElementById('nickname');
- //nickname.setAttribute("value",getNickName(icqnumber));
- //nickname.setAttribute("disabled","true");
- //var email=document.getElementById('email');
- //email.setAttribute("value",getEmail(icqnumber));
- //email.setAttribute("disabled","true");
-
- }