[Rt-commit] r14555 - in rt/branches/3.999-DANGEROUS: lib/RT share/html/Prefs share/html/Widgets

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Jul 28 00:30:34 EDT 2008


Author: sunnavy
Date: Mon Jul 28 00:30:30 2008
New Revision: 14555

Modified:
   rt/branches/3.999-DANGEROUS/   (props changed)
   rt/branches/3.999-DANGEROUS/lib/RT/Config.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Installer.pm
   rt/branches/3.999-DANGEROUS/share/html/Prefs/Other.html
   rt/branches/3.999-DANGEROUS/share/html/Widgets/BulkEdit
   rt/branches/3.999-DANGEROUS/share/html/Widgets/BulkProcess

Log:
 r15034 at sunnavys-mb:  sunnavy | 2008-07-28 11:18:27 +0800
 go on


Modified: rt/branches/3.999-DANGEROUS/lib/RT/Config.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Config.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Config.pm	Mon Jul 28 00:30:30 2008
@@ -97,88 +97,88 @@
 
 our %META = (
     WebDefaultStylesheet => {
-        Section         => 'General',                #loc
-        Overridable     => 1,
-        Widget          => '/Widgets/Form/Select',
-        WidgetArguments => {
+        section         => 'General',                #loc
+        overridable     => 1,
+        widget          => '/Widgets/Form/Select',
+        widget_arguments => {
             description => 'Theme',                  #loc
                  # XXX: we need support for 'get values callback'
             values => [qw(3.5-default 3.4-compat web2)],
         },
     },
     DefaultSummaryRows => {
-        Section         => 'RT at a glance',          #loc
-        Overridable     => 1,
-        Widget          => '/Widgets/Form/Integer',
-        WidgetArguments => {
+        section         => 'RT at a glance',          #loc
+        overridable     => 1,
+        widget          => '/Widgets/Form/Integer',
+        widget_arguments => {
             description => 'Number of search results',    #loc
         },
     },
     MessageBoxRichText => {
-        Section         => 'General',
-        Overridable     => 1,
-        Widget          => '/Widgets/Form/Boolean',
-        WidgetArguments => {
+        section         => 'General',
+        overridable     => 1,
+        widget          => '/Widgets/Form/Boolean',
+        widget_arguments => {
             description => 'WYSIWYG message composer'     # loc
         }
     },
     MessageBoxWidth => {
-        Section         => 'General',
-        Overridable     => 1,
-        Widget          => '/Widgets/Form/Integer',
-        WidgetArguments => {
+        section         => 'General',
+        overridable     => 1,
+        widget          => '/Widgets/Form/Integer',
+        widget_arguments => {
             description => 'Message box width',           #loc
         },
     },
     MessageBoxHeight => {
-        Section         => 'General',
-        Overridable     => 1,
-        Widget          => '/Widgets/Form/Integer',
-        WidgetArguments => {
+        section         => 'General',
+        overridable     => 1,
+        widget          => '/Widgets/Form/Integer',
+        widget_arguments => {
             description => 'Message box height',          #loc
         },
     },
     MaxInlineBody => {
-        Section => 'Ticket display',    #loc
-        Overridable     => 1,
-        Widget          => '/Widgets/Form/Integer',
-        WidgetArguments => {
+        section => 'Ticket display',    #loc
+        overridable     => 1,
+        widget          => '/Widgets/Form/Integer',
+        widget_arguments => {
             description => 'Maximum inline message length',    #loc
             hints =>
 "Length in characters; Use '0' to show all messages inline, regardless of length" #loc
         },
     },
     OldestTransactionsFirst => {
-        Section         => 'Ticket display', #loc
-        Overridable     => 1,
-        Widget          => '/Widgets/Form/Boolean',
-        WidgetArguments => {
+        section         => 'Ticket display', #loc
+        overridable     => 1,
+        widget          => '/Widgets/Form/Boolean',
+        widget_arguments => {
             description => 'Show oldest transactions first',    #loc
         },
     },
     ShowUnreadMessageNotifications => {
-        Section         => 'Ticket display',
-        Overridable     => 1,
-        Widget          => '/Widgets/Form/Boolean',
-        WidgetArguments => {
+        section         => 'Ticket display',
+        overridable     => 1,
+        widget          => '/Widgets/Form/Boolean',
+        widget_arguments => {
             description => 'Notify me of unread messages',    #loc
         },
 
     },
     PlainTextPre => {
-        Section         => 'Ticket display',
-        Overridable     => 1,
-        Widget          => '/Widgets/Form/Boolean',
-        WidgetArguments => {
+        section         => 'Ticket display',
+        overridable     => 1,
+        widget          => '/Widgets/Form/Boolean',
+        widget_arguments => {
             description => 'Use monospace font',
             hints       => "Use fixed-width font to display plaintext messages"
         },
     },
     date_time_format => {
-        Section         => 'Locale',                 #loc
-        Overridable     => 1,
-        Widget          => '/Widgets/Form/Select',
-        WidgetArguments => {
+        section         => 'Locale',                 #loc
+        overridable     => 1,
+        widget          => '/Widgets/Form/Select',
+        widget_arguments => {
             description => 'Date format',                            #loc
             values       => [qw(default_format RFC2822 ISO W3CDTF)],
             values_label => {
@@ -190,10 +190,10 @@
         },
     },
     Usernameformat => {
-        Section         => 'General',
-        Overridable     => 1,
-        Widget          => '/Widgets/Form/Select',
-        WidgetArguments => {
+        section         => 'General',
+        overridable     => 1,
+        widget          => '/Widgets/Form/Select',
+        widget_arguments => {
             description => 'Username format',
             values      => [qw(concise verbose)],
             values_label  => {
@@ -203,10 +203,10 @@
         },
     },
     default_queue => {
-        Section         => 'General',
-        Overridable     => 1,
-        Widget          => '/Widgets/Form/Select',
-        WidgetArguments => {
+        section         => 'General',
+        overridable     => 1,
+        widget          => '/Widgets/Form/Select',
+        widget_arguments => {
             description => 'default queue',    #loc
             callback    => sub {
                 my $ret = { Values => [], values_label => {} };
@@ -223,11 +223,11 @@
         }
     },
     EmailFrequency => {
-        Section         => 'Mail',                   #loc
-        Overridable     => 1,
+        section         => 'Mail',                   #loc
+        overridable     => 1,
         default         => 'Individual messages',
-        Widget          => '/Widgets/Form/Select',
-        WidgetArguments => {
+        widget          => '/Widgets/Form/Select',
+        widget_arguments => {
             description => 'email delivery',         #loc
             values      => [
                 'Individual messages',               #loc
@@ -239,7 +239,7 @@
     },
     DisableGraphViz => {
         type          => 'SCALAR',
-        PostLoadCheck => sub {
+        post_load_check => sub {
             my $self  = shift;
             my $value = shift;
             return if $value;
@@ -253,7 +253,7 @@
     },
     DisableGD => {
         type          => 'SCALAR',
-        PostLoadCheck => sub {
+        post_load_check => sub {
             my $self  = shift;
             my $value = shift;
             return if $value;
@@ -269,7 +269,7 @@
     GnuPG        => { type => 'HASH' },
     GnuPGOptions => {
         type          => 'HASH',
-        PostLoadCheck => sub {
+        post_load_check => sub {
             my $self    = shift;
             my $gpg     = $self->get('GnuPG');
             my $gpgopts = $self->get('GnuPGOptions');
@@ -467,14 +467,14 @@
     @configs = sort @configs;
     unshift( @configs, 'RT_Config.pm' );
 
-sub PostLoadCheck {
+sub post_load_check {
     my $self = shift;
     foreach my $o (
-        grep $META{$_}{'PostLoadCheck'},
-        $self->options( Overridable => undef )
+        grep $META{$_}{'post_load_check'},
+        $self->options( overridable => undef )
       )
     {
-        $META{$o}->{'PostLoadCheck'}->( $self, $self->get($o) );
+        $META{$o}->{'post_load_check'}->( $self, $self->get($o) );
     }
 }
 
@@ -513,7 +513,7 @@
     my ( $self, $name, $user ) = @_;
 
     my $res;
-    if ( $user && $user->id && $META{$name}->{'Overridable'} ) {
+    if ( $user && $user->id && $META{$name}->{'overridable'} ) {
         $user = $user->user_object if $user->isa('RT::CurrentUser');
         my $prefs = $user->preferences( RT->system );
         $res = $prefs->{$name} if $prefs;
@@ -684,17 +684,17 @@
     my $self = shift;
     my %seen;
     return sort
-        grep !$seen{$_}++, map $_->{'Section'} || 'General', values %META;
+        grep !$seen{$_}++, map $_->{'section'} || 'General', values %META;
 }
 
 sub options {
     my $self = shift;
-    my %args = ( Section => undef, Overridable => 1, @_ );
+    my %args = ( section => undef, overridable => 1, @_ );
     my @res  = sort keys %META;
-    @res = grep( ( $META{$_}->{'Section'} || 'General' ) eq $args{'Section'}, @res )
-        if defined $args{'Section'};
-    if ( defined $args{'Overridable'} ) {
-        @res = grep( ( $META{$_}->{'Overridable'} || 0 ) == $args{'Overridable'}, @res );
+    @res = grep( ( $META{$_}->{'section'} || 'General' ) eq $args{'section'}, @res )
+        if defined $args{'section'};
+    if ( defined $args{'overridable'} ) {
+        @res = grep( ( $META{$_}->{'overridable'} || 0 ) == $args{'overridable'}, @res );
     }
     return @res;
 }

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Installer.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Installer.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Installer.pm	Mon Jul 28 00:30:30 2008
@@ -53,8 +53,8 @@
 require UNIVERSAL::require;
 my %Meta = (
     DatabaseType => {
-        Widget          => '/Widgets/Form/Select',
-        WidgetArguments => {
+        widget          => '/Widgets/Form/Select',
+        widget_arguments => {
             description => 'Database type',    # loc
             default      => 0,
             values      => [
@@ -72,19 +72,19 @@
         },
     },
     DatabaseHost => {
-        Widget          => '/Widgets/Form/String',
-        WidgetArguments => {
+        widget          => '/Widgets/Form/String',
+        widget_arguments => {
             description  => 'Database host',                          #loc
             default      => 1,
             default_label => "Keep 'localhost' if you're not sure",    #loc
-            Hints =>
+            hints =>
               "The domain name of your database server (like 'db.example.com')."
             ,                                                         #loc
         },
     },
     DatabasePort => {
-        Widget          => '/Widgets/Form/Integer',
-        WidgetArguments => {
+        widget          => '/Widgets/Form/Integer',
+        widget_arguments => {
             description => 'Database port',                           #loc
             default     => 1,
             default_label =>
@@ -92,16 +92,16 @@
         },
     },
     DatabaseName => {
-        Widget          => '/Widgets/Form/String',
-        WidgetArguments => {
+        widget          => '/Widgets/Form/String',
+        widget_arguments => {
             description => 'Database name',                                #loc
         },
     },
     DatabaseAdmin => {
-        Widget          => '/Widgets/Form/String',
-        WidgetArguments => {
+        widget          => '/Widgets/Form/String',
+        widget_arguments => {
             default => 1,
-            Hints =>
+            hints =>
 "Leave this alone to use the default dba username for your database type"
             ,                                                              #loc
             description  => 'DBA username',                                # loc
@@ -109,108 +109,108 @@
         },
     },
     DatabaseAdminPassword => {
-        Widget          => '/Widgets/Form/String',
-        WidgetArguments => {
+        widget          => '/Widgets/Form/String',
+        widget_arguments => {
             description  => 'DBA password',                                #loc
             default_label => "The DBA's database password",                 #loc
-            Type         => 'password',
-            Hints =>
+            type         => 'password',
+            hints =>
 "You must provide the dba's password so we can create the RT database and user.",
         },
     },
     DatabaseUser => {
-        Widget          => '/Widgets/Form/String',
-        WidgetArguments => {
+        widget          => '/Widgets/Form/String',
+        widget_arguments => {
             description => 'Database username for RT',                     #loc
-            Hints =>
+            hints =>
 'RT will connect to the database using this user.  It will be created for you.'
             ,                                                              #loc
         },
     },
     DatabasePassword => {
-        Widget          => '/Widgets/Form/String',
-        WidgetArguments => {
+        widget          => '/Widgets/Form/String',
+        widget_arguments => {
             description => 'Database password for RT',                     #loc
-            Type        => 'password',
-            Hints => 'The password RT should use to connect to the database.',
+            type        => 'password',
+            hints => 'The password RT should use to connect to the database.',
         },
     },
     DatabaseRequireSSL => {
-        Widget          => '/Widgets/Form/Boolean',
-        WidgetArguments => {
+        widget          => '/Widgets/Form/Boolean',
+        widget_arguments => {
             description => 'Use SSL?',                                     # loc
         },
     },
     rtname => {
-        Widget          => '/Widgets/Form/String',
-        WidgetArguments => {
+        widget          => '/Widgets/Form/String',
+        widget_arguments => {
             description => 'Site name',                                    #loc
-            Hints =>
+            hints =>
 'RT will use this string to uniquely identify your installation and looks for it in the subject of emails to decide what ticket a message applies to.  We recommend that you set this to your internet domain. (ex: example.com)' #loc
         },
     },
     MinimumPasswordLength => {
-        Widget          => '/Widgets/Form/Integer',
-        WidgetArguments => {
+        widget          => '/Widgets/Form/Integer',
+        widget_arguments => {
             description => 'Minimum password length',    #loc
         },
     },
     Password => {
-        Widget          => '/Widgets/Form/String',
-        WidgetArguments => {
+        widget          => '/Widgets/Form/String',
+        widget_arguments => {
             description => 'Administrative password',    #loc
-            Hints =>
+            hints =>
 'RT will create a user called "root" and set this as their password'
             ,                                            #loc
-            Type => 'password',
+            type => 'password',
         },
     },
     OwnerEmail => {
-        Widget          => '/Widgets/Form/String',
-        WidgetArguments => {
+        widget          => '/Widgets/Form/String',
+        widget_arguments => {
             description => 'RT Administrator Email',     #loc
-            Hints =>
+            hints =>
 "When RT can't handle an email message, where should it be forwarded?"
             ,                                            #loc
         },
     },
     comment_address => {
-        Widget          => '/Widgets/Form/String',
-        WidgetArguments => {
+        widget          => '/Widgets/Form/String',
+        widget_arguments => {
             description => 'Comment address',            #loc
-            Hints =>
+            hints =>
 'the default addresses that will be listed in From: and Reply-To: headers of comment mail.' #loc
         },
     },
     correspond_address => {
-        Widget          => '/Widgets/Form/String',
-        WidgetArguments => {
+        widget          => '/Widgets/Form/String',
+        widget_arguments => {
             description => 'Correspond address',    #loc
-            Hints =>
+            hints =>
 'the default addresses that will be listed in From: and Reply-To: headers of correspondence mail.' #loc
         },
     },
     SendmailPath => {
-        Widget          => '/Widgets/Form/String',
-        WidgetArguments => {
-            Hints       => 'Where to find your sendmail binary.',    #loc
+        widget          => '/Widgets/Form/String',
+        widget_arguments => {
+            hints       => 'Where to find your sendmail binary.',    #loc
             description => 'Path to sendmail',                       #loc
         },
     },
     WebDomain => {
-        Widget          => '/Widgets/Form/String',
-        WidgetArguments => {
+        widget          => '/Widgets/Form/String',
+        widget_arguments => {
             description => 'Domain name',                            #loc
-            Hints =>
+            hints =>
 "Don't include http://, just something like 'localhost', 'rt.example.com'"
             ,                                                        #loc
         },
     },
     WebPort => {
-        Widget          => '/Widgets/Form/Integer',
-        WidgetArguments => {
+        widget          => '/Widgets/Form/Integer',
+        widget_arguments => {
             description => 'Web port',                               #loc
-            Hints =>
+            hints =>
               'which port your web server will listen to, e.g. 8080',    #loc
         },
     },
@@ -221,8 +221,8 @@
 
 if ($HAS_DATETIME_TZ) {
     $Meta{Timezone} = {
-        Widget          => '/Widgets/Form/Select',
-        WidgetArguments => {
+        widget          => '/Widgets/Form/Select',
+        widget_arguments => {
             description => 'Timezone',                                   #loc
             Callback    => sub {
                 my $ret;
@@ -246,8 +246,8 @@
 }
 else {
     $Meta{Timezone} = {
-        Widget          => '/Widgets/Form/String',
-        WidgetArguments => {
+        widget          => '/Widgets/Form/String',
+        widget_arguments => {
             description => 'Timezone',                         #loc
         },
     };

Modified: rt/branches/3.999-DANGEROUS/share/html/Prefs/Other.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Prefs/Other.html	(original)
+++ rt/branches/3.999-DANGEROUS/share/html/Prefs/Other.html	Mon Jul 28 00:30:30 2008
@@ -57,10 +57,10 @@
 <&|/Widgets/TitleBox, title => _( $section ) &>
 % foreach my $option( RT->config->options( Section => $section ) ) {
 % my $meta = RT->config->meta( $option );
-<& $meta->{'Widget'},
+<& $meta->{'widget'},
     default      => 1,
     %{ $m->comp('/Widgets/FinalizeWidgetArguments', widget_arguments =>
-            $meta->{'WidgetArguments'} ) },
+            $meta->{'widget_arguments'} ) },
     name         => $option,
     default_value => scalar RT->config->get( $option ),
     current_value => $preferences->{ $option },

Modified: rt/branches/3.999-DANGEROUS/share/html/Widgets/BulkEdit
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Widgets/BulkEdit	(original)
+++ rt/branches/3.999-DANGEROUS/share/html/Widgets/BulkEdit	Mon Jul 28 00:30:30 2008
@@ -46,10 +46,10 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 % for my $type ( @$types ) {
-<& $meta->{$type}{'Widget'},
+<& $meta->{$type}{'widget'},
     default      => $default,
     %{ $m->comp('/Widgets/FinalizeWidgetArguments', widget_arguments =>
-            $meta->{$type}{'WidgetArguments'} ) },
+            $meta->{$type}{'widget_arguments'} ) },
     name         => $type,
     exists $current_value->{$type} ? ( current_value => $current_value->{$type} )
         : (),

Modified: rt/branches/3.999-DANGEROUS/share/html/Widgets/BulkProcess
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Widgets/BulkProcess	(original)
+++ rt/branches/3.999-DANGEROUS/share/html/Widgets/BulkProcess	Mon Jul 28 00:30:30 2008
@@ -48,10 +48,10 @@
 <%init>
 for my $type ( @$types ) {
     my $value =
-        $m->comp( $meta->{$type}{Widget} . ':Process', name => $type, 
+        $m->comp( $meta->{$type}{widget} . ':Process', name => $type, 
                 arguments => $arguments, default => $default,
                 default_value => $default_value->{$type},
-                %{ $meta->{$type}{WidgetArguments} },
+                %{ $meta->{$type}{widget_arguments} },
         );
     unless ( $keep_undef || defined $value ) {
         delete $store->{$type};


More information about the Rt-commit mailing list