[Rt-commit] r2410 - in rt/branches/PLATANO-EXPERIMENTAL-CSS: .
lib/RT/Interface/Web lib/RT/Interface/Web/Menu
jesse at bestpractical.com
jesse at bestpractical.com
Mon Mar 14 02:57:17 EST 2005
Author: jesse
Date: Mon Mar 14 02:57:17 2005
New Revision: 2410
Added:
rt/branches/PLATANO-EXPERIMENTAL-CSS/lib/RT/Interface/Web/Menu/
rt/branches/PLATANO-EXPERIMENTAL-CSS/lib/RT/Interface/Web/Menu.pm
rt/branches/PLATANO-EXPERIMENTAL-CSS/lib/RT/Interface/Web/Menu/Item.pm
Modified:
rt/branches/PLATANO-EXPERIMENTAL-CSS/ (props changed)
Log:
r8570 at hualien: jesse | 2005-03-14 02:40:38 -0500
r6762 at hualien: jesse | 2005-03-11 16:20:03 -0500
Started to sketch out a new API to replace RT's menuing components.
Comments greatly appreciated.
Added: rt/branches/PLATANO-EXPERIMENTAL-CSS/lib/RT/Interface/Web/Menu.pm
==============================================================================
--- (empty file)
+++ rt/branches/PLATANO-EXPERIMENTAL-CSS/lib/RT/Interface/Web/Menu.pm Mon Mar 14 02:57:17 2005
@@ -0,0 +1,19 @@
+package RT::Interface::Web::Menu;
+
+
+sub new {
+ my $class = shift;
+ my $self = bless {}, $class;
+ $self->{'root_node'} = RT::Interface::Web::Menu::Item->new();
+ return $self;
+}
+
+
+sub as_hash_of_hashes {
+
+}
+
+sub root {
+ my $self = shift;
+ return $self->{'root_node'};
+}
Added: rt/branches/PLATANO-EXPERIMENTAL-CSS/lib/RT/Interface/Web/Menu/Item.pm
==============================================================================
--- (empty file)
+++ rt/branches/PLATANO-EXPERIMENTAL-CSS/lib/RT/Interface/Web/Menu/Item.pm Mon Mar 14 02:57:17 2005
@@ -0,0 +1,38 @@
+package RT::Interface::Web::Menu::Item;
+
+
+sub new {
+ my $class = shift;
+ my $self = bless {},$class;
+ $self->{'_attributes'} = {};
+ return($self);
+}
+
+sub label { my $self = shift; $self->_accessor( label => @_) } ;
+sub absolute_url { my $self = shift; $self->_accessor( absolute_url => @_) } ;
+sub rt_path { my $self = shift; $self->_accessor( rt_path => @_) } ;
+sub hilight { my $self = shift; $self->_accessor( hilight => @_);
+ $self->parent->hilight(1);
+ } ;
+sub sort_order { my $self = shift; $self->_accessor( sort_order => @_) } ;
+
+sub add_child {
+}
+
+sub delete {
+}
+
+sub children {
+
+}
+
+sub _accessor {
+ my $self = shift;
+ my $key = shift;
+ if (@_){
+ $self->{'attributes'}->{$key} = shift;
+
+ }
+ return $self->{'_attributes'}->{$key};
+}
+
More information about the Rt-commit
mailing list