o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1358999030.220238: @value"{I" class:EFI"ProcessedAsset;FI"logical_path;FI"#showboat/plugins/help_modal.js;FI" pathname;FI"Z/Users/mkitt/Sites/showboat/app/assets/javascripts/showboat/plugins/help_modal.coffee;FI"content_type;FI"application/javascript;FI" mtime;FI"2013-01-23T20:43:44-07:00;FI" length;FiI I" digest;F"%e8d052474214987861a1c32d1a48023bI" source;FI"I (function() { window.HelpModal = (function() { HelpModal.prototype.shortcuts = [ { key: 'F', desc: 'Enter full screen mode' }, { key: 'S', desc: 'Open the notes window' }, { key: 'Esc', desc: 'Zoom to the overview screen' }, { key: 'Return', desc: 'Select slide from overview screen' }, { key: 'Space', desc: 'Next slide or select slide from overview screen' }, { key: '.', desc: 'Pause the presentation', key_alt: 'b' }, { key: '→', desc: 'Navigate right', key_alt: 'l' }, { key: '←', desc: 'Navigate left', key_alt: 'h' }, { key: '↑', desc: 'Navigate up', key_alt: 'k' }, { key: '↓', desc: 'Navigate down', key_alt: 'j' }, { key: 'p', desc: 'Previous slide', key_alt: 'Page Up' }, { key: 'n', desc: 'Next slide', key_alt: 'Page Down' }, { key: 'home', desc: 'Jump to first slide' }, { key: 'end', desc: 'Jump to last slide' }, { key: '?', desc: 'Toggles the help modal' } ]; function HelpModal(reveal) { var _this = this; this.reveal = reveal; this.help = null; this.is_active = false; document.addEventListener('keydown', function() { return _this.keyed.apply(_this, arguments); }); } HelpModal.prototype.keyed = function(e) { if (e.shiftKey && e.keyCode === 191) { if (this.is_active) { return this.remove(); } else { return this.add(); } } }; HelpModal.prototype.add = function() { this.is_active = true; if (!this.help) { this.render(); } return document.body.appendChild(this.help); }; HelpModal.prototype.remove = function() { this.is_active = false; return document.body.removeChild(this.help); }; HelpModal.prototype.render = function() { var div; div = document.createElement('div'); div.className = 'help-modal'; div.innerHTML = this.markup(); return this.help = document.body.appendChild(div); }; HelpModal.prototype.markup = function() { var html, shortcut; html = "

Keyboard Shortcuts

\n" + ((function() { var _i, _len, _ref, _results; _ref = this.shortcuts; _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { shortcut = _ref[_i]; _results.push(this.row(shortcut)); } return _results; }).call(this)); return html.replace(/\,/g, ''); }; HelpModal.prototype.row = function(shortcut) { return "

\n " + shortcut.desc + "\n " + shortcut.key + "\n " + (shortcut.key_alt ? ' or ' + shortcut.key_alt + '' : '') + "\n

"; }; return HelpModal; })(); }).call(this); ;TI"dependency_digest;F"%d4eb8d3b2181bfaaf393d988b2c43d5cI"required_paths;F[I"Z/Users/mkitt/Sites/showboat/app/assets/javascripts/showboat/plugins/help_modal.coffee;FI"dependency_paths;F[{I" path;FI"Z/Users/mkitt/Sites/showboat/app/assets/javascripts/showboat/plugins/help_modal.coffee;FI" mtime;FI"2013-01-23T20:43:44-07:00;FI" digest;F"%7ced17fc0008d5e0a5e8852719a831e0I" _version;F"%6776f581a4329e299531e1d52aa59832