Bug 391403: new CSS from Zack, fix for bug 390883. p=ben_h, r=zach

This commit is contained in:
zach%zachlipton.com 2007-08-08 21:54:32 +00:00
Родитель 01bbc072fb
Коммит 266b8688e9
9 изменённых файлов: 183 добавлений и 64 удалений

Просмотреть файл

@ -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
@ -32,7 +33,7 @@
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
* ***** END LICENSE BLOCK ***** */
const Ci = Components.interfaces;
@ -153,9 +154,21 @@ var qaTools = {
},
linkTargetsToBlank : function(node) {
assignLinkHandlers : function(node) {
var children = node.getElementsByTagName('a');
for (var i = 0; i < children.length; i++)
children[i].setAttribute("target", "_blank");
}
children[i].addEventListener("click", qaTools.handleLink, false);
},
assignLinkHandler : function(link) {
link.addEventListener("click", qaTools.handleLink, false);
},
handleLink : function(event) {
var url = this.href;
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
},
};

Просмотреть файл

@ -247,8 +247,8 @@
qaTools.writeSafeHTML('qa-testcase-steps', testcase.steps_formatted);
qaTools.writeSafeHTML('qa-testcase-expected', testcase.expected_results_formatted);
qaTools.linkTargetsToBlank($('qa-testcase-steps'));
qaTools.linkTargetsToBlank($('qa-testcase-expected'));
qaTools.assignLinkHandlers($('qa-testcase-steps'));
qaTools.assignLinkHandlers($('qa-testcase-expected'));
litmus.checkRadioButtons();
},

Просмотреть файл

@ -36,6 +36,7 @@
# ***** 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"?>
<?xml-stylesheet href="chrome://qa/skin/qa.css" type="text/css"?>
<?xml-stylesheet href="chrome://qa/skin/platform.css" type="text/css"?>
@ -64,6 +65,7 @@
<stringbundle id="bundle_urls" src="chrome://qa/locale/urls.properties" />
</stringbundleset>
<script type="application/x-javascript" src="chrome://browser/content/utilityOverlay.js" />
<script type="application/x-javascript" src="chrome://qa/content/MochiKit/MochiKit.js" />
<script type="application/x-javascript" src="chrome://qa/content/litmusReporter.js" />
<script type="application/x-javascript" src="chrome://qa/content/prefs.js" />
@ -73,13 +75,13 @@
<tabbox id="qa_tabbox">
<tabs id="qa_tabrow">
<tab image="chrome://qa/skin/qmo.png" />
<tab label="&qa.litmus.title;" />
<tab label="&qa.bugzilla.title;" />
<tab label="&qa.chat.title;" />
<spacer id="qa-tab-spacer" />
<tab label="&qa.preferences.title;" id="qa-tabbar-prefs" />
<tab label="&qa.help.title;" />
<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.chat.title;" class="tabbrowser-tab" />
<spacer id="qa-tabbar-spacer" />
<tab label="&qa.preferences.title;" id="qa-tabbar-prefs" class="tabbrowser-tab" />
<tab label="&qa.help.title;" class="tabbrowser-tab" />
</tabs>
<tabpanels>
<tabpanel id="qa-tab-qmo"></tabpanel>

Просмотреть файл

@ -43,8 +43,6 @@
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://qa/content/tabs/qa.js" />
<script type="application/x-javascript" src="chrome://qa/content/tabs/qmo.js" />
<tabpanel id="qa-tab-bugzilla">
<vbox>
<groupbox>

Просмотреть файл

@ -46,6 +46,12 @@
<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);
</script>
<tabpanel id="qa-tab-chat">
<vbox>
@ -61,8 +67,8 @@
<caption label="&qa.chat.howdoItitle;" />
<div xmlns="http://www.w3.org/1999/xhtml" id="qa-qmo-forumposts">
<ul>
<li><a href="&qa.chat.howdoI.imourl;" target="_blank">&qa.chat.howdoI.imo;</a></li>
<li><a 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;"

Просмотреть файл

@ -44,10 +44,6 @@
]>
<overlay id="qa-litmus-overlay" 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/tabs/qa.js" />
<script type="application/x-javascript" src="chrome://qa/content/tabs/prefs.js" />
<script type="application/x-javascript" src="chrome://qa/content/tabs/litmus.js" />
<tabpanel id="qa-tab-litmus" onload="litmus.readStateFromPref()">
<vbox align="start" pack="start">

Просмотреть файл

