[Jifty-commit] jifty branch, jifty_client, updated. a0cec782ea69a0ed3ff26093ea0eec67781f90d3

Jifty commits jifty-commit at lists.jifty.org
Mon May 3 06:36:04 EDT 2010


The branch, jifty_client has been updated
       via  a0cec782ea69a0ed3ff26093ea0eec67781f90d3 (commit)
      from  a87874a5176ad37b5f91429c9aae98f6365f5f93 (commit)

Summary of changes:
 lib/Jifty/Plugin/REST/Dispatcher.pm |    6 +++++-
 share/web/static/js/jifty_client.js |    4 ++++
 2 files changed, 9 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit a0cec782ea69a0ed3ff26093ea0eec67781f90d3
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Mon May 3 18:35:54 2010 +0800

    Add a JiftyColumn attribute role for introspection

diff --git a/lib/Jifty/Plugin/REST/Dispatcher.pm b/lib/Jifty/Plugin/REST/Dispatcher.pm
index 8b42ea5..66e8a29 100644
--- a/lib/Jifty/Plugin/REST/Dispatcher.pm
+++ b/lib/Jifty/Plugin/REST/Dispatcher.pm
@@ -956,7 +956,10 @@ sub show_joose_class {
     my $cols = {};
     for my $col ( $model->new->columns ) {
         next if $col->private or $col->virtual;
-        my $props = {};
+
+        my $props = {
+            does => 'JiftyColumn',
+        };
 
         # map Jifty column property names to Joose names
         if ($col->default) {
@@ -1011,6 +1014,7 @@ sub show_joose_class {
     # better ideas welcome...
     $class_definition =~ s/"isa":"JiftyModel"/"isa":JiftyModel/g;
     $class_definition =~ s/"isa":"Joose\.Type\.(\w+)"/"isa":Joose.Type.$1/g;
+    $class_definition =~ s/"does":"JiftyColumn"/"does":JiftyColumn/g;
 
     return $class_definition;
 }
diff --git a/share/web/static/js/jifty_client.js b/share/web/static/js/jifty_client.js
index a7b85bd..1cbdc93 100644
--- a/share/web/static/js/jifty_client.js
+++ b/share/web/static/js/jifty_client.js
@@ -51,6 +51,10 @@ Class("JiftyModel", {
     }
 });
 
+// no logic here yet, just here for introspection
+Role("JiftyColumn", {
+});
+
 Class("JiftyClient", {
     has: {
         baseUrl: {

-----------------------------------------------------------------------


More information about the Jifty-commit mailing list