[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.8.8-122-g5d5ecff
Alex Vandiver
alexmv at bestpractical.com
Wed Jul 7 15:17:13 EDT 2010
The branch, 3.9-trunk has been updated
via 5d5ecff5dc35fc4e8ac995b718b34d015796ffdc (commit)
via 8800a8313023e63ff2a20e831f2d8e454747d41d (commit)
via eef16ffc57066d1136fd7fa3c2880470f315007a (commit)
via 77ef13035e1b5d0fb9a5f71c6b4b8a71b5ada166 (commit)
via 9ae6a5d999e1e526a01d2b94c53d6956bfb0d288 (commit)
from eed4c3ad66b735bc2c032dd0478d05854bfa5ba3 (commit)
Summary of changes:
share/html/Elements/SelectQueue | 20 +++++++++-----------
share/html/Elements/SelectStatus | 12 +++++++++---
2 files changed, 18 insertions(+), 14 deletions(-)
- Log -----------------------------------------------------------------
commit 9ae6a5d999e1e526a01d2b94c53d6956bfb0d288
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Jul 7 12:44:03 2010 -0400
Tighten up whitespace in <select>
diff --git a/share/html/Elements/SelectQueue b/share/html/Elements/SelectQueue
index c78afe9..2178a6c 100755
--- a/share/html/Elements/SelectQueue
+++ b/share/html/Elements/SelectQueue
@@ -56,19 +56,15 @@
<option value="">-</option>
% }
% for my $queue (@{$session{$cache_key}}) {
- <option value="<% ($NamedValues ? $queue->{Name} : $queue->{Id}) %>"
-
+ <option value="<% ($NamedValues ? $queue->{Name} : $queue->{Id}) %>"\
% if ($queue->{Id} eq ($Default||'') || $queue->{Name} eq ($Default||'')) {
- selected="selected"
+ selected="selected"\
% }
-
->
- <%$queue->{Name}%>
-
+><%$queue->{Name}%>\
% if ($Verbose and $queue->{Description}) {
- (<%$queue->{Description}%>)
+ (<%$queue->{Description}%>)\
% }
- </option>
+</option>
% }
</select>
% }
commit 77ef13035e1b5d0fb9a5f71c6b4b8a71b5ada166
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Jul 7 12:44:20 2010 -0400
Allow control of what the "null" option is displayed as
diff --git a/share/html/Elements/SelectQueue b/share/html/Elements/SelectQueue
index 2178a6c..e9f96d0 100755
--- a/share/html/Elements/SelectQueue
+++ b/share/html/Elements/SelectQueue
@@ -53,7 +53,7 @@
% else {
<select name="<%$Name%>" <% ($Multiple) ? 'multiple="multiple"' : '' %> <% ($OnChange) ? 'onchange="'.$OnChange.'"' : '' |n %> class="<%$Class%>">
% if ($ShowNullOption) {
- <option value="">-</option>
+ <option value=""><% $DefaultLabel %></option>
% }
% for my $queue (@{$session{$cache_key}}) {
<option value="<% ($NamedValues ? $queue->{Name} : $queue->{Id}) %>"\
@@ -75,6 +75,7 @@ $ShowAllQueues => 1
$Name => undef
$Verbose => undef
$NamedValues => 0
+$DefaultLabel => "-"
$Default => 0
$Lite => 0
$OnChange => undef
commit eef16ffc57066d1136fd7fa3c2880470f315007a
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Jul 7 13:14:49 2010 -0400
Allow setting row size on multiple SelectQueue
diff --git a/share/html/Elements/SelectQueue b/share/html/Elements/SelectQueue
index e9f96d0..a9b7df1 100755
--- a/share/html/Elements/SelectQueue
+++ b/share/html/Elements/SelectQueue
@@ -51,7 +51,7 @@
<input name="<%$Name%>" size="25" value="<%$d->Name%>" class="<%$Class%>" />
% }
% else {
-<select name="<%$Name%>" <% ($Multiple) ? 'multiple="multiple"' : '' %> <% ($OnChange) ? 'onchange="'.$OnChange.'"' : '' |n %> class="<%$Class%>">
+<select name="<%$Name%>" <% ($Multiple) ? qq{multiple="multiple" size="$Size"} : '' %> <% ($OnChange) ? 'onchange="'.$OnChange.'"' : '' |n %> class="<%$Class%>">
% if ($ShowNullOption) {
<option value=""><% $DefaultLabel %></option>
% }
@@ -80,6 +80,7 @@ $Default => 0
$Lite => 0
$OnChange => undef
$Multiple => 0
+$Size => 6
$Class => 'select-queue'
</%args>
<%init>
commit 8800a8313023e63ff2a20e831f2d8e454747d41d
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Jul 7 13:27:11 2010 -0400
Don't html-escape the quotes in our html attributes
diff --git a/share/html/Elements/SelectQueue b/share/html/Elements/SelectQueue
index a9b7df1..ecee86a 100755
--- a/share/html/Elements/SelectQueue
+++ b/share/html/Elements/SelectQueue
@@ -51,7 +51,7 @@
<input name="<%$Name%>" size="25" value="<%$d->Name%>" class="<%$Class%>" />
% }
% else {
-<select name="<%$Name%>" <% ($Multiple) ? qq{multiple="multiple" size="$Size"} : '' %> <% ($OnChange) ? 'onchange="'.$OnChange.'"' : '' |n %> class="<%$Class%>">
+<select name="<%$Name%>" <% ($Multiple) ? qq{multiple="multiple" size="$Size"} : '' |n%> <% ($OnChange) ? 'onchange="'.$OnChange.'"' : '' |n %> class="<%$Class%>">
% if ($ShowNullOption) {
<option value=""><% $DefaultLabel %></option>
% }
commit 5d5ecff5dc35fc4e8ac995b718b34d015796ffdc
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Jul 7 13:27:37 2010 -0400
Allow SelectStatus to generate a multiple select
diff --git a/share/html/Elements/SelectStatus b/share/html/Elements/SelectStatus
index 7f328e5..a0b5720 100755
--- a/share/html/Elements/SelectStatus
+++ b/share/html/Elements/SelectStatus
@@ -45,23 +45,29 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<select name="<%$Name%>">
+<select name="<%$Name%>" <% $Multiple ? qq{multiple="multiple" size="$Size"} : '' |n%>>
%if ($DefaultValue) {
-<option value=""<% !$Default && qq[ selected="selected"] |n %>><%$DefaultLabel%></option>
+<option value=""<% not keys(%default) && qq[ selected="selected"] |n %>><%$DefaultLabel%></option>
%}
%foreach my $status (@status) {
%next if ($SkipDeleted && $status eq 'deleted');
-<option value="<%$status%>"<% (defined $Default && $status eq $Default) && qq[ selected="selected"] |n %>><%loc($status)%></option>
+<option value="<%$status%>"<% $default{$status} && qq[ selected="selected"] |n %>><%loc($status)%></option>
% }
</select>
<%ONCE>
my $queue = new RT::Queue($session{'CurrentUser'});
my @status = $queue->StatusArray();
</%ONCE>
+<%init>
+my %default;
+$default{$_}++ for grep $_, ref $Default ? @{$Default} : ( $Default );
+</%init>
<%ARGS>
$Name => undef
$Default => ''
$SkipDeleted => 0
$DefaultValue => 1
$DefaultLabel => "-"
+$Multiple => 0
+$Size => 6
</%ARGS>
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list