Sha256: 394cbb67bd06175db8e58d98d47a396cae13b37d7b8d98473f4149f8f474342e

Contents?: true

Size: 1.67 KB

Versions: 2

Compression:

Stored size: 1.67 KB

Contents

o: ActiveSupport::Cache::Entry	:@compressedF:@expires_in0:@created_atf1381401964.788249:@value"@{I"
class:EFI"ProcessedAsset;FI"logical_path;FI"locomotive/cmd.js;TI"
pathname;FI"r/Users/papipo/.rvm/gems/ruby-1.9.3-p448/gems/locomotive_cms-2.2.3/vendor/assets/javascripts/locomotive/cmd.js;TI"content_type;FI"application/javascript;FI"
mtime;FI"2013-10-10T12:39:18+02:00;FI"length;FiÏI"digest;F"%546aefd7b2a0ac7e25ebccb20b461e6cI"source;FI"Ï/**
 * Version 0.0.1
 * Catch the CTRL+S keys combination and trigger a callback
 * Didier Lafforgue
 */


$.cmd = function(key, callback, args, options) {
  var keyCode = key.charCodeAt(0);
  var altKeyCode = keyCode + (32 * (keyCode < 97 ? 1 : -1));

  options = (options || { ignoreCase: false });

  if (!options.ignoreCase) altKeyCode = null;

  doc = options.document || window.document;

  $(doc).keydown(function(e) {
    var isCtrl = false;

    if (!args) args = []; // IE barks when args is null

    if (e.ctrlKey || e.metaKey) isCtrl = true;

    if ((keyCode == e.which || altKeyCode == e.which) && isCtrl) {
      e.preventDefault();
      callback.apply(this, args);
      return false;
    }
  });

};
;FI"dependency_digest;F"%bd22eb4d58ecf9f6dc4d082ffe96efebI"required_paths;F[I"r/Users/papipo/.rvm/gems/ruby-1.9.3-p448/gems/locomotive_cms-2.2.3/vendor/assets/javascripts/locomotive/cmd.js;TI"dependency_paths;F[{I"	path;FI"r/Users/papipo/.rvm/gems/ruby-1.9.3-p448/gems/locomotive_cms-2.2.3/vendor/assets/javascripts/locomotive/cmd.js;TI"
mtime;FI"2013-10-10T12:39:18+02:00;FI"digest;F"%821185653274928f27b2d64317761424I"
_version;F"%ffd318ca8b794f42f5029101c2cf5d91

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
locomotivecms-search-0.2.5 spec/dummy/tmp/cache/assets/C5F/E20/sprockets%2F9719b8dbd52279df80037231e4955518
locomotivecms-search-0.2.4 spec/dummy/tmp/cache/assets/C5F/E20/sprockets%2F9719b8dbd52279df80037231e4955518