- while (index<4) {\r
- this["linkedObjs" + (index+1)].empty();\r
- index = index + 1;\r
- }\r
- },\r
-\r
- listViewShower: function(listViewName, collection_name, regionName, title) {\r
- var app=this;\r
- return function() {\r
- app[regionName].show(new app[listViewName]);\r
- app.hideLinkedItems();\r
- $("#contentTitle").html(templateFromId("#xos-title-list")({"title": title}));\r
- $("#detail").show();\r
- $("#xos-listview-button-box").show();\r
- $("#tabs").hide();\r
- $("#xos-detail-button-box").hide();\r
- }\r
- },\r
-\r
- 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({model: model, collection:xos[collection_name]});\r
- app[regionName].show(detailView);\r
- $("#xos-detail-button-box").show();\r
- $("#xos-listview-button-box").hide();\r
- }\r
- },\r
-\r
- detailShower: function(detailName, collection_name, regionName, title) {\r
- var app=this;\r
- showModelId = function(model_id) {\r
- $("#contentTitle").html(templateFromId("#xos-title-detail")({"title": title}));\r
-\r
- collection = xos[collection_name];\r
- model = collection.get(model_id);\r
- if (model == undefined) {\r
- app[regionName].show(new HTMLView({html: "failed to load object " + model_id + " from collection " + collection_name}));\r
- } else {\r
- detailViewClass = app[detailName];\r
- detailView = new detailViewClass({model: model});\r
- app[regionName].show(detailView);\r
- detailView.showLinkedItems();\r
- $("#xos-detail-button-box").show();\r
- $("#xos-listview-button-box").hide();\r
- }\r
- }\r
- return showModelId;\r
- },\r
-\r
- /* error handling callbacks */\r
-\r
- hideError: function() {\r
+ while (index<4) {
+ this["linkedObjs" + (index+1)].empty();
+ index = index + 1;
+ }
+ },
+
+ listViewShower: function(listViewName, collection_name, regionName, title) {
+ var app=this;
+ return function() {
+ app[regionName].show(new app[listViewName]);
+ app.hideLinkedItems();
+ $("#contentTitle").html(templateFromId("#xos-title-list")({"title": title}));
+ $("#detail").show();
+ $("#xos-listview-button-box").show();
+ $("#tabs").hide();
+ $("#xos-detail-button-box").hide();
+ }
+ },
+
+ addShower: function(detailName, collection_name, regionName, title) {
+ var app=this;
+ return function() {
+ model = new xos[collection_name].model();
+ detailViewClass = app[detailName];
+ detailView = new detailViewClass({model: model, collection:xos[collection_name]});
+ app[regionName].show(detailView);
+ $("#xos-detail-button-box").show();
+ $("#xos-listview-button-box").hide();
+ }
+ },
+
+ detailShower: function(detailName, collection_name, regionName, title) {
+ var app=this;
+ showModelId = function(model_id) {
+ $("#contentTitle").html(templateFromId("#xos-title-detail")({"title": title}));
+
+ collection = xos[collection_name];
+ model = collection.get(model_id);
+ if (model == undefined) {
+ app[regionName].show(new HTMLView({html: "failed to load object " + model_id + " from collection " + collection_name}));
+ } else {
+ detailViewClass = app[detailName];
+ detailView = new detailViewClass({model: model});
+ app[regionName].show(detailView);
+ detailView.showLinkedItems();
+ $("#xos-detail-button-box").show();
+ $("#xos-listview-button-box").hide();
+ }
+ }
+ return showModelId;
+ },
+
+ /* error handling callbacks */
+
+ hideError: function() {