[Rt-commit] r8032 -
rtir/branches/2.3-EXPERIMENTAL/html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap
ruz at bestpractical.com
ruz at bestpractical.com
Wed Jun 27 17:05:58 EDT 2007
Author: ruz
Date: Wed Jun 27 17:05:58 2007
New Revision: 8032
Modified:
rtir/branches/2.3-EXPERIMENTAL/html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap/Once
Log:
* delete RTIR's implementation of check boxes and radio buttons,
we ported it into RT
Modified: rtir/branches/2.3-EXPERIMENTAL/html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap/Once
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap/Once (original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap/Once Wed Jun 27 17:05:58 2007
@@ -1,46 +1,5 @@
<%INIT>
-# This is scary and should totally be refactored -- jesse
-$COLUMN_MAP->{'RTIR_Check'} = {
- title => sub {
- my $name = ($_[1] || 'SelectedTickets') .'All';
- my $checked = $m->request_args->{ $name }? 'checked': '';
-
- return \qq{<input type="checkbox" name="$name" value="1" $checked
- onclick="setCheckbox(this.form, 'SelectedTickets', this.checked)" />};
- },
- value => sub {
- my $id = $_[0]->id;
-
- my $name = $_[2] || 'SelectedTickets';
- return \qq{<input type="checkbox" name="$name" value="$id" checked />}
- if $m->request_args->{ $name . 'All'};
-
- my $arg = $m->request_args->{ $name };
- my $checked = '';
- if ( $arg && ref $arg ) {
- $checked = 'checked' if grep $_ == $id, @$arg;
- }
- elsif ( $arg ) {
- $checked = 'checked' if $arg == $id;
- }
- return \qq{<input type="checkbox" name="$name" value="$id" $checked />}
- },
-};
-
-$COLUMN_MAP->{'RTIR_Radio'} = {
- title => \' ',
- value => sub {
- my $id = $_[0]->id;
-
- my $name = $_[2] || 'SelectedTicket';
- my $arg = $m->request_args->{ $name };
- my $checked = '';
- $checked = 'checked' if $arg && $arg == $id;
- return \qq{<input type="radio" name="SelectedTicket" value="$id" $checked />};
- },
-};
-
# XXX: map RTIR hidden custom fields staticaly because user has no rights
# to see this CFs we need to hack over ACLs
my $rtir_cfs = RT::CustomFields->new( $RT::SystemUser );
More information about the Rt-commit
mailing list