aboutsummaryrefslogtreecommitdiffstats
path: root/static/ui.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/ui.js')
-rw-r--r--static/ui.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/static/ui.js b/static/ui.js
index 6f44db0..4f9305c 100644
--- a/static/ui.js
+++ b/static/ui.js
@@ -203,6 +203,10 @@ var Item = Backbone.Model.extend({
unstar: function() {
this.set({'starred': false});
+ },
+
+ full: function() {
+ this.set({'full': true});
}
});
@@ -291,6 +295,7 @@ var ItemView = Backbone.View.extend({
events: {
"click .star": "star",
"click .unstar": "unstar",
+ "click .full": "full",
},
initialize: function() {
@@ -308,6 +313,11 @@ var ItemView = Backbone.View.extend({
this.render();
},
+ full: function() {
+ this.model.full();
+ this.render();
+ },
+
render: function() {
var h = $.tmpl(templates.item_template, { 'item': this.model.toJSON() });
$(this.el).html(h);