diff --git a/testing/extensions/community/README b/testing/extensions/community/README index cd76bd095bd..19ec137979d 100644 --- a/testing/extensions/community/README +++ b/testing/extensions/community/README @@ -8,4 +8,4 @@ License is MPL 1.1/GPL 2.0/LGPL 2.1 tri-license as described in the various srouce files. MochiKit (c) 2005 Bob Ippolito, Academic Free License. Chatzilla (used under MPL/GPL) is modified slightly to run in a different chrome path to not -conflict with standard installations. \ No newline at end of file +conflict with standard installations. diff --git a/testing/extensions/community/build.xml b/testing/extensions/community/build.xml index fde69ffdba9..51092f928e7 100644 --- a/testing/extensions/community/build.xml +++ b/testing/extensions/community/build.xml @@ -1,33 +1,32 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + - + diff --git a/testing/extensions/community/chrome.manifest b/testing/extensions/community/chrome.manifest index 909ab919208..54435ab05c4 100644 --- a/testing/extensions/community/chrome.manifest +++ b/testing/extensions/community/chrome.manifest @@ -1,10 +1,10 @@ -content qa chrome/content/ -skin qa classic/1.0 chrome/skin/ -locale qa en-US chrome/locale/en-US/ +content qa chrome/content/ +skin qa classic/1.0 chrome/skin/ +locale qa en-US chrome/locale/en-US/ overlay chrome://browser/content/browser.xul chrome://qa/content/browserOverlays.xul content chatzilla_qa jar:chatzilla.jar!/content/chatzilla/ skin chatzilla_qa modern/1.0 jar:chatzilla.jar!/skin/modern/chatzilla/ locale chatzilla_qa en-US jar:chatzilla.jar!/locale/en-US/chatzilla/ -content chatzillaservice_qa components/chatzilla-service.js \ No newline at end of file +content chatzillaservice_qa components/chatzilla-service.js diff --git a/testing/extensions/community/chrome/content/accountcreate.js b/testing/extensions/community/chrome/content/accountcreate.js index 126036e8296..9badb3f9cc0 100644 --- a/testing/extensions/community/chrome/content/accountcreate.js +++ b/testing/extensions/community/chrome/content/accountcreate.js @@ -1,108 +1,80 @@ - - -var accountCreate = { - oldPassword: null, //TODO: is this secure? - oldUsername: null, - updateFunction : null, - loadSetup : function() { - document.getElementById('qa-setup-createaccount-iframe').src = - litmus.baseURL+'extension.cgi?createAccount=1'; - accountCreate.updateFunction = window.arguments[0]; - - accountCreate.oldPassword = qaPref.litmus.getPassword(); - accountCreate.oldUsername = qaPref.litmus.getUsername(); - }, - validateAccount : function() { - // we're creating a new account, so get the uname and passwd - // from the account created page: - var page = document.getElementById('qa-setup-createaccount-iframe'). - contentDocument; - if (!page) { - alert("create account page is missing"); - return false; - } - if (page.wrappedJSObject == null) - page.wrappedJSObject = page; - if (page.forms[0] && page.forms[0].wrappedJSObject == null) - page.forms[0].wrappedJSObject = page.forms[0]; - - if (page.location == litmus.baseURL+'extension.cgi?createAccount=1' - && qaSetup.didSubmitForm==0) { - page.forms[0].wrappedJSObject.submit(); - qaSetup.didSubmitForm = 1; - setTimeout("qaSetup.validateAccount()", 5000); - return false; - } - if (qaSetup.didSubmitForm == 1 && ! page.forms || - ! page.forms[0].wrappedJSObject || - ! page.forms[0].wrappedJSObject.email && - ! page.forms[0].wrappedJSObject.email.value) - {qaSetup.didSubmitForm = 2; - setTimeout("qaSetup.validateAccount()", 4000); - return false;} - var e = ''; - var p = ''; - if (page.forms && page.forms[0].wrappedJSObject && - page.forms[0].wrappedJSObject.email && - page.forms[0].wrappedJSObject.email.value) - { e=page.forms[0].wrappedJSObject.email.value } - if (page.forms && page.forms[0].wrappedJSObject && - page.forms[0].wrappedJSObject.password && - page.forms[0].wrappedJSObject.password.value) - { p=page.forms[0].wrappedJSObject.password.value } - // e is account, p is password - - var uname = e; - var passwd = p; - - - if (e == '' || p == '') { - alert("No username or password has been registered."); - return false; //we need better error handling. - } - qaPref.litmus.setPassword(uname, passwd); - accountCreate.updateFunction(); - - // TODO: ideally we would validate against litmus, but... - return true; - }, - - handleCancel : function() { - qaPref.litmus.setPassword(oldUsername, oldPassword); - } -} + - - - - - - - - + @@ -89,13 +101,11 @@ - + - + - - - \ No newline at end of file + diff --git a/testing/extensions/community/chrome/content/settings.js b/testing/extensions/community/chrome/content/settings.js index 7699e02836e..df760e1c832 100755 --- a/testing/extensions/community/chrome/content/settings.js +++ b/testing/extensions/community/chrome/content/settings.js @@ -19,6 +19,7 @@ * * Contributor(s): * Zach Lipton + * Ben Hsieh * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or @@ -36,247 +37,234 @@ var qaPrefsWindow = { - lastSelectedTab : null, - - onSwitchTab : function() { - var newSelection = $('qa_tabrow').selectedItem; - - // user is switching to the prefs tab: - if ($('qa_tabrow').selectedItem == $('qa-tabbar-prefs')) { - qaPrefsWindow.loadPrefsWindow(); - } - - // user is switching away from the prefs tab: - if (qaPrefsWindow.lastSelectedTab != null && - qaPrefsWindow.lastSelectedTab == $('qa-tabbar-prefs')) { - qaPrefsWindow.savePrefsWindow(); - } - - qaPrefsWindow.lastSelectedTab = newSelection; - }, + lastSelectedTab : null, - loadPrefsWindow : function() { - prefsTabOpen = true; - document.getElementById('qa-preferences-litmus-username').value = - qaPref.litmus.getUsername() || ''; - document.getElementById('qa-preferences-litmus-password').value = - qaPref.litmus.getPassword() || ''; - - // load notification settings: - var prefs = qaPref.getPref(qaPref.prefBase+'.notificationSettings', 'char'); - prefs = prefs.split(","); - var notify = $('qa-prefs-notify').childNodes; - var prefCounter = 0; - for (var i=0; i + @@ -49,7 +49,7 @@ width="850" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"> - + @@ -79,22 +79,22 @@ - + - +