Skip to content

Commit

Permalink
[#1788]: Removed all dependancy on ckanjs.js.
Browse files Browse the repository at this point in the history
  • Loading branch information
teajaymars committed Mar 30, 2012
1 parent 08da289 commit 2ee1b48
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1,759 deletions.
15 changes: 15 additions & 0 deletions ckan/public/scripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,21 @@ CKAN.Utils = CKAN.Utils || {};
}(jQuery));


/* =============================== */
/* Backbone Model: Resource object */
/* =============================== */
CKAN.Model.Resource = Backbone.Model.extend({
constructor: function Resource() {
Backbone.Model.prototype.constructor.apply(this, arguments);
},
toTemplateJSON: function() {
var obj = Backbone.Model.prototype.toJSON.apply(this, arguments);
obj.displaytitle = obj.description ? obj.description : 'No description ...';
return obj;
}
});



/* ============================== */
/* == Backbone View: UrlEditor == */
Expand Down

0 comments on commit 2ee1b48

Please sign in to comment.