зеркало из https://github.com/mozilla/pjs.git
Bug 395466 Checking in patch by Ben_H for QA Extension
This commit is contained in:
Родитель
936789ecba
Коммит
d0fd2a9621
|
@ -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,
|
in the various srouce files. MochiKit (c) 2005 Bob Ippolito,
|
||||||
Academic Free License. Chatzilla (used under MPL/GPL) is
|
Academic Free License. Chatzilla (used under MPL/GPL) is
|
||||||
modified slightly to run in a different chrome path to not
|
modified slightly to run in a different chrome path to not
|
||||||
conflict with standard installations.
|
conflict with standard installations.
|
||||||
|
|
|
@ -1,33 +1,32 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
build.xml adapted from Shawn Wilsher's rtse
|
build.xml adapted from Shawn Wilsher's rtse
|
||||||
(http://shawnwilsher.com/extensions/rtse/)
|
(http://shawnwilsher.com/extensions/rtse/)
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
<project name="qa" default="createxpi">
|
<project name="qa" default="createxpi">
|
||||||
<tstamp>
|
<tstamp>
|
||||||
<format property="build.number" pattern="yyyyMMdd" offset="-1" unit="hour"/>
|
<format property="build.number" pattern="yyyyMMdd" offset="-1" unit="hour"/>
|
||||||
</tstamp>
|
</tstamp>
|
||||||
<property name="build.version" value="0.1.${build.number}"/>
|
<property name="build.version" value="0.1.${build.number}"/>
|
||||||
<target name="createxpi" depends="createjar">
|
<target name="createxpi" depends="createjar">
|
||||||
<zip destfile="qa.xpi">
|
<zip destfile="qa.xpi">
|
||||||
<zipfileset dir="" includes="chrome/qa.jar"/>
|
<zipfileset dir="" includes="chrome/qa.jar"/>
|
||||||
<zipfileset dir="" includes="chatzilla.jar"/>
|
<zipfileset dir="" includes="chatzilla.jar"/>
|
||||||
<zipfileset dir="" includes="install.rdf"/>
|
<zipfileset dir="" includes="install.rdf"/>
|
||||||
<zipfileset dir="" includes="jar-chrome.manifest" fullpath="chrome.manifest"/>
|
<zipfileset dir="" includes="jar-chrome.manifest" fullpath="chrome.manifest"/>
|
||||||
<zipfileset dir="" includes="README" />
|
<zipfileset dir="" includes="README" />
|
||||||
<zipfileset dir="" includes="defaults/**" excludes="**CVS"/>
|
<zipfileset dir="" includes="defaults/**" excludes="**CVS"/>
|
||||||
<zipfileset dir="" includes="platform/**" excludes="**CVS"/>
|
<zipfileset dir="" includes="platform/**" excludes="**CVS"/>
|
||||||
<zipfileset dir="" includes="components/chatzilla-service.js" />
|
<zipfileset dir="" includes="components/chatzilla-service.js" />
|
||||||
</zip>
|
</zip>
|
||||||
</target>
|
</target>
|
||||||
<target name="createjar">
|
<target name="createjar">
|
||||||
<zip destfile="chrome/qa.jar">
|
<zip destfile="chrome/qa.jar">
|
||||||
<zipfileset dir="chrome" includes="content/**" excludes="**CVS"/>
|
<zipfileset dir="chrome" includes="content/**" excludes="**CVS"/>
|
||||||
<zipfileset dir="chrome" includes="skin/**" excludes="**CVS"/>
|
<zipfileset dir="chrome" includes="skin/**" excludes="**CVS"/>
|
||||||
<zipfileset dir="chrome" includes="locale/**" excludes="**CVS"/>
|
<zipfileset dir="chrome" includes="locale/**" excludes="**CVS"/>
|
||||||
</zip>
|
</zip>
|
||||||
</target>
|
</target>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
content qa chrome/content/
|
content qa chrome/content/
|
||||||
skin qa classic/1.0 chrome/skin/
|
skin qa classic/1.0 chrome/skin/
|
||||||
locale qa en-US chrome/locale/en-US/
|
locale qa en-US chrome/locale/en-US/
|
||||||
|
|
||||||
overlay chrome://browser/content/browser.xul chrome://qa/content/browserOverlays.xul
|
overlay chrome://browser/content/browser.xul chrome://qa/content/browserOverlays.xul
|
||||||
|
|
||||||
content chatzilla_qa jar:chatzilla.jar!/content/chatzilla/
|
content chatzilla_qa jar:chatzilla.jar!/content/chatzilla/
|
||||||
skin chatzilla_qa modern/1.0 jar:chatzilla.jar!/skin/modern/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/
|
locale chatzilla_qa en-US jar:chatzilla.jar!/locale/en-US/chatzilla/
|
||||||
content chatzillaservice_qa components/chatzilla-service.js
|
content chatzillaservice_qa components/chatzilla-service.js
|
||||||
|
|
|
@ -1,108 +1,80 @@
|
||||||
<!-- -*- Mode: HTML -*-
|
<!-- -*- Mode: HTML -*-
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
/* ***** BEGIN LICENSE BLOCK *****
|
||||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
#
|
*
|
||||||
# The contents of this file are subject to the Mozilla Public License Version
|
* The contents of this file are subject to the Mozilla Public License Version
|
||||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||||
# the License. You may obtain a copy of the License at
|
* the License. You may obtain a copy of the License at
|
||||||
# http://www.mozilla.org/MPL/
|
* http://www.mozilla.org/MPL/
|
||||||
#
|
*
|
||||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
# for the specific language governing rights and limitations under the
|
* for the specific language governing rights and limitations under the
|
||||||
# License.
|
* License.
|
||||||
#
|
*
|
||||||
# The Original Code is the Mozilla Community QA Extension
|
* The Original Code is the Mozilla Community QA Extension
|
||||||
#
|
*
|
||||||
# The Initial Developer of the Original Code is Zach Lipton.
|
* The Initial Developer of the Original Code is the Mozilla Corporation.
|
||||||
# Portions created by the Initial Developer are Copyright (C) 2006
|
* Portions created by the Initial Developer are Copyright (C) 2006
|
||||||
# the Initial Developer. All Rights Reserved.
|
* the Initial Developer. All Rights Reserved.
|
||||||
#
|
*
|
||||||
# Contributor(s):
|
* Contributor(s):
|
||||||
# Ben Hsieh <ben.hsieh@gmail.com>
|
* Ben Hsieh <ben.hsieh@gmail.com>
|
||||||
#
|
*
|
||||||
# Alternatively, the contents of this file may be used under the terms of
|
* Portions taken from David Hamp-Gonsalves' Buggybar (buggybar@gmail.com)
|
||||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
*
|
||||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
* Alternatively, the contents of this file may be used under the terms of
|
||||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
# of those above. If you wish to allow use of your version of this file only
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
# use your version of this file under the terms of the MPL, indicate your
|
* of those above. If you wish to allow use of your version of this file only
|
||||||
# decision by deleting the provisions above and replace them with the notice
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
# and other provisions required by the LGPL or the GPL. If you do not delete
|
* use your version of this file under the terms of the MPL, indicate your
|
||||||
# the provisions above, a recipient may use your version of this file under
|
* decision by deleting the provisions above and replace them with the notice
|
||||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
#
|
* the provisions above, a recipient may use your version of this file under
|
||||||
# ***** END LICENSE BLOCK ***** -->
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
|
*
|
||||||
var accountCreate = {
|
* ***** END LICENSE BLOCK ***** */
|
||||||
oldPassword: null, //TODO: is this secure?
|
|
||||||
oldUsername: null,
|
var accountCreate = {
|
||||||
updateFunction : null,
|
oldPassword: null, //TODO: is this secure?
|
||||||
loadSetup : function() {
|
oldUsername: null,
|
||||||
document.getElementById('qa-setup-createaccount-iframe').src =
|
updateFunction : null,
|
||||||
litmus.baseURL+'extension.cgi?createAccount=1';
|
loadSetup : function() {
|
||||||
accountCreate.updateFunction = window.arguments[0];
|
document.getElementById('qa-settings-createaccount-frame').src =
|
||||||
|
litmus.baseURL+'extension.cgi?createAccount=1';
|
||||||
accountCreate.oldPassword = qaPref.litmus.getPassword();
|
accountCreate.updateFunction = window.arguments[0];
|
||||||
accountCreate.oldUsername = qaPref.litmus.getUsername();
|
|
||||||
},
|
accountCreate.oldPassword = qaPref.litmus.getPassword();
|
||||||
validateAccount : function() {
|
accountCreate.oldUsername = qaPref.litmus.getUsername();
|
||||||
// we're creating a new account, so get the uname and passwd
|
},
|
||||||
// from the account created page:
|
validateAccount : function() {
|
||||||
var page = document.getElementById('qa-setup-createaccount-iframe').
|
|
||||||
contentDocument;
|
var account = qaSetup.retrieveAccount("qa-settings-createaccount-frame");
|
||||||
if (!page) {
|
var uname = account.name;
|
||||||
alert("create account page is missing");
|
var passwd = account.password;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (page.wrappedJSObject == null)
|
if (uname == '' || passwd == '') {
|
||||||
page.wrappedJSObject = page;
|
alert("No username or password has been registered.");
|
||||||
if (page.forms[0] && page.forms[0].wrappedJSObject == null)
|
return false; //we need better error handling.
|
||||||
page.forms[0].wrappedJSObject = page.forms[0];
|
}
|
||||||
|
|
||||||
if (page.location == litmus.baseURL+'extension.cgi?createAccount=1'
|
var location = document.getElementById('qa-settings-createaccount-frame').contentDocument.location + "";
|
||||||
&& qaSetup.didSubmitForm==0) {
|
if (location.indexOf("createAccount") != -1) {
|
||||||
page.forms[0].wrappedJSObject.submit();
|
alert("Account not created! You most likely need to click the 'Create Account' button");
|
||||||
qaSetup.didSubmitForm = 1;
|
return false;
|
||||||
setTimeout("qaSetup.validateAccount()", 5000);
|
}
|
||||||
return false;
|
|
||||||
}
|
qaPref.litmus.setPassword(uname, passwd);
|
||||||
if (qaSetup.didSubmitForm == 1 && ! page.forms ||
|
accountCreate.updateFunction();
|
||||||
! page.forms[0].wrappedJSObject ||
|
|
||||||
! page.forms[0].wrappedJSObject.email &&
|
// TODO: ideally we would validate against litmus, but...
|
||||||
! page.forms[0].wrappedJSObject.email.value)
|
return true;
|
||||||
{qaSetup.didSubmitForm = 2;
|
},
|
||||||
setTimeout("qaSetup.validateAccount()", 4000);
|
|
||||||
return false;}
|
handleCancel : function() {
|
||||||
var e = '';
|
qaPref.litmus.setPassword(oldUsername, oldPassword);
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,69 +1,69 @@
|
||||||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
- ***** BEGIN LICENSE BLOCK *****
|
||||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
#
|
-
|
||||||
# The contents of this file are subject to the Mozilla Public License Version
|
- The contents of this file are subject to the Mozilla Public License Version
|
||||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
- 1.1 (the "License"); you may not use this file except in compliance with
|
||||||
# the License. You may obtain a copy of the License at
|
- the License. You may obtain a copy of the License at
|
||||||
# http://www.mozilla.org/MPL/
|
- http://www.mozilla.org/MPL/
|
||||||
#
|
-
|
||||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
- Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
# for the specific language governing rights and limitations under the
|
- for the specific language governing rights and limitations under the
|
||||||
# License.
|
- License.
|
||||||
#
|
-
|
||||||
# The Original Code is the Mozilla Community QA Extension
|
- The Original Code is the Mozilla Community QA Extension
|
||||||
#
|
-
|
||||||
# The Initial Developer of the Original Code is Zach Lipton.
|
- The Initial Developer of the Original Code is the Mozilla Corporation.
|
||||||
# Portions created by the Initial Developer are Copyright (C) 2006
|
- Portions created by the Initial Developer are Copyright (C) 2007
|
||||||
# the Initial Developer. All Rights Reserved.
|
- the Initial Developer. All Rights Reserved.
|
||||||
#
|
-
|
||||||
# Contributor(s):
|
- Contributor(s):
|
||||||
# Ben Hsieh <ben.hsieh@gmail.com>
|
- Ben Hsieh <ben.hsieh@gmail.com>
|
||||||
#
|
-
|
||||||
# Alternatively, the contents of this file may be used under the terms of
|
- 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
|
- either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
- in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
# of those above. If you wish to allow use of your version of this file only
|
- of those above. If you wish to allow use of your version of this file only
|
||||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
- under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
# use your version of this file under the terms of the MPL, indicate your
|
- use your version of this file under the terms of the MPL, indicate your
|
||||||
# decision by deleting the provisions above and replace them with the notice
|
- decision by deleting the provisions above and replace them with the notice
|
||||||
# and other provisions required by the LGPL or the GPL. If you do not delete
|
- and other provisions required by the LGPL or the GPL. If you do not delete
|
||||||
# the provisions above, a recipient may use your version of this file under
|
- the provisions above, a recipient may use your version of this file under
|
||||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
#
|
-
|
||||||
# ***** END LICENSE BLOCK ***** -->
|
- ***** END LICENSE BLOCK ***** -->
|
||||||
<!DOCTYPE wizard PUBLIC "-//MOZILLA//DTD XUL V1.0//EN" "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
<!DOCTYPE wizard PUBLIC "-//MOZILLA//DTD XUL V1.0//EN" "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||||
|
|
||||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||||
<?xml-stylesheet href="chrome://qa/skin/" type="text/css"?>
|
<?xml-stylesheet href="chrome://qa/skin/" type="text/css"?>
|
||||||
|
|
||||||
<dialog id="account-setup"
|
<dialog id="account-setup"
|
||||||
title="Account Creation"
|
title="Account Creation"
|
||||||
class="color-dialog"
|
class="color-dialog"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
width="800px"
|
width="800px"
|
||||||
height="400px"
|
height="400px"
|
||||||
onload="accountCreate.loadSetup();"
|
onload="accountCreate.loadSetup();"
|
||||||
ondialogaccept="return accountCreate.validateAccount();"
|
ondialogaccept="return accountCreate.validateAccount();"
|
||||||
ondialogcancel=""
|
ondialogcancel=""
|
||||||
>
|
>
|
||||||
<script type="application/x-javascript" src="chrome://qa/content/MochiKit/MochiKit.js" />
|
<script type="application/x-javascript" src="chrome://qa/content/MochiKit/MochiKit.js" />
|
||||||
<script type="application/x-javascript" src="chrome://qa/content/prefs.js" />
|
<script type="application/x-javascript" src="chrome://qa/content/prefs.js" />
|
||||||
<script type="application/x-javascript" src="chrome://qa/content/common.js" />
|
<script type="application/x-javascript" src="chrome://qa/content/common.js" />
|
||||||
<script type="application/x-javascript" src="chrome://qa/content/litmus.js" />
|
<script type="application/x-javascript" src="chrome://qa/content/litmus.js" />
|
||||||
<script type="application/x-javascript" src="chrome://qa/content/settings.js" />
|
<script type="application/x-javascript" src="chrome://qa/content/settings.js" />
|
||||||
<script type="application/x-javascript" src="chrome://qa/content/accountcreate.js" />
|
<script type="application/x-javascript" src="chrome://qa/content/accountcreate.js" />
|
||||||
|
|
||||||
<stringbundleset id="stringbundleset">
|
<stringbundleset id="stringbundleset">
|
||||||
<stringbundle id="bundle_qa" src="chrome://qa/locale/qa.properties" />
|
<stringbundle id="bundle_qa" src="chrome://qa/locale/qa.properties" />
|
||||||
</stringbundleset>
|
</stringbundleset>
|
||||||
|
|
||||||
<vbox id="qa-setup-accountno" style="display: none" width="0px" height="0px" />
|
<vbox id="qa-setup-accountno" style="display: none" width="0px" height="0px" />
|
||||||
<html:iframe id="qa-setup-createaccount-iframe"
|
<html:iframe id="qa-settings-createaccount-frame"
|
||||||
height="280"/>
|
height="280"/>
|
||||||
|
|
||||||
</dialog>
|
</dialog>
|
||||||
|
|
|
@ -1,39 +1,40 @@
|
||||||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
- ***** BEGIN LICENSE BLOCK *****
|
||||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
#
|
-
|
||||||
# The contents of this file are subject to the Mozilla Public License Version
|
- The contents of this file are subject to the Mozilla Public License Version
|
||||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
- 1.1 (the "License"); you may not use this file except in compliance with
|
||||||
# the License. You may obtain a copy of the License at
|
- the License. You may obtain a copy of the License at
|
||||||
# http://www.mozilla.org/MPL/
|
- http://www.mozilla.org/MPL/
|
||||||
#
|
-
|
||||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
- Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
# for the specific language governing rights and limitations under the
|
- for the specific language governing rights and limitations under the
|
||||||
# License.
|
- License.
|
||||||
#
|
-
|
||||||
# The Original Code is the Mozilla Community QA Extension
|
- The Original Code is the Mozilla Community QA Extension
|
||||||
#
|
-
|
||||||
# The Initial Developer of the Original Code is the Mozilla Corporation.
|
- The Initial Developer of the Original Code is the Mozilla Corporation.
|
||||||
# Portions created by the Initial Developer are Copyright (C) 2006
|
- Portions created by the Initial Developer are Copyright (C) 2007
|
||||||
# the Initial Developer. All Rights Reserved.
|
- the Initial Developer. All Rights Reserved.
|
||||||
#
|
-
|
||||||
# Contributor(s):
|
- Contributor(s):
|
||||||
# Zach Lipton <zach@zachlipton.com>
|
- Zach Lipton <zach@zachlipton.com>
|
||||||
#
|
- Ben Hsieh <ben.hsieh@gmail.com>
|
||||||
# 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
|
- Alternatively, the contents of this file may be used under the terms of
|
||||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
- either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
# of those above. If you wish to allow use of your version of this file only
|
- in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
- of those above. If you wish to allow use of your version of this file only
|
||||||
# use your version of this file under the terms of the MPL, indicate your
|
- under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
# decision by deleting the provisions above and replace them with the notice
|
- use your version of this file under the terms of the MPL, indicate your
|
||||||
# and other provisions required by the LGPL or the GPL. If you do not delete
|
- decision by deleting the provisions above and replace them with the notice
|
||||||
# the provisions above, a recipient may use your version of this file under
|
- and other provisions required by the LGPL or the GPL. If you do not delete
|
||||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
- the provisions above, a recipient may use your version of this file under
|
||||||
#
|
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
# ***** END LICENSE BLOCK ***** -->
|
-
|
||||||
|
- ***** END LICENSE BLOCK ***** -->
|
||||||
|
|
||||||
<?xml-stylesheet href="chrome://qa/skin/browserOverlays.css" type="text/css"?>
|
<?xml-stylesheet href="chrome://qa/skin/browserOverlays.css" type="text/css"?>
|
||||||
|
|
||||||
|
@ -41,20 +42,19 @@
|
||||||
<!ENTITY % qaDTD SYSTEM "chrome://qa/locale/qa.dtd"> %qaDTD;
|
<!ENTITY % qaDTD SYSTEM "chrome://qa/locale/qa.dtd"> %qaDTD;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<overlay id="qa"
|
<overlay id="qa"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||||
|
|
||||||
<script type="application/x-javascript" src="chrome://qa/content/MochiKit/MochiKit.js" />
|
<script type="application/x-javascript" src="chrome://qa/content/MochiKit/MochiKit.js" />
|
||||||
<script type="application/x-javascript" src="chrome://qa/content/prefs.js" />
|
<script type="application/x-javascript" src="chrome://qa/content/prefs.js" />
|
||||||
<script type="application/x-javascript" src="chrome://qa/content/qa.js" />
|
<script type="application/x-javascript" src="chrome://qa/content/qa.js" />
|
||||||
<script type="application/x-javascript" src="chrome://qa/content/notifications.js" />
|
<script type="application/x-javascript" src="chrome://qa/content/notifications.js" />
|
||||||
|
|
||||||
<statusbar id="status-bar">
|
<statusbar id="status-bar">
|
||||||
<statusbarpanel class="statusbarpanel-iconic" id="qa-statusbar-overlay"
|
<statusbarpanel class="statusbarpanel-iconic" id="qa-statusbar-overlay"
|
||||||
src="chrome://qa/skin/qmo-16px.png"
|
onclick="qaMain.openQATool();" />
|
||||||
onclick="qaMain.openQATool();" />
|
|
||||||
</statusbar>
|
</statusbar>
|
||||||
|
|
||||||
<window id="main-window">
|
<window id="main-window">
|
||||||
<vbox id="qa-notify" class="qa-notify" hidden="true">
|
<vbox id="qa-notify" class="qa-notify" hidden="true">
|
||||||
<vbox flex="1" class="qa-notify">
|
<vbox flex="1" class="qa-notify">
|
||||||
|
@ -67,23 +67,21 @@
|
||||||
<label id="qa-notify-inprogress" value="&qa.notification.inprogress;" />
|
<label id="qa-notify-inprogress" value="&qa.notification.inprogress;" />
|
||||||
<hbox align="center" id="qa-notify-header-box" style="overflow: hidden">
|
<hbox align="center" id="qa-notify-header-box" style="overflow: hidden">
|
||||||
<label id="qa-notify-header" value="" />
|
<label id="qa-notify-header" value="" />
|
||||||
</hbox>
|
</hbox>
|
||||||
<vbox id="qa-notify-event" style="display: none;">
|
<vbox id="qa-notify-event" style="display: none;">
|
||||||
<label id="qa-notify-event-datetime" value="" />
|
<label id="qa-notify-event-datetime" value="" />
|
||||||
<label id="qa-notify-event-place" value="" />
|
<label id="qa-notify-event-place" value="" />
|
||||||
</vbox>
|
</vbox>
|
||||||
<vbox id="qa-notify-content">
|
<vbox id="qa-notify-content">
|
||||||
<description id="qa-notify-text" />
|
<description id="qa-notify-text" />
|
||||||
<label id="qa-notify-infolink" class="text-link" href=""
|
<label id="qa-notify-infolink" class="text-link" href=""
|
||||||
value="" />
|
value="" />
|
||||||
<label id="qa-notify-getstartedlink" class="text-link" href=""
|
<label id="qa-notify-getstartedlink" class="text-link" href=""
|
||||||
value="" style="display: none;" />
|
value="" style="display: none;" />
|
||||||
</vbox>
|
|
||||||
</vbox>
|
</vbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
|
</vbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
</window>
|
</window>
|
||||||
|
</overlay>
|
||||||
|
|
||||||
</overlay>
|
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
* Zach Lipton <zach@zachlipton.com>
|
* Zach Lipton <zach@zachlipton.com>
|
||||||
* Ben Hsieh <ben.hsieh@gmail.com>
|
* Ben Hsieh <ben.hsieh@gmail.com>
|
||||||
*
|
*
|
||||||
|
* Portions taken from David Hamp-Gonsalves' Buggybar (buggybar@gmail.com)
|
||||||
|
*
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
* 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
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
|
@ -41,102 +43,103 @@ const Cc = Components.classes;
|
||||||
const Cr = Components.results;
|
const Cr = Components.results;
|
||||||
|
|
||||||
var qaTools = {
|
var qaTools = {
|
||||||
// load a JSON doc into a menulist/menupopup
|
// load a JSON doc into a menulist/menupopup
|
||||||
// takes the url to load, the menulist to populate, the name of the method
|
// takes the url to load, the menulist to populate, the name of the method
|
||||||
// to use to get the name from the JSON doc, and the name of the method to
|
// to use to get the name from the JSON doc, and the name of the method to
|
||||||
// use to get the value from the JSON doc, plus an optional callback
|
// use to get the value from the JSON doc, plus an optional callback
|
||||||
loadJsonMenu : function(url, menulist, nameMethod, valueMethod, callback) {
|
loadJsonMenu : function(url, menulist, nameMethod, valueMethod, callback) {
|
||||||
var d = loadJSONDoc(url);
|
var d = loadJSONDoc(url);
|
||||||
d.addErrback(function (err) {
|
d.addErrback(function (err) {
|
||||||
if (err instanceof CancelledError) {
|
if (err instanceof CancelledError) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
alert(err);
|
dump(err);
|
||||||
});
|
});
|
||||||
d.addCallback(function(obj) {
|
d.addCallback(function(obj) {
|
||||||
if (obj instanceof Array) {
|
if (obj instanceof Array) {
|
||||||
for (var i=0; i<obj.length; i++) {
|
for (var i=0; i<obj.length; i++) {
|
||||||
var item = obj[i];
|
var item = obj[i];
|
||||||
if (! item) { continue; }
|
if (! item) { continue; }
|
||||||
var newitem = menulist.appendItem(item[nameMethod],
|
var newitem = menulist.appendItem(item[nameMethod],
|
||||||
item[valueMethod]);
|
item[valueMethod]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var newitem = menulist.appendItem(obj[nameMethod], obj[valueMethod]);
|
var newitem = menulist.appendItem(obj[nameMethod], obj[valueMethod]);
|
||||||
}
|
}
|
||||||
// stash the JSON object in the userData attribute for
|
// stash the JSON object in the userData attribute for
|
||||||
// later use (e.g. when filtering the list).
|
// later use (e.g. when filtering the list).
|
||||||
newitem.userData = item;
|
newitem.userData = item;
|
||||||
if (callback) {
|
if (callback) {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
fetchFeed : function(url, callback) {
|
fetchFeed : function(url, callback) {
|
||||||
var httpRequest = null;
|
var httpRequest = null;
|
||||||
function FeedResultListener() {}
|
function FeedResultListener() {}
|
||||||
FeedResultListener.prototype = {
|
FeedResultListener.prototype = {
|
||||||
handleResult : function(result) {
|
handleResult : function(result) {
|
||||||
var feed = result.doc;
|
var feed = result.doc;
|
||||||
feed.QueryInterface(Ci.nsIFeed);
|
feed.QueryInterface(Ci.nsIFeed);
|
||||||
callback(feed);
|
callback(feed);
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function infoReceived() {
|
function infoReceived() {
|
||||||
var data = httpRequest.responseText;
|
var data = httpRequest.responseText;
|
||||||
var ioService = Cc['@mozilla.org/network/io-service;1']
|
var ioService = Cc['@mozilla.org/network/io-service;1']
|
||||||
.getService(Ci.nsIIOService);
|
.getService(Ci.nsIIOService);
|
||||||
var uri = ioService.newURI(url, null, null);
|
var uri = ioService.newURI(url, null, null);
|
||||||
if (data.length) {
|
if (data.length) {
|
||||||
var processor = Cc["@mozilla.org/feed-processor;1"]
|
var processor = Cc["@mozilla.org/feed-processor;1"]
|
||||||
.createInstance(Ci.nsIFeedProcessor);
|
.createInstance(Ci.nsIFeedProcessor);
|
||||||
try {
|
try {
|
||||||
processor.listener = new FeedResultListener;
|
processor.listener = new FeedResultListener;
|
||||||
processor.parseFromString(data, uri);
|
processor.parseFromString(data, uri);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
alert("Error parsing feed: " + e);
|
alert("Error parsing feed: " + e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
httpRequest = new XMLHttpRequest();
|
httpRequest = new XMLHttpRequest();
|
||||||
httpRequest.open("GET", url, true);
|
httpRequest.open("GET", url, true);
|
||||||
try {
|
try {
|
||||||
httpRequest.onload = infoReceived;
|
httpRequest.onload = infoReceived;
|
||||||
httpRequest.send(null);
|
httpRequest.send(null);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
alert(e);
|
alert(e);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
httpPostRequest : function (url, data, callback, errback) {
|
httpPostRequest : function (url, data, callback, errback) {
|
||||||
// do a xmlhttprequest sending data with the post method
|
// do a xmlhttprequest sending data with the post method
|
||||||
var req = getXMLHttpRequest();
|
var req = getXMLHttpRequest();
|
||||||
req.open("POST", url, true);
|
req.open("POST", url, true);
|
||||||
req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
||||||
req.setRequestHeader("Content-length", data.length);
|
req.setRequestHeader("Content-length", data.length);
|
||||||
req.setRequestHeader("Connection", "close");
|
req.setRequestHeader("Connection", "close");
|
||||||
req = sendXMLHttpRequest(req, data);
|
req = sendXMLHttpRequest(req, data);
|
||||||
req.addErrback(errback);
|
req.addErrback(errback);
|
||||||
req.addCallback(callback);
|
req.addCallback(callback);
|
||||||
},
|
},
|
||||||
showHideLoadingMessage : function(box, bool) {
|
showHideLoadingMessage : function(box, bool) {
|
||||||
if (bool == true) { // show
|
if (bool == true) { // show
|
||||||
var loading = document.createElementNS("http://www.w3.org/1999/xhtml", "p");
|
var loading = document.createElementNS("http://www.w3.org/1999/xhtml", "p");
|
||||||
loading.textContent = qaMain.bundle.getString("qa.extension.loading");
|
loading.textContent = qaMain.bundle.getString("qa.extension.loading");
|
||||||
loading.setAttributeNS("http://www.w3.org/1999/xhtml", "class", "loading_message");
|
loading.setAttributeNS("http://www.w3.org/1999/xhtml",
|
||||||
box.appendChild(loading);
|
"class", "loading_message");
|
||||||
} else { // hide
|
box.appendChild(loading);
|
||||||
var elements = box.childNodes;
|
} else { // hide
|
||||||
for (var i=0; i<elements.length; i++) {
|
var elements = box.childNodes;
|
||||||
if (elements[i] && elements[i].getAttributeNS &&
|
for (var i=0; i<elements.length; i++) {
|
||||||
elements[i].getAttributeNS(
|
if (elements[i] && elements[i].getAttributeNS &&
|
||||||
"http://www.w3.org/1999/xhtml", "class") == "loading_message") {
|
elements[i].getAttributeNS(
|
||||||
box.removeChild(elements[i]);
|
"http://www.w3.org/1999/xhtml", "class") == "loading_message") {
|
||||||
break;
|
box.removeChild(elements[i]);
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
},
|
||||||
arrayify : function(obj) {
|
arrayify : function(obj) {
|
||||||
if (obj instanceof Array) {
|
if (obj instanceof Array) {
|
||||||
return obj;
|
return obj;
|
||||||
|
@ -151,9 +154,9 @@ var qaTools = {
|
||||||
var context = document.getElementById(elementID);
|
var context = document.getElementById(elementID);
|
||||||
var fragment = gUnescapeHTML.parseFragment(htmlstr, false, null, context);
|
var fragment = gUnescapeHTML.parseFragment(htmlstr, false, null, context);
|
||||||
context.appendChild(fragment);
|
context.appendChild(fragment);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
assignLinkHandlers : function(node) {
|
assignLinkHandlers : function(node) {
|
||||||
var children = node.getElementsByTagName('a');
|
var children = node.getElementsByTagName('a');
|
||||||
for (var i = 0; i < children.length; i++)
|
for (var i = 0; i < children.length; i++)
|
||||||
|
@ -167,8 +170,29 @@ var qaTools = {
|
||||||
var type = qaPref.getPref("browser.link.open_external", "int");
|
var type = qaPref.getPref("browser.link.open_external", "int");
|
||||||
var where = "tab";
|
var where = "tab";
|
||||||
if (type == 2) where = "window";
|
if (type == 2) where = "window";
|
||||||
|
|
||||||
openUILinkIn(url, where);
|
openUILinkIn(url, where);
|
||||||
event.preventDefault(); // prevent it from simply following the href
|
event.preventDefault(); // prevent it from simply following the href
|
||||||
},
|
},
|
||||||
|
makeUniqueArray : function(array) {
|
||||||
|
var RV = new Array();
|
||||||
|
for( var i = 0; i < array.length; i++ ) {
|
||||||
|
if( RV.indexOf(array[i]) < 0 ) { RV.push( array[i] ); }
|
||||||
|
}
|
||||||
|
return RV;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function getCleanText(inputText)
|
||||||
|
{
|
||||||
|
inputText = inputText.replace(/@/g,"@");
|
||||||
|
inputText = inputText.replace(/"/g,"\"");
|
||||||
|
inputText = inputText.replace(/</g, "<");
|
||||||
|
inputText = inputText.replace(/>/g, ">");
|
||||||
|
inputText = inputText.replace(/&/g, "&");
|
||||||
|
inputText = inputText.replace(/<[^>]*>/g, "");
|
||||||
|
inputText = inputText.replace(/\s+/g, " ");
|
||||||
|
inputText = inputText.replace(/\n*/g, "");
|
||||||
|
|
||||||
|
return inputText;
|
||||||
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*
|
*
|
||||||
* Contributor(s):
|
* Contributor(s):
|
||||||
* Zach Lipton <zach@zachlipton.com>
|
* Zach Lipton <zach@zachlipton.com>
|
||||||
* Ben Hsieh <bhsieh@mozilla.com>
|
* Ben Hsieh <bhsieh@mozilla.com>
|
||||||
*
|
*
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
* 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
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
|
@ -37,15 +37,15 @@
|
||||||
|
|
||||||
|
|
||||||
const FIREFOX_ID = "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}";
|
const FIREFOX_ID = "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}";
|
||||||
|
|
||||||
var litmus = {
|
var litmus = {
|
||||||
baseURL : qaPref.getPref(qaPref.prefBase+".litmus.url", "char"),
|
baseURL : qaPref.getPref(qaPref.prefBase+".litmus.url", "char"),
|
||||||
userStats : '',
|
userStats : '',
|
||||||
|
|
||||||
getTestcase : function(testcase_id, callback) {
|
getTestcase : function(testcase_id, callback) {
|
||||||
litmus.getLitmusJson(testcase_id, callback, "testcase_id=");
|
litmus.getLitmusJson(testcase_id, callback, "testcase_id=");
|
||||||
},
|
},
|
||||||
getSubgroup : function(subgroupID, callback) {
|
getSubgroup : function(subgroupID, callback) {
|
||||||
litmus.getLitmusJson(subgroupID, callback, "subgroup_id=");
|
litmus.getLitmusJson(subgroupID, callback, "subgroup_id=");
|
||||||
},
|
},
|
||||||
getTestgroup : function(testgroupID, callback) {
|
getTestgroup : function(testgroupID, callback) {
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
litmus.getLitmusJson(testrunID, callback, "test_run_id=");
|
litmus.getLitmusJson(testrunID, callback, "test_run_id=");
|
||||||
},
|
},
|
||||||
getTestruns : function(callback) {
|
getTestruns : function(callback) {
|
||||||
var s = new Sysconfig();
|
var s = new Sysconfig();
|
||||||
var branch = encodeURIComponent(s.branch);
|
var branch = encodeURIComponent(s.branch);
|
||||||
litmus.getLitmusJson("&product_name=Firefox&branch_name=" + branch,
|
litmus.getLitmusJson("&product_name=Firefox&branch_name=" + branch,
|
||||||
callback, "test_runs_by_branch_product_name=1");
|
callback, "test_runs_by_branch_product_name=1");
|
||||||
|
@ -63,38 +63,38 @@
|
||||||
getLitmusJson : function(ID, callback, prefix) {
|
getLitmusJson : function(ID, callback, prefix) {
|
||||||
var url = litmus.baseURL+'json.cgi?' + prefix + ID;
|
var url = litmus.baseURL+'json.cgi?' + prefix + ID;
|
||||||
var d = loadJSONDoc(url);
|
var d = loadJSONDoc(url);
|
||||||
d.addBoth(function (res) {
|
d.addBoth(function (res) {
|
||||||
d.deferred = null;
|
d.deferred = null;
|
||||||
return res;
|
return res;
|
||||||
});
|
});
|
||||||
d.addCallback(callback);
|
d.addCallback(callback);
|
||||||
d.addErrback(function (err) {
|
d.addErrback(function (err) {
|
||||||
if (err instanceof CancelledError) {
|
if (err instanceof CancelledError) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
alert(err);
|
dump(err);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
lastTestRunSummary : "",
|
lastTestRunSummary : "",
|
||||||
lastTestGroupSummary : "",
|
lastTestGroupSummary : "",
|
||||||
lastSubgroupObject: null, // these have to be objects to avoid the async call later.
|
lastSubgroupObject: null, // these have to be objects to avoid the async call later.
|
||||||
lastTestcaseObject: null, // they are saved every time a subgroup or testcase is written to screen
|
lastTestcaseObject: null, // they are saved every time a subgroup or testcase is written to screen
|
||||||
lastTestcaseIndex: null,
|
lastTestcaseIndex: null,
|
||||||
|
|
||||||
preDialogSubgroupObject: null, // saved to be restored in case of Cancel()
|
preDialogSubgroupObject: null, // saved to be restored in case of Cancel()
|
||||||
preDialogTestcaseObject: null,
|
preDialogTestcaseObject: null,
|
||||||
|
|
||||||
dialogActive: false, // we want to keep controls disabled, even if the selection changes.
|
dialogActive: false, // we want to keep controls disabled, even if the selection changes.
|
||||||
|
|
||||||
storeSubgroup : function(subgroup) {
|
storeSubgroup : function(subgroup) {
|
||||||
litmus.lastSubgroupObject = subgroup;
|
litmus.lastSubgroupObject = subgroup;
|
||||||
},
|
},
|
||||||
storeTestcase : function(testcase) {
|
storeTestcase : function(testcase) {
|
||||||
litmus.lastTestcaseObject = testcase;
|
litmus.lastTestcaseObject = testcase;
|
||||||
},
|
},
|
||||||
|
|
||||||
handleDialog : function() {
|
handleDialog : function() {
|
||||||
if ($("qa-testrun-label").value != "") {
|
if ($("qa-testrun-label").value != "") {
|
||||||
litmus.lastTestRunSummary = $("qa-testrun-label").value;
|
litmus.lastTestRunSummary = $("qa-testrun-label").value;
|
||||||
|
@ -108,16 +108,16 @@
|
||||||
var newWindow = window.openDialog('chrome://qa/content/tabs/selecttests.xul', '_blank', 'chrome,all,dialog=yes',
|
var newWindow = window.openDialog('chrome://qa/content/tabs/selecttests.xul', '_blank', 'chrome,all,dialog=yes',
|
||||||
litmus.readStateFromPref, litmus.handleDialogCancel, litmus.handleDialogOK);
|
litmus.readStateFromPref, litmus.handleDialogCancel, litmus.handleDialogOK);
|
||||||
},
|
},
|
||||||
|
|
||||||
handleDialogCancel : function() {
|
handleDialogCancel : function() {
|
||||||
if (litmus.lastTestRunSummary == "") return;
|
if (litmus.lastTestRunSummary == "") return;
|
||||||
|
|
||||||
// this code is v. similar to readStateFromPref, but without an async call.
|
// this code is v. similar to readStateFromPref, but without an async call.
|
||||||
$("qa-testrun-label").value = litmus.lastTestRunSummary;
|
$("qa-testrun-label").value = litmus.lastTestRunSummary;
|
||||||
$("qa-testgroup-label").value = litmus.lastTestGroupSummary;
|
$("qa-testgroup-label").value = litmus.lastTestGroupSummary;
|
||||||
litmus.lastSubgroupObject = litmus.preDialogueSubgroupObject;
|
litmus.lastSubgroupObject = litmus.preDialogueSubgroupObject;
|
||||||
litmus.lastTestcaseObject = litmus.preDialogTestcaseObject;
|
litmus.lastTestcaseObject = litmus.preDialogTestcaseObject;
|
||||||
|
|
||||||
if (litmus.lastSubgroupObject != null)
|
if (litmus.lastSubgroupObject != null)
|
||||||
litmus.populatePreviewBox(litmus.lastSubgroupObject.testcases);
|
litmus.populatePreviewBox(litmus.lastSubgroupObject.testcases);
|
||||||
if (litmus.lastTestcaseObject != null) {
|
if (litmus.lastTestcaseObject != null) {
|
||||||
|
@ -127,45 +127,45 @@
|
||||||
$("testlist").setAttribute("suppressonselect", "true");
|
$("testlist").setAttribute("suppressonselect", "true");
|
||||||
$("testlist").selectedIndex = lastTestcaseIndex;
|
$("testlist").selectedIndex = lastTestcaseIndex;
|
||||||
$("testlist").setAttribute("suppressonselect", "false");
|
$("testlist").setAttribute("suppressonselect", "false");
|
||||||
|
|
||||||
// rewrite the prefs
|
// rewrite the prefs
|
||||||
litmus.writeStateToPref(litmus.lastTestRunSummary, litmus.lastTestGroupSummary,
|
litmus.writeStateToPref(litmus.lastTestRunSummary, litmus.lastTestGroupSummary,
|
||||||
litmus.lastSubgroupObject.subgroup_id, lastTestcaseIndex);
|
litmus.lastSubgroupObject.subgroup_id, lastTestcaseIndex);
|
||||||
|
|
||||||
litmus.dialogActive = false;
|
litmus.dialogActive = false;
|
||||||
litmus.undisableAll();
|
litmus.undisableAll();
|
||||||
},
|
},
|
||||||
|
|
||||||
handleDialogOK : function() {
|
handleDialogOK : function() {
|
||||||
litmus.dialogActive = false;
|
litmus.dialogActive = false;
|
||||||
litmus.undisableAll();
|
litmus.undisableAll();
|
||||||
},
|
},
|
||||||
|
|
||||||
validateLogin : function(uname, passwd, callback) {
|
validateLogin : function(uname, passwd, callback) {
|
||||||
var qs = queryString({
|
var qs = queryString({
|
||||||
validate_login: 1,
|
validate_login: 1,
|
||||||
username: uname,
|
username: uname,
|
||||||
password: passwd
|
password: passwd
|
||||||
});
|
});
|
||||||
qaTools.httpPostRequest(litmus.baseURL+'json.cgi', qs, callback);
|
qaTools.httpPostRequest(litmus.baseURL+'json.cgi', qs, callback);
|
||||||
},
|
},
|
||||||
postResultXML : function(xml, callback, errback) {
|
postResultXML : function(xml, callback, errback) {
|
||||||
var qs = queryString({ data: xml});
|
var qs = queryString({ data: xml});
|
||||||
var fake_callback = function(resp) {
|
var fake_callback = function(resp) {
|
||||||
// only call callback() if we really had a sucuess. XML
|
// only call callback() if we really had a sucuess. XML
|
||||||
// processing errors should result in a call to errback()
|
// processing errors should result in a call to errback()
|
||||||
if ((/^ok/i).exec(resp.responseText)) {
|
if ((/^ok/i).exec(resp.responseText)) {
|
||||||
callback(resp);
|
callback(resp);
|
||||||
} else {
|
} else {
|
||||||
errback(resp);
|
errback(resp);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
qaTools.httpPostRequest(litmus.baseURL+'process_test.cgi',
|
qaTools.httpPostRequest(litmus.baseURL+'process_test.cgi',
|
||||||
qs, fake_callback, errback);
|
qs, fake_callback, errback);
|
||||||
},
|
},
|
||||||
|
|
||||||
currentSubgroupID: null,
|
currentSubgroupID: null,
|
||||||
|
|
||||||
writeStateToPref : function(testrunSummary, testgroupSummary, subgroupID, index) {
|
writeStateToPref : function(testrunSummary, testgroupSummary, subgroupID, index) {
|
||||||
qaPref.setPref(qaPref.prefBase + ".currentTestcase.testrunSummary", testrunSummary, "char");
|
qaPref.setPref(qaPref.prefBase + ".currentTestcase.testrunSummary", testrunSummary, "char");
|
||||||
qaPref.setPref(qaPref.prefBase + ".currentTestcase.testgroupSummary", testgroupSummary, "char");
|
qaPref.setPref(qaPref.prefBase + ".currentTestcase.testgroupSummary", testgroupSummary, "char");
|
||||||
|
@ -177,26 +177,26 @@
|
||||||
$("qa-testgroup-label").value = qaPref.getPref(qaPref.prefBase + ".currentTestcase.testgroupSummary", "char");
|
$("qa-testgroup-label").value = qaPref.getPref(qaPref.prefBase + ".currentTestcase.testgroupSummary", "char");
|
||||||
litmus.currentSubgroupID = qaPref.getPref(qaPref.prefBase + ".currentTestcase.subgroupId", "int");
|
litmus.currentSubgroupID = qaPref.getPref(qaPref.prefBase + ".currentTestcase.subgroupId", "int");
|
||||||
litmus.disableAll();
|
litmus.disableAll();
|
||||||
|
|
||||||
if (litmus.currentSubgroupID != 0)
|
if (litmus.currentSubgroupID != 0)
|
||||||
litmus.getSubgroup(litmus.currentSubgroupID, function(subgroup) {litmus.statePopulateFields(subgroup); litmus.undisableAll();});
|
litmus.getSubgroup(litmus.currentSubgroupID, function(subgroup) {litmus.statePopulateFields(subgroup); litmus.undisableAll();});
|
||||||
},
|
},
|
||||||
loadStats : function() {
|
loadStats : function() {
|
||||||
// pull new user statistics from litmus
|
// pull new user statistics from litmus
|
||||||
var url = litmus.baseURL+'json.cgi?' + 'user_stats=' + qaPref.litmus.getUsername();
|
var url = litmus.baseURL+'json.cgi?' + 'user_stats=' + qaPref.litmus.getUsername();
|
||||||
var req = loadJSONDoc(url);
|
var req = loadJSONDoc(url);
|
||||||
req.addCallback(function(data) {
|
req.addCallback(function(data) {
|
||||||
litmus.userStats = data;
|
litmus.userStats = data;
|
||||||
litmus.displayStats();
|
litmus.displayStats();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
displayStats : function() {
|
displayStats : function() {
|
||||||
var statbox = $('qa-litmus-stats');
|
var statbox = $('qa-litmus-stats');
|
||||||
if (litmus.userStats != '') {
|
if (litmus.userStats != '') {
|
||||||
var statline = qaMain.bundle.getFormattedString('qa.extension.litmus.stats',
|
var statline = qaMain.bundle.getFormattedString('qa.extension.litmus.stats',
|
||||||
[litmus.userStats.week, litmus.userStats.month, litmus.userStats.alltime]);
|
[litmus.userStats.week, litmus.userStats.month, litmus.userStats.alltime]);
|
||||||
statbox.value = statline;
|
statbox.value = statline;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
checkRadioButtons : function() {
|
checkRadioButtons : function() {
|
||||||
var menu = document.getElementById('testlist');
|
var menu = document.getElementById('testlist');
|
||||||
|
@ -204,39 +204,39 @@
|
||||||
var disable = menu.selectedItem.firstChild.getAttribute("checked");
|
var disable = menu.selectedItem.firstChild.getAttribute("checked");
|
||||||
document.getElementById("qa-testcase-result").disabled = disable;
|
document.getElementById("qa-testcase-result").disabled = disable;
|
||||||
},
|
},
|
||||||
|
|
||||||
prevButton : function() {
|
prevButton : function() {
|
||||||
$("testlist").selectedIndex--;
|
$("testlist").selectedIndex--;
|
||||||
},
|
},
|
||||||
nextButton: function() {
|
nextButton: function() {
|
||||||
// if they selected a result, then submit the result
|
// if they selected a result, then submit the result
|
||||||
if ($('qa-testcase-result').selectedItem) {
|
if ($('qa-testcase-result').selectedItem) {
|
||||||
litmus.submitResult();
|
litmus.submitResult();
|
||||||
}
|
}
|
||||||
$("testlist").selectedIndex++;
|
$("testlist").selectedIndex++;
|
||||||
},
|
},
|
||||||
handleSelect : function() {
|
handleSelect : function() {
|
||||||
if ($("testlist").selectedIndex == -1)
|
if ($("testlist").selectedIndex == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
litmus.disableAll();
|
litmus.disableAll();
|
||||||
litmus.getTestcase($("testlist").selectedItem.value, function(testcase) {
|
litmus.getTestcase($("testlist").selectedItem.value, function(testcase) {
|
||||||
litmus.populateTestcase(testcase);
|
litmus.populateTestcase(testcase);
|
||||||
$('qa-testcase-progress').value =
|
$('qa-testcase-progress').value =
|
||||||
qaMain.bundle.getFormattedString('qa.extension.litmus.progress',
|
qaMain.bundle.getFormattedString('qa.extension.litmus.progress',
|
||||||
[$("testlist").selectedIndex+1, $("testlist").getRowCount()]);
|
[$("testlist").selectedIndex+1, $("testlist").getRowCount()]);
|
||||||
litmus.undisableAll();
|
litmus.undisableAll();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
populatePreviewBox : function(testcases) {
|
populatePreviewBox : function(testcases) {
|
||||||
|
|
||||||
var menu = document.getElementById('testlist');
|
var menu = document.getElementById('testlist');
|
||||||
if (!menu) return;
|
if (!menu) return;
|
||||||
|
|
||||||
while (menu.firstChild) { // clear menu
|
while (menu.firstChild) { // clear menu
|
||||||
menu.removeChild(menu.firstChild);
|
menu.removeChild(menu.firstChild);
|
||||||
};
|
};
|
||||||
|
|
||||||
for (var i = 0; i < testcases.length; i++) {
|
for (var i = 0; i < testcases.length; i++) {
|
||||||
var row = document.createElement("listitem");
|
var row = document.createElement("listitem");
|
||||||
row.value = testcases[i].testcase_id;
|
row.value = testcases[i].testcase_id;
|
||||||
|
@ -258,29 +258,40 @@
|
||||||
if (testcase == undefined) {
|
if (testcase == undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
document.getElementById('qa-testcase-id').value =
|
document.getElementById('qa-testcase-id').value =
|
||||||
qaMain.bundle.getString("qa.extension.testcase.head")+testcase.testcase_id;
|
qaMain.bundle.getString("qa.extension.testcase.head")+testcase.testcase_id;
|
||||||
document.getElementById('qa-testcase-summary').value = testcase.summary;
|
document.getElementById('qa-testcase-summary').value = testcase.summary;
|
||||||
|
|
||||||
qaTools.writeSafeHTML('qa-testcase-steps', testcase.steps_formatted);
|
qaTools.writeSafeHTML('qa-testcase-steps', testcase.steps_formatted);
|
||||||
qaTools.writeSafeHTML('qa-testcase-expected', testcase.expected_results_formatted);
|
qaTools.writeSafeHTML('qa-testcase-expected', testcase.expected_results_formatted);
|
||||||
|
|
||||||
qaTools.assignLinkHandlers($('qa-testcase-steps'));
|
qaTools.assignLinkHandlers($('qa-testcase-steps'));
|
||||||
qaTools.assignLinkHandlers($('qa-testcase-expected'));
|
qaTools.assignLinkHandlers($('qa-testcase-expected'));
|
||||||
|
|
||||||
|
if (testcase.regression_bug_id) {
|
||||||
|
bugzilla.loadBug(testcase.regression_bug_id);
|
||||||
|
} else {
|
||||||
|
var bugarray = bugzilla.findBugzillaLinks($("qa-testcase-expected"));
|
||||||
|
if (bugarray.length) {
|
||||||
|
bugzilla.loadBug(bugarray[0]);
|
||||||
|
for (var i = 1; i < bugarray.length; i++) {
|
||||||
|
bugzilla.loadBug(bugarray[i], true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
litmus.checkRadioButtons();
|
litmus.checkRadioButtons();
|
||||||
},
|
},
|
||||||
populateFields : function(subgroup) {
|
populateFields : function(subgroup) {
|
||||||
litmus.lastSubgroupObject = subgroup;
|
litmus.lastSubgroupObject = subgroup;
|
||||||
litmus.populatePreviewBox(subgroup.testcases);
|
litmus.populatePreviewBox(subgroup.testcases);
|
||||||
$('qa-subgroup-label').value = subgroup.name;
|
$('qa-subgroup-label').value = subgroup.name;
|
||||||
$("testlist").selectedIndex = 0;
|
$("testlist").selectedIndex = 0;
|
||||||
},
|
},
|
||||||
statePopulateFields : function(subgroup) { //TODO: there's gotta be a better way to do this...
|
statePopulateFields : function(subgroup) { //TODO: there's gotta be a better way to do this...
|
||||||
litmus.lastSubgroupObject = subgroup;
|
litmus.lastSubgroupObject = subgroup;
|
||||||
litmus.populatePreviewBox(subgroup.testcases);
|
litmus.populatePreviewBox(subgroup.testcases);
|
||||||
$('qa-subgroup-label').value = subgroup.name;
|
$('qa-subgroup-label').value = subgroup.name;
|
||||||
|
|
||||||
$("testlist").selectedIndex = qaPref.getPref(qaPref.prefBase + ".currentTestcase.testcaseIndex", "int");
|
$("testlist").selectedIndex = qaPref.getPref(qaPref.prefBase + ".currentTestcase.testcaseIndex", "int");
|
||||||
},
|
},
|
||||||
disableAll : function() { //
|
disableAll : function() { //
|
||||||
|
@ -288,180 +299,180 @@
|
||||||
$("qa-testcase-result").disabled = true;
|
$("qa-testcase-result").disabled = true;
|
||||||
$("qa-mainwindow-previousButton").disabled = true;
|
$("qa-mainwindow-previousButton").disabled = true;
|
||||||
$("qa-mainwindow-nextButton").disabled = true;
|
$("qa-mainwindow-nextButton").disabled = true;
|
||||||
|
|
||||||
},
|
},
|
||||||
undisableAll : function() {
|
undisableAll : function() {
|
||||||
if(litmus.dialogActive) return; // ignore all requests while there is a dialog open
|
if(litmus.dialogActive) return; // ignore all requests while there is a dialog open
|
||||||
|
|
||||||
$("testlist").disabled = false;
|
$("testlist").disabled = false;
|
||||||
$("qa-testcase-result").disabled = false;
|
$("qa-testcase-result").disabled = false;
|
||||||
$("qa-mainwindow-previousButton").disabled = false;
|
$("qa-mainwindow-previousButton").disabled = false;
|
||||||
$("qa-mainwindow-nextButton").disabled = false;
|
$("qa-mainwindow-nextButton").disabled = false;
|
||||||
|
|
||||||
},
|
},
|
||||||
submitResult : function() {
|
submitResult : function() {
|
||||||
var rs;
|
var rs;
|
||||||
var item = $('qa-testcase-result').selectedItem;
|
var item = $('qa-testcase-result').selectedItem;
|
||||||
if (item.id == "qa-testcase-pass") {
|
if (item.id == "qa-testcase-pass") {
|
||||||
rs = 'Pass';
|
rs = 'Pass';
|
||||||
} else if (item.id == "qa-testcase-fail") {
|
} else if (item.id == "qa-testcase-fail") {
|
||||||
rs = 'Fail';
|
rs = 'Fail';
|
||||||
} else if (item.id == "qa-testcase-unclearBroken") {
|
} else if (item.id == "qa-testcase-unclearBroken") {
|
||||||
rs = 'Test unclear/broken';
|
rs = 'Test unclear/broken';
|
||||||
} else {
|
} else {
|
||||||
// no result selected, so don't submit anything for thes test:
|
// no result selected, so don't submit anything for thes test:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var menu = document.getElementById('testlist');
|
var menu = document.getElementById('testlist');
|
||||||
|
|
||||||
var l = new LitmusResults({username: qaPref.litmus.getUsername(),
|
var l = new LitmusResults({username: qaPref.litmus.getUsername(),
|
||||||
password: qaPref.litmus.getPassword(),
|
password: qaPref.litmus.getPassword(),
|
||||||
server: litmus.baseURL});
|
server: litmus.baseURL});
|
||||||
l.sysconfig(new Sysconfig());
|
l.sysconfig(new Sysconfig());
|
||||||
|
|
||||||
l.addResult(new Result({
|
l.addResult(new Result({
|
||||||
testid: menu.selectedItem.value,
|
testid: menu.selectedItem.value,
|
||||||
resultstatus: rs,
|
resultstatus: rs,
|
||||||
exitstatus: 'Exited Normally',
|
exitstatus: 'Exited Normally',
|
||||||
duration: 0,
|
duration: 0,
|
||||||
comment: $('qa-testcase-comment').value,
|
comment: $('qa-testcase-comment').value,
|
||||||
isAutomatedResult: 0
|
isAutomatedResult: 0
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var callback = function(resp) {
|
var callback = function(resp) {
|
||||||
// increment the stat counters:
|
// increment the stat counters:
|
||||||
for (var i in litmus.userStats) {
|
for (var i in litmus.userStats) {
|
||||||
litmus.userStats[i]++;
|
litmus.userStats[i]++;
|
||||||
}
|
}
|
||||||
litmus.displayStats();
|
litmus.displayStats();
|
||||||
};
|
};
|
||||||
|
|
||||||
var errback = function(resp) {
|
var errback = function(resp) {
|
||||||
alert(resp.responseText);
|
dump(resp.responseText);
|
||||||
};
|
};
|
||||||
|
|
||||||
litmus.postResultXML(l.toXML(), callback, errback);
|
litmus.postResultXML(l.toXML(), callback, errback);
|
||||||
var item = menu.selectedItem;
|
var item = menu.selectedItem;
|
||||||
item.firstChild.setAttribute("checked", "true");
|
item.firstChild.setAttribute("checked", "true");
|
||||||
return false; // ?? Got rid of strict warning...
|
return false; // ?? Got rid of strict warning...
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// any missing fields will be autodetected
|
// any missing fields will be autodetected
|
||||||
function Sysconfig(aProduct, aPlatform, aOpsys, aBranch, aBuildid, aLocale) {
|
function Sysconfig(aProduct, aPlatform, aOpsys, aBranch, aBuildid, aLocale) {
|
||||||
this._load('product', aProduct);
|
this._load('product', aProduct);
|
||||||
this._load('platform', aPlatform);
|
this._load('platform', aPlatform);
|
||||||
this._load('opsys', aOpsys);
|
this._load('opsys', aOpsys);
|
||||||
this._load('branch', aBranch);
|
this._load('branch', aBranch);
|
||||||
this._load('buildid', aBuildid);
|
this._load('buildid', aBuildid);
|
||||||
this._load('locale', aLocale);
|
this._load('locale', aLocale);
|
||||||
this.populate();
|
this.populate();
|
||||||
}
|
}
|
||||||
|
|
||||||
Sysconfig.prototype = {
|
Sysconfig.prototype = {
|
||||||
product: null,
|
product: null,
|
||||||
platform: null,
|
platform: null,
|
||||||
opsys: null,
|
opsys: null,
|
||||||
branch: null,
|
branch: null,
|
||||||
buildid: null,
|
buildid: null,
|
||||||
locale: null,
|
locale: null,
|
||||||
|
|
||||||
// set a field according to the following priorities:
|
// set a field according to the following priorities:
|
||||||
// 1. 'setting'
|
// 1. 'setting'
|
||||||
// 2. qa.extension.sysconfig.fieldname
|
// 2. qa.extension.sysconfig.fieldname
|
||||||
// 3. null
|
// 3. null
|
||||||
_load: function(fieldname, setting) {
|
_load: function(fieldname, setting) {
|
||||||
if (this[fieldname]) { return }
|
if (this[fieldname]) { return }
|
||||||
if (setting) {
|
if (setting) {
|
||||||
this[fieldname] = setting;
|
this[fieldname] = setting;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var pref = qaPref.getPref(qaPref.prefBase+'.sysconfig.'+fieldname, 'char');
|
var pref = qaPref.getPref(qaPref.prefBase+'.sysconfig.'+fieldname, 'char');
|
||||||
if (pref) {
|
if (pref) {
|
||||||
this[fieldname] = pref;
|
this[fieldname] = pref;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// if something cannot be autodetected, an exception is thrown
|
// if something cannot be autodetected, an exception is thrown
|
||||||
// with the name of the missing field
|
// with the name of the missing field
|
||||||
populate: function() {
|
populate: function() {
|
||||||
var appinfo = Components.classes["@mozilla.org/xre/app-info;1"]
|
var appinfo = Components.classes["@mozilla.org/xre/app-info;1"]
|
||||||
.getService(Components.interfaces.nsIXULAppInfo);
|
.getService(Components.interfaces.nsIXULAppInfo);
|
||||||
|
|
||||||
// build id:
|
// build id:
|
||||||
this.buildid = appinfo.appBuildID;
|
this.buildid = appinfo.appBuildID;
|
||||||
if (! this.buildid) { throw "buildid" }
|
if (! this.buildid) { throw "buildid" }
|
||||||
|
|
||||||
// product:
|
// product:
|
||||||
if (! this.product) {
|
if (! this.product) {
|
||||||
if (appinfo.ID == FIREFOX_ID) {
|
if (appinfo.ID == FIREFOX_ID) {
|
||||||
this.product = 'Firefox';
|
this.product = 'Firefox';
|
||||||
}
|
}
|
||||||
if (! this.product) { throw "product" }
|
if (! this.product) { throw "product" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// branch:
|
// branch:
|
||||||
// people switch branches, so we detect this even though it might
|
// people switch branches, so we detect this even though it might
|
||||||
// already be set in a pref
|
// already be set in a pref
|
||||||
if ((/^3\.0/).exec(appinfo.version)) {
|
if ((/^3\.0/).exec(appinfo.version)) {
|
||||||
this.branch = '3.0 Branch';
|
this.branch = '3.0 Branch';
|
||||||
} else if ((/^2\.0/).exec(appinfo.version)) {
|
} else if ((/^2\.0/).exec(appinfo.version)) {
|
||||||
this.branch = '2.0 Branch';
|
this.branch = '2.0 Branch';
|
||||||
} else if ((/^1\.5\./).exec(appinfo.version)) {
|
} else if ((/^1\.5\./).exec(appinfo.version)) {
|
||||||
this.branch = '1.5 Branch';
|
this.branch = '1.5 Branch';
|
||||||
}
|
}
|
||||||
if (! this.branch) { throw "branch" }
|
if (! this.branch) { throw "branch" }
|
||||||
|
|
||||||
// platform:
|
// platform:
|
||||||
if (! this.platform) {
|
if (! this.platform) {
|
||||||
if ((/^MacPPC/).exec(navigator.platform)) {
|
if ((/^MacPPC/).exec(navigator.platform)) {
|
||||||
this.platform = 'Mac (PPC)';
|
this.platform = 'Mac (PPC)';
|
||||||
} else if ((/^MacIntel/).exec(navigator.platform)) {
|
} else if ((/^MacIntel/).exec(navigator.platform)) {
|
||||||
this.platform = 'Mac (Intel)';
|
this.platform = 'Mac (Intel)';
|
||||||
} else if ((/^Win/).exec(navigator.platform)) {
|
} else if ((/^Win/).exec(navigator.platform)) {
|
||||||
this.platform = 'Windows';
|
this.platform = 'Windows';
|
||||||
} else if ((/^Linux/).exec(navigator.platform)) {
|
} else if ((/^Linux/).exec(navigator.platform)) {
|
||||||
this.platform = 'Linux';
|
this.platform = 'Linux';
|
||||||
} else if ((/^Solaris/).exec(navigator.platform)) {
|
} else if ((/^Solaris/).exec(navigator.platform)) {
|
||||||
this.platform = 'Solaris';
|
this.platform = 'Solaris';
|
||||||
}
|
}
|
||||||
if (! this.platform) { throw "platform" }
|
if (! this.platform) { throw "platform" }
|
||||||
}
|
}
|
||||||
// opsys
|
// opsys
|
||||||
if (this.platform == 'Windows') {
|
if (this.platform == 'Windows') {
|
||||||
switch (navigator.oscpu) {
|
switch (navigator.oscpu) {
|
||||||
case 'Windows NT 5.1':
|
case 'Windows NT 5.1':
|
||||||
this.opsys = 'Windows XP';
|
this.opsys = 'Windows XP';
|
||||||
break;
|
break;
|
||||||
case 'Windows NT 5.2':
|
case 'Windows NT 5.2':
|
||||||
this.opsys = 'Windows XP';
|
this.opsys = 'Windows XP';
|
||||||
break;
|
break;
|
||||||
case 'Windows NT 6.0':
|
case 'Windows NT 6.0':
|
||||||
this.opsys = 'Windows Vista';
|
this.opsys = 'Windows Vista';
|
||||||
break;
|
break;
|
||||||
case 'Windows NT 5.0':
|
case 'Windows NT 5.0':
|
||||||
this.opsys = 'Windows 2000';
|
this.opsys = 'Windows 2000';
|
||||||
break;
|
break;
|
||||||
case 'Win 9x 4.90':
|
case 'Win 9x 4.90':
|
||||||
this.opsys = 'Windows ME';
|
this.opsys = 'Windows ME';
|
||||||
break;
|
break;
|
||||||
case 'Win98':
|
case 'Win98':
|
||||||
this.opsys = 'Windows 98';
|
this.opsys = 'Windows 98';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (this.platform == 'Linux') {
|
} else if (this.platform == 'Linux') {
|
||||||
this.opsys = 'Linux';
|
this.opsys = 'Linux';
|
||||||
} else if (this.platform == 'Mac (PPC)' || this.platform == 'Mac (Intel)') {
|
} else if (this.platform == 'Mac (PPC)' || this.platform == 'Mac (Intel)') {
|
||||||
// no way to detect the OS on mac, so just assume
|
// no way to detect the OS on mac, so just assume
|
||||||
// it's 10.4. The user can provide the real OS in setup
|
// it's 10.4. The user can provide the real OS in setup
|
||||||
this.opsys = 'Mac OS 10.4';
|
this.opsys = 'Mac OS 10.4';
|
||||||
}
|
}
|
||||||
if (! this.opsys) {throw "opsys" }
|
if (! this.opsys) {throw "opsys" }
|
||||||
|
|
||||||
// locale
|
// locale
|
||||||
this.locale = navigator.language;
|
this.locale = navigator.language;
|
||||||
if (!this.locale) { throw "locale" }
|
if (!this.locale) { throw "locale" }
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,146 +1,144 @@
|
||||||
// ***** BEGIN LICENSE BLOCK *****
|
/* ***** BEGIN LICENSE BLOCK *****
|
||||||
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
//
|
*
|
||||||
// The contents of this file are subject to the Mozilla Public License Version
|
* The contents of this file are subject to the Mozilla Public License Version
|
||||||
// 1.1 (the "License"); you may not use this file except in compliance with
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||||
// the License. You may obtain a copy of the License at
|
* the License. You may obtain a copy of the License at
|
||||||
// http://www.mozilla.org/MPL/
|
* http://www.mozilla.org/MPL/
|
||||||
//
|
*
|
||||||
// Software distributed under the License is distributed on an "AS IS" basis,
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
// for the specific language governing rights and limitations under the
|
* for the specific language governing rights and limitations under the
|
||||||
// License.
|
* License.
|
||||||
//
|
*
|
||||||
// The Original Code is Litmus.
|
* The Original Code is the Mozilla Community QA Extension
|
||||||
//
|
*
|
||||||
// The Initial Developer of the Original Code is
|
* The Initial Developer of the Original Code is the Mozilla Corporation.
|
||||||
// The Mozilla Corporation.
|
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||||
// Portions created by the Initial Developer are Copyright (C) 2006
|
* the Initial Developer. All Rights Reserved.
|
||||||
// the Initial Developer. All Rights Reserved.
|
*
|
||||||
//
|
* Contributor(s):
|
||||||
// Contributor(s):
|
* Zach Lipton <zach@zachlipton.com>
|
||||||
// Zach Lipton <zach@zachlipton.com> (Original author)
|
*
|
||||||
//
|
* Alternatively, the contents of this file may be used under the terms of
|
||||||
// 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
|
||||||
// either the GNU General Public License Version 2 or later (the "GPL"), or
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
// in which case the provisions of the GPL or the LGPL are applicable instead
|
* of those above. If you wish to allow use of your version of this file only
|
||||||
// of those above. If you wish to allow use of your version of this file only
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
// under the terms of either the GPL or the LGPL, and not to allow others to
|
* use your version of this file under the terms of the MPL, indicate your
|
||||||
// use your version of this file under the terms of the MPL, indicate your
|
* decision by deleting the provisions above and replace them with the notice
|
||||||
// decision by deleting the provisions above and replace them with the notice
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
// and other provisions required by the GPL or the LGPL. If you do not delete
|
* the provisions above, a recipient may use your version of this file under
|
||||||
// the provisions above, a recipient may use your version of this file under
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
// the terms of any one of the MPL, the GPL or the LGPL.
|
*
|
||||||
//
|
* ***** END LICENSE BLOCK ***** */
|
||||||
// ***** END LICENSE BLOCK *****
|
|
||||||
|
|
||||||
// Generate XML result data and submit it to Litmus
|
// Generate XML result data and submit it to Litmus
|
||||||
|
|
||||||
// Note that this is essentially a direct port of the Test::Litmus perl
|
// Note that this is essentially a direct port of the Test::Litmus perl
|
||||||
// module. Please see http://search.cpan.org/~zlipton/Test-Litmus-0.03/lib/Test/Litmus.pm
|
// module. Please see http://search.cpan.org/~zlipton/Test-Litmus-0.03/lib/Test/Litmus.pm
|
||||||
// for further information
|
// for further information
|
||||||
|
|
||||||
// See also the Litmus Web Services Specification at
|
// See also the Litmus Web Services Specification at
|
||||||
// http://wiki.mozilla.org/Litmus:Web_Services
|
// http://wiki.mozilla.org/Litmus:Web_Services
|
||||||
|
|
||||||
const VERSION = '0.0.2';
|
const VERSION = '0.0.2';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Result constructor.
|
* Result constructor.
|
||||||
*
|
*
|
||||||
* @param machinename
|
* @param machinename
|
||||||
* (optional)
|
* (optional)
|
||||||
* The name of the machine running the tests
|
* The name of the machine running the tests
|
||||||
* @param username
|
* @param username
|
||||||
* Username of the account submitting results
|
* Username of the account submitting results
|
||||||
* @param password
|
* @param password
|
||||||
* Authentication token to be sent to the Litmus server
|
* Authentication token to be sent to the Litmus server
|
||||||
* @param server
|
* @param server
|
||||||
* (optional)
|
* (optional)
|
||||||
* The server to send results to
|
* The server to send results to
|
||||||
*/
|
*/
|
||||||
function LitmusResults(a) {
|
function LitmusResults(a) {
|
||||||
this.machinename = a.machinename || '';
|
this.machinename = a.machinename || '';
|
||||||
this.requireField('username', a);
|
this.requireField('username', a);
|
||||||
this.requireField('password', a);
|
this.requireField('password', a);
|
||||||
this.server = a.server || 'http://litmus.mozilla.org/process_test.cgi';
|
this.server = a.server || 'http://litmus.mozilla.org/process_test.cgi';
|
||||||
this.action = 'submit';
|
this.action = 'submit';
|
||||||
|
|
||||||
this.results = new Array();
|
this.results = new Array();
|
||||||
this.logs = new Array();
|
this.logs = new Array();
|
||||||
}
|
}
|
||||||
|
|
||||||
LitmusResults.prototype = {
|
LitmusResults.prototype = {
|
||||||
// add fieldname to this unless it's missing, at which point we throw an
|
// add fieldname to this unless it's missing, at which point we throw an
|
||||||
// exception to the caller
|
// exception to the caller
|
||||||
requireField : function (name, args) {
|
requireField : function (name, args) {
|
||||||
if (args[name] === undefined) {
|
if (args[name] === undefined) {
|
||||||
throw "Missing required field in Litmus result submission: "+name;
|
throw "Missing required field in Litmus result submission: "+name;
|
||||||
}
|
}
|
||||||
this[name] = args[name];
|
this[name] = args[name];
|
||||||
},
|
},
|
||||||
sysconfig : function (a) {
|
sysconfig : function (a) {
|
||||||
this.requireField('product', a);
|
this.requireField('product', a);
|
||||||
this.requireField('platform', a);
|
this.requireField('platform', a);
|
||||||
this.requireField('opsys', a);
|
this.requireField('opsys', a);
|
||||||
this.requireField('branch', a);
|
this.requireField('branch', a);
|
||||||
this.requireField('buildid', a);
|
this.requireField('buildid', a);
|
||||||
this.requireField('locale', a);
|
this.requireField('locale', a);
|
||||||
this.buildtype = a.buildtype;
|
this.buildtype = a.buildtype;
|
||||||
},
|
},
|
||||||
addLog : function(log) {
|
addLog : function(log) {
|
||||||
this.logs.push(log);
|
this.logs.push(log);
|
||||||
},
|
},
|
||||||
addResult : function(result) {
|
addResult : function(result) {
|
||||||
this.results.push(result);
|
this.results.push(result);
|
||||||
},
|
},
|
||||||
toXML : function() {
|
toXML : function() {
|
||||||
var d = '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>'+"\n";
|
var d = '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>'+"\n";
|
||||||
d += '<!DOCTYPE litmusresults PUBLIC' +
|
d += '<!DOCTYPE litmusresults PUBLIC' +
|
||||||
' "-//Mozilla Corporation//Litmus Result Submission DTD//EN/"' +
|
' "-//Mozilla Corporation//Litmus Result Submission DTD//EN/"' +
|
||||||
' "http://litmus.mozilla.org/litmus_results.dtd">'+"\n";
|
' "http://litmus.mozilla.org/litmus_results.dtd">'+"\n";
|
||||||
d += '<litmusresults action="'+this.action+'" useragent="'+
|
d += '<litmusresults action="'+this.action+'" useragent="'+
|
||||||
'litmusReporter.js/'+VERSION+' ('+this.machinename+')" '+
|
'litmusReporter.js/'+VERSION+' ('+this.machinename+')" '+
|
||||||
(this.machinename ? 'machinename="'+this.machinename+'">' : '>') +"\n";
|
(this.machinename ? 'machinename="'+this.machinename+'">' : '>') +"\n";
|
||||||
d += ' <testresults username="'+this.username+'"'+"\n";
|
d += ' <testresults username="'+this.username+'"'+"\n";
|
||||||
d += ' authtoken="'+this.password+'"'+"\n";
|
d += ' authtoken="'+this.password+'"'+"\n";
|
||||||
d += ' product="'+this.product+'"'+"\n";
|
d += ' product="'+this.product+'"'+"\n";
|
||||||
d += ' platform="'+this.platform+'"'+"\n";
|
d += ' platform="'+this.platform+'"'+"\n";
|
||||||
d += ' opsys="'+this.opsys+'"'+"\n";
|
d += ' opsys="'+this.opsys+'"'+"\n";
|
||||||
d += ' branch="'+this.branch+'"'+"\n";
|
d += ' branch="'+this.branch+'"'+"\n";
|
||||||
d += ' buildid="'+this.buildid+'"'+"\n";
|
d += ' buildid="'+this.buildid+'"'+"\n";
|
||||||
d += ' locale="'+this.locale+'"';
|
d += ' locale="'+this.locale+'"';
|
||||||
if (this.buildtype) {
|
if (this.buildtype) {
|
||||||
d += "\n"+' buildtype="'+this.buildtype+'"'+">\n";
|
d += "\n"+' buildtype="'+this.buildtype+'"'+">\n";
|
||||||
} else {
|
} else {
|
||||||
d += ">\n";
|
d += ">\n";
|
||||||
}
|
}
|
||||||
if (this.logs) {
|
if (this.logs) {
|
||||||
if (this.logs instanceof Array) {
|
if (this.logs instanceof Array) {
|
||||||
for(var i=0; i<this.logs.length; i++) {
|
for(var i=0; i<this.logs.length; i++) {
|
||||||
if (this.logs[i] instanceof Log) {
|
if (this.logs[i] instanceof Log) {
|
||||||
d += this.logs[i].toXML();
|
d += this.logs[i].toXML();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.logs instanceof Log) {
|
if (this.logs instanceof Log) {
|
||||||
d += this.logs.toXML();
|
d += this.logs.toXML();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.results) {
|
if (this.results) {
|
||||||
for(var i=0; i<this.results.length; i++) {
|
for(var i=0; i<this.results.length; i++) {
|
||||||
d += this.results[i].toXML();
|
d += this.results[i].toXML();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
d += ' </testresults>'+"\n";
|
d += ' </testresults>'+"\n";
|
||||||
d += '</litmusresults>'+"\n";
|
d += '</litmusresults>'+"\n";
|
||||||
return d;
|
return d;
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log constructor.
|
* Log constructor.
|
||||||
*
|
*
|
||||||
* @param type
|
* @param type
|
||||||
|
@ -149,93 +147,93 @@ LitmusResults.prototype = {
|
||||||
* The log data to submit
|
* The log data to submit
|
||||||
*/
|
*/
|
||||||
function Log(a) {
|
function Log(a) {
|
||||||
this.requireField('type', a);
|
this.requireField('type', a);
|
||||||
this.requireField('data', a);
|
this.requireField('data', a);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.prototype = {
|
Log.prototype = {
|
||||||
type: null,
|
type: null,
|
||||||
data: null,
|
data: null,
|
||||||
requireField : function (name, args) {
|
requireField : function (name, args) {
|
||||||
if (args[name] === undefined) {
|
if (args[name] === undefined) {
|
||||||
throw "Missing required field in Litmus result submission: "+name;
|
throw "Missing required field in Litmus result submission: "+name;
|
||||||
}
|
}
|
||||||
this[name] = args[name];
|
this[name] = args[name];
|
||||||
},
|
},
|
||||||
toXML : function () {
|
toXML : function () {
|
||||||
var d = '<log logtype="'+this.type+'">'+"\n";
|
var d = '<log logtype="'+this.type+'">'+"\n";
|
||||||
d += ' <![CDATA['+this.data+']]>'+"\n";
|
d += ' <![CDATA['+this.data+']]>'+"\n";
|
||||||
d += '</log>'+"\n";
|
d += '</log>'+"\n";
|
||||||
return d;
|
return d;
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Result constructor.
|
* Result constructor.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function Result(a) {
|
function Result(a) {
|
||||||
this.requireField('testid', a);
|
this.requireField('testid', a);
|
||||||
this.requireField('resultstatus', a);
|
this.requireField('resultstatus', a);
|
||||||
this.requireField('exitstatus', a);
|
this.requireField('exitstatus', a);
|
||||||
this.requireField('duration', a);
|
this.requireField('duration', a);
|
||||||
|
|
||||||
// if no timestamp specified, use the current time
|
|
||||||
if (a.timestamp) { this.timestamp = a.timestamp; }
|
|
||||||
else {
|
|
||||||
var d = new Date();
|
|
||||||
this.timestamp=''+d.getFullYear()+leadZero((d.getMonth()+1))+
|
|
||||||
leadZero(d.getDate())+leadZero(d.getHours())+leadZero(d.getMinutes())+
|
|
||||||
leadZero(d.getSeconds());
|
|
||||||
}
|
|
||||||
|
|
||||||
this.comment = a.comment;
|
|
||||||
this.bugnumber = a.bugnumber;
|
|
||||||
this.logs = a.log;
|
|
||||||
this.automated = a.isAutomatedResult ? a.isAutomatedResult : 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
Result.prototype = {
|
// if no timestamp specified, use the current time
|
||||||
requireField : function (name, args) {
|
if (a.timestamp) { this.timestamp = a.timestamp; }
|
||||||
if (args[name] === undefined) {
|
else {
|
||||||
throw "Missing required field in Litmus result submission: "+name;
|
var d = new Date();
|
||||||
}
|
this.timestamp=''+d.getFullYear()+leadZero((d.getMonth()+1))+
|
||||||
this[name] = args[name];
|
leadZero(d.getDate())+leadZero(d.getHours())+leadZero(d.getMinutes())+
|
||||||
},
|
leadZero(d.getSeconds());
|
||||||
toXML : function() {
|
}
|
||||||
var d = '<result testid="'+this.testid+'"'+"\n";
|
|
||||||
d += ' is_automated_result="'+this.automated+'"'+"\n";
|
this.comment = a.comment;
|
||||||
d += ' resultstatus="'+this.resultstatus+'"'+"\n";
|
this.bugnumber = a.bugnumber;
|
||||||
d += ' exitstatus="'+this.exitstatus+'"'+"\n";
|
this.logs = a.log;
|
||||||
d += ' duration="'+this.duration+'"'+"\n";
|
this.automated = a.isAutomatedResult ? a.isAutomatedResult : 1;
|
||||||
d += ' timestamp="'+this.timestamp+'">'+"\n";
|
}
|
||||||
|
|
||||||
if (this.comment) {
|
Result.prototype = {
|
||||||
d += ' <comment>'+this.comment+'</comment>'+"\n";
|
requireField : function (name, args) {
|
||||||
}
|
if (args[name] === undefined) {
|
||||||
|
throw "Missing required field in Litmus result submission: "+name;
|
||||||
if (this.bugnumber) {
|
}
|
||||||
d += ' <bugnumber>'+this.bugnumber+'</bugnumber>'+"\n";
|
this[name] = args[name];
|
||||||
}
|
},
|
||||||
if (this.logs) {
|
toXML : function() {
|
||||||
if (this.logs instanceof Array) {
|
var d = '<result testid="'+this.testid+'"'+"\n";
|
||||||
for(var i=0; i<this.logs.length; i++) {
|
d += ' is_automated_result="'+this.automated+'"'+"\n";
|
||||||
if (this.logs[i] instanceof Log) {
|
d += ' resultstatus="'+this.resultstatus+'"'+"\n";
|
||||||
d += this.logs[i].toXML();
|
d += ' exitstatus="'+this.exitstatus+'"'+"\n";
|
||||||
}
|
d += ' duration="'+this.duration+'"'+"\n";
|
||||||
}
|
d += ' timestamp="'+this.timestamp+'">'+"\n";
|
||||||
} else {
|
|
||||||
if (this.logs instanceof Log) {
|
if (this.comment) {
|
||||||
d += this.logs.toXML();
|
d += ' <comment>'+this.comment+'</comment>'+"\n";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
if (this.bugnumber) {
|
||||||
d += '</result>'+"\n";
|
d += ' <bugnumber>'+this.bugnumber+'</bugnumber>'+"\n";
|
||||||
return d;
|
}
|
||||||
},
|
if (this.logs) {
|
||||||
|
if (this.logs instanceof Array) {
|
||||||
|
for(var i=0; i<this.logs.length; i++) {
|
||||||
|
if (this.logs[i] instanceof Log) {
|
||||||
|
d += this.logs[i].toXML();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (this.logs instanceof Log) {
|
||||||
|
d += this.logs.toXML();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
d += '</result>'+"\n";
|
||||||
|
return d;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function leadZero(num) {
|
function leadZero(num) {
|
||||||
if (num.toString().length == 1) { return '0'+num }
|
if (num.toString().length == 1) { return '0'+num }
|
||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,239 +36,239 @@
|
||||||
|
|
||||||
|
|
||||||
document.addEventListener('load', function() {
|
document.addEventListener('load', function() {
|
||||||
window.setInterval(qaNotifications.updateNotificationStore(), 3600000);
|
window.setInterval(qaNotifications.updateNotificationStore(), 3600000);
|
||||||
}, false)
|
}, false)
|
||||||
|
|
||||||
var qaNotifications = {
|
var qaNotifications = {
|
||||||
storageService : Components.classes["@mozilla.org/storage/service;1"]
|
storageService : Components.classes["@mozilla.org/storage/service;1"]
|
||||||
.getService(Ci.mozIStorageService),
|
.getService(Ci.mozIStorageService),
|
||||||
dbHandle : null,
|
dbHandle : null,
|
||||||
|
|
||||||
openDatabase : function() {
|
openDatabase : function() {
|
||||||
var file = Cc["@mozilla.org/file/directory_service;1"]
|
var file = Cc["@mozilla.org/file/directory_service;1"]
|
||||||
.getService(Ci.nsIProperties)
|
.getService(Ci.nsIProperties)
|
||||||
.get("ProfD", Ci.nsIFile);
|
.get("ProfD", Ci.nsIFile);
|
||||||
file.append("mozqa.sqlite");
|
file.append("mozqa.sqlite");
|
||||||
this.dbHandle = this.storageService.openDatabase(file);
|
this.dbHandle = this.storageService.openDatabase(file);
|
||||||
this.createNotificationTable();
|
this.createNotificationTable();
|
||||||
},
|
},
|
||||||
|
|
||||||
closeDatabase : function() {
|
|
||||||
// there's no way to actually close a database, but setting
|
|
||||||
// the db reference to null will cause the db handle to become
|
|
||||||
// elegible for GC which is about as good as it gets
|
|
||||||
dbHandle = null;
|
|
||||||
},
|
|
||||||
|
|
||||||
createNotificationTable : function() {
|
|
||||||
this.db.executeSimpleSQL("CREATE TABLE if not exists notifications ( \
|
|
||||||
id text, \
|
|
||||||
datetime integer, \
|
|
||||||
firstNotification integer, \
|
|
||||||
secondNotification integer, \
|
|
||||||
serializedJSData string)");
|
|
||||||
},
|
|
||||||
|
|
||||||
updateNotificationStore : function() {
|
|
||||||
var req = new XMLHttpRequest();
|
|
||||||
var url = qaPref.getPref('qa.extension.hermes.url', 'char');
|
|
||||||
req.open('GET', url, true);
|
|
||||||
req.onreadystatechange = function(evt) {
|
|
||||||
if (req.readyState == 4 && req.status == 200) {
|
|
||||||
if (req.responseXML.getElementsByTagName('notifications') == null)
|
|
||||||
return;
|
|
||||||
var notifs = req.responseXML.getElementsByTagName('notification');
|
|
||||||
for (var i=0; i<notifs.length; i++) {
|
|
||||||
var notif = notifs[i];
|
|
||||||
notif = new Notification('xml', notif);
|
|
||||||
notif.serializeToDb();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
req.send(null);
|
|
||||||
},
|
|
||||||
|
|
||||||
checkNotificationStatus : function() {
|
|
||||||
// see if we are elegible for notification:
|
|
||||||
var time = qaPref.getPref(qaPref.prefBase+'.lastNotificationCheckTime', 'int');
|
|
||||||
var interval = qaPref.getPref(qaPref.prefBase+'.minNotificationCheckInterval', 'int');
|
|
||||||
if (time + interval > new Date().valueOf())
|
|
||||||
return; // nothing to see here, try again later
|
|
||||||
|
|
||||||
var sth = this.db.createStatement("SELECT * FROM notifications");
|
|
||||||
var notifications = [];
|
|
||||||
try {
|
|
||||||
while (sth.executeStep()) {
|
|
||||||
notifications.push(new Notification('json', MochiKit.Base.evalJSON(
|
|
||||||
sth.getString(4))));
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
sth.reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (notifications[0] && notifications[0].okToShow() == true) {
|
closeDatabase : function() {
|
||||||
notifications[0].displayToBox();
|
// there's no way to actually close a database, but setting
|
||||||
$('qa-notify').removeAttribute('hidden');
|
// the db reference to null will cause the db handle to become
|
||||||
}
|
// elegible for GC which is about as good as it gets
|
||||||
// reset the interval timer
|
dbHandle = null;
|
||||||
qaPref.setPref(qaPref.prefBase+'.lastNotificationCheckTime', new Date().valueOf(), 'int');
|
},
|
||||||
},
|
|
||||||
|
createNotificationTable : function() {
|
||||||
showHideNotify: function(bool) {
|
this.db.executeSimpleSQL("CREATE TABLE if not exists notifications ( \
|
||||||
var notify = $('qa-notify');
|
id text, \
|
||||||
if (bool == true) {
|
datetime integer, \
|
||||||
notify.removeAttribute("hidden");
|
firstNotification integer, \
|
||||||
} else {
|
secondNotification integer, \
|
||||||
notify.setAttribute("hidden", "true");
|
serializedJSData string)");
|
||||||
}
|
},
|
||||||
},
|
|
||||||
|
updateNotificationStore : function() {
|
||||||
getNotificationSettings : function(bool) {
|
var req = new XMLHttpRequest();
|
||||||
var prefs = qaPref.getPref(qaPref.prefBase+'.notificationSettings', 'char');
|
var url = qaPref.getPref('qa.extension.hermes.url', 'char');
|
||||||
return prefs.split(",");
|
req.open('GET', url, true);
|
||||||
},
|
req.onreadystatechange = function(evt) {
|
||||||
|
if (req.readyState == 4 && req.status == 200) {
|
||||||
|
if (req.responseXML.getElementsByTagName('notifications') == null)
|
||||||
|
return;
|
||||||
|
var notifs = req.responseXML.getElementsByTagName('notification');
|
||||||
|
for (var i=0; i<notifs.length; i++) {
|
||||||
|
var notif = notifs[i];
|
||||||
|
notif = new Notification('xml', notif);
|
||||||
|
notif.serializeToDb();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
req.send(null);
|
||||||
|
},
|
||||||
|
|
||||||
|
checkNotificationStatus : function() {
|
||||||
|
// see if we are elegible for notification:
|
||||||
|
var time = qaPref.getPref(qaPref.prefBase+'.lastNotificationCheckTime', 'int');
|
||||||
|
var interval = qaPref.getPref(qaPref.prefBase+'.minNotificationCheckInterval', 'int');
|
||||||
|
if (time + interval > new Date().valueOf())
|
||||||
|
return; // nothing to see here, try again later
|
||||||
|
|
||||||
|
var sth = this.db.createStatement("SELECT * FROM notifications");
|
||||||
|
var notifications = [];
|
||||||
|
try {
|
||||||
|
while (sth.executeStep()) {
|
||||||
|
notifications.push(new Notification('json', MochiKit.Base.evalJSON(
|
||||||
|
sth.getString(4))));
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
sth.reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (notifications[0] && notifications[0].okToShow() == true) {
|
||||||
|
notifications[0].displayToBox();
|
||||||
|
$('qa-notify').removeAttribute('hidden');
|
||||||
|
}
|
||||||
|
// reset the interval timer
|
||||||
|
qaPref.setPref(qaPref.prefBase+'.lastNotificationCheckTime', new Date().valueOf(), 'int');
|
||||||
|
},
|
||||||
|
|
||||||
|
showHideNotify: function(bool) {
|
||||||
|
var notify = $('qa-notify');
|
||||||
|
if (bool == true) {
|
||||||
|
notify.removeAttribute("hidden");
|
||||||
|
} else {
|
||||||
|
notify.setAttribute("hidden", "true");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getNotificationSettings : function(bool) {
|
||||||
|
var prefs = qaPref.getPref(qaPref.prefBase+'.notificationSettings', 'char');
|
||||||
|
return prefs.split(",");
|
||||||
|
},
|
||||||
};
|
};
|
||||||
qaNotifications.__defineGetter__('db', function() {
|
qaNotifications.__defineGetter__('db', function() {
|
||||||
if (this.dbHandle != null)
|
if (this.dbHandle != null)
|
||||||
return this.dbHandle;
|
return this.dbHandle;
|
||||||
else {
|
else {
|
||||||
this.openDatabase();
|
this.openDatabase();
|
||||||
return this.dbHandle;
|
return this.dbHandle;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function Notification() {
|
function Notification() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Notification(type, data) {
|
function Notification(type, data) {
|
||||||
if (type == 'json') {
|
if (type == 'json') {
|
||||||
this.id = data.id;
|
this.id = data.id;
|
||||||
this.notificationClass = data.notificationClass;
|
this.notificationClass = data.notificationClass;
|
||||||
this.type = data.type;
|
this.type = data.type;
|
||||||
this.headline = data.headline;
|
this.headline = data.headline;
|
||||||
this.datetime = MochiKit.DateTime.isoTimestamp(data.datetime);
|
this.datetime = MochiKit.DateTime.isoTimestamp(data.datetime);
|
||||||
this.place = data.place;
|
this.place = data.place;
|
||||||
this.infotext = data.infotext;
|
this.infotext = data.infotext;
|
||||||
this.infolinktext = data.infolinktext;
|
this.infolinktext = data.infolinktext;
|
||||||
this.infolinkhref = data.infolinkhref;
|
this.infolinkhref = data.infolinkhref;
|
||||||
this.golinktext = data.golinktext;
|
this.golinktext = data.golinktext;
|
||||||
this.golinkhref = data.golinkhref;
|
this.golinkhref = data.golinkhref;
|
||||||
} else if (type == 'xml') {
|
} else if (type == 'xml') {
|
||||||
var notif = data;
|
var notif = data;
|
||||||
this.id = notif.getAttribute('id');
|
this.id = notif.getAttribute('id');
|
||||||
this.notificationClass = notif.getAttribute('class');
|
this.notificationClass = notif.getAttribute('class');
|
||||||
this.type = notif.getAttribute('type');
|
this.type = notif.getAttribute('type');
|
||||||
if (notif.getElementsByTagName('headline')[0] != null)
|
if (notif.getElementsByTagName('headline')[0] != null)
|
||||||
this.headline = notif.getElementsByTagName('headline')[0].textContent;
|
this.headline = notif.getElementsByTagName('headline')[0].textContent;
|
||||||
|
|
||||||
// eventinfo
|
// eventinfo
|
||||||
if (this.notificationClass == 'event') {
|
if (this.notificationClass == 'event') {
|
||||||
var eventInfo = notif.getElementsByTagName('eventinfo')[0];
|
var eventInfo = notif.getElementsByTagName('eventinfo')[0];
|
||||||
this.datetime = MochiKit.DateTime.isoTimestamp(
|
this.datetime = MochiKit.DateTime.isoTimestamp(
|
||||||
eventInfo.getElementsByTagName('datetime')[0].textContent);
|
eventInfo.getElementsByTagName('datetime')[0].textContent);
|
||||||
this.place = eventInfo.getElementsByTagName('place')[0].textContent;
|
this.place = eventInfo.getElementsByTagName('place')[0].textContent;
|
||||||
}
|
}
|
||||||
this.infotext = notif.getElementsByTagName('infotext')[0].textContent;
|
this.infotext = notif.getElementsByTagName('infotext')[0].textContent;
|
||||||
this.infolinktext = notif.getElementsByTagName('infolink')[0].textContent;
|
this.infolinktext = notif.getElementsByTagName('infolink')[0].textContent;
|
||||||
this.infolinkhref = notif.getElementsByTagName('infolink')[0]
|
this.infolinkhref = notif.getElementsByTagName('infolink')[0]
|
||||||
.getAttribute('href');
|
.getAttribute('href');
|
||||||
this.golinktext = notif.getElementsByTagName('golink')[0].textContent;
|
this.golinktext = notif.getElementsByTagName('golink')[0].textContent;
|
||||||
this.golinkhref = notif.getElementsByTagName('golink')[0]
|
this.golinkhref = notif.getElementsByTagName('golink')[0]
|
||||||
.getAttribute('href');
|
.getAttribute('href');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Notification.prototype = {
|
Notification.prototype = {
|
||||||
id : null,
|
id : null,
|
||||||
notificationClass : null,
|
notificationClass : null,
|
||||||
type : null,
|
type : null,
|
||||||
headline : null,
|
headline : null,
|
||||||
datetime : null,
|
datetime : null,
|
||||||
place : null,
|
place : null,
|
||||||
infotext : null,
|
infotext : null,
|
||||||
infolinktext : null,
|
infolinktext : null,
|
||||||
infolinkhref : null,
|
infolinkhref : null,
|
||||||
golinktext : null,
|
golinktext : null,
|
||||||
golinkhref : null,
|
golinkhref : null,
|
||||||
|
|
||||||
hasHadFirstNotification : false,
|
hasHadFirstNotification : false,
|
||||||
hasHadSecondNotification : false,
|
hasHadSecondNotification : false,
|
||||||
serializedJSData : null,
|
serializedJSData : null,
|
||||||
|
|
||||||
serializeToDb: function() {
|
serializeToDb: function() {
|
||||||
var query = qaNotifications.db.createStatement("SELECT id FROM notifications \
|
var query = qaNotifications.db.createStatement("SELECT id FROM notifications \
|
||||||
WHERE id = ?1");
|
WHERE id = ?1");
|
||||||
query.bindStringParameter(0, this.id);
|
query.bindStringParameter(0, this.id);
|
||||||
var foundRow;
|
var foundRow;
|
||||||
while (query.executeStep()) {
|
while (query.executeStep()) {
|
||||||
foundRow = 1;
|
foundRow = 1;
|
||||||
}
|
}
|
||||||
query.reset();
|
query.reset();
|
||||||
if (foundRow == 1) { // it's already been inserted, so update
|
if (foundRow == 1) { // it's already been inserted, so update
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var sth = qaNotifications.db.createStatement("INSERT into notifications \
|
var sth = qaNotifications.db.createStatement("INSERT into notifications \
|
||||||
values (?1, ?2, ?3, ?4, ?5)");
|
values (?1, ?2, ?3, ?4, ?5)");
|
||||||
sth.bindStringParameter(0, this.id);
|
sth.bindStringParameter(0, this.id);
|
||||||
sth.bindStringParameter(1, this.datetime);
|
sth.bindStringParameter(1, this.datetime);
|
||||||
sth.bindStringParameter(2, this.hasHadFirstNotification);
|
sth.bindStringParameter(2, this.hasHadFirstNotification);
|
||||||
sth.bindStringParameter(3, this.hasHadSecondNotification);
|
sth.bindStringParameter(3, this.hasHadSecondNotification);
|
||||||
|
|
||||||
// avoid having serialized data inside serialized data:
|
// avoid having serialized data inside serialized data:
|
||||||
this.serializedJSData = null;
|
this.serializedJSData = null;
|
||||||
var jsData = MochiKit.Base.serializeJSON(this);
|
var jsData = MochiKit.Base.serializeJSON(this);
|
||||||
sth.bindStringParameter(4, jsData);
|
sth.bindStringParameter(4, jsData);
|
||||||
|
|
||||||
sth.execute();
|
sth.execute();
|
||||||
},
|
},
|
||||||
displayToBox : function() {
|
displayToBox : function() {
|
||||||
$('qa-notify-header').value=this.headline;
|
$('qa-notify-header').value=this.headline;
|
||||||
|
|
||||||
if ($('qa-notify-text').firstChild)
|
if ($('qa-notify-text').firstChild)
|
||||||
$('qa-notify-text').removeChild($('qa-notify-text').firstChild);
|
$('qa-notify-text').removeChild($('qa-notify-text').firstChild);
|
||||||
$('qa-notify-text').appendChild(document.createTextNode(this.infotext));
|
$('qa-notify-text').appendChild(document.createTextNode(this.infotext));
|
||||||
|
|
||||||
$('qa-notify-infolink').value=this.infolinktext;
|
$('qa-notify-infolink').value=this.infolinktext;
|
||||||
$('qa-notify-infolink').href=this.infolinkhref;
|
$('qa-notify-infolink').href=this.infolinkhref;
|
||||||
$('qa-notify-infolink').style.display = '';
|
$('qa-notify-infolink').style.display = '';
|
||||||
|
|
||||||
if (this.notificationClass == 'event') {
|
if (this.notificationClass == 'event') {
|
||||||
var inprogress = 0;
|
var inprogress = 0;
|
||||||
$('qa-notify-event-datetime').value=this.datetime;
|
$('qa-notify-event-datetime').value=this.datetime;
|
||||||
$('qa-notify-event-place').value=this.place;
|
$('qa-notify-event-place').value=this.place;
|
||||||
$('qa-notify-event').style.display = '';
|
$('qa-notify-event').style.display = '';
|
||||||
$('qa-notify-inprogress').style.display = 'none';
|
$('qa-notify-inprogress').style.display = 'none';
|
||||||
|
|
||||||
$('qa-notify-getstartedlink').value=this.golinktext;
|
$('qa-notify-getstartedlink').value=this.golinktext;
|
||||||
$('qa-notify-getstartedlink').href=this.golinkhref;
|
$('qa-notify-getstartedlink').href=this.golinkhref;
|
||||||
|
|
||||||
if (inprogress == 1) {
|
if (inprogress == 1) {
|
||||||
$('qa-notify-inprogress').style.display = '';
|
$('qa-notify-inprogress').style.display = '';
|
||||||
$('qa-notify-getstartedlink').style.display = '';
|
$('qa-notify-getstartedlink').style.display = '';
|
||||||
$('qa-notify-infolink').style.display = 'none';
|
$('qa-notify-infolink').style.display = 'none';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
okToShow : function() {
|
okToShow : function() {
|
||||||
var prefs = qaNotifications.getNotificationSettings();
|
var prefs = qaNotifications.getNotificationSettings();
|
||||||
if (prefs[0] == '1') // all notifications disabled
|
if (prefs[0] == '1') // all notifications disabled
|
||||||
return false;
|
return false;
|
||||||
if (this.type == 'testday' && ! prefs[1] == '0')
|
if (this.type == 'testday' && ! prefs[1] == '0')
|
||||||
return true;
|
return true;
|
||||||
if (this.type == 'bugday' && ! prefs[2] == '0')
|
if (this.type == 'bugday' && ! prefs[2] == '0')
|
||||||
return true;
|
return true;
|
||||||
if (this.type == 'prerelease' && ! prefs[3] == '0')
|
if (this.type == 'prerelease' && ! prefs[3] == '0')
|
||||||
return true;
|
return true;
|
||||||
if (this.type == 'news' && ! prefs[4] == '0')
|
if (this.type == 'news' && ! prefs[4] == '0')
|
||||||
return true;
|
return true;
|
||||||
if (this.type == 'newbuilds' && ! prefs[5] == '0')
|
if (this.type == 'newbuilds' && ! prefs[5] == '0')
|
||||||
return true;
|
return true;
|
||||||
if (this.type == 'special' && ! prefs[6] == '0')
|
if (this.type == 'special' && ! prefs[6] == '0')
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// catch all:
|
// catch all:
|
||||||
return false;
|
return false;
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -40,31 +40,31 @@ var qaPref = {
|
||||||
prefBase : "qa.extension",
|
prefBase : "qa.extension",
|
||||||
|
|
||||||
setPref : function(aName, aValue, aType) {
|
setPref : function(aName, aValue, aType) {
|
||||||
|
|
||||||
var pref = Components.classes["@mozilla.org/preferences-service;1"]
|
var pref = Components.classes["@mozilla.org/preferences-service;1"]
|
||||||
.getService(Components.interfaces.nsIPrefBranch);
|
.getService(Components.interfaces.nsIPrefBranch);
|
||||||
try{
|
try{
|
||||||
if(aType == "bool")
|
if(aType == "bool")
|
||||||
pref.setBoolPref(aName, aValue);
|
pref.setBoolPref(aName, aValue);
|
||||||
else if(aType == "int")
|
else if(aType == "int")
|
||||||
pref.setIntPref(aName, aValue);
|
pref.setIntPref(aName, aValue);
|
||||||
else if(aType == "char")
|
else if(aType == "char")
|
||||||
pref.setCharPref(aName, aValue);
|
pref.setCharPref(aName, aValue);
|
||||||
}
|
}
|
||||||
catch(e){ };
|
catch(e){ };
|
||||||
},
|
},
|
||||||
|
|
||||||
getPref : function(aName, aType) {
|
getPref : function(aName, aType) {
|
||||||
|
|
||||||
var pref = Components.classes["@mozilla.org/preferences-service;1"]
|
var pref = Components.classes["@mozilla.org/preferences-service;1"]
|
||||||
.getService(Components.interfaces.nsIPrefBranch);
|
.getService(Components.interfaces.nsIPrefBranch);
|
||||||
try{
|
try{
|
||||||
var result;
|
var result;
|
||||||
if(aType == "bool")
|
if(aType == "bool")
|
||||||
result = pref.getBoolPref(aName);
|
result = pref.getBoolPref(aName);
|
||||||
else if(aType == "int")
|
else if(aType == "int")
|
||||||
result = pref.getIntPref(aName);
|
result = pref.getIntPref(aName);
|
||||||
else if(aType == "char")
|
else if(aType == "char")
|
||||||
result = pref.getCharPref(aName);
|
result = pref.getCharPref(aName);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -72,121 +72,121 @@ var qaPref = {
|
||||||
catch(e){
|
catch(e){
|
||||||
if(aType == "bool"){
|
if(aType == "bool"){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if(aType == "int"){
|
else if(aType == "int"){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else if(aType == "char"){
|
else if(aType == "char"){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// public API:
|
// public API:
|
||||||
// qaPref.litmus.getUsername()
|
// qaPref.litmus.getUsername()
|
||||||
// qaPref.litmus.getPassword()
|
// qaPref.litmus.getPassword()
|
||||||
// qaPref.litmus.setPassword()
|
// qaPref.litmus.setPassword()
|
||||||
// everything else is abstracted away to deal with fx2 vs fx3 changes
|
// everything else is abstracted away to deal with fx2 vs fx3 changes
|
||||||
|
|
||||||
var CC_passwordManager = Components.classes["@mozilla.org/passwordmanager;1"];
|
var CC_passwordManager = Components.classes["@mozilla.org/passwordmanager;1"];
|
||||||
var CC_loginManager = Components.classes["@mozilla.org/login-manager;1"];
|
var CC_loginManager = Components.classes["@mozilla.org/login-manager;1"];
|
||||||
|
|
||||||
if (CC_passwordManager != null) { // old-fashioned password manager
|
if (CC_passwordManager != null) { // old-fashioned password manager
|
||||||
qaPref.litmus = {
|
qaPref.litmus = {
|
||||||
passwordName : function() {return "mozqa-extension-litmus-"+litmus.baseURL},
|
passwordName : function() {return "mozqa-extension-litmus-"+litmus.baseURL},
|
||||||
|
|
||||||
manager : function() {
|
manager : function() {
|
||||||
return Components.classes["@mozilla.org/passwordmanager;1"].
|
return Components.classes["@mozilla.org/passwordmanager;1"].
|
||||||
getService(Components.interfaces.nsIPasswordManager);
|
getService(Components.interfaces.nsIPasswordManager);
|
||||||
},
|
},
|
||||||
getPasswordObj : function() {
|
getPasswordObj : function() {
|
||||||
var m = this.manager();
|
var m = this.manager();
|
||||||
var e = m.enumerator;
|
var e = m.enumerator;
|
||||||
|
|
||||||
// iterate through the PasswordManager service to find
|
// iterate through the PasswordManager service to find
|
||||||
// our password:
|
// our password:
|
||||||
var password;
|
var password;
|
||||||
while(e.hasMoreElements()) {
|
while(e.hasMoreElements()) {
|
||||||
try {
|
try {
|
||||||
var pass = e.getNext().
|
var pass = e.getNext().
|
||||||
QueryInterface(Components.interfaces.nsIPassword);
|
QueryInterface(Components.interfaces.nsIPassword);
|
||||||
if (pass.host == this.passwordName()) {
|
if (pass.host == this.passwordName()) {
|
||||||
password=pass; // found it
|
password=pass; // found it
|
||||||
return password;
|
return password;
|
||||||
}
|
}
|
||||||
} catch (ex) { return false; }
|
} catch (ex) { return false; }
|
||||||
}
|
}
|
||||||
if (!password) { return false; }
|
if (!password) { return false; }
|
||||||
return password;
|
return password;
|
||||||
},
|
},
|
||||||
getUsername : function() {
|
getUsername : function() {
|
||||||
var password = this.getPasswordObj();
|
var password = this.getPasswordObj();
|
||||||
try {
|
try {
|
||||||
return password.user;
|
return password.user;
|
||||||
} catch (ex) { return false; }
|
} catch (ex) { return false; }
|
||||||
},
|
},
|
||||||
getPassword : function() {
|
getPassword : function() {
|
||||||
var password=this.getPasswordObj();
|
var password=this.getPasswordObj();
|
||||||
try {
|
try {
|
||||||
return password.password;
|
return password.password;
|
||||||
} catch (ex) { return false; }
|
} catch (ex) { return false; }
|
||||||
},
|
},
|
||||||
setPassword : function(username, password) {
|
setPassword : function(username, password) {
|
||||||
var m = this.manager();
|
var m = this.manager();
|
||||||
// check to see whether we already have a password stored
|
// check to see whether we already have a password stored
|
||||||
// for the current baseURL. If we do, remove it before adding
|
// for the current baseURL. If we do, remove it before adding
|
||||||
// any new passwords:
|
// any new passwords:
|
||||||
var p;
|
var p;
|
||||||
while (p = this.getPasswordObj()) {
|
while (p = this.getPasswordObj()) {
|
||||||
m.removeUser(p.host, p.user);
|
m.removeUser(p.host, p.user);
|
||||||
}
|
}
|
||||||
m.addUser(this.passwordName(), username, password);
|
m.addUser(this.passwordName(), username, password);
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
} else if (CC_loginManager != null) { // use the new login manager interface
|
} else if (CC_loginManager != null) { // use the new login manager interface
|
||||||
qaPref.litmus = {
|
qaPref.litmus = {
|
||||||
manager : function() {
|
manager : function() {
|
||||||
return Components.classes["@mozilla.org/login-manager;1"]
|
return Components.classes["@mozilla.org/login-manager;1"]
|
||||||
.getService(Components.interfaces.nsILoginManager);
|
.getService(Components.interfaces.nsILoginManager);
|
||||||
},
|
},
|
||||||
getUsername : function() {
|
getUsername : function() {
|
||||||
var password = this.getPasswordObj();
|
var password = this.getPasswordObj();
|
||||||
try {
|
try {
|
||||||
return password.username;
|
return password.username;
|
||||||
} catch (ex) { return false; }
|
} catch (ex) { return false; }
|
||||||
},
|
},
|
||||||
getPassword : function() {
|
getPassword : function() {
|
||||||
var password=this.getPasswordObj();
|
var password=this.getPasswordObj();
|
||||||
try {
|
try {
|
||||||
return password.password;
|
return password.password;
|
||||||
} catch (ex) { return false; }
|
} catch (ex) { return false; }
|
||||||
},
|
},
|
||||||
setPassword : function(username, password) {
|
setPassword : function(username, password) {
|
||||||
// if we already have a password stored, remove it first:
|
// if we already have a password stored, remove it first:
|
||||||
var login = this.getPasswordObj();
|
var login = this.getPasswordObj();
|
||||||
if (login != false) {
|
if (login != false) {
|
||||||
this.manager().removeLogin(login);
|
this.manager().removeLogin(login);
|
||||||
}
|
}
|
||||||
|
|
||||||
var nsLoginInfo = new Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
|
var nsLoginInfo = new Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
|
||||||
Components.interfaces.nsILoginInfo,
|
Components.interfaces.nsILoginInfo,
|
||||||
"init");
|
"init");
|
||||||
var newLogin = new nsLoginInfo('chrome://qa', 'Litmus Login', litmus.baseURL,
|
var newLogin = new nsLoginInfo('chrome://qa', 'Litmus Login', litmus.baseURL,
|
||||||
username, password, null, null);
|
username, password, null, null);
|
||||||
this.manager().addLogin(newLogin);
|
this.manager().addLogin(newLogin);
|
||||||
},
|
},
|
||||||
getPasswordObj: function() {
|
getPasswordObj: function() {
|
||||||
try {
|
try {
|
||||||
var logins = this.manager().findLogins({}, 'chrome://qa',
|
var logins = this.manager().findLogins({}, 'chrome://qa',
|
||||||
'Litmus Login', litmus.baseURL);
|
'Litmus Login', litmus.baseURL);
|
||||||
if (logins.length > 0 && logins[0] != null)
|
if (logins.length > 0 && logins[0] != null)
|
||||||
return logins[0];
|
return logins[0];
|
||||||
return false;
|
return false;
|
||||||
} catch(ex) {
|
} catch(ex) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,34 +36,55 @@
|
||||||
|
|
||||||
|
|
||||||
var qaMain = {
|
var qaMain = {
|
||||||
htmlNS: "http://www.w3.org/1999/xhtml",
|
htmlNS: "http://www.w3.org/1999/xhtml",
|
||||||
|
|
||||||
openQATool : function() {
|
openQATool : function() {
|
||||||
window.open("chrome://qa/content/qa.xul", "_blank", "chrome,all,dialog=no,resizable=no");
|
window.open("chrome://qa/content/qa.xul", "_blank",
|
||||||
},
|
"chrome,all,dialog=no,resizable=no");
|
||||||
onToolOpen : function() {
|
},
|
||||||
if (qaPref.getPref(qaPref.prefBase+'.isFirstTime', 'bool') == true) {
|
onToolOpen : function() {
|
||||||
window.open("chrome://qa/content/setup.xul", "_blank", "chrome,all,dialog=yes");
|
if (qaPref.getPref(qaPref.prefBase+'.isFirstTime', 'bool') == true) {
|
||||||
|
window.open("chrome://qa/content/setup.xul", "_blank",
|
||||||
|
"chrome,all,dialog=yes");
|
||||||
}
|
}
|
||||||
if (qaPref.getPref(qaPref.prefBase + '.currentTestcase.testrunSummary', 'char') != null) {
|
if (qaPref.getPref(qaPref.prefBase + '.currentTestcase.testrunSummary', 'char') != null) {
|
||||||
litmus.readStateFromPref();
|
litmus.readStateFromPref();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onSwitchTab : function() {
|
||||||
|
var newSelection = $('qa_tabrow').selectedItem;
|
||||||
|
|
||||||
|
// user is switching to the prefs tab:
|
||||||
|
if ($('qa_tabrow').selectedItem == $('qa-tabbar-prefs')) {
|
||||||
|
qaPrefsWindow.loadPrefsWindow();
|
||||||
|
} else if ($('qa_tabrow').selectedItem == $('qa-tabbar-bugzilla')) {
|
||||||
|
bugzilla.unhighlightTab();
|
||||||
|
}
|
||||||
|
|
||||||
|
// user is switching away from the prefs tab:
|
||||||
|
if (qaPrefsWindow.lastSelectedTab != null &&
|
||||||
|
qaPrefsWindow.lastSelectedTab == $('qa-tabbar-prefs')) {
|
||||||
|
qaPrefsWindow.savePrefsWindow();
|
||||||
|
}
|
||||||
|
|
||||||
|
qaPrefsWindow.lastSelectedTab = newSelection;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
qaMain.__defineGetter__("bundle", function(){return $("bundle_qa");});
|
qaMain.__defineGetter__("bundle", function(){return $("bundle_qa");});
|
||||||
qaMain.__defineGetter__("urlbundle", function(){return $("bundle_urls");});
|
qaMain.__defineGetter__("urlbundle", function(){return $("bundle_urls");});
|
||||||
function $() {
|
function $() {
|
||||||
var elements = new Array();
|
var elements = new Array();
|
||||||
|
|
||||||
for (var i = 0; i < arguments.length; i++) {
|
for (var i = 0; i < arguments.length; i++) {
|
||||||
var element = arguments[i];
|
var element = arguments[i];
|
||||||
if (typeof element == 'string')
|
if (typeof element == 'string')
|
||||||
element = document.getElementById(element);
|
element = document.getElementById(element);
|
||||||
|
|
||||||
if (arguments.length == 1)
|
if (arguments.length == 1)
|
||||||
return element;
|
return element;
|
||||||
|
|
||||||
elements.push(element);
|
elements.push(element);
|
||||||
}
|
}
|
||||||
|
|
||||||
return elements;
|
return elements;
|
||||||
|
|
|
@ -1,39 +1,40 @@
|
||||||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
- ***** BEGIN LICENSE BLOCK *****
|
||||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
#
|
-
|
||||||
# The contents of this file are subject to the Mozilla Public License Version
|
- The contents of this file are subject to the Mozilla Public License Version
|
||||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
- 1.1 (the "License"); you may not use this file except in compliance with
|
||||||
# the License. You may obtain a copy of the License at
|
- the License. You may obtain a copy of the License at
|
||||||
# http://www.mozilla.org/MPL/
|
- http://www.mozilla.org/MPL/
|
||||||
#
|
-
|
||||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
- Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
# for the specific language governing rights and limitations under the
|
- for the specific language governing rights and limitations under the
|
||||||
# License.
|
- License.
|
||||||
#
|
-
|
||||||
# The Original Code is the Mozilla Community QA Extension
|
- The Original Code is the Mozilla Community QA Extension
|
||||||
#
|
-
|
||||||
# The Initial Developer of the Original Code is the Mozilla Corporation.
|
- The Initial Developer of the Original Code is the Mozilla Corporation.
|
||||||
# Portions created by the Initial Developer are Copyright (C) 2007
|
- Portions created by the Initial Developer are Copyright (C) 2007
|
||||||
# the Initial Developer. All Rights Reserved.
|
- the Initial Developer. All Rights Reserved.
|
||||||
#
|
-
|
||||||
# Contributor(s):
|
- Contributor(s):
|
||||||
# Zach Lipton <zach@zachlipton.com>
|
- Zach Lipton <zach@zachlipton.com>
|
||||||
#
|
- Ben Hsieh <ben.hsieh@gmail.com>
|
||||||
# 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
|
- Alternatively, the contents of this file may be used under the terms of
|
||||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
- either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
# of those above. If you wish to allow use of your version of this file only
|
- in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
- of those above. If you wish to allow use of your version of this file only
|
||||||
# use your version of this file under the terms of the MPL, indicate your
|
- under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
# decision by deleting the provisions above and replace them with the notice
|
- use your version of this file under the terms of the MPL, indicate your
|
||||||
# and other provisions required by the LGPL or the GPL. If you do not delete
|
- decision by deleting the provisions above and replace them with the notice
|
||||||
# the provisions above, a recipient may use your version of this file under
|
- and other provisions required by the LGPL or the GPL. If you do not delete
|
||||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
- the provisions above, a recipient may use your version of this file under
|
||||||
#
|
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
# ***** END LICENSE BLOCK ***** -->
|
-
|
||||||
|
- ***** END LICENSE BLOCK ***** -->
|
||||||
|
|
||||||
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
|
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
|
||||||
<?xml-stylesheet href="chrome://global/skin/browser.css" type="text/css"?>
|
<?xml-stylesheet href="chrome://global/skin/browser.css" type="text/css"?>
|
||||||
|
@ -73,12 +74,23 @@
|
||||||
<script type="application/x-javascript" src="chrome://qa/content/litmus.js" />
|
<script type="application/x-javascript" src="chrome://qa/content/litmus.js" />
|
||||||
<script type="application/x-javascript" src="chrome://qa/content/qa.js" />
|
<script type="application/x-javascript" src="chrome://qa/content/qa.js" />
|
||||||
<script type="application/x-javascript" src="chrome://qa/content/tabs/qmo.js" />
|
<script type="application/x-javascript" src="chrome://qa/content/tabs/qmo.js" />
|
||||||
|
<script type="application/x-javascript" src="chrome://qa/content/tabs/bugzilla.js" />
|
||||||
|
<script type="application/x-javascript" src="chrome://qa/content/tabs/bugAccess.js" />
|
||||||
|
|
||||||
|
<script type="application/x-javascript">
|
||||||
|
|
||||||
|
// on load, set an event listener to deal with saving settings when
|
||||||
|
// changing tabs
|
||||||
|
window.addEventListener('load', function() {
|
||||||
|
$('qa_tabrow').addEventListener('select', qaMain.onSwitchTab, false);
|
||||||
|
}, false);
|
||||||
|
</script>
|
||||||
|
|
||||||
<tabbox id="qa_tabbox">
|
<tabbox id="qa_tabbox">
|
||||||
<tabs id="qa_tabrow">
|
<tabs id="qa_tabrow">
|
||||||
<tab id="qa-tabbar-qmo" class="tabbrowser-tab" />
|
<tab id="qa-tabbar-qmo" class="tabbrowser-tab" />
|
||||||
<tab label="&qa.litmus.title;" class="tabbrowser-tab" />
|
<tab label="&qa.litmus.title;" class="tabbrowser-tab" />
|
||||||
<tab label="&qa.bugzilla.title;" class="tabbrowser-tab" />
|
<tab label="&qa.bugzilla.title;" id="qa-tabbar-bugzilla" class="tabbrowser-tab" />
|
||||||
<tab label="&qa.chat.title;" class="tabbrowser-tab" />
|
<tab label="&qa.chat.title;" class="tabbrowser-tab" />
|
||||||
<spacer id="qa-tabbar-spacer" />
|
<spacer id="qa-tabbar-spacer" />
|
||||||
<tab label="&qa.preferences.title;" id="qa-tabbar-prefs" class="tabbrowser-tab" />
|
<tab label="&qa.preferences.title;" id="qa-tabbar-prefs" class="tabbrowser-tab" />
|
||||||
|
@ -89,13 +101,11 @@
|
||||||
<tabpanel id="qa-tab-litmus"></tabpanel>
|
<tabpanel id="qa-tab-litmus"></tabpanel>
|
||||||
<tabpanel id="qa-tab-bugzilla"></tabpanel>
|
<tabpanel id="qa-tab-bugzilla"></tabpanel>
|
||||||
<tabpanel id="qa-tab-chat"></tabpanel>
|
<tabpanel id="qa-tab-chat"></tabpanel>
|
||||||
|
|
||||||
<tabpanel id="qa-tab-SPACER"></tabpanel>
|
<tabpanel id="qa-tab-SPACER"></tabpanel>
|
||||||
|
|
||||||
<tabpanel id="qa-tab-settings"></tabpanel>
|
<tabpanel id="qa-tab-settings"></tabpanel>
|
||||||
<tabpanel id="qa-tab-help"></tabpanel>
|
<tabpanel id="qa-tab-help"></tabpanel>
|
||||||
</tabpanels>
|
</tabpanels>
|
||||||
</tabbox>
|
</tabbox>
|
||||||
|
</window>
|
||||||
|
|
||||||
</window>
|
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
*
|
*
|
||||||
* Contributor(s):
|
* Contributor(s):
|
||||||
* Zach Lipton <zach@zachlipton.com>
|
* Zach Lipton <zach@zachlipton.com>
|
||||||
|
* Ben Hsieh <ben.hsieh@gmail.com>
|
||||||
*
|
*
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
* 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
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
|
@ -36,247 +37,234 @@
|
||||||
|
|
||||||
|
|
||||||
var qaPrefsWindow = {
|
var qaPrefsWindow = {
|
||||||
lastSelectedTab : null,
|
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;
|
|
||||||
},
|
|
||||||
|
|
||||||
loadPrefsWindow : function() {
|
loadPrefsWindow : function() {
|
||||||
prefsTabOpen = true;
|
prefsTabOpen = true;
|
||||||
document.getElementById('qa-preferences-litmus-username').value =
|
document.getElementById('qa-preferences-litmus-username').value =
|
||||||
qaPref.litmus.getUsername() || '';
|
qaPref.litmus.getUsername() || '';
|
||||||
document.getElementById('qa-preferences-litmus-password').value =
|
document.getElementById('qa-preferences-litmus-password').value =
|
||||||
qaPref.litmus.getPassword() || '';
|
qaPref.litmus.getPassword() || '';
|
||||||
|
|
||||||
// load notification settings:
|
// load notification settings:
|
||||||
var prefs = qaPref.getPref(qaPref.prefBase+'.notificationSettings', 'char');
|
var prefs = qaPref.getPref(qaPref.prefBase+'.notificationSettings', 'char');
|
||||||
prefs = prefs.split(",");
|
prefs = prefs.split(",");
|
||||||
var notify = $('qa-prefs-notify').childNodes;
|
var notify = $('qa-prefs-notify').childNodes;
|
||||||
var prefCounter = 0;
|
var prefCounter = 0;
|
||||||
for (var i=0; i<notify.length; i++) {
|
for (var i=0; i<notify.length; i++) {
|
||||||
if (notify[i].setChecked != null && notify[i].checked != null) { // it's a checkbox
|
if (notify[i].setChecked != null && notify[i].checked != null) { // it's a checkbox
|
||||||
if (prefs[prefCounter] == "1")
|
if (prefs[prefCounter] == "1")
|
||||||
notify[i].checked = true;
|
notify[i].checked = true;
|
||||||
else
|
else
|
||||||
notify[i].checked = false;
|
notify[i].checked = false;
|
||||||
prefCounter++;
|
prefCounter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
savePrefsWindow : function() {
|
savePrefsWindow : function() {
|
||||||
// save notification settings
|
// save notification settings
|
||||||
var notify = $('qa-prefs-notify').childNodes;
|
var notify = $('qa-prefs-notify').childNodes;
|
||||||
var prefs = '';
|
var prefs = '';
|
||||||
for (var i=0; i<notify.length; i++) {
|
for (var i=0; i<notify.length; i++) {
|
||||||
if (notify[i].setChecked != null && (notify[i].checked == true
|
if (notify[i].setChecked != null && (notify[i].checked == true
|
||||||
|| notify[i].checked == false)) { // it's a checkbox
|
|| notify[i].checked == false)) { // it's a checkbox
|
||||||
if (notify[i].checked == false)
|
if (notify[i].checked == false)
|
||||||
prefs += '0,';
|
prefs += '0,';
|
||||||
else
|
else
|
||||||
prefs += '1,';
|
prefs += '1,';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
prefs = prefs.substring(0, prefs.length-1); // remove the trailing comma
|
prefs = prefs.substring(0, prefs.length-1); // remove the trailing comma
|
||||||
qaPref.setPref(qaPref.prefBase+'.notificationSettings', prefs, 'char');
|
qaPref.setPref(qaPref.prefBase+'.notificationSettings', prefs, 'char');
|
||||||
|
|
||||||
// save litmus account settings
|
// save litmus account settings
|
||||||
var uname = document.getElementById('qa-preferences-litmus-username').value;
|
var uname = document.getElementById('qa-preferences-litmus-username').value;
|
||||||
var passwd = document.getElementById('qa-preferences-litmus-password').value;
|
var passwd = document.getElementById('qa-preferences-litmus-password').value;
|
||||||
|
|
||||||
// if uname and passwd are unchanged, we're done:
|
// if uname and passwd are unchanged, we're done:
|
||||||
if (uname == qaPref.litmus.getUsername() &&
|
if (uname == qaPref.litmus.getUsername() &&
|
||||||
passwd == qaPref.litmus.getPassword())
|
passwd == qaPref.litmus.getPassword())
|
||||||
return;
|
return;
|
||||||
var callback = function(resp) {
|
var callback = function(resp) {
|
||||||
if (resp.responseText == 0) {
|
if (resp.responseText == 0) {
|
||||||
alert(document.getElementById("bundle_qa").
|
alert(document.getElementById("bundle_qa").
|
||||||
getString("qa.extension.prefs.loginError"));
|
getString("qa.extension.prefs.loginError"));
|
||||||
// snap the tab selection back to prefs:
|
// snap the tab selection back to prefs:
|
||||||
$('qa_tabrow').selectedItem = $('qa-tabbar-prefs');
|
$('qa_tabrow').selectedItem = $('qa-tabbar-prefs');
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
qaPref.litmus.setPassword(uname, passwd);
|
qaPref.litmus.setPassword(uname, passwd);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
litmus.validateLogin(uname, passwd, callback);
|
litmus.validateLogin(uname, passwd, callback);
|
||||||
return false; // not ready to close yet
|
return false; // not ready to close yet
|
||||||
},
|
},
|
||||||
loadUsernameAndPassword : function() {
|
loadUsernameAndPassword : function() {
|
||||||
var uname = document.getElementById('qa-preferences-litmus-username');
|
var uname = document.getElementById('qa-preferences-litmus-username');
|
||||||
var passwd = document.getElementById('qa-preferences-litmus-password');
|
var passwd = document.getElementById('qa-preferences-litmus-password');
|
||||||
|
|
||||||
uname.value = qaPref.litmus.getUsername();
|
uname.value = qaPref.litmus.getUsername();
|
||||||
passwd.value = qaPref.litmus.getPassword();
|
passwd.value = qaPref.litmus.getPassword();
|
||||||
},
|
},
|
||||||
createAccount : function() {
|
createAccount : function() {
|
||||||
window.openDialog("chrome://qa/content/accountcreate.xul", "_blank", "chrome,all,dialog=yes", qaPrefsWindow.loadUsernameAndPassword);
|
window.openDialog("chrome://qa/content/accountcreate.xul",
|
||||||
},
|
"_blank",
|
||||||
|
"chrome,all,dialog=yes",
|
||||||
|
qaPrefsWindow.loadUsernameAndPassword);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
var qaSetup = {
|
var qaSetup = {
|
||||||
didSubmitForm : 0,
|
didSubmitForm : 0,
|
||||||
|
|
||||||
hideAccountSettings : function() {
|
hideAccountSettings : function() {
|
||||||
var accountyes = document.getElementById('qa-setup-accountyes');
|
var accountyes = document.getElementById('qa-setup-accountyes');
|
||||||
var accountno = document.getElementById('qa-setup-accountno');
|
var accountno = document.getElementById('qa-setup-accountno');
|
||||||
accountyes.style.display = 'none';
|
accountyes.style.display = 'none';
|
||||||
accountno.style.display = 'none';
|
accountno.style.display = 'none';
|
||||||
},
|
},
|
||||||
loadAccountSettings : function() {
|
loadAccountSettings : function() {
|
||||||
var uname = document.getElementById('username');
|
var uname = document.getElementById('username');
|
||||||
var passwd = document.getElementById('password');
|
var passwd = document.getElementById('password');
|
||||||
uname.value = qaPref.litmus.getUsername() || '';
|
uname.value = qaPref.litmus.getUsername() || '';
|
||||||
passwd.value = qaPref.litmus.getPassword() || '';
|
passwd.value = qaPref.litmus.getPassword() || '';
|
||||||
if (qaPref.litmus.getUsername()) {
|
if (qaPref.litmus.getUsername()) {
|
||||||
document.getElementById("qa-setup-account-haveaccount").selectedIndex=1;
|
document.getElementById("qa-setup-account-haveaccount").selectedIndex=1;
|
||||||
document.getElementById('qa-setup-accountyes').style.display = '';
|
document.getElementById('qa-setup-accountyes').style.display = '';
|
||||||
}
|
}
|
||||||
document.getElementById('qa-setup-createaccount-iframe').src =
|
document.getElementById('qa-setup-createaccount-iframe').src =
|
||||||
litmus.baseURL+'extension.cgi?createAccount=1';
|
litmus.baseURL+'extension.cgi?createAccount=1';
|
||||||
},
|
},
|
||||||
|
|
||||||
accountSetting : function(yesno) {
|
accountSetting : function(yesno) {
|
||||||
var accountyes = document.getElementById('qa-setup-accountyes');
|
var accountyes = document.getElementById('qa-setup-accountyes');
|
||||||
var accountno = document.getElementById('qa-setup-accountno');
|
var accountno = document.getElementById('qa-setup-accountno');
|
||||||
qaSetup.hideAccountSettings();
|
qaSetup.hideAccountSettings();
|
||||||
if (yesno == '0') {
|
if (yesno == '0') {
|
||||||
accountno.style.display = '';
|
accountno.style.display = '';
|
||||||
} else {
|
} else {
|
||||||
accountyes.style.display = '';
|
accountyes.style.display = '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
validateAccount : function() {
|
retrieveAccount : function(frameid, loadingid) {
|
||||||
if (document.getElementById('qa-setup-accountno').style.display == '') {
|
var page = document.getElementById(frameid).contentDocument;
|
||||||
// we're creating a new account, so get the uname and passwd
|
if (!page) {
|
||||||
// from the account created page:
|
alert("create account page is missing");
|
||||||
var page = document.getElementById('qa-setup-createaccount-iframe').
|
return false;
|
||||||
contentDocument;
|
}
|
||||||
if (!page) {
|
if (page.wrappedJSObject == null)
|
||||||
alert("create account page is missing");
|
page.wrappedJSObject = page;
|
||||||
return false;
|
if (page.forms[0] && page.forms[0].wrappedJSObject == null)
|
||||||
}
|
page.forms[0].wrappedJSObject = page.forms[0];
|
||||||
if (page.wrappedJSObject == null)
|
|
||||||
page.wrappedJSObject = page;
|
if (loadingid && page.location == litmus.baseURL+'extension.cgi?createAccount=1'
|
||||||
if (page.forms[0] && page.forms[0].wrappedJSObject == null)
|
&& qaSetup.didSubmitForm==0) {
|
||||||
page.forms[0].wrappedJSObject = page.forms[0];
|
document.getElementById('loadingid').value =
|
||||||
|
document.getElementById("bundle_qa").getString("qa.extension.prefs.loadingMsg");
|
||||||
if (page.location == litmus.baseURL+'extension.cgi?createAccount=1'
|
page.forms[0].wrappedJSObject.submit();
|
||||||
&& qaSetup.didSubmitForm==0) {
|
qaSetup.didSubmitForm = 1;
|
||||||
document.getElementById('qa-setup-accountconfirmloading').value =
|
setTimeout("qaSetup.validateAccount()", 5000);
|
||||||
document.getElementById("bundle_qa").getString("qa.extension.prefs.loadingMsg");
|
return false;
|
||||||
page.forms[0].wrappedJSObject.submit();
|
}
|
||||||
qaSetup.didSubmitForm = 1;
|
if (qaSetup.didSubmitForm == 1 && ! page.forms ||
|
||||||
setTimeout("qaSetup.validateAccount()", 5000);
|
! page.forms[0].wrappedJSObject ||
|
||||||
return false;
|
! page.forms[0].wrappedJSObject.email &&
|
||||||
}
|
! page.forms[0].wrappedJSObject.email.value)
|
||||||
if (qaSetup.didSubmitForm == 1 && ! page.forms ||
|
{qaSetup.didSubmitForm = 2;
|
||||||
! page.forms[0].wrappedJSObject ||
|
setTimeout("qaSetup.validateAccount()", 4000);
|
||||||
! page.forms[0].wrappedJSObject.email &&
|
return false;}
|
||||||
! page.forms[0].wrappedJSObject.email.value)
|
var e = '';
|
||||||
{qaSetup.didSubmitForm = 2;
|
var p = '';
|
||||||
setTimeout("qaSetup.validateAccount()", 4000);
|
if (page.forms && page.forms[0].wrappedJSObject &&
|
||||||
return false;}
|
page.forms[0].wrappedJSObject.email &&
|
||||||
var e = '';
|
page.forms[0].wrappedJSObject.email.value)
|
||||||
var p = '';
|
{ e=page.forms[0].wrappedJSObject.email.value }
|
||||||
if (page.forms && page.forms[0].wrappedJSObject &&
|
if (page.forms && page.forms[0].wrappedJSObject &&
|
||||||
page.forms[0].wrappedJSObject.email &&
|
page.forms[0].wrappedJSObject.password &&
|
||||||
page.forms[0].wrappedJSObject.email.value)
|
page.forms[0].wrappedJSObject.password.value)
|
||||||
{ e=page.forms[0].wrappedJSObject.email.value }
|
{ p=page.forms[0].wrappedJSObject.password.value }
|
||||||
if (page.forms && page.forms[0].wrappedJSObject &&
|
|
||||||
page.forms[0].wrappedJSObject.password &&
|
return { name : e, password : p};
|
||||||
page.forms[0].wrappedJSObject.password.value)
|
},
|
||||||
{ p=page.forms[0].wrappedJSObject.password.value }
|
validateAccount : function() {
|
||||||
document.getElementById('username').value = e;
|
if (document.getElementById('qa-setup-accountno').style.display == '') {
|
||||||
document.getElementById('password').value = p;
|
var account = qaSetup.retrieveAccount("qa-setup-createaccount-iframe", "qa-setup-accountconfirmloading");
|
||||||
}
|
document.getElementById('username').value = account.name;
|
||||||
|
document.getElementById('password').value = account.password;
|
||||||
document.getElementById('qa-setup-accountconfirmloading').value =
|
}
|
||||||
document.getElementById("bundle_qa").getString("qa.extension.prefs.loadingMsg");
|
|
||||||
|
document.getElementById('qa-setup-accountconfirmloading').value =
|
||||||
var uname = document.getElementById('username').value;
|
document.getElementById("bundle_qa").getString("qa.extension.prefs.loadingMsg");
|
||||||
var passwd = document.getElementById('password').value;
|
|
||||||
|
var uname = document.getElementById('username').value;
|
||||||
var callback = function(resp) {
|
var passwd = document.getElementById('password').value;
|
||||||
if (resp.responseText != 1) { // failure
|
|
||||||
alert(document.getElementById("bundle_qa").
|
var callback = function(resp) {
|
||||||
getString("qa.extension.prefs.loginError"));
|
if (resp.responseText != 1) { // failure
|
||||||
document.getElementById('qa-setup-accountconfirmloading').value = null;
|
alert(document.getElementById("bundle_qa").
|
||||||
return false;
|
getString("qa.extension.prefs.loginError"));
|
||||||
} else { // all's well
|
document.getElementById('qa-setup-accountconfirmloading').value = null;
|
||||||
qaPref.litmus.setPassword(uname, passwd);
|
return false;
|
||||||
document.getElementById('qa-setup-accountconfirmloading').value = null;
|
} else { // all's well
|
||||||
document.getElementById('qa-setup').pageIndex++; // advance
|
qaPref.litmus.setPassword(uname, passwd);
|
||||||
return true;
|
document.getElementById('qa-setup-accountconfirmloading').value = null;
|
||||||
}
|
document.getElementById('qa-setup').pageIndex++; // advance
|
||||||
}
|
return true;
|
||||||
litmus.validateLogin(uname, passwd, callback);
|
}
|
||||||
return false; // not ready to advance yet
|
}
|
||||||
},
|
litmus.validateLogin(uname, passwd, callback);
|
||||||
|
return false; // not ready to advance yet
|
||||||
loadSysconfig : function() {
|
},
|
||||||
$('qa-setup-sysconfig-loading').value =
|
|
||||||
$("bundle_qa").getString("qa.extension.sysconfig.loadingMsg");
|
loadSysconfig : function() {
|
||||||
|
$('qa-setup-sysconfig-loading').value =
|
||||||
var guessInfo = function() {
|
$("bundle_qa").getString("qa.extension.sysconfig.loadingMsg");
|
||||||
var sysconfig;
|
|
||||||
try {
|
var guessInfo = function() {
|
||||||
sysconfig = new Sysconfig();
|
var sysconfig;
|
||||||
} catch (ex) {}
|
try {
|
||||||
var platItems = $('qa-setup-platform').menupopup.childNodes;
|
sysconfig = new Sysconfig();
|
||||||
for (var i=0; i<platItems.length; i++) {
|
} catch (ex) {}
|
||||||
if (sysconfig.platform && platItems[i].label == sysconfig.platform)
|
var platItems = $('qa-setup-platform').menupopup.childNodes;
|
||||||
$('qa-setup-platform').selectedIndex = i;
|
for (var i=0; i<platItems.length; i++) {
|
||||||
}
|
if (sysconfig.platform && platItems[i].label == sysconfig.platform)
|
||||||
var opsysItems = $('qa-setup-opsys').menupopup.childNodes;
|
$('qa-setup-platform').selectedIndex = i;
|
||||||
for (var i=0; i<opsysItems.length; i++) {
|
}
|
||||||
if (sysconfig.opsys && opsysItems[i].label == sysconfig.opsys)
|
var opsysItems = $('qa-setup-opsys').menupopup.childNodes;
|
||||||
$('qa-setup-opsys').selectedIndex = i;
|
for (var i=0; i<opsysItems.length; i++) {
|
||||||
}
|
if (sysconfig.opsys && opsysItems[i].label == sysconfig.opsys)
|
||||||
$('qa-setup-sysconfig-loading').value = '';
|
$('qa-setup-opsys').selectedIndex = i;
|
||||||
};
|
}
|
||||||
|
$('qa-setup-sysconfig-loading').value = '';
|
||||||
qaTools.loadJsonMenu(litmus.baseURL+"/json.cgi?platforms=1",
|
};
|
||||||
$('qa-setup-platform'), 'name', 'name');
|
|
||||||
qaTools.loadJsonMenu(litmus.baseURL+"/json.cgi?opsyses=1",
|
qaTools.loadJsonMenu(litmus.baseURL+"/json.cgi?platforms=1",
|
||||||
$('qa-setup-opsys'), 'name', 'name', guessInfo);
|
$('qa-setup-platform'), 'name', 'name');
|
||||||
},
|
qaTools.loadJsonMenu(litmus.baseURL+"/json.cgi?opsyses=1",
|
||||||
|
$('qa-setup-opsys'), 'name', 'name', guessInfo);
|
||||||
validateSysconfig : function() {
|
},
|
||||||
var sysconfig;
|
|
||||||
try {
|
validateSysconfig : function() {
|
||||||
sysconfig = new Sysconfig();
|
var sysconfig;
|
||||||
} catch (ex) {}
|
try {
|
||||||
|
sysconfig = new Sysconfig();
|
||||||
// only set prefs for things which differ from the automatically
|
} catch (ex) {}
|
||||||
// detected sysconfig for forward-compatibility
|
|
||||||
if (! sysconfig.platform == $('qa-setup-platform').selectedItem.label) {
|
// only set prefs for things which differ from the automatically
|
||||||
qaPref.setPref(qaPref.prefBase+'.sysconfig.platform',
|
// detected sysconfig for forward-compatibility
|
||||||
$('qa-setup-platform').selectedItem.label, 'char');
|
if (! sysconfig.platform == $('qa-setup-platform').selectedItem.label) {
|
||||||
}
|
qaPref.setPref(qaPref.prefBase+'.sysconfig.platform',
|
||||||
if (! sysconfig.opsys == $('qa-setup-opsys').selectedItem.label) {
|
$('qa-setup-platform').selectedItem.label, 'char');
|
||||||
qaPref.setPref(qaPref.prefBase+'.sysconfig.opsys',
|
}
|
||||||
$('qa-setup-opsys').selectedItem.label, 'char');
|
if (! sysconfig.opsys == $('qa-setup-opsys').selectedItem.label) {
|
||||||
}
|
qaPref.setPref(qaPref.prefBase+'.sysconfig.opsys',
|
||||||
return true;
|
$('qa-setup-opsys').selectedItem.label, 'char');
|
||||||
},
|
}
|
||||||
|
return true;
|
||||||
finish : function() {
|
},
|
||||||
qaPref.setPref(qaPref.prefBase+'.isFirstTime', false, 'bool');
|
|
||||||
},
|
finish : function() {
|
||||||
|
qaPref.setPref(qaPref.prefBase+'.isFirstTime', false, 'bool');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,39 +1,39 @@
|
||||||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
- ***** BEGIN LICENSE BLOCK *****
|
||||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
#
|
-
|
||||||
# The contents of this file are subject to the Mozilla Public License Version
|
- The contents of this file are subject to the Mozilla Public License Version
|
||||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
- 1.1 (the "License"); you may not use this file except in compliance with
|
||||||
# the License. You may obtain a copy of the License at
|
- the License. You may obtain a copy of the License at
|
||||||
# http://www.mozilla.org/MPL/
|
- http://www.mozilla.org/MPL/
|
||||||
#
|
-
|
||||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
- Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
# for the specific language governing rights and limitations under the
|
- for the specific language governing rights and limitations under the
|
||||||
# License.
|
- License.
|
||||||
#
|
-
|
||||||
# The Original Code is the Mozilla Community QA Extension
|
- The Original Code is the Mozilla Community QA Extension
|
||||||
#
|
-
|
||||||
# The Initial Developer of the Original Code is Zach Lipton.
|
- The Initial Developer of the Original Code is the Mozilla Corporation.
|
||||||
# Portions created by the Initial Developer are Copyright (C) 2006
|
- Portions created by the Initial Developer are Copyright (C) 2007
|
||||||
# the Initial Developer. All Rights Reserved.
|
- the Initial Developer. All Rights Reserved.
|
||||||
#
|
-
|
||||||
# Contributor(s):
|
- Contributor(s):
|
||||||
# Zach Lipton <zach@zachlipton.com>
|
- Zach Lipton <zach@zachlipton.com>
|
||||||
#
|
-
|
||||||
# Alternatively, the contents of this file may be used under the terms of
|
- 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
|
- either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
- in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
# of those above. If you wish to allow use of your version of this file only
|
- of those above. If you wish to allow use of your version of this file only
|
||||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
- under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
# use your version of this file under the terms of the MPL, indicate your
|
- use your version of this file under the terms of the MPL, indicate your
|
||||||
# decision by deleting the provisions above and replace them with the notice
|
- decision by deleting the provisions above and replace them with the notice
|
||||||
# and other provisions required by the LGPL or the GPL. If you do not delete
|
- and other provisions required by the LGPL or the GPL. If you do not delete
|
||||||
# the provisions above, a recipient may use your version of this file under
|
- the provisions above, a recipient may use your version of this file under
|
||||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
#
|
-
|
||||||
# ***** END LICENSE BLOCK ***** -->
|
- ***** END LICENSE BLOCK ***** -->
|
||||||
|
|
||||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||||
<?xml-stylesheet href="chrome://qa/skin/" type="text/css"?>
|
<?xml-stylesheet href="chrome://qa/skin/" type="text/css"?>
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
width="850"
|
width="850"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
xmlns:html="http://www.w3.org/1999/xhtml">
|
xmlns:html="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
<stringbundleset id="stringbundleset">
|
<stringbundleset id="stringbundleset">
|
||||||
<stringbundle id="bundle_qa" src="chrome://qa/locale/qa.properties" />
|
<stringbundle id="bundle_qa" src="chrome://qa/locale/qa.properties" />
|
||||||
</stringbundleset>
|
</stringbundleset>
|
||||||
|
@ -79,22 +79,22 @@
|
||||||
<radio value="1" label="&qa.setup.accountyes;" onclick="qaSetup.accountSetting('1');"/>
|
<radio value="1" label="&qa.setup.accountyes;" onclick="qaSetup.accountSetting('1');"/>
|
||||||
</radiogroup>
|
</radiogroup>
|
||||||
<spacer height="20px" />
|
<spacer height="20px" />
|
||||||
|
|
||||||
<vbox id="qa-setup-accountyes" style="display: none;">
|
<vbox id="qa-setup-accountyes" style="display: none;">
|
||||||
<label value="&qa.setup.accountyes.enterinfo;"/>
|
<label value="&qa.setup.accountyes.enterinfo;"/>
|
||||||
<groupbox>
|
<groupbox>
|
||||||
<hbox>
|
<hbox>
|
||||||
<vbox>
|
<vbox>
|
||||||
<label control="username" value="&qa.preferences.litmus.username;"/>
|
<label control="username" value="&qa.preferences.litmus.username;"/>
|
||||||
<textbox id="username" size="35"/>
|
<textbox id="username" size="35"/>
|
||||||
<label control="password" value="&qa.preferences.litmus.password;"/>
|
<label control="password" value="&qa.preferences.litmus.password;"/>
|
||||||
<textbox id="password" type="password" size="35"/>
|
<textbox id="password" type="password" size="35"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
</hbox>
|
</hbox>
|
||||||
</groupbox>
|
</groupbox>
|
||||||
<label id="qa-setup-accountconfirmloading"/>
|
<label id="qa-setup-accountconfirmloading"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
|
|
||||||
<vbox id="qa-setup-accountno" style="display: none;">
|
<vbox id="qa-setup-accountno" style="display: none;">
|
||||||
<description>&qa.setup.accountno.text;</description>
|
<description>&qa.setup.accountno.text;</description>
|
||||||
<html:iframe id="qa-setup-createaccount-iframe"
|
<html:iframe id="qa-setup-createaccount-iframe"
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
</vbox>
|
</vbox>
|
||||||
</wizardpage>
|
</wizardpage>
|
||||||
|
|
||||||
<wizardpage pageid="sysconfig" onpageshow="qaSetup.loadSysconfig();"
|
<wizardpage pageid="sysconfig" onpageshow="qaSetup.loadSysconfig();"
|
||||||
label="&qa.setup.sysconfig.header;"
|
label="&qa.setup.sysconfig.header;"
|
||||||
onpageadvanced="return qaSetup.validateSysconfig();">
|
onpageadvanced="return qaSetup.validateSysconfig();">
|
||||||
<vbox>
|
<vbox>
|
||||||
|
@ -132,4 +132,4 @@
|
||||||
<description>&qa.setup.accountdone;</description>
|
<description>&qa.setup.accountdone;</description>
|
||||||
</wizardpage>
|
</wizardpage>
|
||||||
|
|
||||||
</wizard>
|
</wizard>
|
||||||
|
|
|
@ -0,0 +1,325 @@
|
||||||
|
/* ***** BEGIN LICENSE BLOCK *****
|
||||||
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
|
*
|
||||||
|
* The contents of this file are subject to the Mozilla Public License Version
|
||||||
|
* 1.1 (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.mozilla.org/MPL/
|
||||||
|
*
|
||||||
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
|
* for the specific language governing rights and limitations under the
|
||||||
|
* License.
|
||||||
|
*
|
||||||
|
* The Original Code is the buggybar extension.
|
||||||
|
*
|
||||||
|
* The Initial Developer of the Original Code is
|
||||||
|
* David Hamp-Gonsalves
|
||||||
|
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||||
|
* the Initial Developer. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Contributor(s):
|
||||||
|
*
|
||||||
|
* David Hamp-Gonsalves
|
||||||
|
* Ben Hsieh <ben.hsieh@gmail.com> (modified for the QA Community Extension)
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
|
* of those above. If you wish to allow use of your version of this file only
|
||||||
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
|
* use your version of this file under the terms of the MPL, indicate your
|
||||||
|
* decision by deleting the provisions above and replace them with the notice
|
||||||
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
|
* the provisions above, a recipient may use your version of this file under
|
||||||
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
|
*
|
||||||
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
|
|
||||||
|
//bugAccess Class
|
||||||
|
//used to comunicate with the bugzilla server, this will eventually be
|
||||||
|
//an interface so the webservices version can be pluged in here if the
|
||||||
|
//bugzilla instance supports it. Right now the http/xml version is used
|
||||||
|
|
||||||
|
|
||||||
|
function bugAccess()
|
||||||
|
{
|
||||||
|
var onloadBugList;
|
||||||
|
var onloadBugSpecs;
|
||||||
|
var onloadBugSearch;
|
||||||
|
var onloadBugSave;
|
||||||
|
var onloadLogin;
|
||||||
|
|
||||||
|
|
||||||
|
this.getBugSpecs = function(inputId,inUrl,onloadFunc)
|
||||||
|
{
|
||||||
|
if(onloadFunc!=undefined)
|
||||||
|
{
|
||||||
|
onloadBugSpecs = onloadFunc;
|
||||||
|
}else
|
||||||
|
alert("ERROR: getBugList called without function parameter");
|
||||||
|
var url = inUrl+"show_bug.cgi?ctype=xml&id=";
|
||||||
|
//get bug id and create URL
|
||||||
|
url += inputId;
|
||||||
|
|
||||||
|
//TODO: need pop alert if connect can't be made(onerror)
|
||||||
|
var xmlHttp=new XMLHttpRequest();
|
||||||
|
xmlHttp.open("GET", url, true);
|
||||||
|
|
||||||
|
|
||||||
|
var req=new XMLHttpRequest();
|
||||||
|
req.open("GET", url, true);
|
||||||
|
var callback = this.parseBugSpecs;
|
||||||
|
req.onreadystatechange = function (aEvt) {
|
||||||
|
if (req.readyState == 4) {
|
||||||
|
if(req.status == 200) {
|
||||||
|
// alert(req.responseXML);
|
||||||
|
callback(req);
|
||||||
|
}else
|
||||||
|
alert("Error loading page\n");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
req.send(null);
|
||||||
|
|
||||||
|
|
||||||
|
// leave true for Gecko
|
||||||
|
xmlHttp.send(null);
|
||||||
|
|
||||||
|
//xmlHttp.onload=this.parseBugSpecs;
|
||||||
|
}
|
||||||
|
//parse individual bug page
|
||||||
|
this.parseBugSpecs = function(e)
|
||||||
|
{
|
||||||
|
var bugInfo = new Object();
|
||||||
|
//var xml = e.target.responseXML;
|
||||||
|
var xml = e.responseXML;
|
||||||
|
// alert(xml);
|
||||||
|
|
||||||
|
if(xml.getElementsByTagName("bug")[0].getAttribute("error")!=null)
|
||||||
|
{
|
||||||
|
alert("The requested bug was: "+ xml.getElementsByTagName("bug")[0].getAttribute("error"));
|
||||||
|
bugInfo["id"] = "";
|
||||||
|
bugInfo["title"] = "";
|
||||||
|
bugInfo["status"] = "";
|
||||||
|
bugInfo["info"] = "";
|
||||||
|
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
bugInfo["id"] = xml.getElementsByTagName("bug_id")[0].firstChild.data;
|
||||||
|
bugInfo["title"] = xml.getElementsByTagName("short_desc")[0].firstChild.data;
|
||||||
|
bugInfo["status"] = xml.getElementsByTagName("bug_status")[0].firstChild.data
|
||||||
|
if (xml.getElementsByTagName("resolution").length)
|
||||||
|
bugInfo["status"] += "--" + xml.getElementsByTagName("resolution")[0].firstChild.data;
|
||||||
|
bugInfo["info"] = xml.getElementsByTagName("short_desc")[0].firstChild.data + "\n\n"
|
||||||
|
+ xml.getElementsByTagName("thetext")[0].firstChild.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
onloadBugSpecs(bugInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setBugListOnloadFunc = function(onloadFunc){onloadBugList = onloadFunc;}
|
||||||
|
|
||||||
|
this.setBugSearchOnloadFunc = function(onloadFunc){onloadBugSearch = onloadFunc;}
|
||||||
|
|
||||||
|
// get list of bugs html page
|
||||||
|
this.getBugList = function(inURL, params, mode)
|
||||||
|
{
|
||||||
|
var xmlHttp=new XMLHttpRequest();
|
||||||
|
xmlHttp.open("GET", inURL+"/buglist.cgi?"+params, true);
|
||||||
|
|
||||||
|
dump("searching: " + inURL+"/buglist.cgi?"+params);
|
||||||
|
// leave true for Gecko
|
||||||
|
xmlHttp.send(null);
|
||||||
|
if(mode == 1)//list mode
|
||||||
|
xmlHttp.onload=this.parseBugList;
|
||||||
|
else if(mode == 0)//search mode
|
||||||
|
xmlHttp.onload=this.parseBugSearch;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.parseBugList = function(e)
|
||||||
|
{
|
||||||
|
var bugData = parseList(e.target.responseText);
|
||||||
|
onloadBugList(bugData);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.parseBugSearch = function(e)
|
||||||
|
{
|
||||||
|
var bugData = parseList(e.target.responseText);
|
||||||
|
onloadBugSearch(bugData);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.writeBugToBugzilla = function(inUrl,bugSpec,fn)
|
||||||
|
{
|
||||||
|
onloadBugSave=fn;
|
||||||
|
|
||||||
|
var names = new Array(bugSpecs.getFieldTotal());
|
||||||
|
names[0]="id";
|
||||||
|
names[1]="product";
|
||||||
|
names[2]="component";
|
||||||
|
names[3]="status";
|
||||||
|
names[4]="resolution";
|
||||||
|
names[5]="assigned_to";
|
||||||
|
names[6]="rep_platform";
|
||||||
|
names[7]="op_sys";
|
||||||
|
names[8]="version";
|
||||||
|
names[9]="priority";
|
||||||
|
names[10]="bug_severity";
|
||||||
|
names[11]="target_milestone";
|
||||||
|
names[12]="reporter";
|
||||||
|
names[13]="qa_contact";
|
||||||
|
names[14]="bug_file_loc";
|
||||||
|
names[15]="short_desc";
|
||||||
|
|
||||||
|
var fieldCount = bugSpecs.getFieldTotal();
|
||||||
|
var varString="";
|
||||||
|
|
||||||
|
for(i=0;i<fieldCount-1;i++)
|
||||||
|
{
|
||||||
|
if(names[i]!="reporter")
|
||||||
|
varString+=names[i]+"="+bugSpec.getSpec(i)+"&";
|
||||||
|
}
|
||||||
|
|
||||||
|
varString+="longdesclength=&knob="+bugSpec.getKnob();
|
||||||
|
|
||||||
|
|
||||||
|
var xmlHttp=new XMLHttpRequest();
|
||||||
|
|
||||||
|
xmlHttp.open("POST", inUrl+"/process_bug.cgi",true);
|
||||||
|
|
||||||
|
xmlHttp.setRequestHeader("Method", "POST "+inUrl+"/process_bug.cgi"+" HTTP/1.1");
|
||||||
|
xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
|
||||||
|
|
||||||
|
|
||||||
|
xmlHttp.send(varString);
|
||||||
|
//xmlHttp.onreadystatechange = this.writeBugToBugzillaStatus;
|
||||||
|
xmlHttp.onload = this.writeBugToBugzillaReturnStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.writeBugToBugzillaReturnStatus = function(e)
|
||||||
|
{
|
||||||
|
if (e.target.readyState == 4)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (e.target.status == 200)
|
||||||
|
{
|
||||||
|
var start;//will hold first pos of error search string from responce text if its an error page
|
||||||
|
//window._content.document.write("<b> the responce status is: </b>"+self.xmlHttp.status+"<br/>");
|
||||||
|
if(e.target.responseText.indexOf('name="Bugzilla_login">')!=-1)
|
||||||
|
{
|
||||||
|
//login page returned which means user isn't logged in
|
||||||
|
alert("Your not logged in to this instance of bugzilla");
|
||||||
|
}else if(e.target.responseText.indexOf('Bug processed')!=-1)
|
||||||
|
{
|
||||||
|
var success = "Changes Made";
|
||||||
|
|
||||||
|
alert(success);
|
||||||
|
}else if((start = e.target.responseText.indexOf('<td bgcolor="#ff0000">'))!=-1)
|
||||||
|
{
|
||||||
|
//error was recieved
|
||||||
|
var error = "Error: "+e.target.responseText.substring(start,e.target.responseText.indexOf('</td>'));
|
||||||
|
error = error.replace(/\n|\t|/g,"");
|
||||||
|
error = error.replace(/<[^>]+>/g,"");
|
||||||
|
error = getCleanText(error);
|
||||||
|
alert(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
alert("Connection failed! possible network error");
|
||||||
|
}
|
||||||
|
|
||||||
|
onloadBugSave();
|
||||||
|
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
//at one of the load phases before 4
|
||||||
|
alert("load phase: "+e.target.readyState);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.loginToBugzilla = function(inUrl, user, passwd, fn)
|
||||||
|
{
|
||||||
|
onloadLogin = fn;
|
||||||
|
|
||||||
|
var varString = "&Bugzilla_login="+user+"&Bugzilla_password="+passwd;
|
||||||
|
|
||||||
|
var xmlHttp=new XMLHttpRequest();
|
||||||
|
|
||||||
|
xmlHttp.open("POST", inUrl+"/index.cgi?GoAheadAndLogIn=1",true);
|
||||||
|
|
||||||
|
xmlHttp.setRequestHeader("Method", "POST "+inUrl+"/index.cgi"+" HTTP/1.1");
|
||||||
|
xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
|
||||||
|
|
||||||
|
xmlHttp.send(varString);
|
||||||
|
xmlHttp.onload = this.loginToBugzillaStatus;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.loginToBugzillaStatus = function(e)
|
||||||
|
{
|
||||||
|
//1 - success, -1 - failure, 0 - error unknown state
|
||||||
|
var rc=0;
|
||||||
|
|
||||||
|
var start;//will hold first pos of error search string from responce text if its an error page
|
||||||
|
if(e.target.responseText.indexOf('href="relogin.cgi"')!=-1)//success
|
||||||
|
{
|
||||||
|
//success
|
||||||
|
rc=1;
|
||||||
|
alert("Login successful");
|
||||||
|
|
||||||
|
}else if(e.target.responseText.toLowerCase().indexOf('invalid username or password')!=-1)//failure
|
||||||
|
{
|
||||||
|
rc=-1;
|
||||||
|
alert("Bugzilla reported that your user name or password was invalid please verify");
|
||||||
|
}
|
||||||
|
|
||||||
|
onloadLogin(rc);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//Kludge: couldn't find this fn when inside bugAccess for some reason ahould be moved to bug access class
|
||||||
|
//parse list of bugs html page and return array with ids and descriptions
|
||||||
|
function parseList(xmlHttp)
|
||||||
|
{
|
||||||
|
var beginLoc=0;
|
||||||
|
var endLoc=0;
|
||||||
|
var id;
|
||||||
|
var summary;
|
||||||
|
|
||||||
|
bugData=new Array();
|
||||||
|
//dump(xmlHttp);
|
||||||
|
for(var i = 0;(beginLoc = xmlHttp.indexOf('show_bug.cgi?id',endLoc)) != -1; i++)
|
||||||
|
{
|
||||||
|
endLoc = xmlHttp.indexOf('"',beginLoc);
|
||||||
|
beginLoc = xmlHttp.indexOf('=',beginLoc);
|
||||||
|
|
||||||
|
id=xmlHttp.substring(beginLoc+1, endLoc);
|
||||||
|
|
||||||
|
|
||||||
|
//move past other entries to get to summary
|
||||||
|
var curLoc=endLoc;
|
||||||
|
|
||||||
|
endLoc = xmlHttp.indexOf('</tr>',endLoc);
|
||||||
|
endLoc = xmlHttp.lastIndexOf('</td>',endLoc);
|
||||||
|
beginLoc = xmlHttp.lastIndexOf("<td >",endLoc);
|
||||||
|
if(beginLoc==-1)
|
||||||
|
{
|
||||||
|
beginLoc = xmlHttp.lastIndexOf("<td>",endLoc);//other option
|
||||||
|
}
|
||||||
|
|
||||||
|
summary = xmlHttp.substring(beginLoc, endLoc);
|
||||||
|
|
||||||
|
summary = getCleanText(summary);
|
||||||
|
bugData[i] = new Array(2);
|
||||||
|
bugData[i][0] = id;
|
||||||
|
bugData[i][1] = summary;
|
||||||
|
//alert("loop:" + i);
|
||||||
|
}
|
||||||
|
//alert("end loop:" + bugData, bugData.length);
|
||||||
|
return bugData;
|
||||||
|
}
|
|
@ -0,0 +1,205 @@
|
||||||
|
/* ***** BEGIN LICENSE BLOCK *****
|
||||||
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
|
*
|
||||||
|
* The contents of this file are subject to the Mozilla Public License Version
|
||||||
|
* 1.1 (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.mozilla.org/MPL/
|
||||||
|
*
|
||||||
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
|
* for the specific language governing rights and limitations under the
|
||||||
|
* License.
|
||||||
|
*
|
||||||
|
* The Original Code is the Mozilla Community QA Extension
|
||||||
|
*
|
||||||
|
* The Initial Developer of the Original Code is the Mozilla Corporation.
|
||||||
|
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||||
|
* the Initial Developer. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Contributor(s):
|
||||||
|
* Ben Hsieh <ben.hsieh@gmail.com>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
|
* of those above. If you wish to allow use of your version of this file only
|
||||||
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
|
* use your version of this file under the terms of the MPL, indicate your
|
||||||
|
* decision by deleting the provisions above and replace them with the notice
|
||||||
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
|
* the provisions above, a recipient may use your version of this file under
|
||||||
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
|
*
|
||||||
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
|
var bugzilla = {
|
||||||
|
trunkVersion : "3.0",
|
||||||
|
baseURL : qaPref.getPref(qaPref.prefBase+".bugzilla.url", "char"),
|
||||||
|
sysconfig: null,
|
||||||
|
bugReader : null,
|
||||||
|
doSearch : function() {
|
||||||
|
|
||||||
|
var words = $("qa-bugzilla-input-keywords").value;
|
||||||
|
var bugId = $("qa-bugzilla-input-id").value;
|
||||||
|
|
||||||
|
if ($("qa-bugzilla-radio-words").selected) { // keyword search
|
||||||
|
|
||||||
|
if ($("qa-bugzilla-input-os").checked && words.indexOf("os:") == -1) {
|
||||||
|
if (bugzilla.sysconfig == null) bugzilla.sysconfig = new Sysconfig();
|
||||||
|
words += " os:" + bugzilla.sysconfig.opsys.substr(0,3);
|
||||||
|
}
|
||||||
|
if ($("qa-bugzilla-input-version").checked && words.indexOf("version:") == -1) {
|
||||||
|
if (bugzilla.sysconfig == null) bugzilla.sysconfig = new Sysconfig();
|
||||||
|
var branch = bugzilla.sysconfig.branch.substr(0,3);
|
||||||
|
if (branch.indexOf(bugzilla.trunkVersion) != -1) branch = "Trunk";
|
||||||
|
|
||||||
|
words += " version:" + branch;
|
||||||
|
}
|
||||||
|
|
||||||
|
bugzilla.loadBugGroup(words);
|
||||||
|
} else { //id search
|
||||||
|
bugzilla.loadBug(bugId);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
showRecent : function() {
|
||||||
|
$("qa-bugzilla-input-radiogroup").selectedItem = $("qa-bugzilla-radio-words");
|
||||||
|
bugzilla.disableOther();
|
||||||
|
bugzilla.loadBugGroup("product=Core&product=Firefox&product=Mozilla+Application+Suite&product=Thunderbird&product=Toolkit"
|
||||||
|
+"&bug_status=UNCONFIRMED,NEW,ASSIGNED,REOPENED,RESOLVED&chfield=%5BBug%20creation%5D&chfieldfrom=-24h"
|
||||||
|
, true);
|
||||||
|
},
|
||||||
|
loadBugGroup : function (param, detailsearch) {
|
||||||
|
var callback = function(bugarray) { // bugarray is a 2d array with id and summaries
|
||||||
|
|
||||||
|
var menu = document.getElementById('bugSearchList');
|
||||||
|
while (menu.getRowCount()) { // clear menu
|
||||||
|
menu.removeItemAt(0);
|
||||||
|
};
|
||||||
|
|
||||||
|
for (var i = 0; i < bugarray.length; i++) {
|
||||||
|
var row = document.createElement("listitem");
|
||||||
|
row.value = bugarray[i][0];
|
||||||
|
var number = document.createElement("listcell");
|
||||||
|
number.setAttribute("label", bugarray[i][0]);
|
||||||
|
var name = document.createElement("listcell");
|
||||||
|
name.setAttribute("label", bugarray[i][1]);
|
||||||
|
name.setAttribute("crop", "end");
|
||||||
|
name.setAttribute("maxwidth", "175");
|
||||||
|
row.appendChild(number);
|
||||||
|
row.appendChild(name);
|
||||||
|
menu.appendChild(row);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(bugarray.length) menu.selectedIndex = 0;
|
||||||
|
|
||||||
|
$("qa-bugzilla-input-keywords").value = param;
|
||||||
|
if ($('qa_tabrow').selectedItem != $('qa-tabbar-bugzilla')) {
|
||||||
|
bugzilla.highlightTab();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bugzilla.bugReader == null) bugzilla.bugReader = new bugAccess();
|
||||||
|
bugzilla.bugReader.setBugSearchOnloadFunc(callback);
|
||||||
|
|
||||||
|
if (detailsearch) bugzilla.bugReader.getBugList(bugzilla.baseURL, "buglist.cgi?="+param, 0);
|
||||||
|
else bugzilla.bugReader.getBugList(bugzilla.baseURL, "quicksearch="+param, 0);
|
||||||
|
},
|
||||||
|
loadBug : function (bugId, preserveCurrent) {
|
||||||
|
var callback = function(bugObj) {
|
||||||
|
// menu
|
||||||
|
var menu = document.getElementById('bugSearchList');
|
||||||
|
while (menu.getRowCount() && !preserveCurrent) { // clear menu
|
||||||
|
menu.removeItemAt(0);
|
||||||
|
};
|
||||||
|
|
||||||
|
var row = document.createElement("listitem");
|
||||||
|
row.value = bugObj["id"];
|
||||||
|
var number = document.createElement("listcell");
|
||||||
|
number.setAttribute("label", bugObj["id"]);
|
||||||
|
var name = document.createElement("listcell");
|
||||||
|
name.setAttribute("label", bugObj["title"]);
|
||||||
|
name.setAttribute("crop", "end");
|
||||||
|
name.setAttribute("maxwidth", "175");
|
||||||
|
row.appendChild(number);
|
||||||
|
row.appendChild(name);
|
||||||
|
menu.appendChild(row);
|
||||||
|
|
||||||
|
// summary
|
||||||
|
$("qa-bugzilla-input-id").value = $("qa-bugzilla-output-id").value = bugObj["id"];
|
||||||
|
$("qa-bugzilla-output-status").value = bugObj["status"];
|
||||||
|
$("qa-bugzilla-output-summary").value = bugObj["info"];
|
||||||
|
|
||||||
|
qaTools.assignLinkHandlers($("qa-bugzilla-output-summary"));
|
||||||
|
|
||||||
|
if ($('qa_tabrow').selectedItem != $('qa-tabbar-bugzilla')) {
|
||||||
|
bugzilla.highlightTab();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (bugzilla.bugReader == null) bugzilla.bugReader = new bugAccess();
|
||||||
|
bugzilla.bugReader.getBugSpecs(bugId, bugzilla.baseURL, callback);
|
||||||
|
},
|
||||||
|
disableOther : function() {
|
||||||
|
if ($("qa-bugzilla-radio-words").selected) {
|
||||||
|
$("qa-bugzilla-input-keywords").disabled = false;
|
||||||
|
$("qa-bugzilla-input-os").disabled = false;
|
||||||
|
$("qa-bugzilla-input-version").disabled = false;
|
||||||
|
$("qa-bugzilla-input-id").disabled = true;
|
||||||
|
} else {
|
||||||
|
$("qa-bugzilla-input-id").disabled = false;
|
||||||
|
$("qa-bugzilla-input-keywords").disabled = true;
|
||||||
|
$("qa-bugzilla-input-os").disabled = true;
|
||||||
|
$("qa-bugzilla-input-version").disabled = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSelect : function() {
|
||||||
|
var menu = $('bugSearchList');
|
||||||
|
if (menu.selectedItem.value == $("qa-bugzilla-output-id").value) return;
|
||||||
|
|
||||||
|
var callback = function(bugObj) {
|
||||||
|
$("qa-bugzilla-output-id").value = bugObj["id"];
|
||||||
|
$("qa-bugzilla-output-status").value = bugObj["status"];
|
||||||
|
$("qa-bugzilla-output-summary").value = bugObj["info"];
|
||||||
|
}
|
||||||
|
if (bugzilla.bugReader == null) bugzilla.bugReader = new bugAccess();
|
||||||
|
bugzilla.bugReader.getBugSpecs(menu.selectedItem.value, bugzilla.baseURL, callback);
|
||||||
|
},
|
||||||
|
highlightTab : function() {
|
||||||
|
$('qa-tabbar-bugzilla').className = "tabbrowser-tab highlight";
|
||||||
|
},
|
||||||
|
unhighlightTab : function() {
|
||||||
|
$('qa-tabbar-bugzilla').className = "tabbrowser-tab";
|
||||||
|
},
|
||||||
|
openInBugzilla : function() {
|
||||||
|
if ($("qa-bugzilla-output-id").value == "") {
|
||||||
|
alert("no value");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var url = bugzilla.baseURL + "show_bug.cgi?id=" + $("qa-bugzilla-output-id").value;
|
||||||
|
|
||||||
|
var type = qaPref.getPref("browser.link.open_external", "int");
|
||||||
|
var where = "tab";
|
||||||
|
if (type == 2) where = "window";
|
||||||
|
|
||||||
|
openUILinkIn(url, where);
|
||||||
|
},
|
||||||
|
findBugzillaLinks : function(node) { // assumes HTML-ns node
|
||||||
|
var RV = new Array();
|
||||||
|
var innerstr = node.innerHTML;
|
||||||
|
|
||||||
|
var prefix = "show_bug.cgi?id=";
|
||||||
|
var index = innerstr.indexOf(prefix);
|
||||||
|
dump(innerstr);
|
||||||
|
if (index == -1) {
|
||||||
|
//TODO: search for "bug"? is that too broad?
|
||||||
|
} else {
|
||||||
|
while(index != -1) {
|
||||||
|
RV.push(innerstr.substr(index+prefix.length,6));
|
||||||
|
dump(RV.length + " found so far, current index: " + index+ " \n");
|
||||||
|
index = innerstr.indexOf(prefix, index + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return qaTools.makeUniqueArray(RV);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,76 +1,116 @@
|
||||||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
* ***** BEGIN LICENSE BLOCK *****
|
||||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
#
|
*
|
||||||
# The contents of this file are subject to the Mozilla Public License Version
|
* The contents of this file are subject to the Mozilla Public License Version
|
||||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||||
# the License. You may obtain a copy of the License at
|
* the License. You may obtain a copy of the License at
|
||||||
# http://www.mozilla.org/MPL/
|
* http://www.mozilla.org/MPL/
|
||||||
#
|
*
|
||||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
# for the specific language governing rights and limitations under the
|
* for the specific language governing rights and limitations under the
|
||||||
# License.
|
* License.
|
||||||
#
|
*
|
||||||
# The Original Code is the Mozilla Community QA Extension
|
* The Original Code is the Mozilla Community QA Extension
|
||||||
#
|
*
|
||||||
# The Initial Developer of the Original Code is the Mozilla Corporation.
|
* The Initial Developer of the Original Code is the Mozilla Corporation.
|
||||||
# Portions created by the Initial Developer are Copyright (C) 2007
|
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||||
# the Initial Developer. All Rights Reserved.
|
* the Initial Developer. All Rights Reserved.
|
||||||
#
|
*
|
||||||
# Contributor(s):
|
* Contributor(s):
|
||||||
# Zach Lipton <zach@zachlipton.com>
|
* Zach Lipton <zach@zachlipton.com>
|
||||||
#
|
* Ben Hsieh <ben.hsieh@gmail.com> (rewrite)
|
||||||
# Alternatively, the contents of this file may be used under the terms of
|
* 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
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
# of those above. If you wish to allow use of your version of this file only
|
* of those above. If you wish to allow use of your version of this file only
|
||||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
# use your version of this file under the terms of the MPL, indicate your
|
* use your version of this file under the terms of the MPL, indicate your
|
||||||
# decision by deleting the provisions above and replace them with the notice
|
* decision by deleting the provisions above and replace them with the notice
|
||||||
# and other provisions required by the LGPL or the GPL. If you do not delete
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
# the provisions above, a recipient may use your version of this file under
|
* the provisions above, a recipient may use your version of this file under
|
||||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
#
|
*
|
||||||
# ***** END LICENSE BLOCK ***** -->
|
* ***** END LICENSE BLOCK ***** -->
|
||||||
|
|
||||||
<!DOCTYPE overlay [
|
<!DOCTYPE overlay [
|
||||||
<!ENTITY % qaDTD SYSTEM "chrome://qa/locale/qa.dtd"> %qaDTD;
|
<!ENTITY % qaDTD SYSTEM "chrome://qa/locale/qa.dtd"> %qaDTD;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<overlay id="qa-bz-overlay"
|
<overlay id="qa-bz-overlay"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
xmlns:html="http://www.w3.org/1999/xhtml">
|
xmlns:html="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
<tabpanel id="qa-tab-bugzilla">
|
<tabpanel id="qa-tab-bugzilla">
|
||||||
<vbox>
|
<vbox>
|
||||||
|
<label href="http://bugzilla.mozilla.org"
|
||||||
|
value="Help us by filing and confirming bugs in Bugzilla"
|
||||||
|
class="text-link" />
|
||||||
<groupbox>
|
<groupbox>
|
||||||
|
<caption label="Bug Search" />
|
||||||
|
<radiogroup id = "qa-bugzilla-input-radiogroup"
|
||||||
|
onselect="bugzilla.disableOther()">
|
||||||
|
<hbox>
|
||||||
|
<radio selected="true" id="qa-bugzilla-radio-id"
|
||||||
|
label="Bug id:" width="100px" />
|
||||||
|
<textbox width="200px" id="qa-bugzilla-input-id" />
|
||||||
|
</hbox>
|
||||||
|
<hbox><radio id="qa-bugzilla-radio-words" label="Keywords:" width="100px" />
|
||||||
|
<textbox width="200px" disabled="true" id="qa-bugzilla-input-keywords" /> </hbox>
|
||||||
|
</radiogroup>
|
||||||
|
<hbox>
|
||||||
|
<checkbox id="qa-bugzilla-input-os" label="Include OS" />
|
||||||
|
<checkbox id="qa-bugzilla-input-version" label="Include Version" />
|
||||||
|
</hbox>
|
||||||
|
<spacer height="20px" />
|
||||||
|
<hbox>
|
||||||
|
<button label="Find!" oncommand="bugzilla.doSearch(); "/>
|
||||||
|
<button label="Show all bugs filed today"
|
||||||
|
oncommand="bugzilla.showRecent()"/></hbox>
|
||||||
|
</groupbox>
|
||||||
|
|
||||||
|
<listbox id="bugSearchList" onselect="bugzilla.handleSelect();"
|
||||||
|
flex="1" seltype="single" maxheight="200px" height="200px">
|
||||||
|
<listhead>
|
||||||
|
<listheader label="Id"/>
|
||||||
|
<listheader label="Summary"/>
|
||||||
|
</listhead>
|
||||||
|
|
||||||
|
<listcols>
|
||||||
|
<listcol/>
|
||||||
|
<listcol flex="1"/>
|
||||||
|
</listcols>
|
||||||
|
</listbox>
|
||||||
|
<!-- <groupbox>
|
||||||
<div xmlns="http://www.w3.org/1999/xhtml" id="qa-bz-bugzilla">
|
<div xmlns="http://www.w3.org/1999/xhtml" id="qa-bz-bugzilla">
|
||||||
</div>
|
</div>
|
||||||
|
</groupbox> -->
|
||||||
|
<groupbox>
|
||||||
|
<caption label= "Bug Summary" />
|
||||||
|
<hbox>
|
||||||
|
<label width="100px"> Bug id: </label>
|
||||||
|
<textbox style="color:black" id="qa-bugzilla-output-id"
|
||||||
|
width="197px" cols="31" disabled="true"/>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<label width="100px"> Status: </label>
|
||||||
|
<textbox style="color:black" id="qa-bugzilla-output-status"
|
||||||
|
width="197px" cols="31" disabled="true"/>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<label width="100px"> Summary: </label>
|
||||||
|
<textbox style="color:black" id="qa-bugzilla-output-summary"
|
||||||
|
width="197px" multiline="true" disabled="true" height="100px" rows="7"/> </hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer width="110px" />
|
||||||
|
<button label="Show in Bugzilla" width="200px"
|
||||||
|
oncommand="bugzilla.openInBugzilla();"/>
|
||||||
|
</hbox>
|
||||||
</groupbox>
|
</groupbox>
|
||||||
|
<spacer height= "20px" />
|
||||||
|
|
||||||
</vbox>
|
</vbox>
|
||||||
</tabpanel>
|
</tabpanel>
|
||||||
|
|
||||||
<script type="application/x-javascript">
|
</overlay>
|
||||||
var bz = {
|
|
||||||
populateFields : function() {
|
|
||||||
var box = $('qa-bz-bugzilla');
|
|
||||||
qaTools.showHideLoadingMessage(box, true);
|
|
||||||
qaTools.fetchFeed(qaMain.urlbundle.getString("qa.extension.url.bz.content"),
|
|
||||||
function(feed) {
|
|
||||||
var items = feed.items;
|
|
||||||
var item = items.queryElementAt(0, Ci.nsIFeedEntry);
|
|
||||||
qaTools.showHideLoadingMessage(box, false);
|
|
||||||
if (item != null) {
|
|
||||||
var fragment = item.summary.createDocumentFragment(box);
|
|
||||||
box.appendChild(fragment);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
window.addEventListener('load', bz.populateFields, false);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</overlay>
|
|
||||||
|
|
|
@ -1,87 +1,91 @@
|
||||||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
* ***** BEGIN LICENSE BLOCK *****
|
||||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
#
|
*
|
||||||
# The contents of this file are subject to the Mozilla Public License Version
|
* The contents of this file are subject to the Mozilla Public License Version
|
||||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||||
# the License. You may obtain a copy of the License at
|
* the License. You may obtain a copy of the License at
|
||||||
# http://www.mozilla.org/MPL/
|
* http://www.mozilla.org/MPL/
|
||||||
#
|
*
|
||||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
# for the specific language governing rights and limitations under the
|
* for the specific language governing rights and limitations under the
|
||||||
# License.
|
* License.
|
||||||
#
|
*
|
||||||
# The Original Code is the Mozilla Community QA Extension
|
* The Original Code is the Mozilla Community QA Extension
|
||||||
#
|
*
|
||||||
# The Initial Developer of the Original Code is the Mozilla Corporation.
|
* The Initial Developer of the Original Code is the Mozilla Corporation.
|
||||||
# Portions created by the Initial Developer are Copyright (C) 2007
|
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||||
# the Initial Developer. All Rights Reserved.
|
* the Initial Developer. All Rights Reserved.
|
||||||
#
|
*
|
||||||
# Contributor(s):
|
* Contributor(s):
|
||||||
# Zach Lipton <zach@zachlipton.com>
|
* Zach Lipton <zach@zachlipton.com>
|
||||||
#
|
*
|
||||||
# Alternatively, the contents of this file may be used under the terms of
|
* 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
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
# of those above. If you wish to allow use of your version of this file only
|
* of those above. If you wish to allow use of your version of this file only
|
||||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
# use your version of this file under the terms of the MPL, indicate your
|
* use your version of this file under the terms of the MPL, indicate your
|
||||||
# decision by deleting the provisions above and replace them with the notice
|
* decision by deleting the provisions above and replace them with the notice
|
||||||
# and other provisions required by the LGPL or the GPL. If you do not delete
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
# the provisions above, a recipient may use your version of this file under
|
* the provisions above, a recipient may use your version of this file under
|
||||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
#
|
*
|
||||||
# ***** END LICENSE BLOCK ***** -->
|
* ***** END LICENSE BLOCK ***** -->
|
||||||
|
|
||||||
<!DOCTYPE overlay [
|
<!DOCTYPE overlay [
|
||||||
<!ENTITY % qaDTD SYSTEM "chrome://qa/locale/qa.dtd"> %qaDTD;
|
<!ENTITY % qaDTD SYSTEM "chrome://qa/locale/qa.dtd"> %qaDTD;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<overlay id="qa-qmo-overlay"
|
<overlay id="qa-qmo-overlay"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
xmlns:html="http://www.w3.org/1999/xhtml">
|
xmlns:html="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
|
|
||||||
<script type="application/x-javascript"
|
<script type="application/x-javascript"
|
||||||
src="chrome://chatzillaservice_qa/content/chatzilla-service.js" />
|
src="chrome://chatzillaservice_qa/content/chatzilla-service.js" />
|
||||||
<script type="application/x-javascript" >
|
<script type="application/x-javascript" >
|
||||||
window.addEventListener('load', function() {
|
window.addEventListener('load', function() {
|
||||||
qaTools.assignLinkHandler($("qa-chat-imo"));
|
qaTools.assignLinkHandler($("qa-chat-imo"));
|
||||||
qaTools.assignLinkHandler($("qa-chat-irchelp"));
|
qaTools.assignLinkHandler($("qa-chat-irchelp"));
|
||||||
}, false);
|
}, false);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<tabpanel id="qa-tab-chat">
|
<tabpanel id="qa-tab-chat">
|
||||||
<vbox>
|
<vbox>
|
||||||
|
|
||||||
<groupbox style="width:350px;">
|
<groupbox style="width:350px;">
|
||||||
<caption label="&qa.chat.introtitle;" />
|
<caption label="&qa.chat.introtitle;" />
|
||||||
<description>&qa.chat.intro;</description>
|
<description>&qa.chat.intro;</description>
|
||||||
<spacer style="height: 1em;" />
|
<spacer style="height: 1em;" />
|
||||||
<description>&qa.chat.intro2;</description>
|
<description>&qa.chat.intro2;</description>
|
||||||
</groupbox>
|
</groupbox>
|
||||||
|
|
||||||
<groupbox style="width:350px;">
|
<groupbox style="width:350px;">
|
||||||
<caption label="&qa.chat.howdoItitle;" />
|
<caption label="&qa.chat.howdoItitle;" />
|
||||||
<div xmlns="http://www.w3.org/1999/xhtml" id="qa-qmo-forumposts">
|
<div xmlns="http://www.w3.org/1999/xhtml" id="qa-qmo-forumposts">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a id="qa-chat-imo" href="&qa.chat.howdoI.imourl;" target="_blank">&qa.chat.howdoI.imo;</a></li>
|
<li><a id="qa-chat-imo" href="&qa.chat.howdoI.imourl;" target="_blank">
|
||||||
<li><a id="qa-chat-irchelp" href="&qa.chat.howdoI.irchelpurl;" target="_blank">&qa.chat.howdoI.irchelp;</a></li>
|
&qa.chat.howdoI.imo;</a>
|
||||||
|
</li>
|
||||||
|
<li><a id="qa-chat-irchelp" href="&qa.chat.howdoI.irchelpurl;" target="_blank">
|
||||||
|
&qa.chat.howdoI.irchelp;</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<button style="margin-top: 12px; padding-left: 2em; padding-right: 2em;"
|
<button style="margin-top: 12px; padding-left: 2em; padding-right: 2em;"
|
||||||
oncommand="openQAChat();" label="&qa.chat.howdoI.joinnow;" />
|
oncommand="openQAChat();" label="&qa.chat.howdoI.joinnow;" />
|
||||||
</groupbox>
|
</groupbox>
|
||||||
|
|
||||||
<script type="application/x-javascript">
|
<script type="application/x-javascript">
|
||||||
function openQAChat() {
|
function openQAChat() {
|
||||||
spawnChatZilla('irc://irc.mozilla.org/qa', 0);
|
spawnChatZilla('irc://irc.mozilla.org/qa', 0);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</vbox>
|
</vbox>
|
||||||
</tabpanel>
|
</tabpanel>
|
||||||
|
|
||||||
</overlay>
|
</overlay>
|
||||||
|
|
|
@ -1,45 +1,45 @@
|
||||||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
* ***** BEGIN LICENSE BLOCK *****
|
||||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
#
|
*
|
||||||
# The contents of this file are subject to the Mozilla Public License Version
|
* The contents of this file are subject to the Mozilla Public License Version
|
||||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||||
# the License. You may obtain a copy of the License at
|
* the License. You may obtain a copy of the License at
|
||||||
# http://www.mozilla.org/MPL/
|
* http://www.mozilla.org/MPL/
|
||||||
#
|
*
|
||||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
# for the specific language governing rights and limitations under the
|
* for the specific language governing rights and limitations under the
|
||||||
# License.
|
* License.
|
||||||
#
|
*
|
||||||
# The Original Code is the Mozilla Community QA Extension
|
* The Original Code is the Mozilla Community QA Extension
|
||||||
#
|
*
|
||||||
# The Initial Developer of the Original Code is the Mozilla Corporation.
|
* The Initial Developer of the Original Code is the Mozilla Corporation.
|
||||||
# Portions created by the Initial Developer are Copyright (C) 2007
|
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||||
# the Initial Developer. All Rights Reserved.
|
* the Initial Developer. All Rights Reserved.
|
||||||
#
|
*
|
||||||
# Contributor(s):
|
* Contributor(s):
|
||||||
# Zach Lipton <zach@zachlipton.com>
|
* Zach Lipton <zach@zachlipton.com>
|
||||||
#
|
*
|
||||||
# Alternatively, the contents of this file may be used under the terms of
|
* 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
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
# of those above. If you wish to allow use of your version of this file only
|
* of those above. If you wish to allow use of your version of this file only
|
||||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
# use your version of this file under the terms of the MPL, indicate your
|
* use your version of this file under the terms of the MPL, indicate your
|
||||||
# decision by deleting the provisions above and replace them with the notice
|
* decision by deleting the provisions above and replace them with the notice
|
||||||
# and other provisions required by the LGPL or the GPL. If you do not delete
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
# the provisions above, a recipient may use your version of this file under
|
* the provisions above, a recipient may use your version of this file under
|
||||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
#
|
*
|
||||||
# ***** END LICENSE BLOCK ***** -->
|
* ***** END LICENSE BLOCK ***** -->
|
||||||
|
|
||||||
<!DOCTYPE overlay [
|
<!DOCTYPE overlay [
|
||||||
<!ENTITY % qaDTD SYSTEM "chrome://qa/locale/qa.dtd"> %qaDTD;
|
<!ENTITY % qaDTD SYSTEM "chrome://qa/locale/qa.dtd"> %qaDTD;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<overlay id="qa-help-overlay"
|
<overlay id="qa-help-overlay"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
xmlns:html="http://www.w3.org/1999/xhtml">
|
xmlns:html="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
|
@ -54,4 +54,4 @@
|
||||||
</vbox>
|
</vbox>
|
||||||
</tabpanel>
|
</tabpanel>
|
||||||
|
|
||||||
</overlay>
|
</overlay>
|
||||||
|
|
|
@ -1,42 +1,41 @@
|
||||||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
* ***** BEGIN LICENSE BLOCK *****
|
||||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
#
|
*
|
||||||
# The contents of this file are subject to the Mozilla Public License Version
|
* The contents of this file are subject to the Mozilla Public License Version
|
||||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||||
# the License. You may obtain a copy of the License at
|
* the License. You may obtain a copy of the License at
|
||||||
# http://www.mozilla.org/MPL/
|
* http://www.mozilla.org/MPL/
|
||||||
#
|
*
|
||||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
# for the specific language governing rights and limitations under the
|
* for the specific language governing rights and limitations under the
|
||||||
# License.
|
* License.
|
||||||
#
|
*
|
||||||
# The Original Code is the Mozilla Community QA Extension
|
* The Original Code is the Mozilla Community QA Extension
|
||||||
#
|
*
|
||||||
# The Initial Developer of the Original Code is the Mozilla Corporation.
|
* The Initial Developer of the Original Code is the Mozilla Corporation.
|
||||||
# Portions created by the Initial Developer are Copyright (C) 2006
|
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||||
# the Initial Developer. All Rights Reserved.
|
* the Initial Developer. All Rights Reserved.
|
||||||
#
|
*
|
||||||
# Contributor(s):
|
* Contributor(s):
|
||||||
# Zach Lipton <zach@zachlipton.com>
|
* Zach Lipton <zach@zachlipton.com>
|
||||||
# Ben Hsieh <bhsieh@mozilla.com>
|
* Ben Hsieh <bhsieh@mozilla.com>
|
||||||
#
|
*
|
||||||
# Alternatively, the contents of this file may be used under the terms of
|
* 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
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
# of those above. If you wish to allow use of your version of this file only
|
* of those above. If you wish to allow use of your version of this file only
|
||||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
# use your version of this file under the terms of the MPL, indicate your
|
* use your version of this file under the terms of the MPL, indicate your
|
||||||
# decision by deleting the provisions above and replace them with the notice
|
* decision by deleting the provisions above and replace them with the notice
|
||||||
# and other provisions required by the LGPL or the GPL. If you do not delete
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
# the provisions above, a recipient may use your version of this file under
|
* the provisions above, a recipient may use your version of this file under
|
||||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
#
|
*
|
||||||
# ***** END LICENSE BLOCK ***** -->
|
* ***** END LICENSE BLOCK ***** -->
|
||||||
|
|
||||||
<?xml-stylesheet href="chrome://qa/skin/" type="text/css"?>
|
|
||||||
|
|
||||||
<!DOCTYPE overlay [
|
<!DOCTYPE overlay [
|
||||||
<!ENTITY % qaDTD SYSTEM "chrome://qa/locale/qa.dtd"> %qaDTD;
|
<!ENTITY % qaDTD SYSTEM "chrome://qa/locale/qa.dtd"> %qaDTD;
|
||||||
|
@ -45,69 +44,79 @@
|
||||||
|
|
||||||
<overlay id="qa-litmus-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
<overlay id="qa-litmus-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||||
<tabpanel id="qa-tab-litmus" onload="litmus.readStateFromPref();">
|
<tabpanel id="qa-tab-litmus" onload="litmus.readStateFromPref();">
|
||||||
|
|
||||||
<vbox align="start" pack="start">
|
<vbox align="start" pack="start">
|
||||||
<hbox align="start" pack="start">
|
<hbox align="start" pack="start">
|
||||||
<vbox minwidth="150">
|
<vbox minwidth="150">
|
||||||
<button maxwidth="110" label="&qa.litmus.selecttests;"
|
<button maxwidth="110" label="&qa.litmus.selecttests;"
|
||||||
oncommand="litmus.handleDialog()"
|
oncommand="litmus.handleDialog()"
|
||||||
style="margin-left: 4px;" />
|
style="margin-left: 4px;" />
|
||||||
<label maxwidth="160" value="" id="qa-testrun-label"/>
|
<label maxwidth="160" value="" id="qa-testrun-label"/>
|
||||||
<label maxwidth="160" value="" id="qa-testgroup-label"/>
|
<label maxwidth="160" value="" id="qa-testgroup-label"/>
|
||||||
<label maxwidth="160" value="" id="qa-subgroup-label"/>
|
<label maxwidth="160" value="" id="qa-subgroup-label"/>
|
||||||
<label value="" />
|
<label value="" />
|
||||||
<label value="" id="qa-testcase-progress" />
|
<label value="" id="qa-testcase-progress" />
|
||||||
</vbox>
|
</vbox>
|
||||||
<listbox rows="7" minwidth="200" onselect="litmus.handleSelect()" id="testlist">
|
<listbox rows="7" minwidth="200" onselect="litmus.handleSelect()"
|
||||||
|
id="testlist">
|
||||||
<listcols>
|
<listcols>
|
||||||
<listcol />
|
<listcol />
|
||||||
<listcol />
|
<listcol />
|
||||||
</listcols>
|
</listcols>
|
||||||
<listitem label="&qa.litmus.testlist.initiallabel;" />
|
<listitem label="&qa.litmus.testlist.initiallabel;" />
|
||||||
|
|
||||||
</listbox>
|
</listbox>
|
||||||
</hbox>
|
</hbox>
|
||||||
<vbox>
|
<vbox>
|
||||||
<hbox style="font-weight: bold;">
|
<hbox style="font-weight: bold;">
|
||||||
<label id="qa-testcase-id" value="&qa.litmus.testlist.initialdescription;" />
|
<label id="qa-testcase-id" value="&qa.litmus.testlist.initialdescription;" />
|
||||||
<label value="—" />
|
<label value="—" />
|
||||||
<description id="qa-testcase-summary" maxwidth="230px" crop="end"></description>
|
<description id="qa-testcase-summary" maxwidth="230px" crop="end">
|
||||||
</hbox>
|
</description>
|
||||||
|
</hbox>
|
||||||
</vbox>
|
|
||||||
|
</vbox>
|
||||||
|
|
||||||
<vbox width="370px" minwidth="370px">
|
|
||||||
<groupbox maxheight="130px" minwidth="370px" width="370px">
|
<vbox width="370px" minwidth="370px">
|
||||||
<caption label="&qa.testcase.steps;" crop="end" maxwidth="200"/>
|
<groupbox maxheight="130px" minwidth="370px" width="370px">
|
||||||
<div xmlns="http://www.w3.org/1999/xhtml" style="width: 350px; height: 140px; overflow: auto;" id="qa-testcase-steps" class="list"/>
|
<caption label="&qa.testcase.steps;" crop="end" maxwidth="200"/>
|
||||||
</groupbox>
|
<div xmlns="http://www.w3.org/1999/xhtml"
|
||||||
<splitter id="qa-mainwindow-splitter" state="open" collapse="none">
|
style="width: 350px; height: 140px; overflow: auto;"
|
||||||
<grippy/>
|
id="qa-testcase-steps" class="list"/>
|
||||||
</splitter>
|
|
||||||
<groupbox maxheight="120px" minwidth="370px" width="370px">
|
|
||||||
<caption label="&qa.testcase.expected;" />
|
|
||||||
<div xmlns="http://www.w3.org/1999/xhtml" style="width: 350px; height: 120px; overflow: auto;" id="qa-testcase-expected" class="list"/>
|
|
||||||
</groupbox>
|
|
||||||
</vbox>
|
|
||||||
<hbox>
|
|
||||||
<groupbox>
|
|
||||||
<caption label="Result:" />
|
|
||||||
<radiogroup id="qa-testcase-result">
|
|
||||||
<radio id="qa-testcase-pass" label="&qa.testcase.result.pass;"/>
|
|
||||||
<radio id="qa-testcase-fail" label="&qa.testcase.result.fail;"/>
|
|
||||||
<radio id="qa-testcase-unclearBroken" label="&qa.testcase.result.unclearbroken;"/>
|
|
||||||
</radiogroup>
|
|
||||||
</groupbox>
|
|
||||||
<groupbox>
|
|
||||||
<caption control="qa-testcase-comment" label="&qa.testcase.comment;"/>
|
|
||||||
<textbox id="qa-testcase-comment" style="min-height: 75px; width:150px;" class="plain"/>
|
|
||||||
</groupbox>
|
</groupbox>
|
||||||
</hbox>
|
<splitter id="qa-mainwindow-splitter" state="open" collapse="none">
|
||||||
<hbox flex="1" maxheight="30px">
|
<grippy/>
|
||||||
<button id="qa-mainwindow-previousButton" label="Previous" oncommand="litmus.prevButton()"/>
|
</splitter>
|
||||||
<button id="qa-mainwindow-nextButton" label="Next (Submit)" oncommand="litmus.nextButton()"/>
|
<groupbox maxheight="120px" minwidth="370px" width="370px">
|
||||||
</hbox>
|
<caption label="&qa.testcase.expected;" />
|
||||||
|
<div xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
style="width: 350px; height: 120px; overflow: auto;"
|
||||||
|
id="qa-testcase-expected" class="list"/>
|
||||||
|
</groupbox>
|
||||||
|
</vbox>
|
||||||
|
<hbox>
|
||||||
|
<groupbox>
|
||||||
|
<caption label="Result:" />
|
||||||
|
<radiogroup id="qa-testcase-result">
|
||||||
|
<radio id="qa-testcase-pass" label="&qa.testcase.result.pass;"/>
|
||||||
|
<radio id="qa-testcase-fail" label="&qa.testcase.result.fail;"/>
|
||||||
|
<radio id="qa-testcase-unclearBroken"
|
||||||
|
label="&qa.testcase.result.unclearbroken;"/>
|
||||||
|
</radiogroup>
|
||||||
|
</groupbox>
|
||||||
|
<groupbox>
|
||||||
|
<caption control="qa-testcase-comment" label="&qa.testcase.comment;"/>
|
||||||
|
<textbox id="qa-testcase-comment" rows="4" cols="30" multiline="true"
|
||||||
|
class="plain"/>
|
||||||
|
</groupbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox flex="1" maxheight="30px">
|
||||||
|
<button id="qa-mainwindow-previousButton" label="Previous"
|
||||||
|
oncommand="litmus.prevButton()"/>
|
||||||
|
<button id="qa-mainwindow-nextButton" label="Next (Submit)"
|
||||||
|
oncommand="litmus.nextButton()"/>
|
||||||
|
</hbox>
|
||||||
<label id="qa-litmus-stats" value="" />
|
<label id="qa-litmus-stats" value="" />
|
||||||
<script type="application/x-javascript">
|
<script type="application/x-javascript">
|
||||||
this.addEventListener('load', litmus.loadStats, false);
|
this.addEventListener('load', litmus.loadStats, false);
|
||||||
|
@ -115,4 +124,4 @@
|
||||||
</vbox>
|
</vbox>
|
||||||
</tabpanel>
|
</tabpanel>
|
||||||
|
|
||||||
</overlay>
|
</overlay>
|
||||||
|
|
|
@ -35,108 +35,108 @@
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
var qmo = {
|
var qmo = {
|
||||||
populateFields : function() {
|
populateFields : function() {
|
||||||
qmo.populateForumPosts();
|
qmo.populateForumPosts();
|
||||||
qmo.populateEvents();
|
qmo.populateEvents();
|
||||||
qmo.populateQMONews();
|
qmo.populateQMONews();
|
||||||
qmo.populateHowHelp();
|
qmo.populateHowHelp();
|
||||||
},
|
},
|
||||||
populateForumPosts : function() {
|
populateForumPosts : function() {
|
||||||
var numPosts = 5; // show top 5 topics
|
var numPosts = 5; // show top 5 topics
|
||||||
var postBox = $('qa-qmo-forumposts');
|
var postBox = $('qa-qmo-forumposts');
|
||||||
qaTools.showHideLoadingMessage(postBox, true);
|
qaTools.showHideLoadingMessage(postBox, true);
|
||||||
var url = qaMain.urlbundle.getString("qa.extension.url.qmo.forum_topics");
|
var url = qaMain.urlbundle.getString("qa.extension.url.qmo.forum_topics");
|
||||||
var callback = function(feed) {
|
var callback = function(feed) {
|
||||||
var items = feed.items;
|
var items = feed.items;
|
||||||
qaTools.showHideLoadingMessage(postBox, false);
|
qaTools.showHideLoadingMessage(postBox, false);
|
||||||
if (items.length < numPosts)
|
if (items.length < numPosts)
|
||||||
numPosts=items.length;
|
numPosts=items.length;
|
||||||
for (var i=0; i<numPosts; i++) {
|
for (var i=0; i<numPosts; i++) {
|
||||||
var item = items.queryElementAt(i, Ci.nsIFeedEntry);
|
var item = items.queryElementAt(i, Ci.nsIFeedEntry);
|
||||||
if (item != null) {
|
if (item != null) {
|
||||||
qmo.populateLinkBox(postBox,
|
qmo.populateLinkBox(postBox,
|
||||||
[{text : item.title.plainText(), url : item.link.resolve("")}],
|
[{text : item.title.plainText(), url : item.link.resolve("")}],
|
||||||
64);
|
64);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
qaTools.fetchFeed(url, callback);
|
qaTools.fetchFeed(url, callback);
|
||||||
},
|
},
|
||||||
populateEvents : function() {
|
populateEvents : function() {
|
||||||
var numEvents = 5; // show 5 events
|
var numEvents = 5; // show 5 events
|
||||||
var eventBox = $('qa-qmo-events');
|
var eventBox = $('qa-qmo-events');
|
||||||
qaTools.showHideLoadingMessage(eventBox, true);
|
qaTools.showHideLoadingMessage(eventBox, true);
|
||||||
var url = qaMain.urlbundle.getString("qa.extension.url.qmo.upcomingEvents");
|
var url = qaMain.urlbundle.getString("qa.extension.url.qmo.upcomingEvents");
|
||||||
var callback = function(feed) {
|
var callback = function(feed) {
|
||||||
var items = feed.items;
|
var items = feed.items;
|
||||||
qaTools.showHideLoadingMessage(eventBox, false);
|
qaTools.showHideLoadingMessage(eventBox, false);
|
||||||
if (items.length < numEvents)
|
if (items.length < numEvents)
|
||||||
numEvents=items.length;
|
numEvents=items.length;
|
||||||
for (var i=0; i<numEvents; i++) {
|
for (var i=0; i<numEvents; i++) {
|
||||||
var item = items.queryElementAt(i, Ci.nsIFeedEntry);
|
var item = items.queryElementAt(i, Ci.nsIFeedEntry);
|
||||||
if (item != null) {
|
if (item != null) {
|
||||||
qmo.populateLinkBox(eventBox,
|
qmo.populateLinkBox(eventBox,
|
||||||
[{text : item.title.plainText(), url : item.link.resolve("")}],
|
[{text : item.title.plainText(), url : item.link.resolve("")}],
|
||||||
37);
|
37);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
qaTools.fetchFeed(url, callback);
|
qaTools.fetchFeed(url, callback);
|
||||||
},
|
},
|
||||||
populateQMONews : function() {
|
populateQMONews : function() {
|
||||||
var box = $('qa-qmo-latest');
|
var box = $('qa-qmo-latest');
|
||||||
var url = qaMain.urlbundle.getString("qa.extension.url.qmo.news");
|
var url = qaMain.urlbundle.getString("qa.extension.url.qmo.news");
|
||||||
qaTools.showHideLoadingMessage(box, true);
|
qaTools.showHideLoadingMessage(box, true);
|
||||||
var callback = function(feed) {
|
var callback = function(feed) {
|
||||||
var items = feed.items;
|
var items = feed.items;
|
||||||
var item = items.queryElementAt(0, Ci.nsIFeedEntry);
|
var item = items.queryElementAt(0, Ci.nsIFeedEntry);
|
||||||
qaTools.showHideLoadingMessage(box, false);
|
qaTools.showHideLoadingMessage(box, false);
|
||||||
if (item != null) { // just grab the first item
|
if (item != null) { // just grab the first item
|
||||||
var content = item.summary;
|
var content = item.summary;
|
||||||
var fragment = content.createDocumentFragment(box);
|
var fragment = content.createDocumentFragment(box);
|
||||||
|
|
||||||
box.appendChild(fragment);
|
box.appendChild(fragment);
|
||||||
}
|
}
|
||||||
qaTools.assignLinkHandlers(box);
|
qaTools.assignLinkHandlers(box);
|
||||||
}
|
}
|
||||||
qaTools.fetchFeed(url, callback);
|
qaTools.fetchFeed(url, callback);
|
||||||
},
|
},
|
||||||
populateHowHelp : function() {
|
populateHowHelp : function() {
|
||||||
var box = $('qa-qmo-help');
|
var box = $('qa-qmo-help');
|
||||||
var url = qaMain.urlbundle.getString("qa.extension.url.qmo.howhelp");
|
var url = qaMain.urlbundle.getString("qa.extension.url.qmo.howhelp");
|
||||||
qaTools.showHideLoadingMessage(box, true);
|
qaTools.showHideLoadingMessage(box, true);
|
||||||
var callback = function(feed) {
|
var callback = function(feed) {
|
||||||
var items = feed.items;
|
var items = feed.items;
|
||||||
var item = items.queryElementAt(0, Ci.nsIFeedEntry);
|
var item = items.queryElementAt(0, Ci.nsIFeedEntry);
|
||||||
qaTools.showHideLoadingMessage(box, false);
|
qaTools.showHideLoadingMessage(box, false);
|
||||||
if (item != null) { // just grab the first item
|
if (item != null) { // just grab the first item
|
||||||
var content = item.summary;
|
var content = item.summary;
|
||||||
var fragment = content.createDocumentFragment(box);
|
var fragment = content.createDocumentFragment(box);
|
||||||
|
|
||||||
box.appendChild(fragment);
|
box.appendChild(fragment);
|
||||||
}
|
}
|
||||||
qaTools.assignLinkHandlers(box);
|
qaTools.assignLinkHandlers(box);
|
||||||
}
|
}
|
||||||
qaTools.fetchFeed(url, callback);
|
qaTools.fetchFeed(url, callback);
|
||||||
},
|
},
|
||||||
populateLinkBox : function(box, links, chars) {
|
populateLinkBox : function(box, links, chars) {
|
||||||
var list = box.childNodes[1];
|
var list = box.childNodes[1];
|
||||||
for (var i=0; i<links.length; i++) {
|
for (var i=0; i<links.length; i++) {
|
||||||
var elem = list.appendChild(document.createElementNS(qaMain.htmlNS,"li"));
|
var elem = list.appendChild(document.createElementNS(qaMain.htmlNS,"li"));
|
||||||
var a = elem.appendChild(document.createElementNS(qaMain.htmlNS,"a"));
|
var a = elem.appendChild(document.createElementNS(qaMain.htmlNS,"a"));
|
||||||
|
|
||||||
// limit text to chars characters:
|
// limit text to chars characters:
|
||||||
var text = links[i].text;
|
var text = links[i].text;
|
||||||
if (chars && chars>0 && text.length > chars) {
|
if (chars && chars>0 && text.length > chars) {
|
||||||
a.setAttribute("tooltiptext", text);
|
a.setAttribute("tooltiptext", text);
|
||||||
text = text.substring(0, chars-3)+"...";
|
text = text.substring(0, chars-3)+"...";
|
||||||
}
|
}
|
||||||
|
|
||||||
a.textContent = text;
|
a.textContent = text;
|
||||||
a.href = links[i].url;
|
a.href = links[i].url;
|
||||||
qaTools.assignLinkHandler(a);
|
qaTools.assignLinkHandler(a);
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function $() {
|
function $() {
|
||||||
|
@ -151,4 +151,4 @@ function $() {
|
||||||
elements.push(element);
|
elements.push(element);
|
||||||
}
|
}
|
||||||
return elements;
|
return elements;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,45 +1,45 @@
|
||||||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
* ***** BEGIN LICENSE BLOCK *****
|
||||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
#
|
*
|
||||||
# The contents of this file are subject to the Mozilla Public License Version
|
* The contents of this file are subject to the Mozilla Public License Version
|
||||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||||
# the License. You may obtain a copy of the License at
|
* the License. You may obtain a copy of the License at
|
||||||
# http://www.mozilla.org/MPL/
|
* http://www.mozilla.org/MPL/
|
||||||
#
|
*
|
||||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
# for the specific language governing rights and limitations under the
|
* for the specific language governing rights and limitations under the
|
||||||
# License.
|
* License.
|
||||||
#
|
*
|
||||||
# The Original Code is the Mozilla Community QA Extension
|
* The Original Code is the Mozilla Community QA Extension
|
||||||
#
|
*
|
||||||
# The Initial Developer of the Original Code is the Mozilla Corporation.
|
* The Initial Developer of the Original Code is the Mozilla Corporation.
|
||||||
# Portions created by the Initial Developer are Copyright (C) 2007
|
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||||
# the Initial Developer. All Rights Reserved.
|
* the Initial Developer. All Rights Reserved.
|
||||||
#
|
*
|
||||||
# Contributor(s):
|
* Contributor(s):
|
||||||
# Zach Lipton <zach@zachlipton.com>
|
* Zach Lipton <zach@zachlipton.com>
|
||||||
#
|
*
|
||||||
# Alternatively, the contents of this file may be used under the terms of
|
* 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
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
# of those above. If you wish to allow use of your version of this file only
|
* of those above. If you wish to allow use of your version of this file only
|
||||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
# use your version of this file under the terms of the MPL, indicate your
|
* use your version of this file under the terms of the MPL, indicate your
|
||||||
# decision by deleting the provisions above and replace them with the notice
|
* decision by deleting the provisions above and replace them with the notice
|
||||||
# and other provisions required by the LGPL or the GPL. If you do not delete
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
# the provisions above, a recipient may use your version of this file under
|
* the provisions above, a recipient may use your version of this file under
|
||||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
#
|
*
|
||||||
# ***** END LICENSE BLOCK ***** -->
|
* ***** END LICENSE BLOCK ***** -->
|
||||||
|
|
||||||
<!DOCTYPE overlay [
|
<!DOCTYPE overlay [
|
||||||
<!ENTITY % qaDTD SYSTEM "chrome://qa/locale/qa.dtd"> %qaDTD;
|
<!ENTITY % qaDTD SYSTEM "chrome://qa/locale/qa.dtd"> %qaDTD;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<overlay id="qa-qmo-overlay"
|
<overlay id="qa-qmo-overlay"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
xmlns:html="http://www.w3.org/1999/xhtml">
|
xmlns:html="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
|
@ -52,25 +52,28 @@
|
||||||
<vbox pack="start">
|
<vbox pack="start">
|
||||||
<hbox>
|
<hbox>
|
||||||
<html:a href="http://quality.mozilla.org" target="blank">
|
<html:a href="http://quality.mozilla.org" target="blank">
|
||||||
<image src='chrome://qa/skin/qmo-badge.png'
|
<image src='chrome://qa/skin/qmo-badge.png'
|
||||||
style='max-width: 75px; max-height: 31px; margin-top: 3px; margin-left: 3px;' />
|
style='max-width: 75px; max-height: 31px;
|
||||||
|
margin-top: 3px; margin-left: 3px;' />
|
||||||
</html:a>
|
</html:a>
|
||||||
</hbox>
|
</hbox>
|
||||||
|
|
||||||
|
|
||||||
<hbox class="box-mheight">
|
<hbox class="box-mheight">
|
||||||
<groupbox class="box-mheight">
|
<groupbox class="box-mheight">
|
||||||
<caption label="&qa.qmo.help;" />
|
<caption label="&qa.qmo.help;" />
|
||||||
<div class="box-mheight" xmlns="http://www.w3.org/1999/xhtml" id="qa-qmo-help">
|
<div class="box-mheight" xmlns="http://www.w3.org/1999/xhtml"
|
||||||
</div>
|
id="qa-qmo-help">
|
||||||
</groupbox>
|
</div>
|
||||||
<groupbox class="box-mheight">
|
</groupbox>
|
||||||
<caption label="&qa.qmo.events;" />
|
<groupbox class="box-mheight">
|
||||||
<div class="box-mheight" xmlns="http://www.w3.org/1999/xhtml" id="qa-qmo-events">
|
<caption label="&qa.qmo.events;" />
|
||||||
<ul>
|
<div class="box-mheight" xmlns="http://www.w3.org/1999/xhtml"
|
||||||
</ul>
|
id="qa-qmo-events">
|
||||||
</div>
|
<ul>
|
||||||
</groupbox>
|
</ul>
|
||||||
|
</div>
|
||||||
|
</groupbox>
|
||||||
</hbox>
|
</hbox>
|
||||||
<groupbox>
|
<groupbox>
|
||||||
<caption label="&qa.qmo.forumposts;" />
|
<caption label="&qa.qmo.forumposts;" />
|
||||||
|
@ -79,15 +82,15 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</groupbox>
|
</groupbox>
|
||||||
|
|
||||||
<groupbox id="qa-qmo-latestbox">
|
<groupbox id="qa-qmo-latestbox">
|
||||||
<caption label="&qa.qmo.thelatest;" />
|
<caption label="&qa.qmo.thelatest;" />
|
||||||
<div xmlns="http://www.w3.org/1999/xhtml" id="qa-qmo-latest">
|
<div xmlns="http://www.w3.org/1999/xhtml" id="qa-qmo-latest">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</groupbox>
|
</groupbox>
|
||||||
|
|
||||||
</vbox>
|
</vbox>
|
||||||
</tabpanel>
|
</tabpanel>
|
||||||
|
|
||||||
</overlay>
|
</overlay>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*
|
*
|
||||||
* Contributor(s):
|
* Contributor(s):
|
||||||
* Ben Hsieh <bhsieh@mozilla.com>
|
* Ben Hsieh <bhsieh@mozilla.com>
|
||||||
* Zach Lipton <zach@zachlipton.com>
|
* Zach Lipton <zach@zachlipton.com>
|
||||||
*
|
*
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
* 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
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
|
@ -39,95 +39,98 @@
|
||||||
var updateFunction;
|
var updateFunction;
|
||||||
var handleCancel;
|
var handleCancel;
|
||||||
var handleOK;
|
var handleOK;
|
||||||
var sTestrunsWrapper; // an array of things that are kind of like testruns, but w/o important fields.
|
var sTestrunsWrapper; // an array of things that are kind of like testruns,
|
||||||
//returned by "test_runs_by_branch_product_name="
|
// but w/o important fields.
|
||||||
|
//returned by "test_runs_by_branch_product_name="
|
||||||
|
|
||||||
var sTestrun; // actual testrun
|
var sTestrun; // actual testrun
|
||||||
var sTestgroup;
|
var sTestgroup;
|
||||||
function handleLoad() {
|
function handleLoad() {
|
||||||
|
|
||||||
if (window.arguments.length > 0) {
|
if (window.arguments.length > 0) {
|
||||||
updateFunction = window.arguments[0]; // parent window passes in a function to update itself with data
|
updateFunction = window.arguments[0]; // parent window passes in a function to update itself with data
|
||||||
handleCancel = window.arguments[1]; // parent window passes in a function to restore state if dialog canceled
|
handleCancel = window.arguments[1]; // parent window passes in a function to restore state if dialog canceled
|
||||||
handleOK = window.arguments[2]; // you get the idea
|
handleOK = window.arguments[2]; // you get the idea
|
||||||
}
|
}
|
||||||
litmus.getTestruns(populateTestRuns);
|
litmus.getTestruns(populateTestRuns);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleRunSelect() {
|
function handleRunSelect() {
|
||||||
var id = document.getElementById("qa-st-testrun").selectedItem.getAttribute("value");
|
var id = $("qa-st-testrun").selectedItem.getAttribute("value");
|
||||||
if (id == "") return; // oddly, this check doesn't seem necessary in the other handlers...
|
if (id == "") return;
|
||||||
litmus.getTestrun(id, populateTestGroups);
|
// oddly, this check doesn't seem necessary in the other handlers...
|
||||||
|
litmus.getTestrun(id, populateTestGroups);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleTestgroupSelect() {
|
function handleTestgroupSelect() {
|
||||||
var id = document.getElementById("qa-st-testgroup").selectedItem.value;
|
var id = document.getElementById("qa-st-testgroup").selectedItem.value;
|
||||||
litmus.getTestgroup(id, populateSubgroups);
|
litmus.getTestgroup(id, populateSubgroups);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleSubgroupSelect() {
|
function handleSubgroupSelect() {
|
||||||
var id = document.getElementById("qa-st-subgroup").selectedItem.value;
|
var id = document.getElementById("qa-st-subgroup").selectedItem.value;
|
||||||
updateCaller(sTestrun.name, sTestgroup.name, id, 0);
|
updateCaller(sTestrun.name, sTestgroup.name, id, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
function populateTestRuns(testrunsWrapper) {
|
function populateTestRuns(testrunsWrapper) {
|
||||||
var menu = document.getElementById("qa-st-testrun");
|
var menu = document.getElementById("qa-st-testrun");
|
||||||
testrunsWrapper = qaTools.arrayify(testrunsWrapper);
|
testrunsWrapper = qaTools.arrayify(testrunsWrapper);
|
||||||
sTestrunsWrapper = testrunsWrapper;
|
sTestrunsWrapper = testrunsWrapper;
|
||||||
|
|
||||||
while (menu.firstChild) { // clear menu
|
while (menu.firstChild) { // clear menu
|
||||||
menu.removeChild(menu.firstChild);
|
menu.removeChild(menu.firstChild);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0; i < testrunsWrapper.length; i++) {
|
for (var i = 0; i < testrunsWrapper.length; i++) {
|
||||||
if (testrunsWrapper[i].enabled == 0) continue;
|
if (testrunsWrapper[i].enabled == 0) continue;
|
||||||
var item = menu.appendItem(testrunsWrapper[i].name, testrunsWrapper[i].test_run_id);
|
var item = menu.appendItem(testrunsWrapper[i].name,
|
||||||
}
|
testrunsWrapper[i].test_run_id);
|
||||||
menu.selectedIndex = 0;
|
}
|
||||||
handleRunSelect();
|
menu.selectedIndex = 0;
|
||||||
|
handleRunSelect();
|
||||||
}
|
}
|
||||||
|
|
||||||
function populateTestGroups(testrun) {
|
function populateTestGroups(testrun) {
|
||||||
sTestrun = testrun;
|
sTestrun = testrun;
|
||||||
var menu = document.getElementById("qa-st-testgroup");
|
var menu = document.getElementById("qa-st-testgroup");
|
||||||
while (menu.firstChild) { // clear menu
|
while (menu.firstChild) { // clear menu
|
||||||
menu.removeChild(menu.firstChild);
|
menu.removeChild(menu.firstChild);
|
||||||
}
|
}
|
||||||
|
|
||||||
var testgroups = qaTools.arrayify(testrun.testgroups);
|
var testgroups = qaTools.arrayify(testrun.testgroups);
|
||||||
for (var i = 0; i < testgroups.length; i++) {
|
for (var i = 0; i < testgroups.length; i++) {
|
||||||
if (testgroups[i].enabled == 0) continue;
|
if (testgroups[i].enabled == 0) continue;
|
||||||
menu.appendItem(testgroups[i].name, testgroups[i].testgroup_id);
|
menu.appendItem(testgroups[i].name, testgroups[i].testgroup_id);
|
||||||
}
|
}
|
||||||
menu.selectedIndex = 0;
|
menu.selectedIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function populateSubgroups(testgroup) {
|
function populateSubgroups(testgroup) {
|
||||||
sTestgroup = testgroup;
|
sTestgroup = testgroup;
|
||||||
var menu = document.getElementById("qa-st-subgroup");
|
var menu = document.getElementById("qa-st-subgroup");
|
||||||
while (menu.firstChild) { // clear menu
|
while (menu.firstChild) { // clear menu
|
||||||
menu.removeChild(menu.firstChild);
|
menu.removeChild(menu.firstChild);
|
||||||
}
|
}
|
||||||
var subgroups = qaTools.arrayify(testgroup.subgroups);
|
var subgroups = qaTools.arrayify(testgroup.subgroups);
|
||||||
|
|
||||||
for (var i = 0; i < subgroups.length; i++) {
|
for (var i = 0; i < subgroups.length; i++) {
|
||||||
if (subgroups[i].enabled == 0) continue;
|
if (subgroups[i].enabled == 0) continue;
|
||||||
menu.appendItem(subgroups[i].name, subgroups[i].subgroup_id);
|
menu.appendItem(subgroups[i].name, subgroups[i].subgroup_id);
|
||||||
}
|
}
|
||||||
menu.selectedIndex = 0;
|
menu.selectedIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function OK() {
|
function OK() {
|
||||||
handleOK();
|
handleOK();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateCaller(testrunSummary, testgroupSummary, subgroupID, index) {
|
function updateCaller(testrunSummary, testgroupSummary, subgroupID, index) {
|
||||||
litmus.writeStateToPref(testrunSummary, testgroupSummary, subgroupID, index);
|
litmus.writeStateToPref(testrunSummary, testgroupSummary, subgroupID, index);
|
||||||
updateFunction();
|
updateFunction();
|
||||||
}
|
}
|
||||||
|
|
||||||
function Cancel() {
|
function Cancel() {
|
||||||
handleCancel();
|
handleCancel();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,40 +1,39 @@
|
||||||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
* ***** BEGIN LICENSE BLOCK *****
|
||||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
#
|
*
|
||||||
# The contents of this file are subject to the Mozilla Public License Version
|
* The contents of this file are subject to the Mozilla Public License Version
|
||||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||||
# the License. You may obtain a copy of the License at
|
* the License. You may obtain a copy of the License at
|
||||||
# http://www.mozilla.org/MPL/
|
* http://www.mozilla.org/MPL/
|
||||||
#
|
*
|
||||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
# for the specific language governing rights and limitations under the
|
* for the specific language governing rights and limitations under the
|
||||||
# License.
|
* License.
|
||||||
#
|
*
|
||||||
# The Original Code is the Mozilla Community QA Extension
|
* The Original Code is the Mozilla Community QA Extension
|
||||||
#
|
*
|
||||||
# The Initial Developer of the Original Code is the Mozilla Corporation.
|
* The Initial Developer of the Original Code is the Mozilla Corporation.
|
||||||
# Portions created by the Initial Developer are Copyright (C) 2007
|
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||||
# the Initial Developer. All Rights Reserved.
|
* the Initial Developer. All Rights Reserved.
|
||||||
#
|
*
|
||||||
# Contributor(s):
|
* Contributor(s):
|
||||||
# Ben Hsieh <bhsieh@mozilla.com>
|
* Ben Hsieh <ben.hsieh@gmail.com>
|
||||||
#
|
*
|
||||||
# Alternatively, the contents of this file may be used under the terms of
|
* 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
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
# of those above. If you wish to allow use of your version of this file only
|
* of those above. If you wish to allow use of your version of this file only
|
||||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
# use your version of this file under the terms of the MPL, indicate your
|
* use your version of this file under the terms of the MPL, indicate your
|
||||||
# decision by deleting the provisions above and replace them with the notice
|
* decision by deleting the provisions above and replace them with the notice
|
||||||
# and other provisions required by the LGPL or the GPL. If you do not delete
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
# the provisions above, a recipient may use your version of this file under
|
* the provisions above, a recipient may use your version of this file under
|
||||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
#
|
*
|
||||||
# ***** END LICENSE BLOCK ***** -->
|
* ***** END LICENSE BLOCK ***** -->
|
||||||
|
|
||||||
<!DOCTYPE dialog PUBLIC "-//MOZILLA//DTD XUL V1.0//EN" "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
<!DOCTYPE dialog PUBLIC "-//MOZILLA//DTD XUL V1.0//EN" "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
[<!ENTITY % qaDTD SYSTEM "chrome://qa/locale/qa.dtd"> %qaDTD;
|
[<!ENTITY % qaDTD SYSTEM "chrome://qa/locale/qa.dtd"> %qaDTD;
|
||||||
]>
|
]>
|
||||||
|
@ -43,47 +42,48 @@
|
||||||
<?xml-stylesheet href="chrome://qa/skin/" type="text/css"?>
|
<?xml-stylesheet href="chrome://qa/skin/" type="text/css"?>
|
||||||
|
|
||||||
<dialog id="dialog-name"
|
<dialog id="dialog-name"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
persist="screenX screenY width height"
|
persist="screenX screenY width height"
|
||||||
buttons="accept,cancel"
|
buttons="accept,cancel"
|
||||||
ondialogaccept="return OK();"
|
ondialogaccept="return OK();"
|
||||||
ondialogcancel="return Cancel();"
|
ondialogcancel="return Cancel();"
|
||||||
onload="handleLoad();">
|
onload="handleLoad();">
|
||||||
|
|
||||||
<script type="application/x-javascript" src="chrome://qa/content/MochiKit/MochiKit.js" />
|
<script type="application/x-javascript" src="chrome://qa/content/MochiKit/MochiKit.js" />
|
||||||
<script type="application/x-javascript" src="chrome://qa/content/prefs.js" />
|
<script type="application/x-javascript" src="chrome://qa/content/prefs.js" />
|
||||||
<script type="application/x-javascript" src="chrome://qa/content/litmus.js" />
|
<script type="application/x-javascript" src="chrome://qa/content/litmus.js" />
|
||||||
<script type="application/x-javascript" src="chrome://qa/content/qa.js" />
|
<script type="application/x-javascript" src="chrome://qa/content/qa.js" />
|
||||||
<script type="application/x-javascript" src="chrome://qa/content/settings.js" />
|
<script type="application/x-javascript" src="chrome://qa/content/settings.js" />
|
||||||
<script type="application/x-javascript" src="chrome://qa/content/common.js" />
|
<script type="application/x-javascript" src="chrome://qa/content/common.js" />
|
||||||
<script type="application/x-javascript" src="chrome://qa/content/tabs/selecttests.js" />
|
<script type="application/x-javascript" src="chrome://qa/content/tabs/selecttests.js" />
|
||||||
|
|
||||||
<dialogheader description="&qa.selecttests.header;" />
|
<dialogheader description="&qa.selecttests.header;" />
|
||||||
<spacer height="20" />
|
<spacer height="20" />
|
||||||
<vbox>
|
<vbox>
|
||||||
<hbox>
|
<hbox>
|
||||||
<description value="Test Run:" />
|
<description value="Test Run:" />
|
||||||
<menulist label=" " id="qa-st-testrun" onselect="handleRunSelect()">
|
<menulist label=" " id="qa-st-testrun" onselect="handleRunSelect()">
|
||||||
<menupopup >
|
<menupopup >
|
||||||
<menuitem label="&qa.selecttests.load;" selected="true" />
|
<menuitem label="&qa.selecttests.load;" selected="true" />
|
||||||
</menupopup>
|
</menupopup>
|
||||||
</menulist>
|
</menulist>
|
||||||
</hbox>
|
</hbox>
|
||||||
<spacer height="20" />
|
<spacer height="20" />
|
||||||
<hbox>
|
<hbox>
|
||||||
<vbox>
|
<vbox>
|
||||||
<description value="Test Group:" />
|
<description value="Test Group:" />
|
||||||
<listbox id="qa-st-testgroup" rows = "5" onselect="handleTestgroupSelect()">
|
<listbox id="qa-st-testgroup" rows = "5"
|
||||||
<listitem label="&qa.selecttests.load;" />
|
onselect="handleTestgroupSelect()">
|
||||||
</listbox>
|
<listitem label="&qa.selecttests.load;" />
|
||||||
</vbox>
|
</listbox>
|
||||||
<vbox>
|
</vbox>
|
||||||
<description value="Subgroup" />
|
<vbox>
|
||||||
<listbox id="qa-st-subgroup" rows = "5" onselect="handleSubgroupSelect()">
|
<description value="Subgroup" />
|
||||||
<listitem label="&qa.selecttests.load;" />
|
<listbox id="qa-st-subgroup" rows = "5"
|
||||||
</listbox>
|
onselect="handleSubgroupSelect()">
|
||||||
</vbox>
|
<listitem label="&qa.selecttests.load;" />
|
||||||
</hbox>
|
</listbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
|
</hbox>
|
||||||
|
</vbox>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
|
||||||
|
|
|
@ -1,56 +1,49 @@
|
||||||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
* ***** BEGIN LICENSE BLOCK *****
|
||||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
#
|
*
|
||||||
# The contents of this file are subject to the Mozilla Public License Version
|
* The contents of this file are subject to the Mozilla Public License Version
|
||||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||||
# the License. You may obtain a copy of the License at
|
* the License. You may obtain a copy of the License at
|
||||||
# http://www.mozilla.org/MPL/
|
* http://www.mozilla.org/MPL/
|
||||||
#
|
*
|
||||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
# for the specific language governing rights and limitations under the
|
* for the specific language governing rights and limitations under the
|
||||||
# License.
|
* License.
|
||||||
#
|
*
|
||||||
# The Original Code is the Mozilla Community QA Extension
|
* The Original Code is the Mozilla Community QA Extension
|
||||||
#
|
*
|
||||||
# The Initial Developer of the Original Code is the Mozilla Corporation.
|
* The Initial Developer of the Original Code is the Mozilla Corporation.
|
||||||
# Portions created by the Initial Developer are Copyright (C) 2006
|
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||||
# the Initial Developer. All Rights Reserved.
|
* the Initial Developer. All Rights Reserved.
|
||||||
#
|
*
|
||||||
# Contributor(s):
|
* Contributor(s):
|
||||||
# Zach Lipton <zach@zachlipton.com>
|
* Zach Lipton <zach@zachlipton.com>
|
||||||
#
|
*
|
||||||
# Alternatively, the contents of this file may be used under the terms of
|
* 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
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
# of those above. If you wish to allow use of your version of this file only
|
* of those above. If you wish to allow use of your version of this file only
|
||||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
# use your version of this file under the terms of the MPL, indicate your
|
* use your version of this file under the terms of the MPL, indicate your
|
||||||
# decision by deleting the provisions above and replace them with the notice
|
* decision by deleting the provisions above and replace them with the notice
|
||||||
# and other provisions required by the LGPL or the GPL. If you do not delete
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
# the provisions above, a recipient may use your version of this file under
|
* the provisions above, a recipient may use your version of this file under
|
||||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
#
|
*
|
||||||
# ***** END LICENSE BLOCK ***** -->
|
* ***** END LICENSE BLOCK ***** -->
|
||||||
|
|
||||||
<!DOCTYPE overlay [
|
<!DOCTYPE overlay [
|
||||||
<!ENTITY % qaDTD SYSTEM "chrome://qa/locale/qa.dtd"> %qaDTD;
|
<!ENTITY % qaDTD SYSTEM "chrome://qa/locale/qa.dtd"> %qaDTD;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<overlay id="qa-settings-overlay"
|
<overlay id="qa-settings-overlay"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||||
|
|
||||||
<script type="application/x-javascript" src="chrome://qa/content/settings.js" />
|
<script type="application/x-javascript" src="chrome://qa/content/settings.js" />
|
||||||
<script type="application/x-javascript">
|
|
||||||
|
|
||||||
// on load, set an event listener to deal with saving settings when
|
|
||||||
// changing tabs
|
|
||||||
window.addEventListener('load', function() {
|
|
||||||
$('qa_tabrow').addEventListener('select', qaPrefsWindow.onSwitchTab, false);
|
|
||||||
}, false);
|
|
||||||
</script>
|
|
||||||
<stringbundleset id="stringbundleset">
|
<stringbundleset id="stringbundleset">
|
||||||
<stringbundle id="bundle_qa" src="chrome://qa/locale/qa.properties" />
|
<stringbundle id="bundle_qa" src="chrome://qa/locale/qa.properties" />
|
||||||
</stringbundleset>
|
</stringbundleset>
|
||||||
|
@ -59,29 +52,39 @@
|
||||||
<vbox flex="1">
|
<vbox flex="1">
|
||||||
<groupbox>
|
<groupbox>
|
||||||
<caption label="&qa.preferences.litmus.title;" />
|
<caption label="&qa.preferences.litmus.title;" />
|
||||||
<label control="qa-preferences-litmus-username" value="&qa.preferences.litmus.username;"/>
|
<label control="qa-preferences-litmus-username"
|
||||||
|
value="&qa.preferences.litmus.username;"/>
|
||||||
<textbox id="qa-preferences-litmus-username" />
|
<textbox id="qa-preferences-litmus-username" />
|
||||||
<label control="qa-preferences-litmus-password" value="&qa.preferences.litmus.password;"/>
|
<label control="qa-preferences-litmus-password"
|
||||||
|
value="&qa.preferences.litmus.password;"/>
|
||||||
<textbox id="qa-preferences-litmus-password" type="password" />
|
<textbox id="qa-preferences-litmus-password" type="password" />
|
||||||
<hbox>
|
<hbox>
|
||||||
<button id="qa-preferences-litmus-createAccount" label="&qa.preferences.litmus.createAccount;"
|
<button id="qa-preferences-litmus-createAccount"
|
||||||
oncommand="qaPrefsWindow.createAccount();" />
|
label="&qa.preferences.litmus.createAccount;"
|
||||||
|
oncommand="qaPrefsWindow.createAccount();" />
|
||||||
</hbox>
|
</hbox>
|
||||||
</groupbox>
|
</groupbox>
|
||||||
|
|
||||||
<groupbox id="qa-prefs-notify">
|
<groupbox id="qa-prefs-notify">
|
||||||
<caption label="&qa.preferences.notification.title;" />
|
<caption label="&qa.preferences.notification.title;" />
|
||||||
<checkbox id="qa-prefs-notify-disableall" label="&qa.preferences.notification.disableall;" />
|
<checkbox id="qa-prefs-notify-disableall"
|
||||||
|
label="&qa.preferences.notification.disableall;" />
|
||||||
<description>&qa.preferences.notification.header;</description>
|
<description>&qa.preferences.notification.header;</description>
|
||||||
<checkbox id="qa-prefs-notify-testday" label="&qa.preferences.notification.testday;" />
|
<checkbox id="qa-prefs-notify-testday"
|
||||||
<checkbox id="qa-prefs-notify-bugday" label="&qa.preferences.notification.bugday;" />
|
label="&qa.preferences.notification.testday;" />
|
||||||
<checkbox id="qa-prefs-notify-prerelease" label="&qa.preferences.notification.prerelease;" />
|
<checkbox id="qa-prefs-notify-bugday"
|
||||||
<checkbox id="qa-prefs-notify-qmo" label="&qa.preferences.notification.qmo;" />
|
label="&qa.preferences.notification.bugday;" />
|
||||||
<checkbox id="qa-prefs-notify-newbuild" label="&qa.preferences.notification.newbuild;" />
|
<checkbox id="qa-prefs-notify-prerelease"
|
||||||
<checkbox id="qa-prefs-notify-other" label="&qa.preferences.notification.other;" />
|
label="&qa.preferences.notification.prerelease;" />
|
||||||
|
<checkbox id="qa-prefs-notify-qmo"
|
||||||
|
label="&qa.preferences.notification.qmo;" />
|
||||||
|
<checkbox id="qa-prefs-notify-newbuild"
|
||||||
|
label="&qa.preferences.notification.newbuild;" />
|
||||||
|
<checkbox id="qa-prefs-notify-other"
|
||||||
|
label="&qa.preferences.notification.other;" />
|
||||||
</groupbox>
|
</groupbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
|
|
||||||
</tabpanel>
|
</tabpanel>
|
||||||
|
|
||||||
</overlay>
|
</overlay>
|
||||||
|
|
|
@ -1,18 +1,55 @@
|
||||||
|
<!-- ***** BEGIN LICENSE BLOCK *****
|
||||||
|
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
|
-
|
||||||
|
- The contents of this file are subject to the Mozilla Public License Version
|
||||||
|
- 1.1 (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.mozilla.org/MPL/
|
||||||
|
-
|
||||||
|
- Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
|
- for the specific language governing rights and limitations under the
|
||||||
|
- License.
|
||||||
|
-
|
||||||
|
- The Original Code is Mozilla QA Extension Code.
|
||||||
|
-
|
||||||
|
- The Initial Developer of the Original Code is the Mozilla Corporation.
|
||||||
|
- Portions created by the Initial Developer are Copyright (C) 2007
|
||||||
|
- the Initial Developer. All Rights Reserved.
|
||||||
|
-
|
||||||
|
- Contributor(s):
|
||||||
|
- Zach Lipton <zach@zachlipton.com>
|
||||||
|
- Ben Hsieh <bhsieh@mozilla.com>
|
||||||
|
-
|
||||||
|
- 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
|
||||||
|
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
|
- in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
|
- of those above. If you wish to allow use of your version of this file only
|
||||||
|
- under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
|
- use your version of this file under the terms of the MPL, indicate your
|
||||||
|
- decision by deleting the provisions above and replace them with the notice
|
||||||
|
- and other provisions required by the LGPL or the GPL. If you do not delete
|
||||||
|
- the provisions above, a recipient may use your version of this file under
|
||||||
|
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
|
-
|
||||||
|
- ***** END LICENSE BLOCK ***** -->
|
||||||
|
|
||||||
<!ENTITY qa.litmus.title "Litmus">
|
<!ENTITY qa.litmus.title "Litmus">
|
||||||
<!ENTITY qa.litmus.selecttests "Select Tests">
|
<!ENTITY qa.litmus.selecttests "Select Tests">
|
||||||
<!ENTITY qa.litmus.testlist.initiallabel "No tests loaded, select some tests!">
|
<!ENTITY qa.litmus.testlist.initiallabel "No tests loaded, select some tests!">
|
||||||
<!ENTITY qa.litmus.testlist.initialdescription "No testcase">
|
<!ENTITY qa.litmus.testlist.initialdescription "No testcase">
|
||||||
<!ENTITY qa.statusbar.label "QA">
|
<!ENTITY qa.statusbar.label "QA">
|
||||||
<!ENTITY qa.mainwindow.prefs "Preferences">
|
<!ENTITY qa.mainwindow.prefs "Preferences">
|
||||||
<!ENTITY qa.mainwindow.title "Mozilla QA">
|
<!ENTITY qa.mainwindow.title "Mozilla QA">
|
||||||
<!ENTITY qa.testcase.steps "Steps to Perform">
|
<!ENTITY qa.testcase.steps "Steps to Perform">
|
||||||
<!ENTITY qa.testcase.expected "Expected Results">
|
<!ENTITY qa.testcase.expected "Expected Results">
|
||||||
<!ENTITY qa.testcase.result.pass "Test Passed">
|
<!ENTITY qa.testcase.result.pass "Test Passed">
|
||||||
<!ENTITY qa.testcase.result.fail "Test Failed">
|
<!ENTITY qa.testcase.result.fail "Test Failed">
|
||||||
<!ENTITY qa.testcase.result.unclearbroken "Test is unclear or broken">
|
<!ENTITY qa.testcase.result.unclearbroken "Test is unclear or broken">
|
||||||
<!ENTITY qa.testcase.comment "Comment (optional):">
|
<!ENTITY qa.testcase.comment "Comment (optional):">
|
||||||
|
|
||||||
<!ENTITY qa.selecttests.load "Loading...">
|
<!ENTITY qa.selecttests.load "Loading...">
|
||||||
<!ENTITY qa.selecttests.header "Select test group">
|
<!ENTITY qa.selecttests.header "Select test group">
|
||||||
|
|
||||||
<!ENTITY qa.preferences.title "Settings">
|
<!ENTITY qa.preferences.title "Settings">
|
||||||
|
@ -44,27 +81,27 @@
|
||||||
<!ENTITY qa.setup.welcomeheader "Welcome to the Mozilla QA Extension!">
|
<!ENTITY qa.setup.welcomeheader "Welcome to the Mozilla QA Extension!">
|
||||||
<!ENTITY qa.setup.welcometext "
|
<!ENTITY qa.setup.welcometext "
|
||||||
<html:h4>Welcome to the Mozilla Quality Assurance community!</html:h4>
|
<html:h4>Welcome to the Mozilla Quality Assurance community!</html:h4>
|
||||||
Mozilla Quality Assurance (QA) is a network of countless volunteers
|
Mozilla Quality Assurance (QA) is a network of countless volunteers
|
||||||
from the Internet community, along with a group of Mozilla employees, who share
|
from the Internet community, along with a group of Mozilla employees, who share
|
||||||
the common mission of <html:i>taming the lizard</html:i> through testing and
|
the common mission of <html:i>taming the lizard</html:i> through testing and
|
||||||
constructively reporting bugs in Mozilla products.
|
constructively reporting bugs in Mozilla products.
|
||||||
<html:br/><html:br/>
|
<html:br/><html:br/>
|
||||||
This extension allows you to <html:b>find bugs</html:b> in Mozilla products by
|
This extension allows you to <html:b>find bugs</html:b> in Mozilla products by
|
||||||
running simple tests within the browser. Helping out doesn't take up much of
|
running simple tests within the browser. Helping out doesn't take up much of
|
||||||
your time, doesn't require any special skills, and helps to improve Mozilla
|
your time, doesn't require any special skills, and helps to improve Mozilla
|
||||||
products like Firefox and Thunderbird.
|
products like Firefox and Thunderbird.
|
||||||
<html:br/><html:br/>
|
<html:br/><html:br/>
|
||||||
When you find a bug, this extension helps you to <html:b>report it</html:b>
|
When you find a bug, this extension helps you to <html:b>report it</html:b>
|
||||||
to <html:a href='http://litmus.mozilla.org/' target='_blank'>Litmus</html:a>,
|
to <html:a href='http://litmus.mozilla.org/' target='_blank'>Litmus</html:a>,
|
||||||
the tool we use to track our testing efforts. Your test results are valuable,
|
the tool we use to track our testing efforts. Your test results are valuable,
|
||||||
and we use them to ensure that all features work properly across a wide range
|
and we use them to ensure that all features work properly across a wide range
|
||||||
of platforms, operating systems, and configurations.
|
of platforms, operating systems, and configurations.
|
||||||
|
|
||||||
<html:h4>Why Should I Get Involved?</html:h4>
|
<html:h4>Why Should I Get Involved?</html:h4>
|
||||||
xxx
|
xxx
|
||||||
|
|
||||||
<html:h5>For more information on Mozilla Quality Assurance, please
|
<html:h5>For more information on Mozilla Quality Assurance, please
|
||||||
see the
|
see the
|
||||||
<html:a href='http://wiki.mozilla.org/Mozilla_QA_Community' target='_blank'>
|
<html:a href='http://wiki.mozilla.org/Mozilla_QA_Community' target='_blank'>
|
||||||
Mozilla QA Community Wiki</html:a>.</html:h5>
|
Mozilla QA Community Wiki</html:a>.</html:h5>
|
||||||
">
|
">
|
||||||
|
@ -72,21 +109,21 @@ Mozilla QA Community Wiki</html:a>.</html:h5>
|
||||||
<!ENTITY qa.setup.aboutheader "About the Mozilla QA Extension">
|
<!ENTITY qa.setup.aboutheader "About the Mozilla QA Extension">
|
||||||
<!ENTITY qa.setup.abouttext "
|
<!ENTITY qa.setup.abouttext "
|
||||||
<html:h4>How do I get started?</html:h4>
|
<html:h4>How do I get started?</html:h4>
|
||||||
Getting started with Mozilla QA is easy! This setup wizard will ask you a
|
Getting started with Mozilla QA is easy! This setup wizard will ask you a
|
||||||
few simple questions. Once that's done, you will be taken to the test runner,
|
few simple questions. Once that's done, you will be taken to the test runner,
|
||||||
where you can select what you want to test, run those tests, and submit your
|
where you can select what you want to test, run those tests, and submit your
|
||||||
results to Litmus. You'll also have a chance to learn about QA Community
|
results to Litmus. You'll also have a chance to learn about QA Community
|
||||||
events and other ways to get involved.
|
events and other ways to get involved.
|
||||||
|
|
||||||
<html:h4>A note on privacy</html:h4>
|
<html:h4>A note on privacy</html:h4>
|
||||||
When you use the QA Extension, you are submitting test results to an
|
When you use the QA Extension, you are submitting test results to an
|
||||||
open system. Other members of the community will access the information you
|
open system. Other members of the community will access the information you
|
||||||
submit in order to improve the quality of Mozilla products. You
|
submit in order to improve the quality of Mozilla products. You
|
||||||
<html:b>should not</html:b> submit any private or confidential information
|
<html:b>should not</html:b> submit any private or confidential information
|
||||||
using the Mozilla QA Extension. If you provide your real name or an IRC nickname
|
using the Mozilla QA Extension. If you provide your real name or an IRC nickname
|
||||||
to display instead, we will hide your email address from
|
to display instead, we will hide your email address from
|
||||||
public view to help prevent email harvesting bots from spamming you.
|
public view to help prevent email harvesting bots from spamming you.
|
||||||
For more information, please see our
|
For more information, please see our
|
||||||
<html:a href='http://www.mozilla.com/privacy-policy.html' target='_blank'>
|
<html:a href='http://www.mozilla.com/privacy-policy.html' target='_blank'>
|
||||||
privacy policy</html:a>.
|
privacy policy</html:a>.
|
||||||
|
|
||||||
|
@ -94,39 +131,39 @@ privacy policy</html:a>.
|
||||||
">
|
">
|
||||||
|
|
||||||
<!ENTITY qa.setup.accountheader "Creating an account">
|
<!ENTITY qa.setup.accountheader "Creating an account">
|
||||||
<!ENTITY qa.setup.accounttext "To use the QA Extension, you will need an account
|
<!ENTITY qa.setup.accounttext "To use the QA Extension, you will need an account
|
||||||
on Litmus, our test management system.">
|
on Litmus, our test management system.">
|
||||||
<!ENTITY qa.setup.haveaccount "Do you already have a Litmus account?">
|
<!ENTITY qa.setup.haveaccount "Do you already have a Litmus account?">
|
||||||
<!ENTITY qa.setup.accountno "I do not have a Litmus account">
|
<!ENTITY qa.setup.accountno "I do not have a Litmus account">
|
||||||
<!ENTITY qa.setup.accountyes "I already have a Litmus account">
|
<!ENTITY qa.setup.accountyes "I already have a Litmus account">
|
||||||
<!ENTITY qa.setup.accountyes.enterinfo "Enter your Litmus account information:">
|
<!ENTITY qa.setup.accountyes.enterinfo "Enter your Litmus account information:">
|
||||||
<!ENTITY qa.setup.accountno.text "Complete the form below and press the
|
<!ENTITY qa.setup.accountno.text "Complete the form below and press the
|
||||||
<html:b>Create Account</html:b> button to create your new account. <html:br/>Once your
|
<html:b>Create Account</html:b> button to create your new account. <html:br/>Once your
|
||||||
account is created, press the 'Continue' button to complete setup.">
|
account is created, press the 'Continue' button to complete setup.">
|
||||||
|
|
||||||
<!ENTITY qa.setup.accountdone "
|
<!ENTITY qa.setup.accountdone "
|
||||||
<html:h4>Account Created</html:h4>
|
<html:h4>Account Created</html:h4>
|
||||||
<html:b>Congratulations!</html:b> Your Litmus
|
<html:b>Congratulations!</html:b> Your Litmus
|
||||||
account has been created. You'll be able to use your new account both here in
|
account has been created. You'll be able to use your new account both here in
|
||||||
the QA Extension, and on the Litmus website.
|
the QA Extension, and on the Litmus website.
|
||||||
|
|
||||||
<html:h4>That's it!</html:h4>
|
<html:h4>That's it!</html:h4>
|
||||||
<html:b>You're ready to start testing.</html:b> If you have any questions along
|
<html:b>You're ready to start testing.</html:b> If you have any questions along
|
||||||
the way, you may post to the
|
the way, you may post to the
|
||||||
<html:a href='http://weblogs.mozillazine.org/qa/' target='_blank'>Mozilla QA Blog
|
<html:a href='http://weblogs.mozillazine.org/qa/' target='_blank'>Mozilla QA Blog
|
||||||
</html:a>, or, if you prefer, you can join us on
|
</html:a>, or, if you prefer, you can join us on
|
||||||
<html:a href='http://irc.mozilla.org' target='_blank'>IRC</html:a> (Internet Relay
|
<html:a href='http://irc.mozilla.org' target='_blank'>IRC</html:a> (Internet Relay
|
||||||
Chat) and become more involved in our testing community.
|
Chat) and become more involved in our testing community.
|
||||||
We are in #qa on irc.mozilla.org. If you have an irc client installed already,
|
We are in #qa on irc.mozilla.org. If you have an irc client installed already,
|
||||||
you should be able to join by clicking this link: <html:a href='irc://irc.mozilla.org/qa'>
|
you should be able to join by clicking this link: <html:a href='irc://irc.mozilla.org/qa'>
|
||||||
join #qa</html:a>.
|
join #qa</html:a>.
|
||||||
">
|
">
|
||||||
|
|
||||||
<!ENTITY qa.setup.sysconfig.header "System Configuration">
|
<!ENTITY qa.setup.sysconfig.header "System Configuration">
|
||||||
<!ENTITY qa.setup.sysconfig.text "
|
<!ENTITY qa.setup.sysconfig.text "
|
||||||
For your test results to be useful, we need to know a little bit about your
|
For your test results to be useful, we need to know a little bit about your
|
||||||
system configuration. We've tried to detect as much of the information below as
|
system configuration. We've tried to detect as much of the information below as
|
||||||
possible, but please check the settings below and make any necessary changes.
|
possible, but please check the settings below and make any necessary changes.
|
||||||
">
|
">
|
||||||
<!ENTITY qa.setup.sysconfig.platform "Platform:">
|
<!ENTITY qa.setup.sysconfig.platform "Platform:">
|
||||||
<!ENTITY qa.setup.sysconfig.opsys "Operating System:">
|
<!ENTITY qa.setup.sysconfig.opsys "Operating System:">
|
||||||
|
|
|
@ -1,9 +1,45 @@
|
||||||
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
|
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
|
#
|
||||||
|
# The contents of this file are subject to the Mozilla Public License Version
|
||||||
|
# 1.1 (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.mozilla.org/MPL/
|
||||||
|
#
|
||||||
|
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
|
# for the specific language governing rights and limitations under the
|
||||||
|
# License.
|
||||||
|
#
|
||||||
|
# The Original Code is Mozilla QA Extension Code.
|
||||||
|
#
|
||||||
|
# The Initial Developer of the Original Code is the Mozilla Corporation.
|
||||||
|
# Portions created by the Initial Developer are Copyright (C) 2007
|
||||||
|
# the Initial Developer. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Contributor(s):
|
||||||
|
# Zach Lipton <zach@zachlipton.com>
|
||||||
|
# Ben Hsieh <bhsieh@mozilla.com>
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
|
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
|
# of those above. If you wish to allow use of your version of this file only
|
||||||
|
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
|
# use your version of this file under the terms of the MPL, indicate your
|
||||||
|
# decision by deleting the provisions above and replace them with the notice
|
||||||
|
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
|
# the provisions above, a recipient may use your version of this file under
|
||||||
|
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
|
#
|
||||||
|
# ***** END LICENSE BLOCK *****
|
||||||
|
|
||||||
qa.extension.testcase.head = Testcase #
|
qa.extension.testcase.head = Testcase #
|
||||||
qa.extension.prefs.loginError = Login Error. Please check your username and password or create a new account.
|
qa.extension.prefs.loginError = Login Error. Please check your username and password or create a new account.
|
||||||
qa.extension.prefs.loadingMsg = Validating account information. Please Wait...
|
qa.extension.prefs.loadingMsg = Validating account information. Please Wait...
|
||||||
qa.extension.prefs.savedMsg = Your settings have been saved
|
qa.extension.prefs.savedMsg = Your settings have been saved
|
||||||
qa.extension.sysconfig.loadingMsg = Loading menu options...
|
qa.extension.sysconfig.loadingMsg = Loading menu options...
|
||||||
qa.extension.loading = Loading...
|
qa.extension.loading = Loading...
|
||||||
|
|
||||||
qa.extension.litmus.progress = Test %1$S of %2$S
|
qa.extension.litmus.progress = Test %1$S of %2$S
|
||||||
qa.extension.litmus.stats = My tests run - week: %1$S, month: %2$S, all time: %3$S
|
qa.extension.litmus.stats = My tests run - week: %1$S, month: %2$S, all time: %3$S
|
|
@ -1,3 +1,40 @@
|
||||||
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
|
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
|
#
|
||||||
|
# The contents of this file are subject to the Mozilla Public License Version
|
||||||
|
# 1.1 (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.mozilla.org/MPL/
|
||||||
|
#
|
||||||
|
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
|
# for the specific language governing rights and limitations under the
|
||||||
|
# License.
|
||||||
|
#
|
||||||
|
# The Original Code is Mozilla QA Extension Code.
|
||||||
|
#
|
||||||
|
# The Initial Developer of the Original Code is the Mozilla Corporation.
|
||||||
|
# Portions created by the Initial Developer are Copyright (C) 2007
|
||||||
|
# the Initial Developer. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Contributor(s):
|
||||||
|
# Zach Lipton <zach@zachlipton.com>
|
||||||
|
# Ben Hsieh <bhsieh@mozilla.com>
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
|
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
|
# of those above. If you wish to allow use of your version of this file only
|
||||||
|
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
|
# use your version of this file under the terms of the MPL, indicate your
|
||||||
|
# decision by deleting the provisions above and replace them with the notice
|
||||||
|
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
|
# the provisions above, a recipient may use your version of this file under
|
||||||
|
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
|
#
|
||||||
|
# ***** END LICENSE BLOCK *****
|
||||||
|
|
||||||
qa.extension.url.qmo.upcomingEvents = http://quality.mozilla.org/event/2007/06/21/feed/all/all/
|
qa.extension.url.qmo.upcomingEvents = http://quality.mozilla.org/event/2007/06/21/feed/all/all/
|
||||||
qa.extension.url.qmo.news = http://quality.mozilla.org/rss.xml
|
qa.extension.url.qmo.news = http://quality.mozilla.org/rss.xml
|
||||||
qa.extension.url.qmo.forum_topics = http://quality.mozilla.org/extension/forum_topics
|
qa.extension.url.qmo.forum_topics = http://quality.mozilla.org/extension/forum_topics
|
||||||
|
|
|
@ -1,3 +1,39 @@
|
||||||
|
/* ***** BEGIN LICENSE BLOCK *****
|
||||||
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
|
*
|
||||||
|
* The contents of this file are subject to the Mozilla Public License Version
|
||||||
|
* 1.1 (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.mozilla.org/MPL/
|
||||||
|
*
|
||||||
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
|
* for the specific language governing rights and limitations under the
|
||||||
|
* License.
|
||||||
|
*
|
||||||
|
* The Original Code is the Mozilla Community QA Extension
|
||||||
|
*
|
||||||
|
* The Initial Developer of the Original Code is the Mozilla Corporation.
|
||||||
|
* Portions created by the Initial Developer are Copyright (C) 2006
|
||||||
|
* the Initial Developer. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Contributor(s):
|
||||||
|
* Zach Lipton <zach@zachlipton.com>
|
||||||
|
* Ben Hsieh <ben.hsieh@gmail.com>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
|
* of those above. If you wish to allow use of your version of this file only
|
||||||
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
|
* use your version of this file under the terms of the MPL, indicate your
|
||||||
|
* decision by deleting the provisions above and replace them with the notice
|
||||||
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
|
* the provisions above, a recipient may use your version of this file under
|
||||||
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
|
*
|
||||||
|
* ***** END LICENSE BLOCK ***** */
|
||||||
#qa-notify {
|
#qa-notify {
|
||||||
right: 18px;
|
right: 18px;
|
||||||
bottom: 21px;
|
bottom: 21px;
|
||||||
|
@ -22,4 +58,8 @@
|
||||||
#qa-notify-header {
|
#qa-notify-header {
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#qa-statusbar-overlay {
|
||||||
|
list-style-image: url('chrome://qa/skin/qmo-16px.png');
|
||||||
|
}
|
||||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 3.0 KiB |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 3.0 KiB |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 2.8 KiB |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 3.1 KiB |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 2.8 KiB |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 3.1 KiB |
|
@ -1,77 +1,76 @@
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
/* ***** BEGIN LICENSE BLOCK *****
|
||||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
#
|
*
|
||||||
# The contents of this file are subject to the Mozilla Public License Version
|
* The contents of this file are subject to the Mozilla Public License Version
|
||||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||||
# the License. You may obtain a copy of the License at
|
* the License. You may obtain a copy of the License at
|
||||||
# http://www.mozilla.org/MPL/
|
* http://www.mozilla.org/MPL/
|
||||||
#
|
*
|
||||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
# for the specific language governing rights and limitations under the
|
* for the specific language governing rights and limitations under the
|
||||||
# License.
|
* License.
|
||||||
#
|
*
|
||||||
# The Original Code is the Mozilla Community QA Extension
|
* The Original Code is the Mozilla Community QA Extension
|
||||||
#
|
*
|
||||||
# The Initial Developer of the Original Code is the Mozilla Corporation.
|
* The Initial Developer of the Original Code is the Mozilla Corporation.
|
||||||
# Portions created by the Initial Developer are Copyright (C) 2007
|
* Portions created by the Initial Developer are Copyright (C) 2006
|
||||||
# the Initial Developer. All Rights Reserved.
|
* the Initial Developer. All Rights Reserved.
|
||||||
#
|
*
|
||||||
# Contributor(s):
|
* Contributor(s):
|
||||||
# Zach Lipton <zach@zachlipton.com>
|
* Zach Lipton <zach@zachlipton.com>
|
||||||
# Zach Linder <zakness@gmail.com>
|
* Zach Linder <zakness@gmail.com>
|
||||||
# Ben Hsieh <bhsieh@stanford.edu>
|
* Ben Hsieh <ben.hsieh@gmail.com>
|
||||||
#
|
*
|
||||||
# Alternatively, the contents of this file may be used under the terms of
|
* 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
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
# of those above. If you wish to allow use of your version of this file only
|
* of those above. If you wish to allow use of your version of this file only
|
||||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
# use your version of this file under the terms of the MPL, indicate your
|
* use your version of this file under the terms of the MPL, indicate your
|
||||||
# decision by deleting the provisions above and replace them with the notice
|
* decision by deleting the provisions above and replace them with the notice
|
||||||
# and other provisions required by the LGPL or the GPL. If you do not delete
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
# the provisions above, a recipient may use your version of this file under
|
* the provisions above, a recipient may use your version of this file under
|
||||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
#
|
*
|
||||||
# ***** END LICENSE BLOCK ***** --> */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
@import url(chrome://global/skin/);
|
@import url(chrome://global/skin/);
|
||||||
|
|
||||||
@import url(chrome://browser/skin/);
|
@import url(chrome://browser/skin/);
|
||||||
|
|
||||||
@namespace html "http://www.w3.org/1999/xhtml";
|
@namespace html "http://www.w3.org/1999/xhtml";
|
||||||
|
|
||||||
#qa-pass {
|
#qa-pass {
|
||||||
background: #99ff99;
|
background: #99ff99;
|
||||||
display: none;
|
display: none;
|
||||||
}
|
|
||||||
|
|
||||||
/*-------------------------------
|
|
||||||
HTML
|
|
||||||
-------------------------------*/
|
|
||||||
|
|
||||||
#qa_tabbox html|ul, #qa_tabbox html|ol {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
#qa_tabbox html|ul li {
|
|
||||||
list-style-type: square;
|
|
||||||
margin-bottom: 0.4em;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qa_tabbox html|a,
|
|
||||||
#qa_tabbox html|a:link,
|
|
||||||
#qa_tabbox html|a:visited {
|
|
||||||
font-weight: bold;
|
|
||||||
color: #0067ac;
|
|
||||||
}
|
|
||||||
#qa_tabbox html|a:focus,
|
|
||||||
#qa_tabbox html|a:hover,
|
|
||||||
#qa_tabbox html|a:active {
|
|
||||||
color: #333;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*-------------------------------
|
||||||
|
HTML
|
||||||
|
-------------------------------*/
|
||||||
|
|
||||||
|
#qa_tabbox html|ul, #qa_tabbox html|ol {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
#qa_tabbox html|ul li {
|
||||||
|
list-style-type: square;
|
||||||
|
margin-bottom: 0.4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qa_tabbox html|a,
|
||||||
|
#qa_tabbox html|a:link,
|
||||||
|
#qa_tabbox html|a:visited {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #0067ac;
|
||||||
|
}
|
||||||
|
#qa_tabbox html|a:focus,
|
||||||
|
#qa_tabbox html|a:hover,
|
||||||
|
#qa_tabbox html|a:active {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
/*remove bullets for everything but lists contained inside testcase data */
|
/*remove bullets for everything but lists contained inside testcase data */
|
||||||
html|li {
|
html|li {
|
||||||
list-style-type: none !important;
|
list-style-type: none !important;
|
||||||
|
@ -85,123 +84,154 @@ html|li {
|
||||||
|
|
||||||
#qa-tab-litmus html|ul, #qa-tab-litmus html|ol {
|
#qa-tab-litmus html|ul, #qa-tab-litmus html|ol {
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*-------------------------------
|
|
||||||
TABS
|
/*-------------------------------
|
||||||
-------------------------------*/
|
TABS
|
||||||
#qa_tabbox #qa_tabrow {
|
-------------------------------*/
|
||||||
height: 30px !important;
|
#qa_tabbox #qa_tabrow {
|
||||||
padding-top: 5px !important;
|
height: 30px !important;
|
||||||
}
|
padding-top: 5px !important;
|
||||||
#qa_tabbox .tab-icon-image {
|
}
|
||||||
list-style-image: none;
|
|
||||||
width: 0;
|
#qa_tabbox .tab-icon-image {
|
||||||
}
|
list-style-image: none;
|
||||||
#qa_tabbox #qa-tabbar-qmo {
|
width: 0;
|
||||||
list-style-image: url(qmo-16px.png);
|
}
|
||||||
width: 15px;
|
|
||||||
}
|
#qa_tabbox #qa-tabbar-qmo {
|
||||||
#qa_tabbox tab, #qa_tabbox tabs spacer {
|
list-style-image: url(qmo-16px.png);
|
||||||
border-bottom: 1px solid #ACA899 !important;
|
width: 15px;
|
||||||
}
|
}
|
||||||
.tabs-left, .tabs-right {
|
|
||||||
-moz-border-bottom-colors: #ACA899 #ACA899 !important;
|
#qa_tabbox #qa-tabbar-spacer {
|
||||||
}
|
width: 93px;
|
||||||
#qa_tabbox tab[selected="true"] {
|
}
|
||||||
border-bottom: 1px solid #E8E5D8 !important;
|
|
||||||
}
|
|
||||||
#qa_tabbox #qa-tabbar-spacer {
|
#qa_tabbox tab, #qa_tabbox tabs spacer {
|
||||||
width: 93px;
|
border-bottom: 1px solid #ACA899 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
tabs {
|
.tabs-left, .tabs-right {
|
||||||
border-bottom: 3px solid #E8E5D8;
|
-moz-border-bottom-colors: #ACA899 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#qa_tabbox tab[selected="true"] {
|
||||||
|
border-bottom: 1px solid #E8E5D8 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
tabs {
|
||||||
|
border-bottom: 1px solid #E8E5D8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-close-button {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabbrowser-tab.highlight > .tab-image-right {
|
||||||
|
background: url("chrome://qa/skin/highlight-start.png") no-repeat !important;
|
||||||
|
}
|
||||||
|
.tabbrowser-tab.highlight > .tab-image-left {
|
||||||
|
background: url("chrome://qa/skin/highlight-end.png") no-repeat !important;
|
||||||
|
}
|
||||||
|
.tabbrowser-tab.highlight > .tab-image-middle {
|
||||||
|
background: url("chrome://qa/skin/highlight-mid.png") repeat-x !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabbrowser-tab.highlight:hover > .tab-image-right {
|
||||||
|
background: url("chrome://qa/skin/highlight-hover-start.png") no-repeat !important;
|
||||||
|
}
|
||||||
|
.tabbrowser-tab.highlight:hover > .tab-image-left {
|
||||||
|
background: url("chrome://qa/skin/highlight-hover-end.png") no-repeat !important;
|
||||||
|
}
|
||||||
|
.tabbrowser-tab.highlight:hover > .tab-image-middle {
|
||||||
|
background: url("chrome://qa/skin/highlight-hover-mid.png") repeat-x !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* don't show outline around the middle of selected tabs */
|
/* don't show outline around the middle of selected tabs */
|
||||||
tab:focus > .tab-middle {
|
tab:focus > .tab-middle {
|
||||||
outline: 1px none invert !important;
|
outline: 1px none invert !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-------------------------------
|
/*-------------------------------
|
||||||
PANELS
|
PANELS
|
||||||
-------------------------------*/
|
-------------------------------*/
|
||||||
#qa_tabbox tabpanel {
|
#qa_tabbox tabpanel {
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
#qa_tabbox tabpanels {
|
#qa_tabbox tabpanels {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
border-top: 1px solid #ACA899;
|
border-top: 1px solid #ACA899;
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#qa_tabbox groupbox {
|
#qa_tabbox groupbox {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
#qa_tabbox caption {
|
#qa_tabbox caption {
|
||||||
font: bold 12px helvetica, arial, sans-serif;
|
font: bold 12px helvetica, arial, sans-serif;
|
||||||
color: #ec891d;
|
color: #ec891d;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#qa-qmo-help,
|
#qa-qmo-help,
|
||||||
#qa-qmo-events,
|
#qa-qmo-events,
|
||||||
.box-mheight {
|
.box-mheight {
|
||||||
max-height: 130px;
|
max-height: 130px;
|
||||||
height: 130px;
|
height: 130px;
|
||||||
}
|
}
|
||||||
#qa-qmo-forumposts {
|
#qa-qmo-forumposts {
|
||||||
width: 290px;
|
width: 290px;
|
||||||
}
|
}
|
||||||
#qa-qmo-latestbox {
|
#qa-qmo-latestbox {
|
||||||
height: 200px;
|
height: 200px;
|
||||||
width: 290px;
|
width: 290px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
margin-right: 12px;
|
margin-right: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*-------------------------------
|
/*-------------------------------
|
||||||
NOTIFY
|
NOTIFY
|
||||||
-------------------------------*/
|
-------------------------------*/
|
||||||
|
|
||||||
#qa-notify {
|
#qa-notify {
|
||||||
right: 18px;
|
right: 18px;
|
||||||
bottom: 21px;
|
bottom: 21px;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
border: 1px solid grey;
|
border: 1px solid grey;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
background-image: url("logolight.png");
|
background-image: url("logolight.png");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qa-notify {
|
.qa-notify {
|
||||||
height: 140px;
|
height: 140px;
|
||||||
width: 420px;
|
width: 420px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#qa-notify-box {
|
#qa-notify-box {
|
||||||
padding: 0px 6px 6px 6px;
|
padding: 0px 6px 6px 6px;
|
||||||
display: table;
|
display: table;
|
||||||
}
|
}
|
||||||
|
|
||||||
#qa-notify-header {
|
#qa-notify-header {
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*-------------------------------
|
/*-------------------------------
|
||||||
GENERAL
|
GENERAL
|
||||||
-------------------------------*/
|
-------------------------------*/
|
||||||
|
|
||||||
.list {
|
.list {
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,46 @@
|
||||||
|
/* ***** BEGIN LICENSE BLOCK *****
|
||||||
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
|
*
|
||||||
|
* The contents of this file are subject to the Mozilla Public License Version
|
||||||
|
* 1.1 (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.mozilla.org/MPL/
|
||||||
|
*
|
||||||
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
|
* for the specific language governing rights and limitations under the
|
||||||
|
* License.
|
||||||
|
*
|
||||||
|
* The Original Code is the Mozilla Community QA Extension
|
||||||
|
*
|
||||||
|
* The Initial Developer of the Original Code is the Mozilla Corporation.
|
||||||
|
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||||
|
* the Initial Developer. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Contributor(s):
|
||||||
|
* Zach Lipton <zach@zachlipton.com>
|
||||||
|
* Ben Hsieh <bhsieh@mozilla.com>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
|
* of those above. If you wish to allow use of your version of this file only
|
||||||
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
|
* use your version of this file under the terms of the MPL, indicate your
|
||||||
|
* decision by deleting the provisions above and replace them with the notice
|
||||||
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
|
* the provisions above, a recipient may use your version of this file under
|
||||||
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
|
*
|
||||||
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
pref("qa.extension.litmus.url", "http://litmus.mozilla.org/");
|
pref("qa.extension.litmus.url", "http://litmus.mozilla.org/");
|
||||||
pref("qa.extension.hermes.url", "http://litmus.mozilla.org/hermes/1/");
|
pref("qa.extension.hermes.url", "http://litmus.mozilla.org/hermes/1/");
|
||||||
|
pref("qa.extension.bugzilla.url", "http:/bugzilla.mozilla.org/");
|
||||||
pref("qa.extension.isFirstTime", true);
|
pref("qa.extension.isFirstTime", true);
|
||||||
pref("qa.extension.minNotificationInterval", 5400000); // 90 minutes
|
pref("qa.extension.minNotificationInterval", 5400000); // 90 minutes
|
||||||
pref("qa.extension.lastNotificationTime", 0);
|
pref("qa.extension.lastNotificationTime", 0);
|
||||||
pref("qa.extension.minNotificationCheckInterval", 5400000); // 90 minutes
|
pref("qa.extension.minNotificationCheckInterval", 5400000); // 90 minutes
|
||||||
pref("qa.extension.lastNotificationCheckTime", 0);
|
pref("qa.extension.lastNotificationCheckTime", 0);
|
||||||
pref("qa.extension.notificationSettings", '0,1,0,1,0,0,1');
|
pref("qa.extension.notificationSettings", '0,1,0,1,0,0,1');
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<RDF:RDF xmlns:em="http://www.mozilla.org/2004/em-rdf#"
|
<RDF:RDF xmlns:em="http://www.mozilla.org/2004/em-rdf#"
|
||||||
xmlns:NC="http://home.netscape.com/NC-rdf#"
|
xmlns:NC="http://home.netscape.com/NC-rdf#"
|
||||||
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||||
<RDF:Description RDF:about="rdf:#$QJqvE"
|
<RDF:Description RDF:about="rdf:#$QJqvE"
|
||||||
em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
|
em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
|
||||||
em:minVersion="2.0"
|
em:minVersion="2.0"
|
||||||
em:maxVersion="3.0a9" />
|
em:maxVersion="3.0a9" />
|
||||||
<RDF:Description RDF:about="urn:mozilla:install-manifest"
|
<RDF:Description RDF:about="urn:mozilla:install-manifest"
|
||||||
em:id="{667e9f3d-0096-4d2b-b171-9a96afbabe20}"
|
em:id="{667e9f3d-0096-4d2b-b171-9a96afbabe20}"
|
||||||
em:version="0.1.4"
|
em:version="0.1.4"
|
||||||
em:type="2"
|
em:type="2"
|
||||||
em:name="Mozilla Quality Extension"
|
em:name="Mozilla Quality Extension"
|
||||||
em:description="The QA tool"
|
em:description="The QA tool"
|
||||||
em:creator="Mozilla Quality Assurance"
|
em:creator="Mozilla Quality Assurance"
|
||||||
em:homepageURL="http://quality.mozilla.org/"
|
em:homepageURL="http://quality.mozilla.org/"
|
||||||
em:updateURL="https://landfill.bugzilla.org/mozillaQA/update.rdf">
|
em:updateURL="https://landfill.bugzilla.org/mozillaQA/update.rdf">
|
||||||
<em:targetApplication RDF:resource="rdf:#$QJqvE"/>
|
<em:targetApplication RDF:resource="rdf:#$QJqvE"/>
|
||||||
</RDF:Description>
|
</RDF:Description>
|
||||||
</RDF:RDF>
|
</RDF:RDF>
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
content qa jar:chrome/qa.jar!/content/
|
content qa jar:chrome/qa.jar!/content/
|
||||||
skin qa classic/1.0 jar:chrome/qa.jar!/skin/
|
skin qa classic/1.0 jar:chrome/qa.jar!/skin/
|
||||||
locale qa en-US jar:chrome/qa.jar!/locale/en-US/
|
locale qa en-US jar:chrome/qa.jar!/locale/en-US/
|
||||||
|
|
||||||
overlay chrome://browser/content/browser.xul chrome://qa/content/browserOverlays.xul
|
overlay chrome://browser/content/browser.xul chrome://qa/content/browserOverlays.xul
|
||||||
|
|
||||||
content chatzilla_qa jar:chatzilla.jar!/content/chatzilla/
|
content chatzilla_qa jar:chatzilla.jar!/content/chatzilla/
|
||||||
skin chatzilla_qa modern/1.0 jar:chatzilla.jar!/skin/modern/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/
|
locale chatzilla_qa en-US jar:chatzilla.jar!/locale/en-US/chatzilla/
|
||||||
content chatzillaservice_qa components/chatzilla-service.js
|
content chatzillaservice_qa components/chatzilla-service.js
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,77 @@
|
||||||
#qa-tabbar-spacer {
width: 17px !important;
}
#qa-tabbar-qmo {
margin-left: 10px !important;
margin-right: 17px !important;
}
|
/* ***** BEGIN LICENSE BLOCK *****
|
||||||
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
|
*
|
||||||
|
* The contents of this file are subject to the Mozilla Public License Version
|
||||||
|
* 1.1 (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.mozilla.org/MPL/
|
||||||
|
*
|
||||||
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
|
* for the specific language governing rights and limitations under the
|
||||||
|
* License.
|
||||||
|
*
|
||||||
|
* The Original Code is the Mozilla Community QA Extension
|
||||||
|
*
|
||||||
|
* The Initial Developer of the Original Code is the Mozilla Corporation.
|
||||||
|
* Portions created by the Initial Developer are Copyright (C) 2006
|
||||||
|
* the Initial Developer. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Contributor(s):
|
||||||
|
* Zach Lipton <zach@zachlipton.com>
|
||||||
|
* Ben Hsieh <ben.hsieh@gmail.com>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
|
* of those above. If you wish to allow use of your version of this file only
|
||||||
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
|
* use your version of this file under the terms of the MPL, indicate your
|
||||||
|
* decision by deleting the provisions above and replace them with the notice
|
||||||
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
|
* the provisions above, a recipient may use your version of this file under
|
||||||
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
|
*
|
||||||
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
#qa_tabpanels * {
|
#qa-tabbar-spacer {
|
||||||
background-color: #ebebeb !important;
|
width: 17px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
groupbox * {
|
#qa_tabbox tabpanel {
|
||||||
background: url("chrome://global/skin/10pct_transparent_grey.png") repeat !important;
|
background-color: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#qa_tabbox tabpanels {
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qa_tabbox groupbox {
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
#qa_tabbox caption {
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** causes weird behavior on branch, but needed for trunk **/
|
||||||
|
#qa-tabbar-qmo {
|
||||||
|
width:16px;
|
||||||
|
margin-left: 13px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qa-testcase-comment {
|
||||||
|
background-color: transparent !important;
|
||||||
|
max-width: 170px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qa-preferences-litmus-username {
|
||||||
|
max-width: 350px;
|
||||||
|
width: 350px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qa-preferences-litmus-password {
|
||||||
|
max-width: 400px;
|
||||||
|
width: 350px;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
/**
|
||||||
|
* This file is intentionally left blank to prevent an error from being thrown
|
||||||
|
* on windows when attempting to overwrite the common CSS. If we need future
|
||||||
|
* specific windows CSS tweaks, they should go here.
|
||||||
|
**/
|
Загрузка…
Ссылка в новой задаче