1 /*jshint indent:2, curly:true, eqeqeq:true, immed:true, latedef:true,
2 newcap:true, noarg:true, regexp:true, undef:true, strict:true, trailing:true,
4 /*global XT:true, XM:true, Backbone:true, _:true, console:true */
14 XM.SiteType = XM.Document.extend(/** @lends XM.Site.prototype */{
16 recordType: 'XM.SiteType',
27 XM.SiteZone = XM.Document.extend(/** @lends XM.SiteZone.prototype */{
29 recordType: 'XM.SiteZone',
40 XM.SiteZoneRelation = XM.Document.extend(/** @lends XM.SiteZoneRelation.prototype */{
42 recordType: 'XM.SiteZoneRelation',
53 XM.Site = XM.Document.extend(/** @lends XM.Site.prototype */{
55 recordType: 'XM.Site',
66 XM.SiteComment = XM.Comment.extend(/** @lends XM.SiteComment.prototype */{
68 recordType: 'XM.SiteComment',
79 XM.SiteRelation = XM.Info.extend(/** @lends XM.SiteRelation.prototype */{
81 recordType: 'XM.SiteRelation',
83 editableModel: 'XM.Site'
92 XM.SiteListItem = XM.Info.extend(/** @lends XM.SiteListItem.prototype */{
94 recordType: 'XM.SiteListItem',
96 editableModel: 'XM.Site',
98 couldCreate: function () {
99 // Look to see if there are sites in the sites cache. If so, restrict new for Postbooks.
100 if (!XM.sites.length) {
101 return XM.Info.prototype.couldCreate.apply(this, arguments);
108 // ..........................................................
115 @extends XM.Collection
117 XM.SiteCollection = XM.Collection.extend(/** @lends XM.SiteCollection.prototype */{
125 @extends XM.Collection
127 XM.SiteTypeCollection = XM.Collection.extend(/** @lends XM.SiteTypeCollection.prototype */{
135 @extends XM.Collection
137 XM.SiteRelationCollection = XM.Collection.extend(/** @lends XM.SiteRelationCollection.prototype */{
139 model: XM.SiteRelation
145 @extends XM.Collection
147 XM.SiteListItemCollection = XM.Collection.extend(/** @lends XM.SiteListItemCollection.prototype */{
149 model: XM.SiteListItem
155 @extends XM.Collection
157 XM.SiteZoneRelationCollection = XM.Collection.extend(/** @lends XM.SiteListItemCollection.prototype */{
159 model: XM.SiteZoneRelation