Fix some typos
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 10 Feb 2009 07:22:01 +0000 (00:22 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 10 Feb 2009 07:22:01 +0000 (00:22 -0700)
imp/js/login.js
imp/js/src/login.js
imp/login.php

index 9f58222..95843d2 100644 (file)
@@ -1 +1 @@
-var ImpLogin={_reload:function(){window.top.document.location=this.autologin_url+$F("server_key")},submit:function(){if(this.show_list&&$F("server_key").startsWith("_")){return}if(!$F("imapuser")){alert(IMP.text.login_username);$("imapuser").focus()}else{if(!$F("pass")){alert(IMP.text.login_password);$("pass").focus()}else{$("loginButton").disable();if(this.ie_clientcaps){try{$("ie_version").setValue(objCCaps.getComponentVersion("{89820200-ECBD-11CF-8B85-00AA005B4383}","componentid"))}catch(a){}}$("imp_login").submit()}}},_selectLang:function(){if(!$F("imapuser")&&!$F("pass")){var a={new_lang:$F("new_lang")};if(this.lang_url){a.url=this.lang_url}self.location="login.php?"+Object.toQueryString(a)}},_removeHash:function(a){return(Object.isString(a)&&a.startsWith("#"))?a.substring(1):a},onDomLoad:function(){if(this.imp_auth){if(parent.frames.horde_main){if(this.nomenu){parent.location=self.location}else{document.imp_login.target="_parent"}}}document.observe("change",this._changeHandler.bindAsEventListner(this));document.observe("click",this._clickHandler.bindAsEventListner(this));if(location.hash){$("anchor_string").setValue(this._removeHash(location.hash))}if(!$F("imapuser")){$("imapuser").focus()}else{$("pass").focus()}if(this.reloadmenu&&window.parent.frames.horde_menu){window.parent.frames.horde_menu.location.reload()}},_changeHandler:function(a){switch(a.element().readAttribute("id")){case"new_lang":this._selectLang();break;case"server_key":this._reload();break}},_clickHandler:function(a){switch(a.element().readAttribute("id")){case"btn_login":this._reload();break;case"loginButton":this._submit();break}}};document.observe("dom:loaded",ImpLogin.onDomLoad.bin(ImpLogin));
\ No newline at end of file
+var ImpLogin={_reload:function(){window.top.document.location=this.autologin_url+$F("server_key")},submit:function(){if(this.show_list&&$F("server_key").startsWith("_")){return}if(!$F("imapuser")){alert(IMP.text.login_username);$("imapuser").focus()}else{if(!$F("pass")){alert(IMP.text.login_password);$("pass").focus()}else{$("loginButton").disable();if(this.ie_clientcaps){try{$("ie_version").setValue(objCCaps.getComponentVersion("{89820200-ECBD-11CF-8B85-00AA005B4383}","componentid"))}catch(a){}}$("imp_login").submit()}}},_selectLang:function(){if(!$F("imapuser")&&!$F("pass")){var a={new_lang:$F("new_lang")};if(this.lang_url){a.url=this.lang_url}self.location="login.php?"+Object.toQueryString(a)}},_removeHash:function(a){return(Object.isString(a)&&a.startsWith("#"))?a.substring(1):a},onDomLoad:function(){if(this.imp_auth){if(parent.frames.horde_main){if(this.nomenu){parent.location=self.location}else{document.imp_login.target="_parent"}}}document.observe("change",this._changeHandler.bindAsEventListener(this));document.observe("click",this._clickHandler.bindAsEventListener(this));if(location.hash){$("anchor_string").setValue(this._removeHash(location.hash))}if(!$F("imapuser")){$("imapuser").focus()}else{$("pass").focus()}if(this.reloadmenu&&window.parent.frames.horde_menu){window.parent.frames.horde_menu.location.reload()}},_changeHandler:function(a){switch(a.element().readAttribute("id")){case"new_lang":this._selectLang();break;case"server_key":this._reload();break}},_clickHandler:function(a){switch(a.element().readAttribute("id")){case"btn_login":this._reload();break;case"loginButton":this._submit();break}}};document.observe("dom:loaded",ImpLogin.onDomLoad.bind(ImpLogin));
\ No newline at end of file
index 62c481f..6fe249e 100644 (file)
@@ -68,8 +68,8 @@ var ImpLogin = {
             }
         }
 
-        document.observe('change', this._changeHandler.bindAsEventListner(this));
-        document.observe('click', this._clickHandler.bindAsEventListner(this));
+        document.observe('change', this._changeHandler.bindAsEventListener(this));
+        document.observe('click', this._clickHandler.bindAsEventListener(this));
 
         // Need to capture hash information if it exists in URL
         if (location.hash) {
@@ -115,4 +115,4 @@ var ImpLogin = {
 
 };
 
-document.observe('dom:loaded', ImpLogin.onDomLoad.bin(ImpLogin));
+document.observe('dom:loaded', ImpLogin.onDomLoad.bind(ImpLogin));
index cf1976b..338708f 100644 (file)
@@ -334,7 +334,7 @@ IMP::addInlineScript(array(
     'ImpLogin.imp_auth = ' . intval($imp_auth),
     'ImpLogin.lang_url = ' . Horde_Serialize::serialize($lang_url, SERIALIZE_JSON, $charset),
     'ImpLogin.nomenu = ' . intval(empty($conf['menu']['always'])),
-    'ImpLogin.reloadmenu = ' . (boolean) ($logout_reason && $imp_auth && $conf['menu']['always']),
+    'ImpLogin.reloadmenu = ' . intval($logout_reason && $imp_auth && $conf['menu']['always']),
     'ImpLogin.show_list = ' . intval($show_list),
 ));