Commit b87aeda1 authored by Thomas Sibley's avatar Thomas Sibley
Browse files

LOTS of miscellaneous changes...

I've mostly styled the /Widget/TitleBoxes, but they still need
to be colorized according to type (and this needs to be synced with
history).

A lot of form elements still need styling because they don't have appropriate
classes.  These would be done already if I could use CSS3 attribute selectors,
but alas, I can't.

A few JS improvements plus general cleanup of HTML as I go along.

I still have to correct for a few IE bugs.

git-svn-id: svn+ssh://svn.bestpractical.com/svn/bps-public/rt/branches/3.5-TESTING@3291 e417ac7c-1bcc-0310-8ffa-8f5827389a85
parent c7219ba6
......@@ -57,14 +57,15 @@
<link type="text/css" rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/css/main.css" />
<script>
function hideshow(num) {
idstring = "element-" + num;
chunk = document.getElementById(idstring);
var idstring = "element-" + num;
var chunk = document.getElementById(idstring);
if ( chunk.style.display == "none") {
chunk.style.display = chunk.style.tag;
chunk.style.display = chunk.style.tag;
} else {
chunk.style.tag = chunk.style.display;
chunk.style.display = "none";
}
return false;
}
</script>
<& /Elements/Callback, _CallbackName => 'Head', %ARGS &>
......@@ -78,6 +79,7 @@ onload="
% }
>
% if ($ShowBar) {
<div id="quickbar">
<div id="quick-personal">
<span class="hide"><a href="#skipnav"><&|/l&>Skip Menu</&></a> | </span>
......@@ -95,6 +97,7 @@ onload="
| <a href="<%$RT::WebPath%>/NoAuth/Logout.html<%$URL ? "?URL=".$URL : ''%>"><&|/l&>Logout</&></a>
% }
</div>
% }
<%INIT>
$r->headers_out->{'Pragma'} = 'no-cache';
......@@ -103,13 +106,14 @@ $r->headers_out->{'Cache-control'} = 'no-cache';
<%ARGS>
$Prefs => '/User/Prefs.html'
$Focus => 'focus'
#$Focus => 'focus'
$Focus => ''
$Title => 'RT'
$Code => undef
$Refresh => 0
$Why => undef
#$BgColor => '#ffffff'
#$ShowBar => 1
$ShowBar => 1
#$LoggedIn => 1
$URL => undef
</%ARGS>
......@@ -46,7 +46,7 @@
<div id="topactions">
% foreach my $action (reverse sort keys %{$topactions}) {
<span class="topaction">
% $m->out($topactions->{"$action"}->{'html'}."&nbsp;" );
% $m->out($topactions->{"$action"}->{'html'});
</span>
% }
</div>
......@@ -63,16 +63,16 @@
<& /Elements/Menu, toptabs => $toptabs, current_toptab => $current_toptab &>
</div>
<div id="header" style="padding-top: <% 1.2 * $menu_depth %>em;">
<div id="header" style="padding-top: <% 1.2 * $menu_depth %>em; _padding-top: <% 0.5 * $menu_depth %>;">
<div class="clear"></div>
<h1><%$title%></h1>
% my $count = 0;
% my $class = {};
%
% if ($page_tabs) {
<ul id="page-menu">
<ul id="page-menu"<% ($actions || $subactions) && q[ class="actions-present"] | n %>>
<div><div><div>
% if ($page_tabs) {
% foreach my $tab (sort keys %{$page_tabs}) {
% next if $tab =~ /^(?:current_toptab|this)$/;
% $count++;
......@@ -99,11 +99,15 @@
%
<li<% $class->{li} ? qq[ class="$class->{li}"] : ''|n %>><% $count > 1 && "&#183; "|n%><a href="<%$RT::WebPath%>/<%$page_tabs->{$tab}->{'path'}%>"<%$class->{a}|n%><% $class->{a} ? ' name="focus"' : ''|n %>><% $page_tabs->{$tab}->{'title'} %></a></li>
% }
% } else {
&nbsp;
% }
</div></div></div>
</ul>
% }
% if ($actions or $subactions) {
<ul id="actions-menu">
<div>
<div><div><div>
% $count = 0;
%
% if ($actions) {
......@@ -113,6 +117,8 @@
<li<% $count == 1 ? q[ class="first"] : '' |n %>><% $count > 1 && "&#183; "|n%>
% if ($actions->{"$action"}->{'html'}) {
<% $actions->{"$action"}->{'html'} | n %>
% } elsif ($actions->{$action}->{separator}) {
&#183;
% } else {
<a href="<%$RT::WebPath%>/<%$actions->{$action}->{'path'}%>"><%$actions->{$action}->{'title'}%></a>
% }
......@@ -133,8 +139,9 @@
<li<% $count == 1 ? q[ class="first"] : '' |n %>><% $count > 1 && !$sep && "&#183; "|n%><% $subactions->{"$action"}->{'html'} | n %></li>
% }
% }
</div>
</div></div></div>
</ul>
% }
</div>
<div id="body">
......
......@@ -44,7 +44,7 @@
%#
%# END BPS TAGGED BLOCK }}}
% if ($CheckAll or $ClearAll) {
<script><!--
<script type="text/javascript"><!--
function set_checkbox (obj, val) {
var i;
var myfield = obj.form.getElementsByTagName('input');
......@@ -56,41 +56,31 @@ function set_checkbox (obj, val) {
}
--></script>
% }
<table width="100%" bgcolor="<%$color%>" cellspacing="0" border="0" cellpadding="0" >
<tr>
<td>
<div class="submit">
<div class="extra-buttons">
% if ($CheckAll) {
<input type="BUTTON" value="<%$CheckAllLabel%>" onclick="set_checkbox(this, true)">
<input type="button" value="<%$CheckAllLabel%>" onclick="set_checkbox(this, true);return false;" class="button" />
% }
% if ($ClearAll) {
<input type="BUTTON" value="<%$ClearAllLabel%>" onclick="set_checkbox(this, false)">
<input type="button" value="<%$ClearAllLabel%>" onclick="set_checkbox(this, false);return false;" class="button" />
% }
% if ($Reset) {
<input type="RESET" value="<%$ResetLabel%>">
%}
</td>
<td>
&nbsp;
</td>
<td align="RIGHT" valign="CENTER"><font color="#ffd800">
% if ($AlternateLabel) {
<strong><%$AlternateCaption%>
<input type="SUBMIT"
%if ($Name) {
NAME="<%$Name%>"
%}
VALUE='<%$AlternateLabel%>'></strong>
<input type="reset" value="<%$ResetLabel%>" class="button" />
% }
<strong><%$Caption%> <input type="SUBMIT"
%if ($Name) {
NAME="<%$Name%>"
</div>
<div class="buttons">
% if ($AlternateLabel) {
<span class="caption"><%$AlternateCaption%></span>
<input type="submit"<% $Name && qq[ name="$Name"] | n %> value="<%$AlternateLabel%>" class="button" />
% } else {
<span class="caption"><%$Caption%></span>
<input type="submit"<% $Name && qq[ name="$Name"] | n %> value="<%$Label%>" class="button" />
% }
VALUE='<%$Label%>'></strong></font>
</td>
</tr>
</table>
</div>
</div>
<%ARGS>
$color => "#336699"
$color => undef
$Caption => ''
$AlternateCaption => undef
$AlternateLabel => undef
......
%# BEGIN BPS TAGGED BLOCK {{{
%#
%# COPYRIGHT:
%#
%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
%#
%#
%# LICENSE:
%#
%# This work is made available to you under the terms of Version 2 of
%# the GNU General Public License. A copy of that license should have
%# been provided with this software, but in any event can be snarfed
%# from www.gnu.org.
%#
%# This work is distributed in the hope that it will be useful, but
%# WITHOUT ANY WARRANTY; without even the implied warranty of
%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%# General Public License for more details.
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
%#
%# (The following paragraph is not intended to limit the rights granted
%# to you to modify and distribute this software under the terms of
%# the GNU General Public License and is only of importance to you if
%# you choose to contribute your changes and enhancements to the
%# community by submitting them to Best Practical Solutions, LLC.)
%#
%# By intentionally submitting any modifications, corrections or
%# derivatives to this work, or any other work intended for use with
%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
%# you are the copyright holder for those contributions and you grant
%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
%# royalty-free, perpetual, license to use, copy, create derivative
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
#body {
clear: both;
margin: 0 0.75em 0 1em;
padding-top: 0.5em;
}
.titlebox .content {
margin: 0 2em 0 2em;
}
.titlebox .title {
font-weight: bold;
color: #930;
font-size: 1.2em;
padding: 0.2em 0 0.2em 2em;
border-bottom: 1px solid #069;
}
.titlebox .title span a {
display: block;
letter-spacing: -9999em;
height: 1em;
width: 20px;
background: url(<%$RT::WebImagesURL%>/css/rollup-arrow.png) no-repeat bottom center;
position: relative;
left: -2em;
float: left;
}
.titlebox .title :link,
.titlebox .title :visited
{
color: #930;
text-decoration: none;
}
.titlebox .title :link:hover,
.titlebox .title :visited:hover
{
text-decoration: underline;
}
.submit {
font-weight: bold;
color: #a00;
font-size: 1.1em;
padding: 0.3em 1.5em 0 1.5em;
border-top: 1px solid #069;
margin: 1.5em 0 0 0;
}
.submit .buttons { float: right; }
.submit .extra-buttons { float: left; }
.submit .button { font-size: 0.9em; }
<%init>
$r->content_type('text/css');
</%init>
......@@ -82,8 +82,10 @@
}
#footer #legal {
float: none;
color: #888;
padding-left: 2em;
padding: 1em 0 0 2em;
clear: both;
}
<%init>
......
%# BEGIN BPS TAGGED BLOCK {{{
%#
%# COPYRIGHT:
%#
%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
%#
%#
%# LICENSE:
%#
%# This work is made available to you under the terms of Version 2 of
%# the GNU General Public License. A copy of that license should have
%# been provided with this software, but in any event can be snarfed
%# from www.gnu.org.
%#
%# This work is distributed in the hope that it will be useful, but
%# WITHOUT ANY WARRANTY; without even the implied warranty of
%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%# General Public License for more details.
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
%#
%# (The following paragraph is not intended to limit the rights granted
%# to you to modify and distribute this software under the terms of
%# the GNU General Public License and is only of importance to you if
%# you choose to contribute your changes and enhancements to the
%# community by submitting them to Best Practical Solutions, LLC.)
%#
%# By intentionally submitting any modifications, corrections or
%# derivatives to this work, or any other work intended for use with
%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
%# you are the copyright holder for those contributions and you grant
%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
%# royalty-free, perpetual, license to use, copy, create derivative
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
form .button {
border: 1px solid #069;
padding: 1px;
background: white;
font-weight: bold;
}
html>body form .button { padding: 2px; }
form .button:hover {
border-color: #08c;
}
form .field, form select, form .entry input, form input {
border: 1px solid #069;
padding: 1px;
}
form input.field, form .entry input, form .value input {
padding: 3px;
}
form .label, form label {
font-weight: bold;
}
<%init>
$r->content_type('text/css');
</%init>
......@@ -64,28 +64,55 @@
font-weight: bold;
left: 1.3em;
top: 0.21em;
z-index: 3;
}
#header ul#page-menu {
#header ul {
margin: 0;
padding: 0;
color: #eee;
background: #069 url(<%$RT::WebImagesURL%>/css/ct.gif) no-repeat top left;
float: left;
min-width: 75%;
}
#header #page-menu {
position: relative;
z-index: 2;
background: #069 url(<%$RT::WebImagesURL%>/css/ct.gif) no-repeat top left;
min-width: 65%;
}
* html #header ul#page-menu {
width: 65%;
overflow: visible;
}
#page-menu div { background: url(<%$RT::WebImagesURL%>/css/cb.gif) no-repeat bottom left; }
#page-menu div div { background: url(<%$RT::WebImagesURL%>/css/cbr.gif) no-repeat bottom right; }
#page-menu div div div {
background: url(<%$RT::WebImagesURL%>/css/ctr.gif) no-repeat top right;
padding: 0.2em 1em 0.4em 1em;
}
#header ul#page-menu li {
#page-menu.actions-present div div { background: url(<%$RT::WebImagesURL%>/css/cbr-b2lb.gif) no-repeat bottom right; }
#page-menu.actions-present div div div { background: url(<%$RT::WebImagesURL%>/css/ctr-b2lb.gif) no-repeat top right; }
#header ul li {
display: inline;
}
#header #actions-menu {
position: relative;
background: #08c;
}
/*#actions-menu div { background: url(<%$RT::WebImagesURL%>/css/cb.gif) no-repeat bottom left; }*/
#actions-menu div div { background: url(<%$RT::WebImagesURL%>/css/cbr.gif) no-repeat bottom right; }
#actions-menu div div div {
background: url(<%$RT::WebImagesURL%>/css/ctr.gif) no-repeat top right;
padding: 0.2em 1em 0.4em 1em;
}
#header :link,
#header :visited
{
......
......@@ -45,6 +45,8 @@
%# END BPS TAGGED BLOCK }}}
@import "misc.css";
@import "body.css";
@import "forms.css";
@import "nav.css";
@import "nav-left.css";
@import "header.css";
......
......@@ -61,12 +61,6 @@ body {
font-weight: bold;
}
#body {
clear: both;
margin: 0 0.75em 0 1em;
padding-top: 0.5em;
}
#quickbar #quick-personal {
display: inline;
color: #888;
......
......@@ -67,7 +67,7 @@
&>
<%ARGS>
$id => undef
$Create => undef
......
......@@ -144,43 +144,48 @@ $current_tab = "Ticket/Display.html?id=" . $id;
if ( $Ticket->CurrentUserHasRight('ModifyTicket')
or $Ticket->CurrentUserHasRight('ReplyToTicket') ) {
$actions->{'A'} = { title => loc('Reply'),
$actions->{'F'} = { title => loc('Reply'),
path => "Ticket/Update.html?Action=Respond&id=" . $id,
};
}
if ( $Ticket->CurrentUserHasRight('ModifyTicket') ) {
if ( $Ticket->Status ne 'resolved' ) {
$actions->{'B'} = {
$actions->{'G'} = {
path => "Ticket/Update.html?Action=Comment&DefaultStatus=resolved&id=" . $id,
title => loc('Resolve') };
}
if ( $Ticket->Status ne 'open' ) {
$actions->{'C'} = { path => "Ticket/Display.html?Status=open&id=" . $id,
$actions->{'A'} = { path => "Ticket/Display.html?Status=open&id=" . $id,
title => loc('Open it') };
}
}
if ( $Ticket->CurrentUserHasRight('OwnTicket') ) {
if ( $Ticket->OwnerObj->id == $RT::Nobody->id ) {
$actions->{'D'} = { path => "Ticket/Display.html?Action=Take&id=" . $id,
$actions->{'B'} = { path => "Ticket/Display.html?Action=Take&id=" . $id,
title => loc('Take') };
}
elsif ( $Ticket->OwnerObj->id != $session{CurrentUser}->id ) {
$actions->{'E'} = {path => "Ticket/Display.html?Action=Steal&id=" . $id,
$actions->{'C'} = {path => "Ticket/Display.html?Action=Steal&id=" . $id,
title => loc('Steal') };
}
}
if ( $Ticket->CurrentUserHasRight('ModifyTicket')
or $Ticket->CurrentUserHasRight('CommentOnTicket') ) {
$actions->{'F'} = { title => loc('Comment'),
$actions->{'E'} = { title => loc('Comment'),
path => "Ticket/Update.html?Action=Comment&id=" . $id,
};
}
}
if ( defined $actions->{A} || defined $actions->{B} || defined $actions->{C}
&& defined $actions->{E} || defined $actions->{F} || defined $actions->{G}) {
$actions->{D} = { separator => 1 };
}
my $args;
$args= "?" . $m->comp(
'/Elements/QueryString',
......
......@@ -61,7 +61,7 @@ $Transaction => undef
</%init>
<& /Elements/Header, ShowBar => 0 &>
<pre>
<pre style="padding: 2em;">
<%$AttachmentObj->Headers%>
<%$AttachmentObj->Content%>
......
......@@ -64,7 +64,7 @@
%# $m->comp ('/Widgets/SelectionBox:process', %ARGS, self => $sel)
%#
%# where @items is an arrayref, each element is [value, label],
%# and selected is an arrayref of selected values from @items.
%# and @selected is an arrayref of selected values from @items.
%#
%# and in html:
%# <& /Widgets/SelectionBox:sow, self => $sel &>
......@@ -73,8 +73,8 @@
%# on every button clicked in non-js mode.
<%method header>
% unless ($nojs) {
<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/class.js"></script>
<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/list.js"></script>
<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/class.js"></script>
<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/list.js"></script>
% }
<%ARGS>
$nojs => 0
......@@ -82,7 +82,6 @@ $nojs => 0
</%method>
<%method new>
<%init>
$ARGS{_item_map} = {map {$_->[0] => $_->[1]} @{$ARGS{Available}}};
return \%ARGS;
......@@ -176,7 +175,7 @@ $self => undef
</%method>
<%method show>
<form METHOD="POST" ACTION="<%$self->{Action}%>" name="SelectionBox-<% $name %>" id="SelectionBox-<% $name %>"
<form method="post" action="<%$self->{Action}%>" name="SelectionBox-<% $name %>" id="SelectionBox-<% $name %>"
% unless ($nojs) {
onSubmit="list_<% $name %>.selectAll();"
% }
......
......@@ -44,9 +44,9 @@
%#
%# END BPS TAGGED BLOCK }}}
<div class="<% $class %>">
<& TitleBoxStart, %ARGS&><%$m->content|n%><& TitleBoxEnd&>
<& TitleBoxStart, %ARGS &><% $m->content | n %><& TitleBoxEnd &>
</div>
<%ARGS>
$class => undef
$class => undef
</%ARGS>
......@@ -43,7 +43,8 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
</div></div>
</div>
</div>
% #Manually flush the content buffer after each titlebox is displayed
% $m->flush_buffer();
......
......@@ -44,29 +44,26 @@
%#
%# END BPS TAGGED BLOCK }}}
<div class="titlebox">
<div class="titlebox-title">
<span class="titleboxclose"><a href="#" onClick="hideshow('<%$id%>')">X</a></span>
<span class="titleboxtitle">
<strong><% $title_href && "<a $title_class href=\"$title_href\">"|n%><%$title |n %><% $title_href && "</a>" |n%></strong>
</span>
</div>
<div id="element-<%$id%>">
<div class="title">
<span><a href="#" onclick="return hideshow('<%$id%>');">^</a></span>
<% $title_href && qq[<a $title_class href="$title_href">] | n %><% $title |n %><% $title_href && "</a>" |n%>
</div>
<div class="content" id="element-<%$id%>">
<%ARGS>
$width => undef
$class => undef
$class => undef
$bodyclass => undef
$title_href => undef
$title => undef