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

Jifty commits jifty-commit at lists.jifty.org
Mon Aug 24 22:59:58 EDT 2009


Author: sartak
Date: Mon Aug 24 22:59:57 2009
New Revision: 7422

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

Log:
More 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 22:59:57 2009
@@ -796,26 +796,28 @@
     $collection->_do_search(); # we're going to need the results. 
     # XXX TODO, should use a real API to force the search
 
-    if ( $collection->count == 0 ) {
-        render_region(
-            name => 'no_items_found',
-            path => $self->fragment_for('no_items_found'),
-        );
-    }
-
-    my $i = 0;
     div {
-        { class is 'list' };
-        while ( my $item = $collection->next ) {
+        { class is 'crud-list' };
+        if ( $collection->count == 0 ) {
             render_region(
-                name     => 'item-' . $item->id,
-                path     => $item_path,
-                defaults => { id => $item->id, object_type => $object_type }
+                name => 'no_items_found',
+                path => $self->fragment_for('no_items_found'),
             );
-            $callback->(++$i) if $callback;
         }
-    };
 
+        my $i = 0;
+        div {
+            { class is 'list' };
+            while ( my $item = $collection->next ) {
+                render_region(
+                    name     => 'item-' . $item->id,
+                    path     => $item_path,
+                    defaults => { id => $item->id, object_type => $object_type }
+                );
+                $callback->(++$i) if $callback;
+            }
+        };
+    };
 };
 
 =head2 paging_top $collection $page_number
@@ -850,10 +852,10 @@
     my $collection = shift;
     my $page       = shift;
     div {
-        { class is 'paging' };
+        { class is 'crud-paging paging' };
         if ( $collection->pager->previous_page ) {
             span {
-                { class is 'prev-page' };
+                { class is 'crud-prev-page' };
                 hyperlink(
                     label   => _("Previous Page"),
                     onclick => {
@@ -864,7 +866,7 @@
         }
         if ( $collection->pager->next_page ) {
             span {
-                { class is 'next-page' };
+                { class is 'crud-next-page' };
                 hyperlink(
                     label   => _("Next Page"),
                     onclick =>
@@ -885,6 +887,7 @@
 private template 'create_item' => sub {
     my $self = shift;
     my $action = shift;
+
     for my $field ($self->create_columns($action)) {
         div { 
             { class is 'create-argument-'.$field};
@@ -932,7 +935,7 @@
     my $create = $record_class->as_create_action;
 
     div {
-        { class is 'crud create item inline' };
+        { class is 'crud-create crud create item inline' };
         show('./create_item', $create);
         show('./new_item_controls', $create);
     }

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 22:59:57 2009
@@ -7,9 +7,18 @@
 .crud-pages {
 }
 
+.crud-paging {
+}
+
 .crud-column-headers {
 }
 
+.crud-list {
+}
+
+.crud-create {
+}
+
 .field {
     float: left;
     margin: 0.15em 0.5em 0.15em 0.15em;


More information about the Jifty-commit mailing list