set document title when displaying xosAdmin views
diff --git a/xos/core/xoslib/static/js/xoslib/xosHelper.js b/xos/core/xoslib/static/js/xoslib/xosHelper.js
index 2779cd0..2a4f2a2 100644
--- a/xos/core/xoslib/static/js/xoslib/xosHelper.js
+++ b/xos/core/xoslib/static/js/xoslib/xosHelper.js
@@ -191,6 +191,7 @@
app[regionName].show(listView);
app.hideLinkedItems();
$("#contentTitle").html(templateFromId("#xos-title-list")({"title": title}));
+ $(document).attr('title', title);
$("#detail").show();
app.hideTabs();
@@ -265,13 +266,17 @@
createDetailHandler: 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 {
+ title = title + ": " + model.attributes.humanReadableName;
+
+ $("#contentTitle").html(templateFromId("#xos-title-detail")({"title": title}));
+
+ $(document).attr('title', title);
+
detailViewClass = app[detailName];
detailView = new detailViewClass({model: model});
app[regionName].show(detailView);