aboutsummaryrefslogtreecommitdiffstats
path: root/static/ui.js
diff options
context:
space:
mode:
authorAdam Mathes <adam@trenchant.org>2017-11-20 10:21:05 -0700
committerAdam Mathes <adam@trenchant.org>2017-11-20 10:21:05 -0700
commiteffcafcb7d2010c4d182b296ff2cf5b55cc91cf5 (patch)
tree8154c4cd6e7ad1167aafade5277f212aeee3b97a /static/ui.js
parent1a6516cffc33403b51a8f38af4a574ae94ab2999 (diff)
downloadneko-effcafcb7d2010c4d182b296ff2cf5b55cc91cf5.tar.gz
neko-effcafcb7d2010c4d182b296ff2cf5b55cc91cf5.tar.bz2
neko-effcafcb7d2010c4d182b296ff2cf5b55cc91cf5.zip
wip img
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);