addShower: function(detailName, collection_name, regionName, title) {\r
var app=this;\r
return function() {\r
+ model = new xos[collection_name].model();\r
detailViewClass = app[detailName];\r
- detailView = new detailViewClass();\r
+ detailView = new detailViewClass({model: model});\r
app[regionName].show(detailView);\r
+ $("#xos-detail-button-box").show();\r
+ $("#xos-listview-button-box").hide();\r
}\r
},\r
\r
addClicked: function(e) {
console.log("add");
e.preventDefault();
- this.app.Router.navigate("add" + firstCharUpper(this.collection.modelName));
+ this.app.Router.navigate("add" + firstCharUpper(this.collection.modelName), {trigger: true});
},
\r
initialize: function() {\r
from django.core import serializers
import json
-print "function xosdefault() {"
+print "function xos_get_defaults() {"
for c in dir(core.models):
c = getattr(core.models,c)
print " this." + classname + " = " + fields_json + ";"
print "};"
+print "xosdefaults = new xos_get_defaults();"