[Jifty-commit] r7420 - in jifty/trunk: lib/Jifty/View/Declare

Jifty commits jifty-commit at lists.jifty.org
Mon Aug 24 18:46:23 EDT 2009


Author: sartak
Date: Mon Aug 24 18:46:23 2009
New Revision: 7420

Modified:
   jifty/trunk/lib/Jifty/View/Declare/CRUD.pm
   jifty/trunk/share/web/static/css/crud.css

Log:
Begin adding useful CSS classes

Modified: jifty/trunk/lib/Jifty/View/Declare/CRUD.pm
==============================================================================
--- jifty/trunk/lib/Jifty/View/Declare/CRUD.pm	(original)
+++ jifty/trunk/lib/Jifty/View/Declare/CRUD.pm	Mon Aug 24 18:46:23 2009
@@ -566,9 +566,10 @@
     my $sort_by = get ('sort_by') || '';
     my $order = get ('order') || '';
     my $collection =  $self->_current_collection();
+
     div {
-        {class is 'crud-'.$self->object_type }; 
-        show('./search_region');
+        {class is 'crud-ui crud-'.$self->object_type };
+        show( './search_region');
         show( './paging_top',    $collection, $page );
         show( './sort_header', $item_path, $sort_by, $order );
         show( './list_items',    $collection, $item_path );
@@ -631,7 +632,7 @@
     my $record_class = $self->record_class;
 
     div { 
-        { class is "jifty_admin_header" };
+        { class is "crud-column-headers jifty_admin_header" };
         for my $argument ($self->display_columns) {
             my $css_class = ($sort_by && !$order && $sort_by eq $argument)?'up_select':'up';
             span {
@@ -719,25 +720,29 @@
     my $self        = shift;
     my $object_type = $self->object_type;
 
-    show('predefined_search');
+    div {
+        attr { class is 'crud-search' };
 
-    my $search_region = Jifty::Web::PageRegion->new(
-        name => 'search',
-        path => '/__jifty/empty'
-    );
-
-    hyperlink(
-        onclick => [
-            {   region       => $search_region->qualified_name,
-                replace_with => $self->fragment_for('search'),
-                toggle       => 1,
-                args         => { object_type => $object_type }
-            },
-        ],
-        label => _('Toggle search'),
-    );
+        show('predefined_search');
 
-    outs( $search_region->render );
+        my $search_region = Jifty::Web::PageRegion->new(
+            name => 'search',
+            path => '/__jifty/empty'
+        );
+
+        hyperlink(
+            onclick => [
+                {   region       => $search_region->qualified_name,
+                    replace_with => $self->fragment_for('search'),
+                    toggle       => 1,
+                    args         => { object_type => $object_type }
+                },
+            ],
+            label => _('Toggle search'),
+        );
+
+        outs( $search_region->render );
+    }
 };
 
 =head2 new_item_region
@@ -826,7 +831,7 @@
 
     if ( $collection->pager->last_page > 1 ) {
         div {
-            { class is 'page-count' };
+            { class is 'crud-pages page-count' };
             outs(
                 _( "Page %1 of %2", $page, $collection->pager->last_page ) );
             }

Modified: jifty/trunk/share/web/static/css/crud.css
==============================================================================
--- jifty/trunk/share/web/static/css/crud.css	(original)
+++ jifty/trunk/share/web/static/css/crud.css	Mon Aug 24 18:46:23 2009
@@ -1,2 +1,12 @@
+.crud-ui {
+}
 
+.crud-search {
+}
+
+.crud-pages {
+}
+
+.crud-column-headers {
+}
 


More information about the Jifty-commit mailing list