Permalink
Browse files

ro instances now contain enough info to ascertain url

  • Loading branch information...
1 parent 69cf64e commit c41390a08648d6365f57d4984530839246b25e9b @herbdaily committed Apr 2, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/marley/client/reggae.js
@@ -163,14 +163,16 @@ r.nodeTypes={
return ["div",{"class":"instanceContainer"},content];
},
"ro_instance":function(i){
- var content=i[2]
+ var instance_id;
+ var content=i[2];
content.unshift(["div",{},pl.map(i.attrs.schema, function(col){
+ if(col[NAME_INDEX]=='id'){instance_id=col[VALUE_INDEX]}
return ["div",{"class":col[1]+"ColContainer colContainer"},[["label",{},col[1].humanize()+":"],col[3]]]
})]);
var actions_dom=["div",{"class":"instanceActions"},[]];
r.actionTypes["get"].call(actions_dom[2],i.attrs.actions["get"]);
content.push(actions_dom);
- return ["div",{"class":"instanceContainer"},content];
+ return ["div",{"class":"instanceContainer roInstance","id":i.attrs.name+'__'+instance_id},content];
},
"instance_list":function(il) {
var name=il.attrs.name;
@@ -197,7 +199,6 @@ r.nodeTypes={
{
"name":name,
"new_rec":false,
- "url":'asdf', //FIX THIS
"schema": instance_schema,
"actions": il.attrs.actions
},

0 comments on commit c41390a

Please sign in to comment.