From 2ad496102fa63654009b86b0bb992904aad38f71 Mon Sep 17 00:00:00 2001 From: rnlee0054 Date: Wed, 20 May 2015 00:32:35 -0700 Subject: [PATCH] Tweaking hotkey add and feed and css --- scripts/FeedController.js | 13 +++++++++++++ styles/flashy.css | 7 +++++-- templates/feed.html | 4 ++-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/scripts/FeedController.js b/scripts/FeedController.js index b10eec4..309f3f4 100644 --- a/scripts/FeedController.js +++ b/scripts/FeedController.js @@ -56,6 +56,8 @@ angular.module('flashy.FeedController', ['ui.router']). console.log('refresh fail'); }); } + + /* Key bindings for the whole feed window. Hotkey it up! */ var listenForC = true; $(document).keydown(function (e) { var keyed = e.which; @@ -63,6 +65,9 @@ angular.module('flashy.FeedController', ['ui.router']). $('#newCard').openModal(); listenForC = false; return false; + } else if (keyed == 13 || keyed == 27) { // enter or esc, respectively + listenForC = true; + document.getElementById('new-card-input').value = ''; } }); @@ -77,6 +82,14 @@ angular.module('flashy.FeedController', ['ui.router']). opacity: 0, // Opacity of modal background in_duration: 300, // Transition in duration out_duration: 200, // Transition out duration + ready: function() { + listenForC = false; + console.log("modal OPENING"); + }, + complete: function() { + listenForC = true; + console.log("modal done, closing"); + } } ); }); diff --git a/styles/flashy.css b/styles/flashy.css index 1d0fd78..143a74f 100644 --- a/styles/flashy.css +++ b/styles/flashy.css @@ -104,7 +104,7 @@ ul.side-nav.fixed li a { } .card:hover .card-overlay { - opacity: 1; + opacity: 0.9; transition-delay: 0s; /* animation effect to appear on hover */ visibility: visible; } @@ -166,7 +166,10 @@ ul.side-nav.fixed li a { margin-right: auto; } -/* label color */ +#newCard input[type=text] { + height: 3rem !important; +} + .input-field label { color: #673ab7; } diff --git a/templates/feed.html b/templates/feed.html index ed206ba..dc4342d 100644 --- a/templates/feed.html +++ b/templates/feed.html @@ -30,8 +30,8 @@
- - + +
-- 1.9.1