Sha256: a37eae916d8aca59e91d3bfdd704e3c83b73b33bdf63dd3a65aab70fcf987f0f

Contents?: true

Size: 1.42 KB

Versions: 10

Compression:

Stored size: 1.42 KB

Contents

{I"
class:EFI"BundledAsset;FI"logical_path;FI"!umlaut/ensure_window_size.js;TI"
pathname;FI"`/Users/jrochkind/code/umlaut-rails4/app/assets/javascripts/umlaut/ensure_window_size.js.erb;TI"content_type;FI"application/javascript;FI"
mtime;Fl+l»SI"length;FißI"digest;F"%205cb1c76e9dec312651b19d064a406fI"source;FI"ß// Some code to re-size our window to config defined minimum height/width
//     We have little control over what size a content provider generates a
//     window for a link resolver. Often it's too small. So we resize in
//     js.

// Some browsers won't let us resize the window though. Oh well, we try. 
// Those that wont' let us just silently no-op. 

jQuery(document).ready(function($) {    
  var min_width = 820;
  var min_height = 400;

  // Default to something huge, so if we fail in getting dimensions,
  // we won't resize. 
  var orig_width = 100000; 
  var orig_height = 100000;
  
  // JQuery document viewport width/height 
  
  orig_width = $(window).width();
  orig_height = $(window).height();
  
  
  
  width_diff = min_width - orig_width;
  height_diff = min_height - orig_height;
  
  if (width_diff < 0) { width_diff = 0 }
  if (height_diff < 0) { height_diff = 0 }
  
  if (width_diff >0 || height_diff > 0) {
    window.resizeBy(width_diff, height_diff)
  }
});
;TI"required_assets_digest;F"%673fb0639fe837fe145984293ec419ebI"
_version;F"%01511319732b44ed6445e68132ed559b

Version data entries

10 entries across 5 versions & 1 rubygems

Version Path
umlaut_borrow_direct-1.0.1 test/dummy/tmp/cache/assets/development/sprockets/d81f215f779ce2609d4dfa76b02df41c
umlaut_borrow_direct-1.0.1 test/dummy/tmp/cache/assets/development/sprockets/1e127abfd1414d0de67e3d78570c8195
umlaut_borrow_direct-1.0.0 test/dummy/tmp/cache/assets/development/sprockets/1e127abfd1414d0de67e3d78570c8195
umlaut_borrow_direct-1.0.0 test/dummy/tmp/cache/assets/development/sprockets/d81f215f779ce2609d4dfa76b02df41c
umlaut_borrow_direct-1.0.0.pre3 test/dummy/tmp/cache/assets/development/sprockets/1e127abfd1414d0de67e3d78570c8195
umlaut_borrow_direct-1.0.0.pre3 test/dummy/tmp/cache/assets/development/sprockets/d81f215f779ce2609d4dfa76b02df41c
umlaut_borrow_direct-1.0.0.pre2 test/dummy/tmp/cache/assets/development/sprockets/d81f215f779ce2609d4dfa76b02df41c
umlaut_borrow_direct-1.0.0.pre2 test/dummy/tmp/cache/assets/development/sprockets/1e127abfd1414d0de67e3d78570c8195
umlaut_borrow_direct-1.0.0.pre.alpha.1 test/dummy/tmp/cache/assets/development/sprockets/1e127abfd1414d0de67e3d78570c8195
umlaut_borrow_direct-1.0.0.pre.alpha.1 test/dummy/tmp/cache/assets/development/sprockets/d81f215f779ce2609d4dfa76b02df41c