зеркало из 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,
|
||||
Academic Free License. Chatzilla (used under MPL/GPL) is
|
||||
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"?>
|
||||
|
||||
<!--
|
||||
build.xml adapted from Shawn Wilsher's rtse
|
||||
<!--
|
||||
build.xml adapted from Shawn Wilsher's rtse
|
||||
(http://shawnwilsher.com/extensions/rtse/)
|
||||
-->
|
||||
|
||||
|
||||
<project name="qa" default="createxpi">
|
||||
<tstamp>
|
||||
<format property="build.number" pattern="yyyyMMdd" offset="-1" unit="hour"/>
|
||||
</tstamp>
|
||||
<property name="build.version" value="0.1.${build.number}"/>
|
||||
<target name="createxpi" depends="createjar">
|
||||
<zip destfile="qa.xpi">
|
||||
<zipfileset dir="" includes="chrome/qa.jar"/>
|
||||
<zipfileset dir="" includes="chatzilla.jar"/>
|
||||
<zipfileset dir="" includes="install.rdf"/>
|
||||
<zipfileset dir="" includes="jar-chrome.manifest" fullpath="chrome.manifest"/>
|
||||
<zipfileset dir="" includes="README" />
|
||||
<zipfileset dir="" includes="defaults/**" excludes="**CVS"/>
|
||||
<zipfileset dir="" includes="platform/**" excludes="**CVS"/>
|
||||
<zipfileset dir="" includes="components/chatzilla-service.js" />
|
||||
</zip>
|
||||
</target>
|
||||
<target name="createjar">
|
||||
<target name="createxpi" depends="createjar">
|
||||
<zip destfile="qa.xpi">
|
||||
<zipfileset dir="" includes="chrome/qa.jar"/>
|
||||
<zipfileset dir="" includes="chatzilla.jar"/>
|
||||
<zipfileset dir="" includes="install.rdf"/>
|
||||
<zipfileset dir="" includes="jar-chrome.manifest" fullpath="chrome.manifest"/>
|
||||
<zipfileset dir="" includes="README" />
|
||||
<zipfileset dir="" includes="defaults/**" excludes="**CVS"/>
|
||||
<zipfileset dir="" includes="platform/**" excludes="**CVS"/>
|
||||
<zipfileset dir="" includes="components/chatzilla-service.js" />
|
||||
</zip>
|
||||
</target>
|
||||
<target name="createjar">
|
||||
<zip destfile="chrome/qa.jar">
|
||||
<zipfileset dir="chrome" includes="content/**" excludes="**CVS"/>
|
||||
<zipfileset dir="chrome" includes="skin/**" excludes="**CVS"/>
|
||||
<zipfileset dir="chrome" includes="locale/**" excludes="**CVS"/>
|
||||
</zip>
|
||||
</zip>
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
content qa chrome/content/
|
||||
skin qa classic/1.0 chrome/skin/
|
||||
locale qa en-US chrome/locale/en-US/
|
||||
content qa chrome/content/
|
||||
skin qa classic/1.0 chrome/skin/
|
||||
locale qa en-US chrome/locale/en-US/
|
||||
|
||||
overlay chrome://browser/content/browser.xul chrome://qa/content/browserOverlays.xul
|
||||
|
||||
content chatzilla_qa jar:chatzilla.jar!/content/chatzilla/
|
||||
skin chatzilla_qa modern/1.0 jar:chatzilla.jar!/skin/modern/chatzilla/
|
||||
locale chatzilla_qa en-US jar:chatzilla.jar!/locale/en-US/chatzilla/
|
||||
content chatzillaservice_qa components/chatzilla-service.js
|
||||
content chatzillaservice_qa components/chatzilla-service.js
|
||||
|
|
|
@ -1,108 +1,80 @@
|
|||
<!-- -*- Mode: HTML -*-
|
||||
# ***** 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 Zach Lipton.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2006
|
||||
# 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 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 ***** -->
|
||||
|
||||
var accountCreate = {
|
||||
oldPassword: null, //TODO: is this secure?
|
||||
oldUsername: null,
|
||||
updateFunction : null,
|
||||
loadSetup : function() {
|
||||
document.getElementById('qa-setup-createaccount-iframe').src =
|
||||
litmus.baseURL+'extension.cgi?createAccount=1';
|
||||
accountCreate.updateFunction = window.arguments[0];
|
||||
|
||||
accountCreate.oldPassword = qaPref.litmus.getPassword();
|
||||
accountCreate.oldUsername = qaPref.litmus.getUsername();
|
||||
},
|
||||
validateAccount : function() {
|
||||
// we're creating a new account, so get the uname and passwd
|
||||
// from the account created page:
|
||||
var page = document.getElementById('qa-setup-createaccount-iframe').
|
||||
contentDocument;
|
||||
if (!page) {
|
||||
alert("create account page is missing");
|
||||
return false;
|
||||
}
|
||||
if (page.wrappedJSObject == null)
|
||||
page.wrappedJSObject = page;
|
||||
if (page.forms[0] && page.forms[0].wrappedJSObject == null)
|
||||
page.forms[0].wrappedJSObject = page.forms[0];
|
||||
|
||||
if (page.location == litmus.baseURL+'extension.cgi?createAccount=1'
|
||||
&& qaSetup.didSubmitForm==0) {
|
||||
page.forms[0].wrappedJSObject.submit();
|
||||
qaSetup.didSubmitForm = 1;
|
||||
setTimeout("qaSetup.validateAccount()", 5000);
|
||||
return false;
|
||||
}
|
||||
if (qaSetup.didSubmitForm == 1 && ! page.forms ||
|
||||
! page.forms[0].wrappedJSObject ||
|
||||
! page.forms[0].wrappedJSObject.email &&
|
||||
! page.forms[0].wrappedJSObject.email.value)
|
||||
{qaSetup.didSubmitForm = 2;
|
||||
setTimeout("qaSetup.validateAccount()", 4000);
|
||||
return false;}
|
||||
var e = '';
|
||||
var p = '';
|
||||
if (page.forms && page.forms[0].wrappedJSObject &&
|
||||
page.forms[0].wrappedJSObject.email &&
|
||||
page.forms[0].wrappedJSObject.email.value)
|
||||
{ e=page.forms[0].wrappedJSObject.email.value }
|
||||
if (page.forms && page.forms[0].wrappedJSObject &&
|
||||
page.forms[0].wrappedJSObject.password &&
|
||||
page.forms[0].wrappedJSObject.password.value)
|
||||
{ p=page.forms[0].wrappedJSObject.password.value }
|
||||
// e is account, p is password
|
||||
|
||||
var uname = e;
|
||||
var passwd = p;
|
||||
|
||||
|
||||
if (e == '' || p == '') {
|
||||
alert("No username or password has been registered.");
|
||||
return false; //we need better error handling.
|
||||
}
|
||||
qaPref.litmus.setPassword(uname, passwd);
|
||||
accountCreate.updateFunction();
|
||||
|
||||
// TODO: ideally we would validate against litmus, but...
|
||||
return true;
|
||||
},
|
||||
|
||||
handleCancel : function() {
|
||||
qaPref.litmus.setPassword(oldUsername, oldPassword);
|
||||
}
|
||||
}
|
||||
<!-- -*- Mode: HTML -*-
|
||||
/* ***** 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):
|
||||
* 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
|
||||
* 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 accountCreate = {
|
||||
oldPassword: null, //TODO: is this secure?
|
||||
oldUsername: null,
|
||||
updateFunction : null,
|
||||
loadSetup : function() {
|
||||
document.getElementById('qa-settings-createaccount-frame').src =
|
||||
litmus.baseURL+'extension.cgi?createAccount=1';
|
||||
accountCreate.updateFunction = window.arguments[0];
|
||||
|
||||
accountCreate.oldPassword = qaPref.litmus.getPassword();
|
||||
accountCreate.oldUsername = qaPref.litmus.getUsername();
|
||||
},
|
||||
validateAccount : function() {
|
||||
|
||||
var account = qaSetup.retrieveAccount("qa-settings-createaccount-frame");
|
||||
var uname = account.name;
|
||||
var passwd = account.password;
|
||||
|
||||
|
||||
if (uname == '' || passwd == '') {
|
||||
alert("No username or password has been registered.");
|
||||
return false; //we need better error handling.
|
||||
}
|
||||
|
||||
var location = document.getElementById('qa-settings-createaccount-frame').contentDocument.location + "";
|
||||
if (location.indexOf("createAccount") != -1) {
|
||||
alert("Account not created! You most likely need to click the 'Create Account' button");
|
||||
return false;
|
||||
}
|
||||
|
||||
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 -*-
|
||||
# ***** 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 Zach Lipton.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2006
|
||||
# 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 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 ***** -->
|
||||
<!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://qa/skin/" type="text/css"?>
|
||||
|
||||
<dialog id="account-setup"
|
||||
title="Account Creation"
|
||||
class="color-dialog"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
width="800px"
|
||||
height="400px"
|
||||
onload="accountCreate.loadSetup();"
|
||||
ondialogaccept="return accountCreate.validateAccount();"
|
||||
ondialogcancel=""
|
||||
>
|
||||
<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/common.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/accountcreate.js" />
|
||||
|
||||
<stringbundleset id="stringbundleset">
|
||||
<stringbundle id="bundle_qa" src="chrome://qa/locale/qa.properties" />
|
||||
</stringbundleset>
|
||||
|
||||
<vbox id="qa-setup-accountno" style="display: none" width="0px" height="0px" />
|
||||
<html:iframe id="qa-setup-createaccount-iframe"
|
||||
height="280"/>
|
||||
|
||||
</dialog>
|
||||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||
- ***** 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 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 ***** -->
|
||||
<!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://qa/skin/" type="text/css"?>
|
||||
|
||||
<dialog id="account-setup"
|
||||
title="Account Creation"
|
||||
class="color-dialog"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
width="800px"
|
||||
height="400px"
|
||||
onload="accountCreate.loadSetup();"
|
||||
ondialogaccept="return accountCreate.validateAccount();"
|
||||
ondialogcancel=""
|
||||
>
|
||||
<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/common.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/accountcreate.js" />
|
||||
|
||||
<stringbundleset id="stringbundleset">
|
||||
<stringbundle id="bundle_qa" src="chrome://qa/locale/qa.properties" />
|
||||
</stringbundleset>
|
||||
|
||||
<vbox id="qa-setup-accountno" style="display: none" width="0px" height="0px" />
|
||||
<html:iframe id="qa-settings-createaccount-frame"
|
||||
height="280"/>
|
||||
|
||||
</dialog>
|
||||
|
|
|
@ -1,39 +1,40 @@
|
|||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||
# ***** 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>
|
||||
#
|
||||
# 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 ***** -->
|
||||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||
- ***** 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 <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 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 ***** -->
|
||||
|
||||
<?xml-stylesheet href="chrome://qa/skin/browserOverlays.css" type="text/css"?>
|
||||
|
||||
|
@ -41,20 +42,19 @@
|
|||
<!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">
|
||||
|
||||
|
||||
<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/qa.js" />
|
||||
<script type="application/x-javascript" src="chrome://qa/content/notifications.js" />
|
||||
|
||||
|
||||
<statusbar id="status-bar">
|
||||
<statusbarpanel class="statusbarpanel-iconic" id="qa-statusbar-overlay"
|
||||
src="chrome://qa/skin/qmo-16px.png"
|
||||
onclick="qaMain.openQATool();" />
|
||||
<statusbarpanel class="statusbarpanel-iconic" id="qa-statusbar-overlay"
|
||||
onclick="qaMain.openQATool();" />
|
||||
</statusbar>
|
||||
|
||||
|
||||
<window id="main-window">
|
||||
<vbox id="qa-notify" class="qa-notify" hidden="true">
|
||||
<vbox flex="1" class="qa-notify">
|
||||
|
@ -67,23 +67,21 @@
|
|||
<label id="qa-notify-inprogress" value="&qa.notification.inprogress;" />
|
||||
<hbox align="center" id="qa-notify-header-box" style="overflow: hidden">
|
||||
<label id="qa-notify-header" value="" />
|
||||
</hbox>
|
||||
</hbox>
|
||||
<vbox id="qa-notify-event" style="display: none;">
|
||||
<label id="qa-notify-event-datetime" value="" />
|
||||
<label id="qa-notify-event-place" value="" />
|
||||
</vbox>
|
||||
<vbox id="qa-notify-content">
|
||||
<description id="qa-notify-text" />
|
||||
<label id="qa-notify-infolink" class="text-link" href=""
|
||||
value="" />
|
||||
<label id="qa-notify-getstartedlink" class="text-link" href=""
|
||||
value="" style="display: none;" />
|
||||
</vbox>
|
||||
<label id="qa-notify-infolink" class="text-link" href=""
|
||||
value="" />
|
||||
<label id="qa-notify-getstartedlink" class="text-link" href=""
|
||||
value="" style="display: none;" />
|
||||
</vbox>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</window>
|
||||
|
||||
|
||||
</overlay>
|
||||
</overlay>
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
* Zach Lipton <zach@zachlipton.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
|
||||
* 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"),
|
||||
|
@ -41,102 +43,103 @@ const Cc = Components.classes;
|
|||
const Cr = Components.results;
|
||||
|
||||
var qaTools = {
|
||||
// load a JSON doc into a menulist/menupopup
|
||||
// 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
|
||||
// use to get the value from the JSON doc, plus an optional callback
|
||||
loadJsonMenu : function(url, menulist, nameMethod, valueMethod, callback) {
|
||||
var d = loadJSONDoc(url);
|
||||
d.addErrback(function (err) {
|
||||
if (err instanceof CancelledError) {
|
||||
return;
|
||||
// load a JSON doc into a menulist/menupopup
|
||||
// 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
|
||||
// use to get the value from the JSON doc, plus an optional callback
|
||||
loadJsonMenu : function(url, menulist, nameMethod, valueMethod, callback) {
|
||||
var d = loadJSONDoc(url);
|
||||
d.addErrback(function (err) {
|
||||
if (err instanceof CancelledError) {
|
||||
return;
|
||||
}
|
||||
alert(err);
|
||||
dump(err);
|
||||
});
|
||||
d.addCallback(function(obj) {
|
||||
if (obj instanceof Array) {
|
||||
for (var i=0; i<obj.length; i++) {
|
||||
var item = obj[i];
|
||||
if (! item) { continue; }
|
||||
var newitem = menulist.appendItem(item[nameMethod],
|
||||
item[valueMethod]);
|
||||
}
|
||||
} else {
|
||||
var newitem = menulist.appendItem(obj[nameMethod], obj[valueMethod]);
|
||||
}
|
||||
// stash the JSON object in the userData attribute for
|
||||
// later use (e.g. when filtering the list).
|
||||
newitem.userData = item;
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
},
|
||||
fetchFeed : function(url, callback) {
|
||||
var httpRequest = null;
|
||||
function FeedResultListener() {}
|
||||
FeedResultListener.prototype = {
|
||||
handleResult : function(result) {
|
||||
var feed = result.doc;
|
||||
feed.QueryInterface(Ci.nsIFeed);
|
||||
callback(feed);
|
||||
},
|
||||
};
|
||||
|
||||
function infoReceived() {
|
||||
var data = httpRequest.responseText;
|
||||
var ioService = Cc['@mozilla.org/network/io-service;1']
|
||||
.getService(Ci.nsIIOService);
|
||||
var uri = ioService.newURI(url, null, null);
|
||||
if (data.length) {
|
||||
var processor = Cc["@mozilla.org/feed-processor;1"]
|
||||
.createInstance(Ci.nsIFeedProcessor);
|
||||
try {
|
||||
processor.listener = new FeedResultListener;
|
||||
processor.parseFromString(data, uri);
|
||||
} catch(e) {
|
||||
alert("Error parsing feed: " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
httpRequest = new XMLHttpRequest();
|
||||
httpRequest.open("GET", url, true);
|
||||
try {
|
||||
httpRequest.onload = infoReceived;
|
||||
httpRequest.send(null);
|
||||
} catch(e) {
|
||||
alert(e);
|
||||
}
|
||||
},
|
||||
httpPostRequest : function (url, data, callback, errback) {
|
||||
// do a xmlhttprequest sending data with the post method
|
||||
var req = getXMLHttpRequest();
|
||||
req.open("POST", url, true);
|
||||
req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
||||
req.setRequestHeader("Content-length", data.length);
|
||||
req.setRequestHeader("Connection", "close");
|
||||
req = sendXMLHttpRequest(req, data);
|
||||
req.addErrback(errback);
|
||||
req.addCallback(callback);
|
||||
},
|
||||
showHideLoadingMessage : function(box, bool) {
|
||||
if (bool == true) { // show
|
||||
var loading = document.createElementNS("http://www.w3.org/1999/xhtml", "p");
|
||||
loading.textContent = qaMain.bundle.getString("qa.extension.loading");
|
||||
loading.setAttributeNS("http://www.w3.org/1999/xhtml", "class", "loading_message");
|
||||
box.appendChild(loading);
|
||||
} else { // hide
|
||||
var elements = box.childNodes;
|
||||
for (var i=0; i<elements.length; i++) {
|
||||
if (elements[i] && elements[i].getAttributeNS &&
|
||||
elements[i].getAttributeNS(
|
||||
"http://www.w3.org/1999/xhtml", "class") == "loading_message") {
|
||||
box.removeChild(elements[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
d.addCallback(function(obj) {
|
||||
if (obj instanceof Array) {
|
||||
for (var i=0; i<obj.length; i++) {
|
||||
var item = obj[i];
|
||||
if (! item) { continue; }
|
||||
var newitem = menulist.appendItem(item[nameMethod],
|
||||
item[valueMethod]);
|
||||
}
|
||||
} else {
|
||||
var newitem = menulist.appendItem(obj[nameMethod], obj[valueMethod]);
|
||||
}
|
||||
// stash the JSON object in the userData attribute for
|
||||
// later use (e.g. when filtering the list).
|
||||
newitem.userData = item;
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
},
|
||||
fetchFeed : function(url, callback) {
|
||||
var httpRequest = null;
|
||||
function FeedResultListener() {}
|
||||
FeedResultListener.prototype = {
|
||||
handleResult : function(result) {
|
||||
var feed = result.doc;
|
||||
feed.QueryInterface(Ci.nsIFeed);
|
||||
callback(feed);
|
||||
}
|
||||
};
|
||||
|
||||
function infoReceived() {
|
||||
var data = httpRequest.responseText;
|
||||
var ioService = Cc['@mozilla.org/network/io-service;1']
|
||||
.getService(Ci.nsIIOService);
|
||||
var uri = ioService.newURI(url, null, null);
|
||||
if (data.length) {
|
||||
var processor = Cc["@mozilla.org/feed-processor;1"]
|
||||
.createInstance(Ci.nsIFeedProcessor);
|
||||
try {
|
||||
processor.listener = new FeedResultListener;
|
||||
processor.parseFromString(data, uri);
|
||||
} catch(e) {
|
||||
alert("Error parsing feed: " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
httpRequest = new XMLHttpRequest();
|
||||
httpRequest.open("GET", url, true);
|
||||
try {
|
||||
httpRequest.onload = infoReceived;
|
||||
httpRequest.send(null);
|
||||
} catch(e) {
|
||||
alert(e);
|
||||
}
|
||||
},
|
||||
httpPostRequest : function (url, data, callback, errback) {
|
||||
// do a xmlhttprequest sending data with the post method
|
||||
var req = getXMLHttpRequest();
|
||||
req.open("POST", url, true);
|
||||
req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
||||
req.setRequestHeader("Content-length", data.length);
|
||||
req.setRequestHeader("Connection", "close");
|
||||
req = sendXMLHttpRequest(req, data);
|
||||
req.addErrback(errback);
|
||||
req.addCallback(callback);
|
||||
},
|
||||
showHideLoadingMessage : function(box, bool) {
|
||||
if (bool == true) { // show
|
||||
var loading = document.createElementNS("http://www.w3.org/1999/xhtml", "p");
|
||||
loading.textContent = qaMain.bundle.getString("qa.extension.loading");
|
||||
loading.setAttributeNS("http://www.w3.org/1999/xhtml",
|
||||
"class", "loading_message");
|
||||
box.appendChild(loading);
|
||||
} else { // hide
|
||||
var elements = box.childNodes;
|
||||
for (var i=0; i<elements.length; i++) {
|
||||
if (elements[i] && elements[i].getAttributeNS &&
|
||||
elements[i].getAttributeNS(
|
||||
"http://www.w3.org/1999/xhtml", "class") == "loading_message") {
|
||||
box.removeChild(elements[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
arrayify : function(obj) {
|
||||
if (obj instanceof Array) {
|
||||
return obj;
|
||||
|
@ -151,9 +154,9 @@ var qaTools = {
|
|||
var context = document.getElementById(elementID);
|
||||
var fragment = gUnescapeHTML.parseFragment(htmlstr, false, null, context);
|
||||
context.appendChild(fragment);
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
assignLinkHandlers : function(node) {
|
||||
var children = node.getElementsByTagName('a');
|
||||
for (var i = 0; i < children.length; i++)
|
||||
|
@ -167,8 +170,29 @@ var qaTools = {
|
|||
var type = qaPref.getPref("browser.link.open_external", "int");
|
||||
var where = "tab";
|
||||
if (type == 2) where = "window";
|
||||
|
||||
|
||||
openUILinkIn(url, where);
|
||||
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):
|
||||
* 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
|
||||
* 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}";
|
||||
|
||||
|
||||
var litmus = {
|
||||
baseURL : qaPref.getPref(qaPref.prefBase+".litmus.url", "char"),
|
||||
userStats : '',
|
||||
|
||||
getTestcase : function(testcase_id, callback) {
|
||||
baseURL : qaPref.getPref(qaPref.prefBase+".litmus.url", "char"),
|
||||
userStats : '',
|
||||
|
||||
getTestcase : function(testcase_id, callback) {
|
||||
litmus.getLitmusJson(testcase_id, callback, "testcase_id=");
|
||||
},
|
||||
getSubgroup : function(subgroupID, callback) {
|
||||
},
|
||||
getSubgroup : function(subgroupID, callback) {
|
||||
litmus.getLitmusJson(subgroupID, callback, "subgroup_id=");
|
||||
},
|
||||
getTestgroup : function(testgroupID, callback) {
|
||||
|
@ -55,7 +55,7 @@
|
|||
litmus.getLitmusJson(testrunID, callback, "test_run_id=");
|
||||
},
|
||||
getTestruns : function(callback) {
|
||||
var s = new Sysconfig();
|
||||
var s = new Sysconfig();
|
||||
var branch = encodeURIComponent(s.branch);
|
||||
litmus.getLitmusJson("&product_name=Firefox&branch_name=" + branch,
|
||||
callback, "test_runs_by_branch_product_name=1");
|
||||
|
@ -63,38 +63,38 @@
|
|||
getLitmusJson : function(ID, callback, prefix) {
|
||||
var url = litmus.baseURL+'json.cgi?' + prefix + ID;
|
||||
var d = loadJSONDoc(url);
|
||||
d.addBoth(function (res) {
|
||||
d.deferred = null;
|
||||
return res;
|
||||
});
|
||||
d.addCallback(callback);
|
||||
d.addErrback(function (err) {
|
||||
if (err instanceof CancelledError) {
|
||||
return;
|
||||
d.addBoth(function (res) {
|
||||
d.deferred = null;
|
||||
return res;
|
||||
});
|
||||
d.addCallback(callback);
|
||||
d.addErrback(function (err) {
|
||||
if (err instanceof CancelledError) {
|
||||
return;
|
||||
}
|
||||
alert(err);
|
||||
dump(err);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
lastTestRunSummary : "",
|
||||
lastTestGroupSummary : "",
|
||||
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
|
||||
lastTestcaseIndex: null,
|
||||
|
||||
|
||||
preDialogSubgroupObject: null, // saved to be restored in case of Cancel()
|
||||
preDialogTestcaseObject: null,
|
||||
|
||||
|
||||
dialogActive: false, // we want to keep controls disabled, even if the selection changes.
|
||||
|
||||
|
||||
storeSubgroup : function(subgroup) {
|
||||
litmus.lastSubgroupObject = subgroup;
|
||||
},
|
||||
storeTestcase : function(testcase) {
|
||||
litmus.lastTestcaseObject = testcase;
|
||||
},
|
||||
|
||||
|
||||
handleDialog : function() {
|
||||
if ($("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',
|
||||
litmus.readStateFromPref, litmus.handleDialogCancel, litmus.handleDialogOK);
|
||||
},
|
||||
|
||||
|
||||
handleDialogCancel : function() {
|
||||
if (litmus.lastTestRunSummary == "") return;
|
||||
|
||||
|
||||
// this code is v. similar to readStateFromPref, but without an async call.
|
||||
$("qa-testrun-label").value = litmus.lastTestRunSummary;
|
||||
$("qa-testgroup-label").value = litmus.lastTestGroupSummary;
|
||||
litmus.lastSubgroupObject = litmus.preDialogueSubgroupObject;
|
||||
litmus.lastTestcaseObject = litmus.preDialogTestcaseObject;
|
||||
|
||||
|
||||
if (litmus.lastSubgroupObject != null)
|
||||
litmus.populatePreviewBox(litmus.lastSubgroupObject.testcases);
|
||||
if (litmus.lastTestcaseObject != null) {
|
||||
|
@ -127,45 +127,45 @@
|
|||
$("testlist").setAttribute("suppressonselect", "true");
|
||||
$("testlist").selectedIndex = lastTestcaseIndex;
|
||||
$("testlist").setAttribute("suppressonselect", "false");
|
||||
|
||||
|
||||
// rewrite the prefs
|
||||
litmus.writeStateToPref(litmus.lastTestRunSummary, litmus.lastTestGroupSummary,
|
||||
litmus.lastSubgroupObject.subgroup_id, lastTestcaseIndex);
|
||||
|
||||
|
||||
litmus.dialogActive = false;
|
||||
litmus.undisableAll();
|
||||
},
|
||||
|
||||
|
||||
handleDialogOK : function() {
|
||||
litmus.dialogActive = false;
|
||||
litmus.undisableAll();
|
||||
},
|
||||
|
||||
validateLogin : function(uname, passwd, callback) {
|
||||
var qs = queryString({
|
||||
validate_login: 1,
|
||||
username: uname,
|
||||
password: passwd
|
||||
});
|
||||
qaTools.httpPostRequest(litmus.baseURL+'json.cgi', qs, callback);
|
||||
},
|
||||
postResultXML : function(xml, callback, errback) {
|
||||
var qs = queryString({ data: xml});
|
||||
var fake_callback = function(resp) {
|
||||
// only call callback() if we really had a sucuess. XML
|
||||
// processing errors should result in a call to errback()
|
||||
if ((/^ok/i).exec(resp.responseText)) {
|
||||
callback(resp);
|
||||
} else {
|
||||
errback(resp);
|
||||
}
|
||||
};
|
||||
qaTools.httpPostRequest(litmus.baseURL+'process_test.cgi',
|
||||
qs, fake_callback, errback);
|
||||
},
|
||||
|
||||
currentSubgroupID: null,
|
||||
|
||||
|
||||
validateLogin : function(uname, passwd, callback) {
|
||||
var qs = queryString({
|
||||
validate_login: 1,
|
||||
username: uname,
|
||||
password: passwd
|
||||
});
|
||||
qaTools.httpPostRequest(litmus.baseURL+'json.cgi', qs, callback);
|
||||
},
|
||||
postResultXML : function(xml, callback, errback) {
|
||||
var qs = queryString({ data: xml});
|
||||
var fake_callback = function(resp) {
|
||||
// only call callback() if we really had a sucuess. XML
|
||||
// processing errors should result in a call to errback()
|
||||
if ((/^ok/i).exec(resp.responseText)) {
|
||||
callback(resp);
|
||||
} else {
|
||||
errback(resp);
|
||||
}
|
||||
};
|
||||
qaTools.httpPostRequest(litmus.baseURL+'process_test.cgi',
|
||||
qs, fake_callback, errback);
|
||||
},
|
||||
|
||||
currentSubgroupID: null,
|
||||
|
||||
writeStateToPref : function(testrunSummary, testgroupSummary, subgroupID, index) {
|
||||
qaPref.setPref(qaPref.prefBase + ".currentTestcase.testrunSummary", testrunSummary, "char");
|
||||
qaPref.setPref(qaPref.prefBase + ".currentTestcase.testgroupSummary", testgroupSummary, "char");
|
||||
|
@ -177,26 +177,26 @@
|
|||
$("qa-testgroup-label").value = qaPref.getPref(qaPref.prefBase + ".currentTestcase.testgroupSummary", "char");
|
||||
litmus.currentSubgroupID = qaPref.getPref(qaPref.prefBase + ".currentTestcase.subgroupId", "int");
|
||||
litmus.disableAll();
|
||||
|
||||
|
||||
if (litmus.currentSubgroupID != 0)
|
||||
litmus.getSubgroup(litmus.currentSubgroupID, function(subgroup) {litmus.statePopulateFields(subgroup); litmus.undisableAll();});
|
||||
},
|
||||
loadStats : function() {
|
||||
// pull new user statistics from litmus
|
||||
var url = litmus.baseURL+'json.cgi?' + 'user_stats=' + qaPref.litmus.getUsername();
|
||||
var req = loadJSONDoc(url);
|
||||
req.addCallback(function(data) {
|
||||
litmus.userStats = data;
|
||||
litmus.displayStats();
|
||||
});
|
||||
// pull new user statistics from litmus
|
||||
var url = litmus.baseURL+'json.cgi?' + 'user_stats=' + qaPref.litmus.getUsername();
|
||||
var req = loadJSONDoc(url);
|
||||
req.addCallback(function(data) {
|
||||
litmus.userStats = data;
|
||||
litmus.displayStats();
|
||||
});
|
||||
},
|
||||
displayStats : function() {
|
||||
var statbox = $('qa-litmus-stats');
|
||||
if (litmus.userStats != '') {
|
||||
var statline = qaMain.bundle.getFormattedString('qa.extension.litmus.stats',
|
||||
[litmus.userStats.week, litmus.userStats.month, litmus.userStats.alltime]);
|
||||
statbox.value = statline;
|
||||
}
|
||||
var statbox = $('qa-litmus-stats');
|
||||
if (litmus.userStats != '') {
|
||||
var statline = qaMain.bundle.getFormattedString('qa.extension.litmus.stats',
|
||||
[litmus.userStats.week, litmus.userStats.month, litmus.userStats.alltime]);
|
||||
statbox.value = statline;
|
||||
}
|
||||
},
|
||||
checkRadioButtons : function() {
|
||||
var menu = document.getElementById('testlist');
|
||||
|
@ -204,39 +204,39 @@
|
|||
var disable = menu.selectedItem.firstChild.getAttribute("checked");
|
||||
document.getElementById("qa-testcase-result").disabled = disable;
|
||||
},
|
||||
|
||||
|
||||
prevButton : function() {
|
||||
$("testlist").selectedIndex--;
|
||||
},
|
||||
nextButton: function() {
|
||||
// if they selected a result, then submit the result
|
||||
if ($('qa-testcase-result').selectedItem) {
|
||||
litmus.submitResult();
|
||||
}
|
||||
nextButton: function() {
|
||||
// if they selected a result, then submit the result
|
||||
if ($('qa-testcase-result').selectedItem) {
|
||||
litmus.submitResult();
|
||||
}
|
||||
$("testlist").selectedIndex++;
|
||||
},
|
||||
},
|
||||
handleSelect : function() {
|
||||
if ($("testlist").selectedIndex == -1)
|
||||
return;
|
||||
|
||||
|
||||
litmus.disableAll();
|
||||
litmus.getTestcase($("testlist").selectedItem.value, function(testcase) {
|
||||
litmus.populateTestcase(testcase);
|
||||
$('qa-testcase-progress').value =
|
||||
qaMain.bundle.getFormattedString('qa.extension.litmus.progress',
|
||||
[$("testlist").selectedIndex+1, $("testlist").getRowCount()]);
|
||||
litmus.populateTestcase(testcase);
|
||||
$('qa-testcase-progress').value =
|
||||
qaMain.bundle.getFormattedString('qa.extension.litmus.progress',
|
||||
[$("testlist").selectedIndex+1, $("testlist").getRowCount()]);
|
||||
litmus.undisableAll();
|
||||
});
|
||||
},
|
||||
populatePreviewBox : function(testcases) {
|
||||
|
||||
populatePreviewBox : function(testcases) {
|
||||
|
||||
var menu = document.getElementById('testlist');
|
||||
if (!menu) return;
|
||||
|
||||
|
||||
while (menu.firstChild) { // clear menu
|
||||
menu.removeChild(menu.firstChild);
|
||||
};
|
||||
|
||||
|
||||
for (var i = 0; i < testcases.length; i++) {
|
||||
var row = document.createElement("listitem");
|
||||
row.value = testcases[i].testcase_id;
|
||||
|
@ -258,29 +258,40 @@
|
|||
if (testcase == undefined) {
|
||||
return;
|
||||
}
|
||||
document.getElementById('qa-testcase-id').value =
|
||||
document.getElementById('qa-testcase-id').value =
|
||||
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-expected', testcase.expected_results_formatted);
|
||||
|
||||
|
||||
qaTools.assignLinkHandlers($('qa-testcase-steps'));
|
||||
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();
|
||||
},
|
||||
populateFields : function(subgroup) {
|
||||
populateFields : function(subgroup) {
|
||||
litmus.lastSubgroupObject = subgroup;
|
||||
litmus.populatePreviewBox(subgroup.testcases);
|
||||
$('qa-subgroup-label').value = subgroup.name;
|
||||
litmus.populatePreviewBox(subgroup.testcases);
|
||||
$('qa-subgroup-label').value = subgroup.name;
|
||||
$("testlist").selectedIndex = 0;
|
||||
},
|
||||
statePopulateFields : function(subgroup) { //TODO: there's gotta be a better way to do this...
|
||||
litmus.lastSubgroupObject = subgroup;
|
||||
litmus.populatePreviewBox(subgroup.testcases);
|
||||
$('qa-subgroup-label').value = subgroup.name;
|
||||
|
||||
|
||||
$("testlist").selectedIndex = qaPref.getPref(qaPref.prefBase + ".currentTestcase.testcaseIndex", "int");
|
||||
},
|
||||
disableAll : function() { //
|
||||
|
@ -288,180 +299,180 @@
|
|||
$("qa-testcase-result").disabled = true;
|
||||
$("qa-mainwindow-previousButton").disabled = true;
|
||||
$("qa-mainwindow-nextButton").disabled = true;
|
||||
|
||||
|
||||
},
|
||||
undisableAll : function() {
|
||||
if(litmus.dialogActive) return; // ignore all requests while there is a dialog open
|
||||
|
||||
|
||||
$("testlist").disabled = false;
|
||||
$("qa-testcase-result").disabled = false;
|
||||
$("qa-mainwindow-previousButton").disabled = false;
|
||||
$("qa-mainwindow-nextButton").disabled = false;
|
||||
|
||||
|
||||
},
|
||||
submitResult : function() {
|
||||
var rs;
|
||||
var item = $('qa-testcase-result').selectedItem;
|
||||
if (item.id == "qa-testcase-pass") {
|
||||
rs = 'Pass';
|
||||
} else if (item.id == "qa-testcase-fail") {
|
||||
rs = 'Fail';
|
||||
} else if (item.id == "qa-testcase-unclearBroken") {
|
||||
rs = 'Test unclear/broken';
|
||||
} else {
|
||||
// no result selected, so don't submit anything for thes test:
|
||||
return false;
|
||||
}
|
||||
submitResult : function() {
|
||||
var rs;
|
||||
var item = $('qa-testcase-result').selectedItem;
|
||||
if (item.id == "qa-testcase-pass") {
|
||||
rs = 'Pass';
|
||||
} else if (item.id == "qa-testcase-fail") {
|
||||
rs = 'Fail';
|
||||
} else if (item.id == "qa-testcase-unclearBroken") {
|
||||
rs = 'Test unclear/broken';
|
||||
} else {
|
||||
// no result selected, so don't submit anything for thes test:
|
||||
return false;
|
||||
}
|
||||
|
||||
var menu = document.getElementById('testlist');
|
||||
|
||||
var l = new LitmusResults({username: qaPref.litmus.getUsername(),
|
||||
password: qaPref.litmus.getPassword(),
|
||||
server: litmus.baseURL});
|
||||
l.sysconfig(new Sysconfig());
|
||||
|
||||
l.addResult(new Result({
|
||||
testid: menu.selectedItem.value,
|
||||
resultstatus: rs,
|
||||
exitstatus: 'Exited Normally',
|
||||
duration: 0,
|
||||
comment: $('qa-testcase-comment').value,
|
||||
isAutomatedResult: 0
|
||||
}));
|
||||
|
||||
var callback = function(resp) {
|
||||
// increment the stat counters:
|
||||
for (var i in litmus.userStats) {
|
||||
litmus.userStats[i]++;
|
||||
}
|
||||
litmus.displayStats();
|
||||
};
|
||||
|
||||
var errback = function(resp) {
|
||||
alert(resp.responseText);
|
||||
};
|
||||
|
||||
litmus.postResultXML(l.toXML(), callback, errback);
|
||||
|
||||
var l = new LitmusResults({username: qaPref.litmus.getUsername(),
|
||||
password: qaPref.litmus.getPassword(),
|
||||
server: litmus.baseURL});
|
||||
l.sysconfig(new Sysconfig());
|
||||
|
||||
l.addResult(new Result({
|
||||
testid: menu.selectedItem.value,
|
||||
resultstatus: rs,
|
||||
exitstatus: 'Exited Normally',
|
||||
duration: 0,
|
||||
comment: $('qa-testcase-comment').value,
|
||||
isAutomatedResult: 0
|
||||
}));
|
||||
|
||||
var callback = function(resp) {
|
||||
// increment the stat counters:
|
||||
for (var i in litmus.userStats) {
|
||||
litmus.userStats[i]++;
|
||||
}
|
||||
litmus.displayStats();
|
||||
};
|
||||
|
||||
var errback = function(resp) {
|
||||
dump(resp.responseText);
|
||||
};
|
||||
|
||||
litmus.postResultXML(l.toXML(), callback, errback);
|
||||
var item = menu.selectedItem;
|
||||
item.firstChild.setAttribute("checked", "true");
|
||||
return false; // ?? Got rid of strict warning...
|
||||
},
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
// any missing fields will be autodetected
|
||||
function Sysconfig(aProduct, aPlatform, aOpsys, aBranch, aBuildid, aLocale) {
|
||||
this._load('product', aProduct);
|
||||
this._load('platform', aPlatform);
|
||||
this._load('opsys', aOpsys);
|
||||
this._load('branch', aBranch);
|
||||
this._load('buildid', aBuildid);
|
||||
this._load('locale', aLocale);
|
||||
this.populate();
|
||||
}
|
||||
|
||||
Sysconfig.prototype = {
|
||||
product: null,
|
||||
platform: null,
|
||||
opsys: null,
|
||||
branch: null,
|
||||
buildid: null,
|
||||
locale: null,
|
||||
|
||||
// set a field according to the following priorities:
|
||||
// 1. 'setting'
|
||||
// 2. qa.extension.sysconfig.fieldname
|
||||
// 3. null
|
||||
_load: function(fieldname, setting) {
|
||||
if (this[fieldname]) { return }
|
||||
if (setting) {
|
||||
this[fieldname] = setting;
|
||||
return;
|
||||
}
|
||||
var pref = qaPref.getPref(qaPref.prefBase+'.sysconfig.'+fieldname, 'char');
|
||||
if (pref) {
|
||||
this[fieldname] = pref;
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
// if something cannot be autodetected, an exception is thrown
|
||||
// with the name of the missing field
|
||||
populate: function() {
|
||||
var appinfo = Components.classes["@mozilla.org/xre/app-info;1"]
|
||||
// any missing fields will be autodetected
|
||||
function Sysconfig(aProduct, aPlatform, aOpsys, aBranch, aBuildid, aLocale) {
|
||||
this._load('product', aProduct);
|
||||
this._load('platform', aPlatform);
|
||||
this._load('opsys', aOpsys);
|
||||
this._load('branch', aBranch);
|
||||
this._load('buildid', aBuildid);
|
||||
this._load('locale', aLocale);
|
||||
this.populate();
|
||||
}
|
||||
|
||||
Sysconfig.prototype = {
|
||||
product: null,
|
||||
platform: null,
|
||||
opsys: null,
|
||||
branch: null,
|
||||
buildid: null,
|
||||
locale: null,
|
||||
|
||||
// set a field according to the following priorities:
|
||||
// 1. 'setting'
|
||||
// 2. qa.extension.sysconfig.fieldname
|
||||
// 3. null
|
||||
_load: function(fieldname, setting) {
|
||||
if (this[fieldname]) { return }
|
||||
if (setting) {
|
||||
this[fieldname] = setting;
|
||||
return;
|
||||
}
|
||||
var pref = qaPref.getPref(qaPref.prefBase+'.sysconfig.'+fieldname, 'char');
|
||||
if (pref) {
|
||||
this[fieldname] = pref;
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
// if something cannot be autodetected, an exception is thrown
|
||||
// with the name of the missing field
|
||||
populate: function() {
|
||||
var appinfo = Components.classes["@mozilla.org/xre/app-info;1"]
|
||||
.getService(Components.interfaces.nsIXULAppInfo);
|
||||
|
||||
// build id:
|
||||
this.buildid = appinfo.appBuildID;
|
||||
if (! this.buildid) { throw "buildid" }
|
||||
|
||||
|
||||
// build id:
|
||||
this.buildid = appinfo.appBuildID;
|
||||
if (! this.buildid) { throw "buildid" }
|
||||
|
||||
// product:
|
||||
if (! this.product) {
|
||||
if (appinfo.ID == FIREFOX_ID) {
|
||||
this.product = 'Firefox';
|
||||
}
|
||||
if (! this.product) { throw "product" }
|
||||
if (appinfo.ID == FIREFOX_ID) {
|
||||
this.product = 'Firefox';
|
||||
}
|
||||
if (! this.product) { throw "product" }
|
||||
}
|
||||
|
||||
|
||||
// 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
|
||||
if ((/^3\.0/).exec(appinfo.version)) {
|
||||
this.branch = '3.0 Branch';
|
||||
} else if ((/^2\.0/).exec(appinfo.version)) {
|
||||
this.branch = '2.0 Branch';
|
||||
} else if ((/^1\.5\./).exec(appinfo.version)) {
|
||||
this.branch = '1.5 Branch';
|
||||
}
|
||||
if (! this.branch) { throw "branch" }
|
||||
|
||||
if ((/^3\.0/).exec(appinfo.version)) {
|
||||
this.branch = '3.0 Branch';
|
||||
} else if ((/^2\.0/).exec(appinfo.version)) {
|
||||
this.branch = '2.0 Branch';
|
||||
} else if ((/^1\.5\./).exec(appinfo.version)) {
|
||||
this.branch = '1.5 Branch';
|
||||
}
|
||||
if (! this.branch) { throw "branch" }
|
||||
|
||||
// platform:
|
||||
if (! this.platform) {
|
||||
if ((/^MacPPC/).exec(navigator.platform)) {
|
||||
this.platform = 'Mac (PPC)';
|
||||
} else if ((/^MacIntel/).exec(navigator.platform)) {
|
||||
this.platform = 'Mac (Intel)';
|
||||
} else if ((/^Win/).exec(navigator.platform)) {
|
||||
this.platform = 'Windows';
|
||||
} else if ((/^Linux/).exec(navigator.platform)) {
|
||||
this.platform = 'Linux';
|
||||
} else if ((/^Solaris/).exec(navigator.platform)) {
|
||||
this.platform = 'Solaris';
|
||||
}
|
||||
if (! this.platform) { throw "platform" }
|
||||
if ((/^MacPPC/).exec(navigator.platform)) {
|
||||
this.platform = 'Mac (PPC)';
|
||||
} else if ((/^MacIntel/).exec(navigator.platform)) {
|
||||
this.platform = 'Mac (Intel)';
|
||||
} else if ((/^Win/).exec(navigator.platform)) {
|
||||
this.platform = 'Windows';
|
||||
} else if ((/^Linux/).exec(navigator.platform)) {
|
||||
this.platform = 'Linux';
|
||||
} else if ((/^Solaris/).exec(navigator.platform)) {
|
||||
this.platform = 'Solaris';
|
||||
}
|
||||
if (! this.platform) { throw "platform" }
|
||||
}
|
||||
// opsys
|
||||
if (this.platform == 'Windows') {
|
||||
switch (navigator.oscpu) {
|
||||
case 'Windows NT 5.1':
|
||||
this.opsys = 'Windows XP';
|
||||
break;
|
||||
case 'Windows NT 5.2':
|
||||
this.opsys = 'Windows XP';
|
||||
break;
|
||||
case 'Windows NT 6.0':
|
||||
this.opsys = 'Windows Vista';
|
||||
break;
|
||||
case 'Windows NT 5.0':
|
||||
this.opsys = 'Windows 2000';
|
||||
break;
|
||||
case 'Win 9x 4.90':
|
||||
this.opsys = 'Windows ME';
|
||||
break;
|
||||
case 'Win98':
|
||||
this.opsys = 'Windows 98';
|
||||
break;
|
||||
}
|
||||
switch (navigator.oscpu) {
|
||||
case 'Windows NT 5.1':
|
||||
this.opsys = 'Windows XP';
|
||||
break;
|
||||
case 'Windows NT 5.2':
|
||||
this.opsys = 'Windows XP';
|
||||
break;
|
||||
case 'Windows NT 6.0':
|
||||
this.opsys = 'Windows Vista';
|
||||
break;
|
||||
case 'Windows NT 5.0':
|
||||
this.opsys = 'Windows 2000';
|
||||
break;
|
||||
case 'Win 9x 4.90':
|
||||
this.opsys = 'Windows ME';
|
||||
break;
|
||||
case 'Win98':
|
||||
this.opsys = 'Windows 98';
|
||||
break;
|
||||
}
|
||||
} else if (this.platform == 'Linux') {
|
||||
this.opsys = 'Linux';
|
||||
this.opsys = 'Linux';
|
||||
} else if (this.platform == 'Mac (PPC)' || this.platform == 'Mac (Intel)') {
|
||||
// no way to detect the OS on mac, so just assume
|
||||
// it's 10.4. The user can provide the real OS in setup
|
||||
this.opsys = 'Mac OS 10.4';
|
||||
// no way to detect the OS on mac, so just assume
|
||||
// it's 10.4. The user can provide the real OS in setup
|
||||
this.opsys = 'Mac OS 10.4';
|
||||
}
|
||||
if (! this.opsys) {throw "opsys" }
|
||||
|
||||
|
||||
// locale
|
||||
this.locale = navigator.language;
|
||||
if (!this.locale) { throw "locale" }
|
||||
},
|
||||
this.locale = navigator.language;
|
||||
if (!this.locale) { throw "locale" }
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,146 +1,144 @@
|
|||
// ***** 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 Litmus.
|
||||
//
|
||||
// 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> (Original author)
|
||||
//
|
||||
// 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 *****
|
||||
|
||||
/* ***** 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>
|
||||
*
|
||||
* 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 ***** */
|
||||
// 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
|
||||
// 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
|
||||
|
||||
const VERSION = '0.0.2';
|
||||
|
||||
/**
|
||||
/**
|
||||
* Result constructor.
|
||||
*
|
||||
* @param machinename
|
||||
* (optional)
|
||||
* The name of the machine running the tests
|
||||
* @param machinename
|
||||
* (optional)
|
||||
* The name of the machine running the tests
|
||||
* @param username
|
||||
* Username of the account submitting results
|
||||
* Username of the account submitting results
|
||||
* @param password
|
||||
* Authentication token to be sent to the Litmus server
|
||||
* @param server
|
||||
* (optional)
|
||||
* The server to send results to
|
||||
* The server to send results to
|
||||
*/
|
||||
function LitmusResults(a) {
|
||||
this.machinename = a.machinename || '';
|
||||
this.requireField('username', a);
|
||||
this.requireField('password', a);
|
||||
this.server = a.server || 'http://litmus.mozilla.org/process_test.cgi';
|
||||
this.action = 'submit';
|
||||
|
||||
this.results = new Array();
|
||||
this.logs = new Array();
|
||||
this.machinename = a.machinename || '';
|
||||
this.requireField('username', a);
|
||||
this.requireField('password', a);
|
||||
this.server = a.server || 'http://litmus.mozilla.org/process_test.cgi';
|
||||
this.action = 'submit';
|
||||
|
||||
this.results = new Array();
|
||||
this.logs = new Array();
|
||||
}
|
||||
|
||||
LitmusResults.prototype = {
|
||||
// add fieldname to this unless it's missing, at which point we throw an
|
||||
// exception to the caller
|
||||
requireField : function (name, args) {
|
||||
if (args[name] === undefined) {
|
||||
throw "Missing required field in Litmus result submission: "+name;
|
||||
}
|
||||
this[name] = args[name];
|
||||
},
|
||||
sysconfig : function (a) {
|
||||
this.requireField('product', a);
|
||||
this.requireField('platform', a);
|
||||
this.requireField('opsys', a);
|
||||
this.requireField('branch', a);
|
||||
this.requireField('buildid', a);
|
||||
this.requireField('locale', a);
|
||||
this.buildtype = a.buildtype;
|
||||
},
|
||||
addLog : function(log) {
|
||||
this.logs.push(log);
|
||||
},
|
||||
addResult : function(result) {
|
||||
this.results.push(result);
|
||||
},
|
||||
toXML : function() {
|
||||
var d = '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>'+"\n";
|
||||
d += '<!DOCTYPE litmusresults PUBLIC' +
|
||||
// add fieldname to this unless it's missing, at which point we throw an
|
||||
// exception to the caller
|
||||
requireField : function (name, args) {
|
||||
if (args[name] === undefined) {
|
||||
throw "Missing required field in Litmus result submission: "+name;
|
||||
}
|
||||
this[name] = args[name];
|
||||
},
|
||||
sysconfig : function (a) {
|
||||
this.requireField('product', a);
|
||||
this.requireField('platform', a);
|
||||
this.requireField('opsys', a);
|
||||
this.requireField('branch', a);
|
||||
this.requireField('buildid', a);
|
||||
this.requireField('locale', a);
|
||||
this.buildtype = a.buildtype;
|
||||
},
|
||||
addLog : function(log) {
|
||||
this.logs.push(log);
|
||||
},
|
||||
addResult : function(result) {
|
||||
this.results.push(result);
|
||||
},
|
||||
toXML : function() {
|
||||
var d = '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>'+"\n";
|
||||
d += '<!DOCTYPE litmusresults PUBLIC' +
|
||||
' "-//Mozilla Corporation//Litmus Result Submission DTD//EN/"' +
|
||||
' "http://litmus.mozilla.org/litmus_results.dtd">'+"\n";
|
||||
d += '<litmusresults action="'+this.action+'" useragent="'+
|
||||
'litmusReporter.js/'+VERSION+' ('+this.machinename+')" '+
|
||||
(this.machinename ? 'machinename="'+this.machinename+'">' : '>') +"\n";
|
||||
d += ' <testresults username="'+this.username+'"'+"\n";
|
||||
d += ' authtoken="'+this.password+'"'+"\n";
|
||||
d += ' product="'+this.product+'"'+"\n";
|
||||
d += ' platform="'+this.platform+'"'+"\n";
|
||||
d += ' opsys="'+this.opsys+'"'+"\n";
|
||||
d += ' branch="'+this.branch+'"'+"\n";
|
||||
d += ' buildid="'+this.buildid+'"'+"\n";
|
||||
d += ' locale="'+this.locale+'"';
|
||||
if (this.buildtype) {
|
||||
d += "\n"+' buildtype="'+this.buildtype+'"'+">\n";
|
||||
} else {
|
||||
d += ">\n";
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.results) {
|
||||
for(var i=0; i<this.results.length; i++) {
|
||||
d += this.results[i].toXML();
|
||||
}
|
||||
}
|
||||
d += ' </testresults>'+"\n";
|
||||
d += '</litmusresults>'+"\n";
|
||||
return d;
|
||||
},
|
||||
d += '<litmusresults action="'+this.action+'" useragent="'+
|
||||
'litmusReporter.js/'+VERSION+' ('+this.machinename+')" '+
|
||||
(this.machinename ? 'machinename="'+this.machinename+'">' : '>') +"\n";
|
||||
d += ' <testresults username="'+this.username+'"'+"\n";
|
||||
d += ' authtoken="'+this.password+'"'+"\n";
|
||||
d += ' product="'+this.product+'"'+"\n";
|
||||
d += ' platform="'+this.platform+'"'+"\n";
|
||||
d += ' opsys="'+this.opsys+'"'+"\n";
|
||||
d += ' branch="'+this.branch+'"'+"\n";
|
||||
d += ' buildid="'+this.buildid+'"'+"\n";
|
||||
d += ' locale="'+this.locale+'"';
|
||||
if (this.buildtype) {
|
||||
d += "\n"+' buildtype="'+this.buildtype+'"'+">\n";
|
||||
} else {
|
||||
d += ">\n";
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.results) {
|
||||
for(var i=0; i<this.results.length; i++) {
|
||||
d += this.results[i].toXML();
|
||||
}
|
||||
}
|
||||
d += ' </testresults>'+"\n";
|
||||
d += '</litmusresults>'+"\n";
|
||||
return d;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
/**
|
||||
* Log constructor.
|
||||
*
|
||||
* @param type
|
||||
|
@ -149,93 +147,93 @@ LitmusResults.prototype = {
|
|||
* The log data to submit
|
||||
*/
|
||||
function Log(a) {
|
||||
this.requireField('type', a);
|
||||
this.requireField('data', a);
|
||||
this.requireField('type', a);
|
||||
this.requireField('data', a);
|
||||
}
|
||||
|
||||
Log.prototype = {
|
||||
type: null,
|
||||
data: null,
|
||||
requireField : function (name, args) {
|
||||
if (args[name] === undefined) {
|
||||
throw "Missing required field in Litmus result submission: "+name;
|
||||
}
|
||||
this[name] = args[name];
|
||||
},
|
||||
toXML : function () {
|
||||
var d = '<log logtype="'+this.type+'">'+"\n";
|
||||
d += ' <![CDATA['+this.data+']]>'+"\n";
|
||||
d += '</log>'+"\n";
|
||||
return d;
|
||||
},
|
||||
type: null,
|
||||
data: null,
|
||||
requireField : function (name, args) {
|
||||
if (args[name] === undefined) {
|
||||
throw "Missing required field in Litmus result submission: "+name;
|
||||
}
|
||||
this[name] = args[name];
|
||||
},
|
||||
toXML : function () {
|
||||
var d = '<log logtype="'+this.type+'">'+"\n";
|
||||
d += ' <![CDATA['+this.data+']]>'+"\n";
|
||||
d += '</log>'+"\n";
|
||||
return d;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* Result constructor.
|
||||
*
|
||||
*/
|
||||
function Result(a) {
|
||||
this.requireField('testid', a);
|
||||
this.requireField('resultstatus', a);
|
||||
this.requireField('exitstatus', 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;
|
||||
}
|
||||
this.requireField('testid', a);
|
||||
this.requireField('resultstatus', a);
|
||||
this.requireField('exitstatus', a);
|
||||
this.requireField('duration', a);
|
||||
|
||||
Result.prototype = {
|
||||
requireField : function (name, args) {
|
||||
if (args[name] === undefined) {
|
||||
throw "Missing required field in Litmus result submission: "+name;
|
||||
}
|
||||
this[name] = args[name];
|
||||
},
|
||||
toXML : function() {
|
||||
var d = '<result testid="'+this.testid+'"'+"\n";
|
||||
d += ' is_automated_result="'+this.automated+'"'+"\n";
|
||||
d += ' resultstatus="'+this.resultstatus+'"'+"\n";
|
||||
d += ' exitstatus="'+this.exitstatus+'"'+"\n";
|
||||
d += ' duration="'+this.duration+'"'+"\n";
|
||||
d += ' timestamp="'+this.timestamp+'">'+"\n";
|
||||
|
||||
if (this.comment) {
|
||||
d += ' <comment>'+this.comment+'</comment>'+"\n";
|
||||
}
|
||||
|
||||
if (this.bugnumber) {
|
||||
d += ' <bugnumber>'+this.bugnumber+'</bugnumber>'+"\n";
|
||||
}
|
||||
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;
|
||||
},
|
||||
// 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 = {
|
||||
requireField : function (name, args) {
|
||||
if (args[name] === undefined) {
|
||||
throw "Missing required field in Litmus result submission: "+name;
|
||||
}
|
||||
this[name] = args[name];
|
||||
},
|
||||
toXML : function() {
|
||||
var d = '<result testid="'+this.testid+'"'+"\n";
|
||||
d += ' is_automated_result="'+this.automated+'"'+"\n";
|
||||
d += ' resultstatus="'+this.resultstatus+'"'+"\n";
|
||||
d += ' exitstatus="'+this.exitstatus+'"'+"\n";
|
||||
d += ' duration="'+this.duration+'"'+"\n";
|
||||
d += ' timestamp="'+this.timestamp+'">'+"\n";
|
||||
|
||||
if (this.comment) {
|
||||
d += ' <comment>'+this.comment+'</comment>'+"\n";
|
||||
}
|
||||
|
||||
if (this.bugnumber) {
|
||||
d += ' <bugnumber>'+this.bugnumber+'</bugnumber>'+"\n";
|
||||
}
|
||||
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) {
|
||||
if (num.toString().length == 1) { return '0'+num }
|
||||
return num;
|
||||
}
|
||||
if (num.toString().length == 1) { return '0'+num }
|
||||
return num;
|
||||
}
|
||||
|
|
|
@ -36,239 +36,239 @@
|
|||
|
||||
|
||||
document.addEventListener('load', function() {
|
||||
window.setInterval(qaNotifications.updateNotificationStore(), 3600000);
|
||||
window.setInterval(qaNotifications.updateNotificationStore(), 3600000);
|
||||
}, false)
|
||||
|
||||
var qaNotifications = {
|
||||
storageService : Components.classes["@mozilla.org/storage/service;1"]
|
||||
storageService : Components.classes["@mozilla.org/storage/service;1"]
|
||||
.getService(Ci.mozIStorageService),
|
||||
dbHandle : null,
|
||||
|
||||
openDatabase : function() {
|
||||
var file = Cc["@mozilla.org/file/directory_service;1"]
|
||||
dbHandle : null,
|
||||
|
||||
openDatabase : function() {
|
||||
var file = Cc["@mozilla.org/file/directory_service;1"]
|
||||
.getService(Ci.nsIProperties)
|
||||
.get("ProfD", Ci.nsIFile);
|
||||
file.append("mozqa.sqlite");
|
||||
this.dbHandle = this.storageService.openDatabase(file);
|
||||
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();
|
||||
}
|
||||
file.append("mozqa.sqlite");
|
||||
this.dbHandle = this.storageService.openDatabase(file);
|
||||
this.createNotificationTable();
|
||||
},
|
||||
|
||||
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(",");
|
||||
},
|
||||
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) {
|
||||
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() {
|
||||
if (this.dbHandle != null)
|
||||
return this.dbHandle;
|
||||
else {
|
||||
this.openDatabase();
|
||||
return this.dbHandle;
|
||||
}
|
||||
if (this.dbHandle != null)
|
||||
return this.dbHandle;
|
||||
else {
|
||||
this.openDatabase();
|
||||
return this.dbHandle;
|
||||
}
|
||||
});
|
||||
|
||||
function Notification() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
function Notification(type, data) {
|
||||
if (type == 'json') {
|
||||
this.id = data.id;
|
||||
this.notificationClass = data.notificationClass;
|
||||
this.type = data.type;
|
||||
this.headline = data.headline;
|
||||
this.datetime = MochiKit.DateTime.isoTimestamp(data.datetime);
|
||||
this.place = data.place;
|
||||
this.infotext = data.infotext;
|
||||
this.infolinktext = data.infolinktext;
|
||||
this.infolinkhref = data.infolinkhref;
|
||||
this.golinktext = data.golinktext;
|
||||
this.golinkhref = data.golinkhref;
|
||||
} else if (type == 'xml') {
|
||||
var notif = data;
|
||||
this.id = notif.getAttribute('id');
|
||||
this.notificationClass = notif.getAttribute('class');
|
||||
this.type = notif.getAttribute('type');
|
||||
if (notif.getElementsByTagName('headline')[0] != null)
|
||||
this.headline = notif.getElementsByTagName('headline')[0].textContent;
|
||||
|
||||
// eventinfo
|
||||
if (this.notificationClass == 'event') {
|
||||
var eventInfo = notif.getElementsByTagName('eventinfo')[0];
|
||||
this.datetime = MochiKit.DateTime.isoTimestamp(
|
||||
eventInfo.getElementsByTagName('datetime')[0].textContent);
|
||||
this.place = eventInfo.getElementsByTagName('place')[0].textContent;
|
||||
}
|
||||
this.infotext = notif.getElementsByTagName('infotext')[0].textContent;
|
||||
this.infolinktext = notif.getElementsByTagName('infolink')[0].textContent;
|
||||
this.infolinkhref = notif.getElementsByTagName('infolink')[0]
|
||||
.getAttribute('href');
|
||||
this.golinktext = notif.getElementsByTagName('golink')[0].textContent;
|
||||
this.golinkhref = notif.getElementsByTagName('golink')[0]
|
||||
.getAttribute('href');
|
||||
}
|
||||
if (type == 'json') {
|
||||
this.id = data.id;
|
||||
this.notificationClass = data.notificationClass;
|
||||
this.type = data.type;
|
||||
this.headline = data.headline;
|
||||
this.datetime = MochiKit.DateTime.isoTimestamp(data.datetime);
|
||||
this.place = data.place;
|
||||
this.infotext = data.infotext;
|
||||
this.infolinktext = data.infolinktext;
|
||||
this.infolinkhref = data.infolinkhref;
|
||||
this.golinktext = data.golinktext;
|
||||
this.golinkhref = data.golinkhref;
|
||||
} else if (type == 'xml') {
|
||||
var notif = data;
|
||||
this.id = notif.getAttribute('id');
|
||||
this.notificationClass = notif.getAttribute('class');
|
||||
this.type = notif.getAttribute('type');
|
||||
if (notif.getElementsByTagName('headline')[0] != null)
|
||||
this.headline = notif.getElementsByTagName('headline')[0].textContent;
|
||||
|
||||
// eventinfo
|
||||
if (this.notificationClass == 'event') {
|
||||
var eventInfo = notif.getElementsByTagName('eventinfo')[0];
|
||||
this.datetime = MochiKit.DateTime.isoTimestamp(
|
||||
eventInfo.getElementsByTagName('datetime')[0].textContent);
|
||||
this.place = eventInfo.getElementsByTagName('place')[0].textContent;
|
||||
}
|
||||
this.infotext = notif.getElementsByTagName('infotext')[0].textContent;
|
||||
this.infolinktext = notif.getElementsByTagName('infolink')[0].textContent;
|
||||
this.infolinkhref = notif.getElementsByTagName('infolink')[0]
|
||||
.getAttribute('href');
|
||||
this.golinktext = notif.getElementsByTagName('golink')[0].textContent;
|
||||
this.golinkhref = notif.getElementsByTagName('golink')[0]
|
||||
.getAttribute('href');
|
||||
}
|
||||
}
|
||||
|
||||
Notification.prototype = {
|
||||
id : null,
|
||||
notificationClass : null,
|
||||
type : null,
|
||||
headline : null,
|
||||
datetime : null,
|
||||
place : null,
|
||||
infotext : null,
|
||||
infolinktext : null,
|
||||
infolinkhref : null,
|
||||
golinktext : null,
|
||||
golinkhref : null,
|
||||
|
||||
hasHadFirstNotification : false,
|
||||
hasHadSecondNotification : false,
|
||||
serializedJSData : null,
|
||||
|
||||
serializeToDb: function() {
|
||||
var query = qaNotifications.db.createStatement("SELECT id FROM notifications \
|
||||
WHERE id = ?1");
|
||||
query.bindStringParameter(0, this.id);
|
||||
var foundRow;
|
||||
while (query.executeStep()) {
|
||||
foundRow = 1;
|
||||
}
|
||||
query.reset();
|
||||
if (foundRow == 1) { // it's already been inserted, so update
|
||||
return;
|
||||
}
|
||||
|
||||
var sth = qaNotifications.db.createStatement("INSERT into notifications \
|
||||
values (?1, ?2, ?3, ?4, ?5)");
|
||||
sth.bindStringParameter(0, this.id);
|
||||
sth.bindStringParameter(1, this.datetime);
|
||||
sth.bindStringParameter(2, this.hasHadFirstNotification);
|
||||
sth.bindStringParameter(3, this.hasHadSecondNotification);
|
||||
|
||||
// avoid having serialized data inside serialized data:
|
||||
this.serializedJSData = null;
|
||||
var jsData = MochiKit.Base.serializeJSON(this);
|
||||
sth.bindStringParameter(4, jsData);
|
||||
|
||||
sth.execute();
|
||||
},
|
||||
displayToBox : function() {
|
||||
$('qa-notify-header').value=this.headline;
|
||||
|
||||
if ($('qa-notify-text').firstChild)
|
||||
$('qa-notify-text').removeChild($('qa-notify-text').firstChild);
|
||||
$('qa-notify-text').appendChild(document.createTextNode(this.infotext));
|
||||
|
||||
$('qa-notify-infolink').value=this.infolinktext;
|
||||
$('qa-notify-infolink').href=this.infolinkhref;
|
||||
$('qa-notify-infolink').style.display = '';
|
||||
|
||||
if (this.notificationClass == 'event') {
|
||||
var inprogress = 0;
|
||||
$('qa-notify-event-datetime').value=this.datetime;
|
||||
$('qa-notify-event-place').value=this.place;
|
||||
$('qa-notify-event').style.display = '';
|
||||
$('qa-notify-inprogress').style.display = 'none';
|
||||
|
||||
$('qa-notify-getstartedlink').value=this.golinktext;
|
||||
$('qa-notify-getstartedlink').href=this.golinkhref;
|
||||
|
||||
if (inprogress == 1) {
|
||||
$('qa-notify-inprogress').style.display = '';
|
||||
$('qa-notify-getstartedlink').style.display = '';
|
||||
$('qa-notify-infolink').style.display = 'none';
|
||||
}
|
||||
}
|
||||
},
|
||||
okToShow : function() {
|
||||
var prefs = qaNotifications.getNotificationSettings();
|
||||
if (prefs[0] == '1') // all notifications disabled
|
||||
return false;
|
||||
if (this.type == 'testday' && ! prefs[1] == '0')
|
||||
return true;
|
||||
if (this.type == 'bugday' && ! prefs[2] == '0')
|
||||
return true;
|
||||
if (this.type == 'prerelease' && ! prefs[3] == '0')
|
||||
return true;
|
||||
if (this.type == 'news' && ! prefs[4] == '0')
|
||||
return true;
|
||||
if (this.type == 'newbuilds' && ! prefs[5] == '0')
|
||||
return true;
|
||||
if (this.type == 'special' && ! prefs[6] == '0')
|
||||
return true;
|
||||
|
||||
// catch all:
|
||||
return false;
|
||||
},
|
||||
};
|
||||
id : null,
|
||||
notificationClass : null,
|
||||
type : null,
|
||||
headline : null,
|
||||
datetime : null,
|
||||
place : null,
|
||||
infotext : null,
|
||||
infolinktext : null,
|
||||
infolinkhref : null,
|
||||
golinktext : null,
|
||||
golinkhref : null,
|
||||
|
||||
hasHadFirstNotification : false,
|
||||
hasHadSecondNotification : false,
|
||||
serializedJSData : null,
|
||||
|
||||
serializeToDb: function() {
|
||||
var query = qaNotifications.db.createStatement("SELECT id FROM notifications \
|
||||
WHERE id = ?1");
|
||||
query.bindStringParameter(0, this.id);
|
||||
var foundRow;
|
||||
while (query.executeStep()) {
|
||||
foundRow = 1;
|
||||
}
|
||||
query.reset();
|
||||
if (foundRow == 1) { // it's already been inserted, so update
|
||||
return;
|
||||
}
|
||||
|
||||
var sth = qaNotifications.db.createStatement("INSERT into notifications \
|
||||
values (?1, ?2, ?3, ?4, ?5)");
|
||||
sth.bindStringParameter(0, this.id);
|
||||
sth.bindStringParameter(1, this.datetime);
|
||||
sth.bindStringParameter(2, this.hasHadFirstNotification);
|
||||
sth.bindStringParameter(3, this.hasHadSecondNotification);
|
||||
|
||||
// avoid having serialized data inside serialized data:
|
||||
this.serializedJSData = null;
|
||||
var jsData = MochiKit.Base.serializeJSON(this);
|
||||
sth.bindStringParameter(4, jsData);
|
||||
|
||||
sth.execute();
|
||||
},
|
||||
displayToBox : function() {
|
||||
$('qa-notify-header').value=this.headline;
|
||||
|
||||
if ($('qa-notify-text').firstChild)
|
||||
$('qa-notify-text').removeChild($('qa-notify-text').firstChild);
|
||||
$('qa-notify-text').appendChild(document.createTextNode(this.infotext));
|
||||
|
||||
$('qa-notify-infolink').value=this.infolinktext;
|
||||
$('qa-notify-infolink').href=this.infolinkhref;
|
||||
$('qa-notify-infolink').style.display = '';
|
||||
|
||||
if (this.notificationClass == 'event') {
|
||||
var inprogress = 0;
|
||||
$('qa-notify-event-datetime').value=this.datetime;
|
||||
$('qa-notify-event-place').value=this.place;
|
||||
$('qa-notify-event').style.display = '';
|
||||
$('qa-notify-inprogress').style.display = 'none';
|
||||
|
||||
$('qa-notify-getstartedlink').value=this.golinktext;
|
||||
$('qa-notify-getstartedlink').href=this.golinkhref;
|
||||
|
||||
if (inprogress == 1) {
|
||||
$('qa-notify-inprogress').style.display = '';
|
||||
$('qa-notify-getstartedlink').style.display = '';
|
||||
$('qa-notify-infolink').style.display = 'none';
|
||||
}
|
||||
}
|
||||
},
|
||||
okToShow : function() {
|
||||
var prefs = qaNotifications.getNotificationSettings();
|
||||
if (prefs[0] == '1') // all notifications disabled
|
||||
return false;
|
||||
if (this.type == 'testday' && ! prefs[1] == '0')
|
||||
return true;
|
||||
if (this.type == 'bugday' && ! prefs[2] == '0')
|
||||
return true;
|
||||
if (this.type == 'prerelease' && ! prefs[3] == '0')
|
||||
return true;
|
||||
if (this.type == 'news' && ! prefs[4] == '0')
|
||||
return true;
|
||||
if (this.type == 'newbuilds' && ! prefs[5] == '0')
|
||||
return true;
|
||||
if (this.type == 'special' && ! prefs[6] == '0')
|
||||
return true;
|
||||
|
||||
// catch all:
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -40,31 +40,31 @@ var qaPref = {
|
|||
prefBase : "qa.extension",
|
||||
|
||||
setPref : function(aName, aValue, aType) {
|
||||
|
||||
|
||||
var pref = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
try{
|
||||
if(aType == "bool")
|
||||
pref.setBoolPref(aName, aValue);
|
||||
else if(aType == "int")
|
||||
else if(aType == "int")
|
||||
pref.setIntPref(aName, aValue);
|
||||
else if(aType == "char")
|
||||
pref.setCharPref(aName, aValue);
|
||||
}
|
||||
catch(e){ };
|
||||
},
|
||||
|
||||
|
||||
getPref : function(aName, aType) {
|
||||
|
||||
|
||||
var pref = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
try{
|
||||
var result;
|
||||
if(aType == "bool")
|
||||
result = pref.getBoolPref(aName);
|
||||
else if(aType == "int")
|
||||
else if(aType == "int")
|
||||
result = pref.getIntPref(aName);
|
||||
else if(aType == "char")
|
||||
else if(aType == "char")
|
||||
result = pref.getCharPref(aName);
|
||||
|
||||
return result;
|
||||
|
@ -72,121 +72,121 @@ var qaPref = {
|
|||
catch(e){
|
||||
if(aType == "bool"){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if(aType == "int"){
|
||||
return 0;
|
||||
}
|
||||
else if(aType == "char"){
|
||||
return null;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
// public API:
|
||||
// qaPref.litmus.getUsername()
|
||||
// qaPref.litmus.getPassword()
|
||||
// qaPref.litmus.setPassword()
|
||||
// qaPref.litmus.getUsername()
|
||||
// qaPref.litmus.getPassword()
|
||||
// qaPref.litmus.setPassword()
|
||||
// everything else is abstracted away to deal with fx2 vs fx3 changes
|
||||
|
||||
var CC_passwordManager = Components.classes["@mozilla.org/passwordmanager;1"];
|
||||
var CC_loginManager = Components.classes["@mozilla.org/login-manager;1"];
|
||||
|
||||
if (CC_passwordManager != null) { // old-fashioned password manager
|
||||
qaPref.litmus = {
|
||||
passwordName : function() {return "mozqa-extension-litmus-"+litmus.baseURL},
|
||||
|
||||
manager : function() {
|
||||
return Components.classes["@mozilla.org/passwordmanager;1"].
|
||||
getService(Components.interfaces.nsIPasswordManager);
|
||||
},
|
||||
getPasswordObj : function() {
|
||||
var m = this.manager();
|
||||
var e = m.enumerator;
|
||||
|
||||
// iterate through the PasswordManager service to find
|
||||
// our password:
|
||||
var password;
|
||||
while(e.hasMoreElements()) {
|
||||
try {
|
||||
var pass = e.getNext().
|
||||
QueryInterface(Components.interfaces.nsIPassword);
|
||||
if (pass.host == this.passwordName()) {
|
||||
password=pass; // found it
|
||||
return password;
|
||||
}
|
||||
} catch (ex) { return false; }
|
||||
}
|
||||
if (!password) { return false; }
|
||||
return password;
|
||||
},
|
||||
getUsername : function() {
|
||||
var password = this.getPasswordObj();
|
||||
try {
|
||||
return password.user;
|
||||
} catch (ex) { return false; }
|
||||
},
|
||||
getPassword : function() {
|
||||
var password=this.getPasswordObj();
|
||||
try {
|
||||
return password.password;
|
||||
} catch (ex) { return false; }
|
||||
},
|
||||
setPassword : function(username, password) {
|
||||
var m = this.manager();
|
||||
// check to see whether we already have a password stored
|
||||
// for the current baseURL. If we do, remove it before adding
|
||||
// any new passwords:
|
||||
var p;
|
||||
while (p = this.getPasswordObj()) {
|
||||
m.removeUser(p.host, p.user);
|
||||
}
|
||||
m.addUser(this.passwordName(), username, password);
|
||||
},
|
||||
};
|
||||
} else if (CC_loginManager != null) { // use the new login manager interface
|
||||
qaPref.litmus = {
|
||||
manager : function() {
|
||||
return Components.classes["@mozilla.org/login-manager;1"]
|
||||
.getService(Components.interfaces.nsILoginManager);
|
||||
},
|
||||
getUsername : function() {
|
||||
var password = this.getPasswordObj();
|
||||
try {
|
||||
return password.username;
|
||||
} catch (ex) { return false; }
|
||||
},
|
||||
getPassword : function() {
|
||||
var password=this.getPasswordObj();
|
||||
try {
|
||||
return password.password;
|
||||
} catch (ex) { return false; }
|
||||
},
|
||||
setPassword : function(username, password) {
|
||||
// if we already have a password stored, remove it first:
|
||||
var login = this.getPasswordObj();
|
||||
if (login != false) {
|
||||
this.manager().removeLogin(login);
|
||||
}
|
||||
|
||||
var nsLoginInfo = new Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
|
||||
if (CC_passwordManager != null) { // old-fashioned password manager
|
||||
qaPref.litmus = {
|
||||
passwordName : function() {return "mozqa-extension-litmus-"+litmus.baseURL},
|
||||
|
||||
manager : function() {
|
||||
return Components.classes["@mozilla.org/passwordmanager;1"].
|
||||
getService(Components.interfaces.nsIPasswordManager);
|
||||
},
|
||||
getPasswordObj : function() {
|
||||
var m = this.manager();
|
||||
var e = m.enumerator;
|
||||
|
||||
// iterate through the PasswordManager service to find
|
||||
// our password:
|
||||
var password;
|
||||
while(e.hasMoreElements()) {
|
||||
try {
|
||||
var pass = e.getNext().
|
||||
QueryInterface(Components.interfaces.nsIPassword);
|
||||
if (pass.host == this.passwordName()) {
|
||||
password=pass; // found it
|
||||
return password;
|
||||
}
|
||||
} catch (ex) { return false; }
|
||||
}
|
||||
if (!password) { return false; }
|
||||
return password;
|
||||
},
|
||||
getUsername : function() {
|
||||
var password = this.getPasswordObj();
|
||||
try {
|
||||
return password.user;
|
||||
} catch (ex) { return false; }
|
||||
},
|
||||
getPassword : function() {
|
||||
var password=this.getPasswordObj();
|
||||
try {
|
||||
return password.password;
|
||||
} catch (ex) { return false; }
|
||||
},
|
||||
setPassword : function(username, password) {
|
||||
var m = this.manager();
|
||||
// check to see whether we already have a password stored
|
||||
// for the current baseURL. If we do, remove it before adding
|
||||
// any new passwords:
|
||||
var p;
|
||||
while (p = this.getPasswordObj()) {
|
||||
m.removeUser(p.host, p.user);
|
||||
}
|
||||
m.addUser(this.passwordName(), username, password);
|
||||
}
|
||||
};
|
||||
} else if (CC_loginManager != null) { // use the new login manager interface
|
||||
qaPref.litmus = {
|
||||
manager : function() {
|
||||
return Components.classes["@mozilla.org/login-manager;1"]
|
||||
.getService(Components.interfaces.nsILoginManager);
|
||||
},
|
||||
getUsername : function() {
|
||||
var password = this.getPasswordObj();
|
||||
try {
|
||||
return password.username;
|
||||
} catch (ex) { return false; }
|
||||
},
|
||||
getPassword : function() {
|
||||
var password=this.getPasswordObj();
|
||||
try {
|
||||
return password.password;
|
||||
} catch (ex) { return false; }
|
||||
},
|
||||
setPassword : function(username, password) {
|
||||
// if we already have a password stored, remove it first:
|
||||
var login = this.getPasswordObj();
|
||||
if (login != false) {
|
||||
this.manager().removeLogin(login);
|
||||
}
|
||||
|
||||
var nsLoginInfo = new Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
|
||||
Components.interfaces.nsILoginInfo,
|
||||
"init");
|
||||
var newLogin = new nsLoginInfo('chrome://qa', 'Litmus Login', litmus.baseURL,
|
||||
username, password, null, null);
|
||||
this.manager().addLogin(newLogin);
|
||||
},
|
||||
getPasswordObj: function() {
|
||||
try {
|
||||
var logins = this.manager().findLogins({}, 'chrome://qa',
|
||||
'Litmus Login', litmus.baseURL);
|
||||
if (logins.length > 0 && logins[0] != null)
|
||||
return logins[0];
|
||||
return false;
|
||||
} catch(ex) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
var newLogin = new nsLoginInfo('chrome://qa', 'Litmus Login', litmus.baseURL,
|
||||
username, password, null, null);
|
||||
this.manager().addLogin(newLogin);
|
||||
},
|
||||
getPasswordObj: function() {
|
||||
try {
|
||||
var logins = this.manager().findLogins({}, 'chrome://qa',
|
||||
'Litmus Login', litmus.baseURL);
|
||||
if (logins.length > 0 && logins[0] != null)
|
||||
return logins[0];
|
||||
return false;
|
||||
} catch(ex) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -36,34 +36,55 @@
|
|||
|
||||
|
||||
var qaMain = {
|
||||
htmlNS: "http://www.w3.org/1999/xhtml",
|
||||
|
||||
openQATool : function() {
|
||||
window.open("chrome://qa/content/qa.xul", "_blank", "chrome,all,dialog=no,resizable=no");
|
||||
},
|
||||
onToolOpen : function() {
|
||||
if (qaPref.getPref(qaPref.prefBase+'.isFirstTime', 'bool') == true) {
|
||||
window.open("chrome://qa/content/setup.xul", "_blank", "chrome,all,dialog=yes");
|
||||
htmlNS: "http://www.w3.org/1999/xhtml",
|
||||
|
||||
openQATool : function() {
|
||||
window.open("chrome://qa/content/qa.xul", "_blank",
|
||||
"chrome,all,dialog=no,resizable=no");
|
||||
},
|
||||
onToolOpen : function() {
|
||||
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();
|
||||
}
|
||||
},
|
||||
},
|
||||
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__("urlbundle", function(){return $("bundle_urls");});
|
||||
function $() {
|
||||
var elements = new Array();
|
||||
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
var element = arguments[i];
|
||||
if (typeof element == 'string')
|
||||
element = document.getElementById(element);
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
var element = arguments[i];
|
||||
if (typeof element == 'string')
|
||||
element = document.getElementById(element);
|
||||
|
||||
if (arguments.length == 1)
|
||||
return element;
|
||||
if (arguments.length == 1)
|
||||
return element;
|
||||
|
||||
elements.push(element);
|
||||
elements.push(element);
|
||||
}
|
||||
|
||||
return elements;
|
||||
|
|
|
@ -1,39 +1,40 @@
|
|||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||
# ***** 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>
|
||||
#
|
||||
# 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 ***** -->
|
||||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||
- ***** 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 <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 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 ***** -->
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/global.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/qa.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">
|
||||
<tabs id="qa_tabrow">
|
||||
<tab id="qa-tabbar-qmo" 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" />
|
||||
<spacer id="qa-tabbar-spacer" />
|
||||
<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-bugzilla"></tabpanel>
|
||||
<tabpanel id="qa-tab-chat"></tabpanel>
|
||||
|
||||
|
||||
<tabpanel id="qa-tab-SPACER"></tabpanel>
|
||||
|
||||
|
||||
<tabpanel id="qa-tab-settings"></tabpanel>
|
||||
<tabpanel id="qa-tab-help"></tabpanel>
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
|
||||
|
||||
</window>
|
||||
</window>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*
|
||||
* 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
|
||||
|
@ -36,247 +37,234 @@
|
|||
|
||||
|
||||
var qaPrefsWindow = {
|
||||
lastSelectedTab : null,
|
||||
|
||||
onSwitchTab : function() {
|
||||
var newSelection = $('qa_tabrow').selectedItem;
|
||||
|
||||
// user is switching to the prefs tab:
|
||||
if ($('qa_tabrow').selectedItem == $('qa-tabbar-prefs')) {
|
||||
qaPrefsWindow.loadPrefsWindow();
|
||||
}
|
||||
|
||||
// user is switching away from the prefs tab:
|
||||
if (qaPrefsWindow.lastSelectedTab != null &&
|
||||
qaPrefsWindow.lastSelectedTab == $('qa-tabbar-prefs')) {
|
||||
qaPrefsWindow.savePrefsWindow();
|
||||
}
|
||||
|
||||
qaPrefsWindow.lastSelectedTab = newSelection;
|
||||
},
|
||||
lastSelectedTab : null,
|
||||
|
||||
loadPrefsWindow : function() {
|
||||
prefsTabOpen = true;
|
||||
document.getElementById('qa-preferences-litmus-username').value =
|
||||
qaPref.litmus.getUsername() || '';
|
||||
document.getElementById('qa-preferences-litmus-password').value =
|
||||
qaPref.litmus.getPassword() || '';
|
||||
|
||||
// load notification settings:
|
||||
var prefs = qaPref.getPref(qaPref.prefBase+'.notificationSettings', 'char');
|
||||
prefs = prefs.split(",");
|
||||
var notify = $('qa-prefs-notify').childNodes;
|
||||
var prefCounter = 0;
|
||||
for (var i=0; i<notify.length; i++) {
|
||||
if (notify[i].setChecked != null && notify[i].checked != null) { // it's a checkbox
|
||||
if (prefs[prefCounter] == "1")
|
||||
notify[i].checked = true;
|
||||
else
|
||||
notify[i].checked = false;
|
||||
prefCounter++;
|
||||
}
|
||||
}
|
||||
},
|
||||
savePrefsWindow : function() {
|
||||
// save notification settings
|
||||
var notify = $('qa-prefs-notify').childNodes;
|
||||
var prefs = '';
|
||||
for (var i=0; i<notify.length; i++) {
|
||||
if (notify[i].setChecked != null && (notify[i].checked == true
|
||||
|| notify[i].checked == false)) { // it's a checkbox
|
||||
if (notify[i].checked == false)
|
||||
prefs += '0,';
|
||||
else
|
||||
prefs += '1,';
|
||||
}
|
||||
}
|
||||
prefs = prefs.substring(0, prefs.length-1); // remove the trailing comma
|
||||
qaPref.setPref(qaPref.prefBase+'.notificationSettings', prefs, 'char');
|
||||
|
||||
// save litmus account settings
|
||||
var uname = document.getElementById('qa-preferences-litmus-username').value;
|
||||
var passwd = document.getElementById('qa-preferences-litmus-password').value;
|
||||
|
||||
// if uname and passwd are unchanged, we're done:
|
||||
if (uname == qaPref.litmus.getUsername() &&
|
||||
passwd == qaPref.litmus.getPassword())
|
||||
return;
|
||||
var callback = function(resp) {
|
||||
if (resp.responseText == 0) {
|
||||
alert(document.getElementById("bundle_qa").
|
||||
getString("qa.extension.prefs.loginError"));
|
||||
// snap the tab selection back to prefs:
|
||||
$('qa_tabrow').selectedItem = $('qa-tabbar-prefs');
|
||||
return false;
|
||||
} else {
|
||||
qaPref.litmus.setPassword(uname, passwd);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
litmus.validateLogin(uname, passwd, callback);
|
||||
return false; // not ready to close yet
|
||||
},
|
||||
loadUsernameAndPassword : function() {
|
||||
var uname = document.getElementById('qa-preferences-litmus-username');
|
||||
var passwd = document.getElementById('qa-preferences-litmus-password');
|
||||
|
||||
uname.value = qaPref.litmus.getUsername();
|
||||
passwd.value = qaPref.litmus.getPassword();
|
||||
},
|
||||
createAccount : function() {
|
||||
window.openDialog("chrome://qa/content/accountcreate.xul", "_blank", "chrome,all,dialog=yes", qaPrefsWindow.loadUsernameAndPassword);
|
||||
},
|
||||
loadPrefsWindow : function() {
|
||||
prefsTabOpen = true;
|
||||
document.getElementById('qa-preferences-litmus-username').value =
|
||||
qaPref.litmus.getUsername() || '';
|
||||
document.getElementById('qa-preferences-litmus-password').value =
|
||||
qaPref.litmus.getPassword() || '';
|
||||
|
||||
// load notification settings:
|
||||
var prefs = qaPref.getPref(qaPref.prefBase+'.notificationSettings', 'char');
|
||||
prefs = prefs.split(",");
|
||||
var notify = $('qa-prefs-notify').childNodes;
|
||||
var prefCounter = 0;
|
||||
for (var i=0; i<notify.length; i++) {
|
||||
if (notify[i].setChecked != null && notify[i].checked != null) { // it's a checkbox
|
||||
if (prefs[prefCounter] == "1")
|
||||
notify[i].checked = true;
|
||||
else
|
||||
notify[i].checked = false;
|
||||
prefCounter++;
|
||||
}
|
||||
}
|
||||
},
|
||||
savePrefsWindow : function() {
|
||||
// save notification settings
|
||||
var notify = $('qa-prefs-notify').childNodes;
|
||||
var prefs = '';
|
||||
for (var i=0; i<notify.length; i++) {
|
||||
if (notify[i].setChecked != null && (notify[i].checked == true
|
||||
|| notify[i].checked == false)) { // it's a checkbox
|
||||
if (notify[i].checked == false)
|
||||
prefs += '0,';
|
||||
else
|
||||
prefs += '1,';
|
||||
}
|
||||
}
|
||||
prefs = prefs.substring(0, prefs.length-1); // remove the trailing comma
|
||||
qaPref.setPref(qaPref.prefBase+'.notificationSettings', prefs, 'char');
|
||||
|
||||
// save litmus account settings
|
||||
var uname = document.getElementById('qa-preferences-litmus-username').value;
|
||||
var passwd = document.getElementById('qa-preferences-litmus-password').value;
|
||||
|
||||
// if uname and passwd are unchanged, we're done:
|
||||
if (uname == qaPref.litmus.getUsername() &&
|
||||
passwd == qaPref.litmus.getPassword())
|
||||
return;
|
||||
var callback = function(resp) {
|
||||
if (resp.responseText == 0) {
|
||||
alert(document.getElementById("bundle_qa").
|
||||
getString("qa.extension.prefs.loginError"));
|
||||
// snap the tab selection back to prefs:
|
||||
$('qa_tabrow').selectedItem = $('qa-tabbar-prefs');
|
||||
return false;
|
||||
} else {
|
||||
qaPref.litmus.setPassword(uname, passwd);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
litmus.validateLogin(uname, passwd, callback);
|
||||
return false; // not ready to close yet
|
||||
},
|
||||
loadUsernameAndPassword : function() {
|
||||
var uname = document.getElementById('qa-preferences-litmus-username');
|
||||
var passwd = document.getElementById('qa-preferences-litmus-password');
|
||||
|
||||
uname.value = qaPref.litmus.getUsername();
|
||||
passwd.value = qaPref.litmus.getPassword();
|
||||
},
|
||||
createAccount : function() {
|
||||
window.openDialog("chrome://qa/content/accountcreate.xul",
|
||||
"_blank",
|
||||
"chrome,all,dialog=yes",
|
||||
qaPrefsWindow.loadUsernameAndPassword);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
var qaSetup = {
|
||||
didSubmitForm : 0,
|
||||
|
||||
hideAccountSettings : function() {
|
||||
var accountyes = document.getElementById('qa-setup-accountyes');
|
||||
var accountno = document.getElementById('qa-setup-accountno');
|
||||
accountyes.style.display = 'none';
|
||||
accountno.style.display = 'none';
|
||||
},
|
||||
loadAccountSettings : function() {
|
||||
var uname = document.getElementById('username');
|
||||
var passwd = document.getElementById('password');
|
||||
uname.value = qaPref.litmus.getUsername() || '';
|
||||
passwd.value = qaPref.litmus.getPassword() || '';
|
||||
if (qaPref.litmus.getUsername()) {
|
||||
document.getElementById("qa-setup-account-haveaccount").selectedIndex=1;
|
||||
document.getElementById('qa-setup-accountyes').style.display = '';
|
||||
}
|
||||
document.getElementById('qa-setup-createaccount-iframe').src =
|
||||
litmus.baseURL+'extension.cgi?createAccount=1';
|
||||
},
|
||||
|
||||
accountSetting : function(yesno) {
|
||||
var accountyes = document.getElementById('qa-setup-accountyes');
|
||||
var accountno = document.getElementById('qa-setup-accountno');
|
||||
qaSetup.hideAccountSettings();
|
||||
if (yesno == '0') {
|
||||
accountno.style.display = '';
|
||||
} else {
|
||||
accountyes.style.display = '';
|
||||
}
|
||||
},
|
||||
validateAccount : function() {
|
||||
if (document.getElementById('qa-setup-accountno').style.display == '') {
|
||||
// we're creating a new account, so get the uname and passwd
|
||||
// from the account created page:
|
||||
var page = document.getElementById('qa-setup-createaccount-iframe').
|
||||
contentDocument;
|
||||
if (!page) {
|
||||
alert("create account page is missing");
|
||||
return false;
|
||||
}
|
||||
if (page.wrappedJSObject == null)
|
||||
page.wrappedJSObject = page;
|
||||
if (page.forms[0] && page.forms[0].wrappedJSObject == null)
|
||||
page.forms[0].wrappedJSObject = page.forms[0];
|
||||
|
||||
if (page.location == litmus.baseURL+'extension.cgi?createAccount=1'
|
||||
&& qaSetup.didSubmitForm==0) {
|
||||
document.getElementById('qa-setup-accountconfirmloading').value =
|
||||
document.getElementById("bundle_qa").getString("qa.extension.prefs.loadingMsg");
|
||||
page.forms[0].wrappedJSObject.submit();
|
||||
qaSetup.didSubmitForm = 1;
|
||||
setTimeout("qaSetup.validateAccount()", 5000);
|
||||
return false;
|
||||
}
|
||||
if (qaSetup.didSubmitForm == 1 && ! page.forms ||
|
||||
! page.forms[0].wrappedJSObject ||
|
||||
! page.forms[0].wrappedJSObject.email &&
|
||||
! page.forms[0].wrappedJSObject.email.value)
|
||||
{qaSetup.didSubmitForm = 2;
|
||||
setTimeout("qaSetup.validateAccount()", 4000);
|
||||
return false;}
|
||||
var e = '';
|
||||
var p = '';
|
||||
if (page.forms && page.forms[0].wrappedJSObject &&
|
||||
page.forms[0].wrappedJSObject.email &&
|
||||
page.forms[0].wrappedJSObject.email.value)
|
||||
{ e=page.forms[0].wrappedJSObject.email.value }
|
||||
if (page.forms && page.forms[0].wrappedJSObject &&
|
||||
page.forms[0].wrappedJSObject.password &&
|
||||
page.forms[0].wrappedJSObject.password.value)
|
||||
{ p=page.forms[0].wrappedJSObject.password.value }
|
||||
document.getElementById('username').value = e;
|
||||
document.getElementById('password').value = p;
|
||||
}
|
||||
|
||||
document.getElementById('qa-setup-accountconfirmloading').value =
|
||||
document.getElementById("bundle_qa").getString("qa.extension.prefs.loadingMsg");
|
||||
|
||||
var uname = document.getElementById('username').value;
|
||||
var passwd = document.getElementById('password').value;
|
||||
|
||||
var callback = function(resp) {
|
||||
if (resp.responseText != 1) { // failure
|
||||
alert(document.getElementById("bundle_qa").
|
||||
getString("qa.extension.prefs.loginError"));
|
||||
document.getElementById('qa-setup-accountconfirmloading').value = null;
|
||||
return false;
|
||||
} else { // all's well
|
||||
qaPref.litmus.setPassword(uname, passwd);
|
||||
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
|
||||
},
|
||||
|
||||
loadSysconfig : function() {
|
||||
$('qa-setup-sysconfig-loading').value =
|
||||
$("bundle_qa").getString("qa.extension.sysconfig.loadingMsg");
|
||||
|
||||
var guessInfo = function() {
|
||||
var sysconfig;
|
||||
try {
|
||||
sysconfig = new Sysconfig();
|
||||
} catch (ex) {}
|
||||
var platItems = $('qa-setup-platform').menupopup.childNodes;
|
||||
for (var i=0; i<platItems.length; i++) {
|
||||
if (sysconfig.platform && platItems[i].label == sysconfig.platform)
|
||||
$('qa-setup-platform').selectedIndex = i;
|
||||
}
|
||||
var opsysItems = $('qa-setup-opsys').menupopup.childNodes;
|
||||
for (var i=0; i<opsysItems.length; i++) {
|
||||
if (sysconfig.opsys && opsysItems[i].label == sysconfig.opsys)
|
||||
$('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",
|
||||
$('qa-setup-opsys'), 'name', 'name', guessInfo);
|
||||
},
|
||||
|
||||
validateSysconfig : function() {
|
||||
var sysconfig;
|
||||
try {
|
||||
sysconfig = new Sysconfig();
|
||||
} catch (ex) {}
|
||||
|
||||
// only set prefs for things which differ from the automatically
|
||||
// detected sysconfig for forward-compatibility
|
||||
if (! sysconfig.platform == $('qa-setup-platform').selectedItem.label) {
|
||||
qaPref.setPref(qaPref.prefBase+'.sysconfig.platform',
|
||||
$('qa-setup-platform').selectedItem.label, 'char');
|
||||
}
|
||||
if (! sysconfig.opsys == $('qa-setup-opsys').selectedItem.label) {
|
||||
qaPref.setPref(qaPref.prefBase+'.sysconfig.opsys',
|
||||
$('qa-setup-opsys').selectedItem.label, 'char');
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
finish : function() {
|
||||
qaPref.setPref(qaPref.prefBase+'.isFirstTime', false, 'bool');
|
||||
},
|
||||
didSubmitForm : 0,
|
||||
|
||||
hideAccountSettings : function() {
|
||||
var accountyes = document.getElementById('qa-setup-accountyes');
|
||||
var accountno = document.getElementById('qa-setup-accountno');
|
||||
accountyes.style.display = 'none';
|
||||
accountno.style.display = 'none';
|
||||
},
|
||||
loadAccountSettings : function() {
|
||||
var uname = document.getElementById('username');
|
||||
var passwd = document.getElementById('password');
|
||||
uname.value = qaPref.litmus.getUsername() || '';
|
||||
passwd.value = qaPref.litmus.getPassword() || '';
|
||||
if (qaPref.litmus.getUsername()) {
|
||||
document.getElementById("qa-setup-account-haveaccount").selectedIndex=1;
|
||||
document.getElementById('qa-setup-accountyes').style.display = '';
|
||||
}
|
||||
document.getElementById('qa-setup-createaccount-iframe').src =
|
||||
litmus.baseURL+'extension.cgi?createAccount=1';
|
||||
},
|
||||
|
||||
accountSetting : function(yesno) {
|
||||
var accountyes = document.getElementById('qa-setup-accountyes');
|
||||
var accountno = document.getElementById('qa-setup-accountno');
|
||||
qaSetup.hideAccountSettings();
|
||||
if (yesno == '0') {
|
||||
accountno.style.display = '';
|
||||
} else {
|
||||
accountyes.style.display = '';
|
||||
}
|
||||
},
|
||||
retrieveAccount : function(frameid, loadingid) {
|
||||
var page = document.getElementById(frameid).contentDocument;
|
||||
if (!page) {
|
||||
alert("create account page is missing");
|
||||
return false;
|
||||
}
|
||||
if (page.wrappedJSObject == null)
|
||||
page.wrappedJSObject = page;
|
||||
if (page.forms[0] && page.forms[0].wrappedJSObject == null)
|
||||
page.forms[0].wrappedJSObject = page.forms[0];
|
||||
|
||||
if (loadingid && page.location == litmus.baseURL+'extension.cgi?createAccount=1'
|
||||
&& qaSetup.didSubmitForm==0) {
|
||||
document.getElementById('loadingid').value =
|
||||
document.getElementById("bundle_qa").getString("qa.extension.prefs.loadingMsg");
|
||||
page.forms[0].wrappedJSObject.submit();
|
||||
qaSetup.didSubmitForm = 1;
|
||||
setTimeout("qaSetup.validateAccount()", 5000);
|
||||
return false;
|
||||
}
|
||||
if (qaSetup.didSubmitForm == 1 && ! page.forms ||
|
||||
! page.forms[0].wrappedJSObject ||
|
||||
! page.forms[0].wrappedJSObject.email &&
|
||||
! page.forms[0].wrappedJSObject.email.value)
|
||||
{qaSetup.didSubmitForm = 2;
|
||||
setTimeout("qaSetup.validateAccount()", 4000);
|
||||
return false;}
|
||||
var e = '';
|
||||
var p = '';
|
||||
if (page.forms && page.forms[0].wrappedJSObject &&
|
||||
page.forms[0].wrappedJSObject.email &&
|
||||
page.forms[0].wrappedJSObject.email.value)
|
||||
{ e=page.forms[0].wrappedJSObject.email.value }
|
||||
if (page.forms && page.forms[0].wrappedJSObject &&
|
||||
page.forms[0].wrappedJSObject.password &&
|
||||
page.forms[0].wrappedJSObject.password.value)
|
||||
{ p=page.forms[0].wrappedJSObject.password.value }
|
||||
|
||||
return { name : e, password : p};
|
||||
},
|
||||
validateAccount : function() {
|
||||
if (document.getElementById('qa-setup-accountno').style.display == '') {
|
||||
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");
|
||||
|
||||
var uname = document.getElementById('username').value;
|
||||
var passwd = document.getElementById('password').value;
|
||||
|
||||
var callback = function(resp) {
|
||||
if (resp.responseText != 1) { // failure
|
||||
alert(document.getElementById("bundle_qa").
|
||||
getString("qa.extension.prefs.loginError"));
|
||||
document.getElementById('qa-setup-accountconfirmloading').value = null;
|
||||
return false;
|
||||
} else { // all's well
|
||||
qaPref.litmus.setPassword(uname, passwd);
|
||||
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
|
||||
},
|
||||
|
||||
loadSysconfig : function() {
|
||||
$('qa-setup-sysconfig-loading').value =
|
||||
$("bundle_qa").getString("qa.extension.sysconfig.loadingMsg");
|
||||
|
||||
var guessInfo = function() {
|
||||
var sysconfig;
|
||||
try {
|
||||
sysconfig = new Sysconfig();
|
||||
} catch (ex) {}
|
||||
var platItems = $('qa-setup-platform').menupopup.childNodes;
|
||||
for (var i=0; i<platItems.length; i++) {
|
||||
if (sysconfig.platform && platItems[i].label == sysconfig.platform)
|
||||
$('qa-setup-platform').selectedIndex = i;
|
||||
}
|
||||
var opsysItems = $('qa-setup-opsys').menupopup.childNodes;
|
||||
for (var i=0; i<opsysItems.length; i++) {
|
||||
if (sysconfig.opsys && opsysItems[i].label == sysconfig.opsys)
|
||||
$('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",
|
||||
$('qa-setup-opsys'), 'name', 'name', guessInfo);
|
||||
},
|
||||
|
||||
validateSysconfig : function() {
|
||||
var sysconfig;
|
||||
try {
|
||||
sysconfig = new Sysconfig();
|
||||
} catch (ex) {}
|
||||
|
||||
// only set prefs for things which differ from the automatically
|
||||
// detected sysconfig for forward-compatibility
|
||||
if (! sysconfig.platform == $('qa-setup-platform').selectedItem.label) {
|
||||
qaPref.setPref(qaPref.prefBase+'.sysconfig.platform',
|
||||
$('qa-setup-platform').selectedItem.label, 'char');
|
||||
}
|
||||
if (! sysconfig.opsys == $('qa-setup-opsys').selectedItem.label) {
|
||||
qaPref.setPref(qaPref.prefBase+'.sysconfig.opsys',
|
||||
$('qa-setup-opsys').selectedItem.label, 'char');
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
finish : function() {
|
||||
qaPref.setPref(qaPref.prefBase+'.isFirstTime', false, 'bool');
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,39 +1,39 @@
|
|||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||
# ***** 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 Zach Lipton.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2006
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Zach Lipton <zach@zachlipton.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 ***** -->
|
||||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||
- ***** 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>
|
||||
-
|
||||
- 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 ***** -->
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://qa/skin/" type="text/css"?>
|
||||
|
@ -49,7 +49,7 @@
|
|||
width="850"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml">
|
||||
|
||||
|
||||
<stringbundleset id="stringbundleset">
|
||||
<stringbundle id="bundle_qa" src="chrome://qa/locale/qa.properties" />
|
||||
</stringbundleset>
|
||||
|
@ -79,22 +79,22 @@
|
|||
<radio value="1" label="&qa.setup.accountyes;" onclick="qaSetup.accountSetting('1');"/>
|
||||
</radiogroup>
|
||||
<spacer height="20px" />
|
||||
|
||||
|
||||
<vbox id="qa-setup-accountyes" style="display: none;">
|
||||
<label value="&qa.setup.accountyes.enterinfo;"/>
|
||||
<groupbox>
|
||||
<hbox>
|
||||
<vbox>
|
||||
<label control="username" value="&qa.preferences.litmus.username;"/>
|
||||
<textbox id="username" size="35"/>
|
||||
<label control="password" value="&qa.preferences.litmus.password;"/>
|
||||
<textbox id="password" type="password" size="35"/>
|
||||
<label control="username" value="&qa.preferences.litmus.username;"/>
|
||||
<textbox id="username" size="35"/>
|
||||
<label control="password" value="&qa.preferences.litmus.password;"/>
|
||||
<textbox id="password" type="password" size="35"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
<label id="qa-setup-accountconfirmloading"/>
|
||||
</vbox>
|
||||
|
||||
|
||||
<vbox id="qa-setup-accountno" style="display: none;">
|
||||
<description>&qa.setup.accountno.text;</description>
|
||||
<html:iframe id="qa-setup-createaccount-iframe"
|
||||
|
@ -102,7 +102,7 @@
|
|||
</vbox>
|
||||
</wizardpage>
|
||||
|
||||
<wizardpage pageid="sysconfig" onpageshow="qaSetup.loadSysconfig();"
|
||||
<wizardpage pageid="sysconfig" onpageshow="qaSetup.loadSysconfig();"
|
||||
label="&qa.setup.sysconfig.header;"
|
||||
onpageadvanced="return qaSetup.validateSysconfig();">
|
||||
<vbox>
|
||||
|
@ -132,4 +132,4 @@
|
|||
<description>&qa.setup.accountdone;</description>
|
||||
</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 -*-
|
||||
# ***** 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>
|
||||
#
|
||||
# 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 ***** -->
|
||||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||
* ***** 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 <ben.hsieh@gmail.com> (rewrite)
|
||||
* 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 ***** -->
|
||||
|
||||
<!DOCTYPE overlay [
|
||||
<!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:html="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<tabpanel id="qa-tab-bugzilla">
|
||||
<vbox>
|
||||
<label href="http://bugzilla.mozilla.org"
|
||||
value="Help us by filing and confirming bugs in Bugzilla"
|
||||
class="text-link" />
|
||||
<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>
|
||||
</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>
|
||||
<spacer height= "20px" />
|
||||
|
||||
</vbox>
|
||||
</tabpanel>
|
||||
|
||||
<script type="application/x-javascript">
|
||||
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>
|
||||
</overlay>
|
||||
|
|
|
@ -1,87 +1,91 @@
|
|||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||
# ***** 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>
|
||||
#
|
||||
# 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 ***** -->
|
||||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||
* ***** 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>
|
||||
*
|
||||
* 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 ***** -->
|
||||
|
||||
<!DOCTYPE overlay [
|
||||
<!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:html="http://www.w3.org/1999/xhtml">
|
||||
|
||||
|
||||
<script type="application/x-javascript"
|
||||
src="chrome://chatzillaservice_qa/content/chatzilla-service.js" />
|
||||
<script type="application/x-javascript"
|
||||
src="chrome://chatzillaservice_qa/content/chatzilla-service.js" />
|
||||
<script type="application/x-javascript" >
|
||||
window.addEventListener('load', function() {
|
||||
qaTools.assignLinkHandler($("qa-chat-imo"));
|
||||
qaTools.assignLinkHandler($("qa-chat-irchelp"));
|
||||
}, false);
|
||||
window.addEventListener('load', function() {
|
||||
qaTools.assignLinkHandler($("qa-chat-imo"));
|
||||
qaTools.assignLinkHandler($("qa-chat-irchelp"));
|
||||
}, false);
|
||||
</script>
|
||||
|
||||
<tabpanel id="qa-tab-chat">
|
||||
<vbox>
|
||||
|
||||
|
||||
<groupbox style="width:350px;">
|
||||
<caption label="&qa.chat.introtitle;" />
|
||||
<description>&qa.chat.intro;</description>
|
||||
<spacer style="height: 1em;" />
|
||||
<description>&qa.chat.intro2;</description>
|
||||
</groupbox>
|
||||
|
||||
|
||||
<groupbox style="width:350px;">
|
||||
<caption label="&qa.chat.howdoItitle;" />
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" id="qa-qmo-forumposts">
|
||||
<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-irchelp" href="&qa.chat.howdoI.irchelpurl;" target="_blank">&qa.chat.howdoI.irchelp;</a></li>
|
||||
<li><a id="qa-chat-imo" href="&qa.chat.howdoI.imourl;" target="_blank">
|
||||
&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>
|
||||
</div>
|
||||
<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>
|
||||
|
||||
|
||||
<script type="application/x-javascript">
|
||||
function openQAChat() {
|
||||
spawnChatZilla('irc://irc.mozilla.org/qa', 0);
|
||||
spawnChatZilla('irc://irc.mozilla.org/qa', 0);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</vbox>
|
||||
</tabpanel>
|
||||
|
||||
</overlay>
|
||||
</overlay>
|
||||
|
|
|
@ -1,45 +1,45 @@
|
|||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||
# ***** 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>
|
||||
#
|
||||
# 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 ***** -->
|
||||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||
* ***** 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>
|
||||
*
|
||||
* 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 ***** -->
|
||||
|
||||
<!DOCTYPE overlay [
|
||||
<!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:html="http://www.w3.org/1999/xhtml">
|
||||
|
||||
|
@ -54,4 +54,4 @@
|
|||
</vbox>
|
||||
</tabpanel>
|
||||
|
||||
</overlay>
|
||||
</overlay>
|
||||
|
|
|
@ -1,42 +1,41 @@
|
|||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||
# ***** 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 <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 ***** -->
|
||||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||
* ***** 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 ***** -->
|
||||
|
||||
<?xml-stylesheet href="chrome://qa/skin/" type="text/css"?>
|
||||
|
||||
<!DOCTYPE overlay [
|
||||
<!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">
|
||||
<tabpanel id="qa-tab-litmus" onload="litmus.readStateFromPref();">
|
||||
|
||||
|
||||
<vbox align="start" pack="start">
|
||||
<hbox align="start" pack="start">
|
||||
<vbox minwidth="150">
|
||||
<button maxwidth="110" label="&qa.litmus.selecttests;"
|
||||
<hbox align="start" pack="start">
|
||||
<vbox minwidth="150">
|
||||
<button maxwidth="110" label="&qa.litmus.selecttests;"
|
||||
oncommand="litmus.handleDialog()"
|
||||
style="margin-left: 4px;" />
|
||||
<label maxwidth="160" value="" id="qa-testrun-label"/>
|
||||
<label maxwidth="160" value="" id="qa-testgroup-label"/>
|
||||
<label maxwidth="160" value="" id="qa-subgroup-label"/>
|
||||
<label maxwidth="160" value="" id="qa-testrun-label"/>
|
||||
<label maxwidth="160" value="" id="qa-testgroup-label"/>
|
||||
<label maxwidth="160" value="" id="qa-subgroup-label"/>
|
||||
<label value="" />
|
||||
<label value="" id="qa-testcase-progress" />
|
||||
</vbox>
|
||||
<listbox rows="7" minwidth="200" onselect="litmus.handleSelect()" id="testlist">
|
||||
</vbox>
|
||||
<listbox rows="7" minwidth="200" onselect="litmus.handleSelect()"
|
||||
id="testlist">
|
||||
<listcols>
|
||||
<listcol />
|
||||
<listcol />
|
||||
</listcols>
|
||||
<listitem label="&qa.litmus.testlist.initiallabel;" />
|
||||
|
||||
|
||||
</listbox>
|
||||
</hbox>
|
||||
<vbox>
|
||||
<hbox style="font-weight: bold;">
|
||||
<label id="qa-testcase-id" value="&qa.litmus.testlist.initialdescription;" />
|
||||
<label value="—" />
|
||||
<description id="qa-testcase-summary" maxwidth="230px" crop="end"></description>
|
||||
</hbox>
|
||||
|
||||
</vbox>
|
||||
|
||||
|
||||
<vbox width="370px" minwidth="370px">
|
||||
<groupbox maxheight="130px" minwidth="370px" width="370px">
|
||||
<caption label="&qa.testcase.steps;" crop="end" maxwidth="200"/>
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="width: 350px; height: 140px; overflow: auto;" id="qa-testcase-steps" class="list"/>
|
||||
</groupbox>
|
||||
<splitter id="qa-mainwindow-splitter" state="open" collapse="none">
|
||||
<grippy/>
|
||||
</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"/>
|
||||
</hbox>
|
||||
<vbox>
|
||||
<hbox style="font-weight: bold;">
|
||||
<label id="qa-testcase-id" value="&qa.litmus.testlist.initialdescription;" />
|
||||
<label value="—" />
|
||||
<description id="qa-testcase-summary" maxwidth="230px" crop="end">
|
||||
</description>
|
||||
</hbox>
|
||||
|
||||
</vbox>
|
||||
|
||||
|
||||
<vbox width="370px" minwidth="370px">
|
||||
<groupbox maxheight="130px" minwidth="370px" width="370px">
|
||||
<caption label="&qa.testcase.steps;" crop="end" maxwidth="200"/>
|
||||
<div xmlns="http://www.w3.org/1999/xhtml"
|
||||
style="width: 350px; height: 140px; overflow: auto;"
|
||||
id="qa-testcase-steps" class="list"/>
|
||||
</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>
|
||||
<splitter id="qa-mainwindow-splitter" state="open" collapse="none">
|
||||
<grippy/>
|
||||
</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" 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="" />
|
||||
<script type="application/x-javascript">
|
||||
this.addEventListener('load', litmus.loadStats, false);
|
||||
|
@ -115,4 +124,4 @@
|
|||
</vbox>
|
||||
</tabpanel>
|
||||
|
||||
</overlay>
|
||||
</overlay>
|
||||
|
|
|
@ -35,108 +35,108 @@
|
|||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
var qmo = {
|
||||
populateFields : function() {
|
||||
qmo.populateForumPosts();
|
||||
qmo.populateEvents();
|
||||
qmo.populateQMONews();
|
||||
qmo.populateHowHelp();
|
||||
},
|
||||
populateForumPosts : function() {
|
||||
var numPosts = 5; // show top 5 topics
|
||||
var postBox = $('qa-qmo-forumposts');
|
||||
qaTools.showHideLoadingMessage(postBox, true);
|
||||
var url = qaMain.urlbundle.getString("qa.extension.url.qmo.forum_topics");
|
||||
var callback = function(feed) {
|
||||
var items = feed.items;
|
||||
qaTools.showHideLoadingMessage(postBox, false);
|
||||
if (items.length < numPosts)
|
||||
numPosts=items.length;
|
||||
for (var i=0; i<numPosts; i++) {
|
||||
var item = items.queryElementAt(i, Ci.nsIFeedEntry);
|
||||
if (item != null) {
|
||||
qmo.populateLinkBox(postBox,
|
||||
[{text : item.title.plainText(), url : item.link.resolve("")}],
|
||||
64);
|
||||
}
|
||||
}
|
||||
};
|
||||
qaTools.fetchFeed(url, callback);
|
||||
},
|
||||
populateEvents : function() {
|
||||
var numEvents = 5; // show 5 events
|
||||
var eventBox = $('qa-qmo-events');
|
||||
qaTools.showHideLoadingMessage(eventBox, true);
|
||||
var url = qaMain.urlbundle.getString("qa.extension.url.qmo.upcomingEvents");
|
||||
var callback = function(feed) {
|
||||
var items = feed.items;
|
||||
qaTools.showHideLoadingMessage(eventBox, false);
|
||||
if (items.length < numEvents)
|
||||
numEvents=items.length;
|
||||
for (var i=0; i<numEvents; i++) {
|
||||
var item = items.queryElementAt(i, Ci.nsIFeedEntry);
|
||||
if (item != null) {
|
||||
qmo.populateLinkBox(eventBox,
|
||||
[{text : item.title.plainText(), url : item.link.resolve("")}],
|
||||
37);
|
||||
}
|
||||
}
|
||||
};
|
||||
qaTools.fetchFeed(url, callback);
|
||||
},
|
||||
populateQMONews : function() {
|
||||
var box = $('qa-qmo-latest');
|
||||
var url = qaMain.urlbundle.getString("qa.extension.url.qmo.news");
|
||||
qaTools.showHideLoadingMessage(box, true);
|
||||
var callback = function(feed) {
|
||||
var items = feed.items;
|
||||
var item = items.queryElementAt(0, Ci.nsIFeedEntry);
|
||||
qaTools.showHideLoadingMessage(box, false);
|
||||
if (item != null) { // just grab the first item
|
||||
var content = item.summary;
|
||||
var fragment = content.createDocumentFragment(box);
|
||||
|
||||
box.appendChild(fragment);
|
||||
}
|
||||
qaTools.assignLinkHandlers(box);
|
||||
}
|
||||
qaTools.fetchFeed(url, callback);
|
||||
},
|
||||
populateHowHelp : function() {
|
||||
var box = $('qa-qmo-help');
|
||||
var url = qaMain.urlbundle.getString("qa.extension.url.qmo.howhelp");
|
||||
qaTools.showHideLoadingMessage(box, true);
|
||||
var callback = function(feed) {
|
||||
var items = feed.items;
|
||||
var item = items.queryElementAt(0, Ci.nsIFeedEntry);
|
||||
qaTools.showHideLoadingMessage(box, false);
|
||||
if (item != null) { // just grab the first item
|
||||
var content = item.summary;
|
||||
var fragment = content.createDocumentFragment(box);
|
||||
|
||||
box.appendChild(fragment);
|
||||
}
|
||||
qaTools.assignLinkHandlers(box);
|
||||
}
|
||||
qaTools.fetchFeed(url, callback);
|
||||
},
|
||||
populateLinkBox : function(box, links, chars) {
|
||||
var list = box.childNodes[1];
|
||||
for (var i=0; i<links.length; i++) {
|
||||
var elem = list.appendChild(document.createElementNS(qaMain.htmlNS,"li"));
|
||||
var a = elem.appendChild(document.createElementNS(qaMain.htmlNS,"a"));
|
||||
|
||||
// limit text to chars characters:
|
||||
var text = links[i].text;
|
||||
if (chars && chars>0 && text.length > chars) {
|
||||
a.setAttribute("tooltiptext", text);
|
||||
text = text.substring(0, chars-3)+"...";
|
||||
}
|
||||
|
||||
a.textContent = text;
|
||||
a.href = links[i].url;
|
||||
qaTools.assignLinkHandler(a);
|
||||
}
|
||||
},
|
||||
populateFields : function() {
|
||||
qmo.populateForumPosts();
|
||||
qmo.populateEvents();
|
||||
qmo.populateQMONews();
|
||||
qmo.populateHowHelp();
|
||||
},
|
||||
populateForumPosts : function() {
|
||||
var numPosts = 5; // show top 5 topics
|
||||
var postBox = $('qa-qmo-forumposts');
|
||||
qaTools.showHideLoadingMessage(postBox, true);
|
||||
var url = qaMain.urlbundle.getString("qa.extension.url.qmo.forum_topics");
|
||||
var callback = function(feed) {
|
||||
var items = feed.items;
|
||||
qaTools.showHideLoadingMessage(postBox, false);
|
||||
if (items.length < numPosts)
|
||||
numPosts=items.length;
|
||||
for (var i=0; i<numPosts; i++) {
|
||||
var item = items.queryElementAt(i, Ci.nsIFeedEntry);
|
||||
if (item != null) {
|
||||
qmo.populateLinkBox(postBox,
|
||||
[{text : item.title.plainText(), url : item.link.resolve("")}],
|
||||
64);
|
||||
}
|
||||
}
|
||||
};
|
||||
qaTools.fetchFeed(url, callback);
|
||||
},
|
||||
populateEvents : function() {
|
||||
var numEvents = 5; // show 5 events
|
||||
var eventBox = $('qa-qmo-events');
|
||||
qaTools.showHideLoadingMessage(eventBox, true);
|
||||
var url = qaMain.urlbundle.getString("qa.extension.url.qmo.upcomingEvents");
|
||||
var callback = function(feed) {
|
||||
var items = feed.items;
|
||||
qaTools.showHideLoadingMessage(eventBox, false);
|
||||
if (items.length < numEvents)
|
||||
numEvents=items.length;
|
||||
for (var i=0; i<numEvents; i++) {
|
||||
var item = items.queryElementAt(i, Ci.nsIFeedEntry);
|
||||
if (item != null) {
|
||||
qmo.populateLinkBox(eventBox,
|
||||
[{text : item.title.plainText(), url : item.link.resolve("")}],
|
||||
37);
|
||||
}
|
||||
}
|
||||
};
|
||||
qaTools.fetchFeed(url, callback);
|
||||
},
|
||||
populateQMONews : function() {
|
||||
var box = $('qa-qmo-latest');
|
||||
var url = qaMain.urlbundle.getString("qa.extension.url.qmo.news");
|
||||
qaTools.showHideLoadingMessage(box, true);
|
||||
var callback = function(feed) {
|
||||
var items = feed.items;
|
||||
var item = items.queryElementAt(0, Ci.nsIFeedEntry);
|
||||
qaTools.showHideLoadingMessage(box, false);
|
||||
if (item != null) { // just grab the first item
|
||||
var content = item.summary;
|
||||
var fragment = content.createDocumentFragment(box);
|
||||
|
||||
box.appendChild(fragment);
|
||||
}
|
||||
qaTools.assignLinkHandlers(box);
|
||||
}
|
||||
qaTools.fetchFeed(url, callback);
|
||||
},
|
||||
populateHowHelp : function() {
|
||||
var box = $('qa-qmo-help');
|
||||
var url = qaMain.urlbundle.getString("qa.extension.url.qmo.howhelp");
|
||||
qaTools.showHideLoadingMessage(box, true);
|
||||
var callback = function(feed) {
|
||||
var items = feed.items;
|
||||
var item = items.queryElementAt(0, Ci.nsIFeedEntry);
|
||||
qaTools.showHideLoadingMessage(box, false);
|
||||
if (item != null) { // just grab the first item
|
||||
var content = item.summary;
|
||||
var fragment = content.createDocumentFragment(box);
|
||||
|
||||
box.appendChild(fragment);
|
||||
}
|
||||
qaTools.assignLinkHandlers(box);
|
||||
}
|
||||
qaTools.fetchFeed(url, callback);
|
||||
},
|
||||
populateLinkBox : function(box, links, chars) {
|
||||
var list = box.childNodes[1];
|
||||
for (var i=0; i<links.length; i++) {
|
||||
var elem = list.appendChild(document.createElementNS(qaMain.htmlNS,"li"));
|
||||
var a = elem.appendChild(document.createElementNS(qaMain.htmlNS,"a"));
|
||||
|
||||
// limit text to chars characters:
|
||||
var text = links[i].text;
|
||||
if (chars && chars>0 && text.length > chars) {
|
||||
a.setAttribute("tooltiptext", text);
|
||||
text = text.substring(0, chars-3)+"...";
|
||||
}
|
||||
|
||||
a.textContent = text;
|
||||
a.href = links[i].url;
|
||||
qaTools.assignLinkHandler(a);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function $() {
|
||||
|
@ -151,4 +151,4 @@ function $() {
|
|||
elements.push(element);
|
||||
}
|
||||
return elements;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,45 +1,45 @@
|
|||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||
# ***** 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>
|
||||
#
|
||||
# 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 ***** -->
|
||||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||
* ***** 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>
|
||||
*
|
||||
* 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 ***** -->
|
||||
|
||||
<!DOCTYPE overlay [
|
||||
<!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:html="http://www.w3.org/1999/xhtml">
|
||||
|
||||
|
@ -52,25 +52,28 @@
|
|||
<vbox pack="start">
|
||||
<hbox>
|
||||
<html:a href="http://quality.mozilla.org" target="blank">
|
||||
<image src='chrome://qa/skin/qmo-badge.png'
|
||||
style='max-width: 75px; max-height: 31px; margin-top: 3px; margin-left: 3px;' />
|
||||
<image src='chrome://qa/skin/qmo-badge.png'
|
||||
style='max-width: 75px; max-height: 31px;
|
||||
margin-top: 3px; margin-left: 3px;' />
|
||||
</html:a>
|
||||
</hbox>
|
||||
|
||||
|
||||
|
||||
|
||||
<hbox class="box-mheight">
|
||||
<groupbox class="box-mheight">
|
||||
<caption label="&qa.qmo.help;" />
|
||||
<div class="box-mheight" xmlns="http://www.w3.org/1999/xhtml" id="qa-qmo-help">
|
||||
</div>
|
||||
</groupbox>
|
||||
<groupbox class="box-mheight">
|
||||
<caption label="&qa.qmo.events;" />
|
||||
<div class="box-mheight" xmlns="http://www.w3.org/1999/xhtml" id="qa-qmo-events">
|
||||
<ul>
|
||||
</ul>
|
||||
</div>
|
||||
</groupbox>
|
||||
<groupbox class="box-mheight">
|
||||
<caption label="&qa.qmo.help;" />
|
||||
<div class="box-mheight" xmlns="http://www.w3.org/1999/xhtml"
|
||||
id="qa-qmo-help">
|
||||
</div>
|
||||
</groupbox>
|
||||
<groupbox class="box-mheight">
|
||||
<caption label="&qa.qmo.events;" />
|
||||
<div class="box-mheight" xmlns="http://www.w3.org/1999/xhtml"
|
||||
id="qa-qmo-events">
|
||||
<ul>
|
||||
</ul>
|
||||
</div>
|
||||
</groupbox>
|
||||
</hbox>
|
||||
<groupbox>
|
||||
<caption label="&qa.qmo.forumposts;" />
|
||||
|
@ -79,15 +82,15 @@
|
|||
</ul>
|
||||
</div>
|
||||
</groupbox>
|
||||
|
||||
|
||||
<groupbox id="qa-qmo-latestbox">
|
||||
<caption label="&qa.qmo.thelatest;" />
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" id="qa-qmo-latest">
|
||||
|
||||
|
||||
</div>
|
||||
</groupbox>
|
||||
|
||||
|
||||
</vbox>
|
||||
</tabpanel>
|
||||
|
||||
</overlay>
|
||||
</overlay>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
* Contributor(s):
|
||||
* 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
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
|
@ -39,95 +39,98 @@
|
|||
var updateFunction;
|
||||
var handleCancel;
|
||||
var handleOK;
|
||||
var sTestrunsWrapper; // an array of things that are kind of like testruns, but w/o important fields.
|
||||
//returned by "test_runs_by_branch_product_name="
|
||||
var sTestrunsWrapper; // an array of things that are kind of like testruns,
|
||||
// but w/o important fields.
|
||||
//returned by "test_runs_by_branch_product_name="
|
||||
|
||||
var sTestrun; // actual testrun
|
||||
var sTestgroup;
|
||||
function handleLoad() {
|
||||
|
||||
if (window.arguments.length > 0) {
|
||||
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
|
||||
handleOK = window.arguments[2]; // you get the idea
|
||||
}
|
||||
litmus.getTestruns(populateTestRuns);
|
||||
if (window.arguments.length > 0) {
|
||||
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
|
||||
handleOK = window.arguments[2]; // you get the idea
|
||||
}
|
||||
litmus.getTestruns(populateTestRuns);
|
||||
}
|
||||
|
||||
function handleRunSelect() {
|
||||
var id = document.getElementById("qa-st-testrun").selectedItem.getAttribute("value");
|
||||
if (id == "") return; // oddly, this check doesn't seem necessary in the other handlers...
|
||||
litmus.getTestrun(id, populateTestGroups);
|
||||
var id = $("qa-st-testrun").selectedItem.getAttribute("value");
|
||||
if (id == "") return;
|
||||
// oddly, this check doesn't seem necessary in the other handlers...
|
||||
litmus.getTestrun(id, populateTestGroups);
|
||||
}
|
||||
|
||||
function handleTestgroupSelect() {
|
||||
var id = document.getElementById("qa-st-testgroup").selectedItem.value;
|
||||
litmus.getTestgroup(id, populateSubgroups);
|
||||
var id = document.getElementById("qa-st-testgroup").selectedItem.value;
|
||||
litmus.getTestgroup(id, populateSubgroups);
|
||||
}
|
||||
|
||||
function handleSubgroupSelect() {
|
||||
var id = document.getElementById("qa-st-subgroup").selectedItem.value;
|
||||
updateCaller(sTestrun.name, sTestgroup.name, id, 0);
|
||||
var id = document.getElementById("qa-st-subgroup").selectedItem.value;
|
||||
updateCaller(sTestrun.name, sTestgroup.name, id, 0);
|
||||
}
|
||||
|
||||
function populateTestRuns(testrunsWrapper) {
|
||||
var menu = document.getElementById("qa-st-testrun");
|
||||
testrunsWrapper = qaTools.arrayify(testrunsWrapper);
|
||||
sTestrunsWrapper = testrunsWrapper;
|
||||
var menu = document.getElementById("qa-st-testrun");
|
||||
testrunsWrapper = qaTools.arrayify(testrunsWrapper);
|
||||
sTestrunsWrapper = testrunsWrapper;
|
||||
|
||||
while (menu.firstChild) { // clear menu
|
||||
menu.removeChild(menu.firstChild);
|
||||
}
|
||||
while (menu.firstChild) { // clear menu
|
||||
menu.removeChild(menu.firstChild);
|
||||
}
|
||||
|
||||
for (var i = 0; i < testrunsWrapper.length; i++) {
|
||||
if (testrunsWrapper[i].enabled == 0) continue;
|
||||
var item = menu.appendItem(testrunsWrapper[i].name, testrunsWrapper[i].test_run_id);
|
||||
}
|
||||
menu.selectedIndex = 0;
|
||||
handleRunSelect();
|
||||
for (var i = 0; i < testrunsWrapper.length; i++) {
|
||||
if (testrunsWrapper[i].enabled == 0) continue;
|
||||
var item = menu.appendItem(testrunsWrapper[i].name,
|
||||
testrunsWrapper[i].test_run_id);
|
||||
}
|
||||
menu.selectedIndex = 0;
|
||||
handleRunSelect();
|
||||
}
|
||||
|
||||
function populateTestGroups(testrun) {
|
||||
sTestrun = testrun;
|
||||
var menu = document.getElementById("qa-st-testgroup");
|
||||
while (menu.firstChild) { // clear menu
|
||||
menu.removeChild(menu.firstChild);
|
||||
}
|
||||
sTestrun = testrun;
|
||||
var menu = document.getElementById("qa-st-testgroup");
|
||||
while (menu.firstChild) { // clear menu
|
||||
menu.removeChild(menu.firstChild);
|
||||
}
|
||||
|
||||
var testgroups = qaTools.arrayify(testrun.testgroups);
|
||||
for (var i = 0; i < testgroups.length; i++) {
|
||||
if (testgroups[i].enabled == 0) continue;
|
||||
menu.appendItem(testgroups[i].name, testgroups[i].testgroup_id);
|
||||
}
|
||||
menu.selectedIndex = 0;
|
||||
var testgroups = qaTools.arrayify(testrun.testgroups);
|
||||
for (var i = 0; i < testgroups.length; i++) {
|
||||
if (testgroups[i].enabled == 0) continue;
|
||||
menu.appendItem(testgroups[i].name, testgroups[i].testgroup_id);
|
||||
}
|
||||
menu.selectedIndex = 0;
|
||||
}
|
||||
|
||||
function populateSubgroups(testgroup) {
|
||||
sTestgroup = testgroup;
|
||||
var menu = document.getElementById("qa-st-subgroup");
|
||||
while (menu.firstChild) { // clear menu
|
||||
menu.removeChild(menu.firstChild);
|
||||
}
|
||||
var subgroups = qaTools.arrayify(testgroup.subgroups);
|
||||
sTestgroup = testgroup;
|
||||
var menu = document.getElementById("qa-st-subgroup");
|
||||
while (menu.firstChild) { // clear menu
|
||||
menu.removeChild(menu.firstChild);
|
||||
}
|
||||
var subgroups = qaTools.arrayify(testgroup.subgroups);
|
||||
|
||||
for (var i = 0; i < subgroups.length; i++) {
|
||||
if (subgroups[i].enabled == 0) continue;
|
||||
menu.appendItem(subgroups[i].name, subgroups[i].subgroup_id);
|
||||
}
|
||||
menu.selectedIndex = 0;
|
||||
for (var i = 0; i < subgroups.length; i++) {
|
||||
if (subgroups[i].enabled == 0) continue;
|
||||
menu.appendItem(subgroups[i].name, subgroups[i].subgroup_id);
|
||||
}
|
||||
menu.selectedIndex = 0;
|
||||
}
|
||||
|
||||
function OK() {
|
||||
handleOK();
|
||||
return true;
|
||||
handleOK();
|
||||
return true;
|
||||
}
|
||||
|
||||
function updateCaller(testrunSummary, testgroupSummary, subgroupID, index) {
|
||||
litmus.writeStateToPref(testrunSummary, testgroupSummary, subgroupID, index);
|
||||
updateFunction();
|
||||
litmus.writeStateToPref(testrunSummary, testgroupSummary, subgroupID, index);
|
||||
updateFunction();
|
||||
}
|
||||
|
||||
function Cancel() {
|
||||
handleCancel();
|
||||
return true;
|
||||
handleCancel();
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,40 +1,39 @@
|
|||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||
# ***** 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 <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 ***** -->
|
||||
|
||||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||
* ***** 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 ***** -->
|
||||
<!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;
|
||||
]>
|
||||
|
@ -43,47 +42,48 @@
|
|||
<?xml-stylesheet href="chrome://qa/skin/" type="text/css"?>
|
||||
|
||||
<dialog id="dialog-name"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
persist="screenX screenY width height"
|
||||
buttons="accept,cancel"
|
||||
ondialogaccept="return OK();"
|
||||
ondialogcancel="return Cancel();"
|
||||
onload="handleLoad();">
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
persist="screenX screenY width height"
|
||||
buttons="accept,cancel"
|
||||
ondialogaccept="return OK();"
|
||||
ondialogcancel="return Cancel();"
|
||||
onload="handleLoad();">
|
||||
|
||||
<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/litmus.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/common.js" />
|
||||
<script type="application/x-javascript" src="chrome://qa/content/tabs/selecttests.js" />
|
||||
|
||||
<dialogheader description="&qa.selecttests.header;" />
|
||||
<spacer height="20" />
|
||||
<vbox>
|
||||
<hbox>
|
||||
<description value="Test Run:" />
|
||||
<menulist label=" " id="qa-st-testrun" onselect="handleRunSelect()">
|
||||
<menupopup >
|
||||
<menuitem label="&qa.selecttests.load;" selected="true" />
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
<spacer height="20" />
|
||||
<hbox>
|
||||
<vbox>
|
||||
<description value="Test Group:" />
|
||||
<listbox id="qa-st-testgroup" rows = "5" onselect="handleTestgroupSelect()">
|
||||
<listitem label="&qa.selecttests.load;" />
|
||||
</listbox>
|
||||
</vbox>
|
||||
<vbox>
|
||||
<description value="Subgroup" />
|
||||
<listbox id="qa-st-subgroup" rows = "5" onselect="handleSubgroupSelect()">
|
||||
<listitem label="&qa.selecttests.load;" />
|
||||
</listbox>
|
||||
</vbox>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<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/litmus.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/common.js" />
|
||||
<script type="application/x-javascript" src="chrome://qa/content/tabs/selecttests.js" />
|
||||
|
||||
<dialogheader description="&qa.selecttests.header;" />
|
||||
<spacer height="20" />
|
||||
<vbox>
|
||||
<hbox>
|
||||
<description value="Test Run:" />
|
||||
<menulist label=" " id="qa-st-testrun" onselect="handleRunSelect()">
|
||||
<menupopup >
|
||||
<menuitem label="&qa.selecttests.load;" selected="true" />
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
<spacer height="20" />
|
||||
<hbox>
|
||||
<vbox>
|
||||
<description value="Test Group:" />
|
||||
<listbox id="qa-st-testgroup" rows = "5"
|
||||
onselect="handleTestgroupSelect()">
|
||||
<listitem label="&qa.selecttests.load;" />
|
||||
</listbox>
|
||||
</vbox>
|
||||
<vbox>
|
||||
<description value="Subgroup" />
|
||||
<listbox id="qa-st-subgroup" rows = "5"
|
||||
onselect="handleSubgroupSelect()">
|
||||
<listitem label="&qa.selecttests.load;" />
|
||||
</listbox>
|
||||
</vbox>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</dialog>
|
||||
|
||||
|
|
|
@ -1,56 +1,49 @@
|
|||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||
# ***** 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>
|
||||
#
|
||||
# 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 ***** -->
|
||||
<?xml version="1.0"?><!-- -*- Mode: HTML -*-
|
||||
* ***** 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>
|
||||
*
|
||||
* 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 ***** -->
|
||||
|
||||
<!DOCTYPE overlay [
|
||||
<!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">
|
||||
|
||||
<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">
|
||||
<stringbundle id="bundle_qa" src="chrome://qa/locale/qa.properties" />
|
||||
</stringbundleset>
|
||||
|
@ -59,29 +52,39 @@
|
|||
<vbox flex="1">
|
||||
<groupbox>
|
||||
<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" />
|
||||
<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" />
|
||||
<hbox>
|
||||
<button id="qa-preferences-litmus-createAccount" label="&qa.preferences.litmus.createAccount;"
|
||||
oncommand="qaPrefsWindow.createAccount();" />
|
||||
<button id="qa-preferences-litmus-createAccount"
|
||||
label="&qa.preferences.litmus.createAccount;"
|
||||
oncommand="qaPrefsWindow.createAccount();" />
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
|
||||
<groupbox id="qa-prefs-notify">
|
||||
<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>
|
||||
<checkbox id="qa-prefs-notify-testday" label="&qa.preferences.notification.testday;" />
|
||||
<checkbox id="qa-prefs-notify-bugday" label="&qa.preferences.notification.bugday;" />
|
||||
<checkbox id="qa-prefs-notify-prerelease" 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;" />
|
||||
<checkbox id="qa-prefs-notify-testday"
|
||||
label="&qa.preferences.notification.testday;" />
|
||||
<checkbox id="qa-prefs-notify-bugday"
|
||||
label="&qa.preferences.notification.bugday;" />
|
||||
<checkbox id="qa-prefs-notify-prerelease"
|
||||
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>
|
||||
</vbox>
|
||||
|
||||
</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.selecttests "Select Tests">
|
||||
<!ENTITY qa.litmus.testlist.initiallabel "No tests loaded, select some tests!">
|
||||
<!ENTITY qa.litmus.testlist.initialdescription "No testcase">
|
||||
<!ENTITY qa.statusbar.label "QA">
|
||||
<!ENTITY qa.mainwindow.prefs "Preferences">
|
||||
<!ENTITY qa.mainwindow.title "Mozilla QA">
|
||||
<!ENTITY qa.testcase.steps "Steps to Perform">
|
||||
<!ENTITY qa.testcase.expected "Expected Results">
|
||||
<!ENTITY qa.testcase.result.pass "Test Passed">
|
||||
<!ENTITY qa.testcase.result.fail "Test Failed">
|
||||
<!ENTITY qa.testcase.result.unclearbroken "Test is unclear or broken">
|
||||
<!ENTITY qa.testcase.comment "Comment (optional):">
|
||||
<!ENTITY qa.statusbar.label "QA">
|
||||
<!ENTITY qa.mainwindow.prefs "Preferences">
|
||||
<!ENTITY qa.mainwindow.title "Mozilla QA">
|
||||
<!ENTITY qa.testcase.steps "Steps to Perform">
|
||||
<!ENTITY qa.testcase.expected "Expected Results">
|
||||
<!ENTITY qa.testcase.result.pass "Test Passed">
|
||||
<!ENTITY qa.testcase.result.fail "Test Failed">
|
||||
<!ENTITY qa.testcase.result.unclearbroken "Test is unclear or broken">
|
||||
<!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.preferences.title "Settings">
|
||||
|
@ -44,27 +81,27 @@
|
|||
<!ENTITY qa.setup.welcomeheader "Welcome to the Mozilla QA Extension!">
|
||||
<!ENTITY qa.setup.welcometext "
|
||||
<html:h4>Welcome to the Mozilla Quality Assurance community!</html:h4>
|
||||
Mozilla Quality Assurance (QA) is a network of countless volunteers
|
||||
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
|
||||
Mozilla Quality Assurance (QA) is a network of countless volunteers
|
||||
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
|
||||
constructively reporting bugs in Mozilla products.
|
||||
<html:br/><html:br/>
|
||||
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
|
||||
your time, doesn't require any special skills, and helps to improve Mozilla
|
||||
products like Firefox and Thunderbird.
|
||||
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
|
||||
your time, doesn't require any special skills, and helps to improve Mozilla
|
||||
products like Firefox and Thunderbird.
|
||||
<html:br/><html:br/>
|
||||
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>,
|
||||
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
|
||||
of platforms, operating systems, and configurations.
|
||||
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>,
|
||||
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
|
||||
of platforms, operating systems, and configurations.
|
||||
|
||||
<html:h4>Why Should I Get Involved?</html:h4>
|
||||
xxx
|
||||
|
||||
<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'>
|
||||
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.abouttext "
|
||||
<html:h4>How do I get started?</html:h4>
|
||||
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,
|
||||
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
|
||||
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,
|
||||
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
|
||||
events and other ways to get involved.
|
||||
|
||||
<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
|
||||
submit in order to improve the quality of Mozilla products. You
|
||||
<html:b>should not</html:b> submit any private or confidential information
|
||||
submit in order to improve the quality of Mozilla products. You
|
||||
<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
|
||||
to display instead, we will hide your email address from
|
||||
public view to help prevent email harvesting bots from spamming you.
|
||||
For more information, please see our
|
||||
to display instead, we will hide your email address from
|
||||
public view to help prevent email harvesting bots from spamming you.
|
||||
For more information, please see our
|
||||
<html:a href='http://www.mozilla.com/privacy-policy.html' target='_blank'>
|
||||
privacy policy</html:a>.
|
||||
|
||||
|
@ -94,39 +131,39 @@ privacy policy</html:a>.
|
|||
">
|
||||
|
||||
<!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.">
|
||||
<!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.accountyes "I already have a Litmus account">
|
||||
<!ENTITY qa.setup.accountyes.enterinfo "Enter your Litmus account information:">
|
||||
<!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
|
||||
<!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
|
||||
account is created, press the 'Continue' button to complete setup.">
|
||||
|
||||
<!ENTITY qa.setup.accountdone "
|
||||
<html:h4>Account Created</html:h4>
|
||||
<html:b>Congratulations!</html:b> Your Litmus
|
||||
account has been created. You'll be able to use your new account both here in
|
||||
<html:b>Congratulations!</html:b> Your Litmus
|
||||
account has been created. You'll be able to use your new account both here in
|
||||
the QA Extension, and on the Litmus website.
|
||||
|
||||
<html:h4>That's it!</html:h4>
|
||||
<html:b>You're ready to start testing.</html:b> If you have any questions along
|
||||
the way, you may post to the
|
||||
<html:b>You're ready to start testing.</html:b> If you have any questions along
|
||||
the way, you may post to the
|
||||
<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 href='http://irc.mozilla.org' target='_blank'>IRC</html:a> (Internet Relay
|
||||
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,
|
||||
</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
|
||||
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,
|
||||
you should be able to join by clicking this link: <html:a href='irc://irc.mozilla.org/qa'>
|
||||
join #qa</html:a>.
|
||||
">
|
||||
|
||||
<!ENTITY qa.setup.sysconfig.header "System Configuration">
|
||||
<!ENTITY qa.setup.sysconfig.text "
|
||||
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
|
||||
possible, but please check the settings below and make any necessary changes.
|
||||
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
|
||||
possible, but please check the settings below and make any necessary changes.
|
||||
">
|
||||
<!ENTITY qa.setup.sysconfig.platform "Platform:">
|
||||
<!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.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.savedMsg = Your settings have been saved
|
||||
qa.extension.sysconfig.loadingMsg = Loading menu options...
|
||||
qa.extension.loading = Loading...
|
||||
|
||||
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
|
|
@ -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.news = http://quality.mozilla.org/rss.xml
|
||||
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 {
|
||||
right: 18px;
|
||||
bottom: 21px;
|
||||
|
@ -22,4 +58,8 @@
|
|||
#qa-notify-header {
|
||||
font-size: 1.5em;
|
||||
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 *****
|
||||
# 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>
|
||||
# Zach Linder <zakness@gmail.com>
|
||||
# Ben Hsieh <bhsieh@stanford.edu>
|
||||
#
|
||||
# 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 ***** --> */
|
||||
|
||||
@import url(chrome://global/skin/);
|
||||
|
||||
@import url(chrome://browser/skin/);
|
||||
|
||||
@namespace html "http://www.w3.org/1999/xhtml";
|
||||
|
||||
#qa-pass {
|
||||
background: #99ff99;
|
||||
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;
|
||||
/* ***** 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>
|
||||
* Zach Linder <zakness@gmail.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 ***** */
|
||||
|
||||
@import url(chrome://global/skin/);
|
||||
|
||||
@import url(chrome://browser/skin/);
|
||||
|
||||
@namespace html "http://www.w3.org/1999/xhtml";
|
||||
|
||||
#qa-pass {
|
||||
background: #99ff99;
|
||||
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;
|
||||
}
|
||||
/*remove bullets for everything but lists contained inside testcase data */
|
||||
html|li {
|
||||
list-style-type: none !important;
|
||||
|
@ -85,123 +84,154 @@ html|li {
|
|||
|
||||
#qa-tab-litmus html|ul, #qa-tab-litmus html|ol {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------
|
||||
TABS
|
||||
-------------------------------*/
|
||||
#qa_tabbox #qa_tabrow {
|
||||
height: 30px !important;
|
||||
padding-top: 5px !important;
|
||||
}
|
||||
#qa_tabbox .tab-icon-image {
|
||||
list-style-image: none;
|
||||
width: 0;
|
||||
}
|
||||
#qa_tabbox #qa-tabbar-qmo {
|
||||
list-style-image: url(qmo-16px.png);
|
||||
width: 15px;
|
||||
}
|
||||
#qa_tabbox tab, #qa_tabbox tabs spacer {
|
||||
border-bottom: 1px solid #ACA899 !important;
|
||||
}
|
||||
.tabs-left, .tabs-right {
|
||||
-moz-border-bottom-colors: #ACA899 #ACA899 !important;
|
||||
}
|
||||
#qa_tabbox tab[selected="true"] {
|
||||
border-bottom: 1px solid #E8E5D8 !important;
|
||||
}
|
||||
#qa_tabbox #qa-tabbar-spacer {
|
||||
width: 93px;
|
||||
}
|
||||
|
||||
tabs {
|
||||
border-bottom: 3px solid #E8E5D8;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------
|
||||
TABS
|
||||
-------------------------------*/
|
||||
#qa_tabbox #qa_tabrow {
|
||||
height: 30px !important;
|
||||
padding-top: 5px !important;
|
||||
}
|
||||
|
||||
#qa_tabbox .tab-icon-image {
|
||||
list-style-image: none;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
#qa_tabbox #qa-tabbar-qmo {
|
||||
list-style-image: url(qmo-16px.png);
|
||||
width: 15px;
|
||||
}
|
||||
|
||||
#qa_tabbox #qa-tabbar-spacer {
|
||||
width: 93px;
|
||||
}
|
||||
|
||||
|
||||
#qa_tabbox tab, #qa_tabbox tabs spacer {
|
||||
border-bottom: 1px solid #ACA899 !important;
|
||||
}
|
||||
|
||||
.tabs-left, .tabs-right {
|
||||
-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 */
|
||||
tab:focus > .tab-middle {
|
||||
outline: 1px none invert !important;
|
||||
outline: 1px none invert !important;
|
||||
}
|
||||
|
||||
/*-------------------------------
|
||||
PANELS
|
||||
-------------------------------*/
|
||||
#qa_tabbox tabpanel {
|
||||
line-height: 1.6;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
#qa_tabbox tabpanels {
|
||||
background-color: white;
|
||||
border-top: 1px solid #ACA899;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
#qa_tabbox groupbox {
|
||||
background-color: white;
|
||||
}
|
||||
#qa_tabbox caption {
|
||||
font: bold 12px helvetica, arial, sans-serif;
|
||||
color: #ec891d;
|
||||
background-color: white;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#qa-qmo-help,
|
||||
#qa-qmo-events,
|
||||
.box-mheight {
|
||||
max-height: 130px;
|
||||
height: 130px;
|
||||
}
|
||||
#qa-qmo-forumposts {
|
||||
width: 290px;
|
||||
}
|
||||
#qa-qmo-latestbox {
|
||||
height: 200px;
|
||||
width: 290px;
|
||||
overflow: auto;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------
|
||||
NOTIFY
|
||||
-------------------------------*/
|
||||
|
||||
#qa-notify {
|
||||
right: 18px;
|
||||
bottom: 21px;
|
||||
position: fixed;
|
||||
border: 1px solid grey;
|
||||
background-color: white;
|
||||
background-image: url("logolight.png");
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.qa-notify {
|
||||
height: 140px;
|
||||
width: 420px;
|
||||
}
|
||||
|
||||
#qa-notify-box {
|
||||
padding: 0px 6px 6px 6px;
|
||||
display: table;
|
||||
}
|
||||
|
||||
#qa-notify-header {
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------
|
||||
GENERAL
|
||||
-------------------------------*/
|
||||
|
||||
.list {
|
||||
padding-left: 10px;
|
||||
|
||||
/*-------------------------------
|
||||
PANELS
|
||||
-------------------------------*/
|
||||
#qa_tabbox tabpanel {
|
||||
line-height: 1.6;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
#qa_tabbox tabpanels {
|
||||
background-color: white;
|
||||
border-top: 1px solid #ACA899;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
#qa_tabbox groupbox {
|
||||
background-color: white;
|
||||
}
|
||||
#qa_tabbox caption {
|
||||
font: bold 12px helvetica, arial, sans-serif;
|
||||
color: #ec891d;
|
||||
background-color: white;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#qa-qmo-help,
|
||||
#qa-qmo-events,
|
||||
.box-mheight {
|
||||
max-height: 130px;
|
||||
height: 130px;
|
||||
}
|
||||
#qa-qmo-forumposts {
|
||||
width: 290px;
|
||||
}
|
||||
#qa-qmo-latestbox {
|
||||
height: 200px;
|
||||
width: 290px;
|
||||
overflow: auto;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------
|
||||
NOTIFY
|
||||
-------------------------------*/
|
||||
|
||||
#qa-notify {
|
||||
right: 18px;
|
||||
bottom: 21px;
|
||||
position: fixed;
|
||||
border: 1px solid grey;
|
||||
background-color: white;
|
||||
background-image: url("logolight.png");
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.qa-notify {
|
||||
height: 140px;
|
||||
width: 420px;
|
||||
}
|
||||
|
||||
#qa-notify-box {
|
||||
padding: 0px 6px 6px 6px;
|
||||
display: table;
|
||||
}
|
||||
|
||||
#qa-notify-header {
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------
|
||||
GENERAL
|
||||
-------------------------------*/
|
||||
|
||||
.list {
|
||||
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.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.minNotificationInterval", 5400000); // 90 minutes
|
||||
pref("qa.extension.lastNotificationTime", 0);
|
||||
pref("qa.extension.minNotificationCheckInterval", 5400000); // 90 minutes
|
||||
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"?>
|
||||
<RDF:RDF xmlns:em="http://www.mozilla.org/2004/em-rdf#"
|
||||
xmlns:NC="http://home.netscape.com/NC-rdf#"
|
||||
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||
<RDF:Description RDF:about="rdf:#$QJqvE"
|
||||
em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
|
||||
em:minVersion="2.0"
|
||||
em:maxVersion="3.0a9" />
|
||||
<RDF:Description RDF:about="urn:mozilla:install-manifest"
|
||||
em:id="{667e9f3d-0096-4d2b-b171-9a96afbabe20}"
|
||||
em:version="0.1.4"
|
||||
em:type="2"
|
||||
em:name="Mozilla Quality Extension"
|
||||
em:description="The QA tool"
|
||||
em:creator="Mozilla Quality Assurance"
|
||||
em:homepageURL="http://quality.mozilla.org/"
|
||||
em:updateURL="https://landfill.bugzilla.org/mozillaQA/update.rdf">
|
||||
<em:targetApplication RDF:resource="rdf:#$QJqvE"/>
|
||||
</RDF:Description>
|
||||
</RDF:RDF>
|
||||
<?xml version="1.0"?>
|
||||
<RDF:RDF xmlns:em="http://www.mozilla.org/2004/em-rdf#"
|
||||
xmlns:NC="http://home.netscape.com/NC-rdf#"
|
||||
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||
<RDF:Description RDF:about="rdf:#$QJqvE"
|
||||
em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
|
||||
em:minVersion="2.0"
|
||||
em:maxVersion="3.0a9" />
|
||||
<RDF:Description RDF:about="urn:mozilla:install-manifest"
|
||||
em:id="{667e9f3d-0096-4d2b-b171-9a96afbabe20}"
|
||||
em:version="0.1.4"
|
||||
em:type="2"
|
||||
em:name="Mozilla Quality Extension"
|
||||
em:description="The QA tool"
|
||||
em:creator="Mozilla Quality Assurance"
|
||||
em:homepageURL="http://quality.mozilla.org/"
|
||||
em:updateURL="https://landfill.bugzilla.org/mozillaQA/update.rdf">
|
||||
<em:targetApplication RDF:resource="rdf:#$QJqvE"/>
|
||||
</RDF:Description>
|
||||
</RDF:RDF>
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
content qa jar:chrome/qa.jar!/content/
|
||||
skin qa classic/1.0 jar:chrome/qa.jar!/skin/
|
||||
locale qa en-US jar:chrome/qa.jar!/locale/en-US/
|
||||
content qa jar:chrome/qa.jar!/content/
|
||||
skin qa classic/1.0 jar:chrome/qa.jar!/skin/
|
||||
locale qa en-US jar:chrome/qa.jar!/locale/en-US/
|
||||
|
||||
overlay chrome://browser/content/browser.xul chrome://qa/content/browserOverlays.xul
|
||||
|
||||
content chatzilla_qa jar:chatzilla.jar!/content/chatzilla/
|
||||
skin chatzilla_qa modern/1.0 jar:chatzilla.jar!/skin/modern/chatzilla/
|
||||
locale chatzilla_qa en-US jar:chatzilla.jar!/locale/en-US/chatzilla/
|
||||
content chatzillaservice_qa components/chatzilla-service.js
|
||||
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 * {
|
||||
background-color: #ebebeb !important;
|
||||
#qa-tabbar-spacer {
|
||||
width: 17px !important;
|
||||
}
|
||||
|
||||
groupbox * {
|
||||
background: url("chrome://global/skin/10pct_transparent_grey.png") repeat !important;
|
||||
#qa_tabbox tabpanel {
|
||||
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.
|
||||
**/
|
Загрузка…
Ссылка в новой задаче