test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af in psique-1.0.0 vs test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af in psique-1.0.1
- old
+ new
@@ -1,13 +1,82 @@
{I"
class:ETI"BundledAsset; FI"logical_path; TI"application.js; TI"
pathname; TI"0$root/app/assets/javascripts/application.js; FI"content_type; TI"application/javascript; TI"
-mtime; Tl+æîTI"length; TiuI"digest; TI"%55196aacd3b3c0c9f84d40d4e4d912b2; FI"source; TI"u// Place all the behaviors and hooks related to the matching controller here.
-// All this logic will automatically be available in application.js.
-;
+mtime; Tl+nþUI"length; Ti
+I"digest; TI"%07e3b2340ca6e280a6aa6cfb5f87f6f6; FI"source; TI"
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.
;
+(function() {
+ (function($, window, document) {
+ var OffCanvas, defaults;
+ defaults = {
+ menu: 'offcanvas-menu',
+ page: 'offcanvas-page'
+ };
+ OffCanvas = (function() {
+ function OffCanvas(element) {
+ this.element = element;
+ this.$body = $('body');
+ this.$element = $(this.element);
+ this.$menu = $(this.$element.data(defaults.menu));
+ this.$page = $(this.$element.data(defaults.page));
+ this.init();
+ }
+
+ OffCanvas.prototype.init = function() {
+ this.resize(this.$page);
+ this.$menu.addClass(defaults.menu).appendTo(this.$body);
+ this.$page.addClass(defaults.page);
+ this.$body.addClass('offcanvas');
+ this.$element.on({
+ click: (function(_this) {
+ return function(event) {
+ event.stopPropagation();
+ return _this.open();
+ };
+ })(this)
+ });
+ return this.$page.on({
+ click: (function(_this) {
+ return function() {
+ return _this.close();
+ };
+ })(this)
+ });
+ };
+
+ OffCanvas.prototype.open = function() {
+ return this.$body.toggleClass('is-open');
+ };
+
+ OffCanvas.prototype.close = function() {
+ return this.$body.removeClass('is-open');
+ };
+
+ OffCanvas.prototype.resize = function($item) {
+ return $(window).on({
+ 'load resize': (function(_this) {
+ return function() {
+ return $item.css('min-height', window.innerHeight);
+ };
+ })(this)
+ });
+ };
+
+ return OffCanvas;
+
+ })();
+ if ($("[data-" + defaults.menu + "]").length > 0) {
+ return new OffCanvas("[data-" + defaults.menu + "]");
+ }
+ })(jQuery, window, document);
+
+}).call(this);
+(function() {
+
+
+}).call(this);
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
@@ -19,6 +88,6 @@
// about supported directives.
//
;
-; TI"required_assets_digest; TI"%8df4367b15e93afd30f7b47bd7f20889; FI"
_version; TI"%64e62ddc273c2f5847f30d698ca14b67; F
+; TI"required_assets_digest; TI"%608422478e23ccac4169a6a264223b0a; FI"
_version; TI"%64e62ddc273c2f5847f30d698ca14b67; F
\ No newline at end of file