@ -97,6 +97,7 @@ var qmo = {
box.appendChild(fragment);
}
qaTools.assignLinkHandlers(box);
}
qaTools.fetchFeed(url, callback);
},
@ -114,6 +115,7 @@ var qmo = {
box.appendChild(fragment);
}
qaTools.assignLinkHandlers(box);
}
qaTools.fetchFeed(url, callback);
},
@ -132,7 +134,7 @@ var qmo = {
a.textContent = text;
a.href = links[i].url;
a.target = "blank_";
qaTools.assignLinkHandler(a);
}
},
};

Просмотреть файл

@ -43,8 +43,7 @@
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://qa/content/tabs/qa.js" />
<script type="application/x-javascript" src="chrome://qa/content/tabs/qmo.js" />
<script type="application/x-javascript">
window.addEventListener('load', qmo.populateFields, false)
</script>
@ -53,15 +52,15 @@
<vbox pack="start">
<label href="http://quality.mozilla.org" value="&qa.qmo.visit;" class="text-link" />
<hbox maxheight="130px" height="130px">
<groupbox maxheight="130px" height="130px">
<hbox class="box-mheight">
<groupbox class="box-mheight">
<caption label="&qa.qmo.help;" />
<div style="max-height: 130px; height: 130px" xmlns="http://www.w3.org/1999/xhtml" id="qa-qmo-help">
<div class="box-mheight" xmlns="http://www.w3.org/1999/xhtml" id="qa-qmo-help">
</div>
</groupbox>
<groupbox maxheight="130px" height="130px">
<groupbox class="box-mheight">
<caption label="&qa.qmo.events;" />
<div style="max-height: 130px; height: 130px" xmlns="http://www.w3.org/1999/xhtml" id="qa-qmo-events">
<div class="box-mheight" xmlns="http://www.w3.org/1999/xhtml" id="qa-qmo-events">
<ul>
</ul>
</div>
@ -69,13 +68,13 @@
</hbox>
<groupbox>
<caption label="&qa.qmo.forumposts;" />
<div xmlns="http://www.w3.org/1999/xhtml" style="width: 290px" id="qa-qmo-forumposts">
<div xmlns="http://www.w3.org/1999/xhtml" id="qa-qmo-forumposts">
<ul>
</ul>
</div>
</groupbox>
<groupbox style="height: 200px; width:100px; overflow: auto; margin-right: 12px;">
<groupbox id="qa-qmo-latestbox">
<caption label="&qa.qmo.thelatest;" />
<div xmlns="http://www.w3.org/1999/xhtml" id="qa-qmo-latest">

Просмотреть файл

@ -1,3 +1,41 @@
/* ***** 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/);
@ -13,24 +51,24 @@
HTML
-------------------------------*/
html|ul, html|ol {
#qa_tabbox html|ul, #qa_tabbox html|ol {
margin: 0;
padding: 0;
}
html|ul li {
#qa_tabbox html|ul li {
list-style-type: square;
margin-bottom: 0.4em;
}
html|p {
}
html|a, html|a:link, html|a:visited {
#qa_tabbox html|a,
#qa_tabbox html|a:link,
#qa_tabbox html|a:visited {
font-weight: bold;
color: #0067ac;
}
html|a:focus, html|a:hover, html|a:active {
#qa_tabbox html|a:focus,
#qa_tabbox html|a:hover,
#qa_tabbox html|a:active {
color: #333;
}
@ -39,50 +77,116 @@ html|a:focus, html|a:hover, html|a:active {
TABS
-------------------------------*/
tabs {
background: #e1dece url(tabrow-bg.gif) repeat-x left top;
height: 26px;
#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;
}
tab {
padding: 0.1em 0.6em;
vertical-align: middle;
background-color: transparent;
}
/* set 140px tab spacer width here
for windows. Will be overriden in platform/ for other OSes */
#qa-tab-spacer { width: 140px; }
/*-------------------------------
PANELS
-------------------------------*/
tabpanel {
color: #5F6775;
#qa_tabbox tabpanel {
line-height: 1.6;
background-color: white;
}
groupbox {
border-color: #e0e0e0;
padding: 6px 8px;
#qa_tabbox tabpanels {
background-color: white;
border-top: 1px solid #ACA899;
margin-top: 0px;
}
caption {
#qa_tabbox groupbox {
background-color: white;
}
#qa_tabbox caption {
font: bold 12px helvetica, arial, sans-serif;
color: #ec891d;
background: transparent none repeat-x left 6px;
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;
}
#qa-tab-qmo > html|li {
list-style-type: none;
}
}
/* @group test overview */
#qa-litmus-testoverview {
text-decoration: underline;
font-size: x-small;
@ -97,4 +201,3 @@ caption {
background-color: gray;
font-weight: bold;
}
/* @end */