Sha256: ebd035f02a9d0f342508df73e51d35b0a6502f2489dfa6a0d924dd37d68cfb70

Contents?: true

Size: 1.62 KB

Versions: 8

Compression:

Stored size: 1.62 KB

Contents

o: ActiveSupport::Cache::Entry	:@compressedF:@expires_in0:@created_atf1384093241.151065:@value"{I"
class:ETI"ProcessedAsset;FI"logical_path;TI"locomotive/cmd.js;FI"
pathname;TI"]/Users/didier/Documents/LocomotiveCMS/engine/vendor/assets/javascripts/locomotive/cmd.js;FI"content_type;TI"application/javascript;TI"
mtime;TI"2012-04-06T12:27:39+02:00;TI"length;TiÏI"digest;TI"%546aefd7b2a0ac7e25ebccb20b461e6c;FI"source;TI"Ï/**
 * 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;
    }
  });

};
;TI"dependency_digest;TI"%bd22eb4d58ecf9f6dc4d082ffe96efeb;FI"required_paths;T[I"]/Users/didier/Documents/LocomotiveCMS/engine/vendor/assets/javascripts/locomotive/cmd.js;FI"dependency_paths;T[{I"	path;TI"]/Users/didier/Documents/LocomotiveCMS/engine/vendor/assets/javascripts/locomotive/cmd.js;FI"
mtime;TI"2012-04-06T12:27:39+02:00;TI"digest;TI"%821185653274928f27b2d64317761424;FI"
_version;TI"%ffd318ca8b794f42f5029101c2cf5d91;F

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
locomotivecms-search-0.3.5 spec/dummy/tmp/cache/assets/D3F/3D0/sprockets%2Fa63a8c690af3c36847ed2803d5dba717
locomotivecms-search-0.3.4 spec/dummy/tmp/cache/assets/D3F/3D0/sprockets%2Fa63a8c690af3c36847ed2803d5dba717
locomotivecms-search-0.3.3 spec/dummy/tmp/cache/assets/D3F/3D0/sprockets%2Fa63a8c690af3c36847ed2803d5dba717
locomotivecms-search-0.3.2 spec/dummy/tmp/cache/assets/D3F/3D0/sprockets%2Fa63a8c690af3c36847ed2803d5dba717
locomotivecms-search-0.3.0 spec/dummy/tmp/cache/assets/D3F/3D0/sprockets%2Fa63a8c690af3c36847ed2803d5dba717
locomotivecms-search-0.2.8 spec/dummy/tmp/cache/assets/D3F/3D0/sprockets%2Fa63a8c690af3c36847ed2803d5dba717
locomotivecms-search-0.2.7 spec/dummy/tmp/cache/assets/D3F/3D0/sprockets%2Fa63a8c690af3c36847ed2803d5dba717
locomotivecms-search-0.2.6 spec/dummy/tmp/cache/assets/D3F/3D0/sprockets%2Fa63a8c690af3c36847ed2803d5dba717