aboutsummaryrefslogtreecommitdiffstats
path: root/static
diff options
context:
space:
mode:
authorAdam Mathes <adam@trenchant.org>2017-11-21 15:13:15 -0700
committerAdam Mathes <adam@trenchant.org>2017-11-21 15:13:15 -0700
commitd256564c435c5cef02262fb64fb2bddcd38c05a1 (patch)
tree902914fb325bd8de68f0df052cabb2a3d21dc79e /static
parenteffcafcb7d2010c4d182b296ff2cf5b55cc91cf5 (diff)
downloadneko-d256564c435c5cef02262fb64fb2bddcd38c05a1.tar.gz
neko-d256564c435c5cef02262fb64fb2bddcd38c05a1.tar.bz2
neko-d256564c435c5cef02262fb64fb2bddcd38c05a1.zip
add full view toggle kb shortcut
Diffstat (limited to 'static')
-rw-r--r--static/ui.js16
1 files changed, 13 insertions, 3 deletions
diff --git a/static/ui.js b/static/ui.js
index 4f9305c..4df0550 100644
--- a/static/ui.js
+++ b/static/ui.js
@@ -109,10 +109,17 @@ var AppModel = Backbone.Model.extend({
},
star: function() {
- if(this.get('selectedIndex') > 0) {
+ if(this.get('selectedIndex') >= 0) {
App.items.at(this.get('selectedIndex')).toggleStar();
}
+ },
+
+ full: function() {
+ if(this.get('selectedIndex') >= 0) {
+ App.items.at(this.get('selectedIndex')).full();
+ }
}
+
});
var App = new AppModel();
@@ -206,7 +213,7 @@ var Item = Backbone.Model.extend({
},
full: function() {
- this.set({'full': true});
+ this.set({'full': !(this.get('full'))} );
}
});
@@ -544,7 +551,10 @@ function boot() {
event.preventDefault();
App.star();
}
-
+ if (event.which == 70) {
+ event.preventDefault();
+ App.full();
+ }
});
App.boot();