o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1374498084.1064699:@value"{I" class:EFI"ProcessedAsset; FI"logical_path; F"9iugu-ux/components/usecode/iugu-ui-responsive-box.jsI" pathname; F"/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/iugu-ux/components/usecode/iugu-ui-responsive-box.js.coffeeI"content_type; FI"application/javascript; FI" mtime; FI"2013-07-10T19:25:36-03:00; FI"length; FiXI"digest; F"%f8a6efc9676b38556b5be4a2f1e480fcI"source; FI"X(function() { var _ref, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; IuguUI.ResponsiveBox = (function(_super) { __extends(ResponsiveBox, _super); function ResponsiveBox() { _ref = ResponsiveBox.__super__.constructor.apply(this, arguments); return _ref; } ResponsiveBox.prototype.layout = "iugu-ui-responsive-box"; ResponsiveBox.prototype.defaults = { sidebar: null }; ResponsiveBox.prototype.initialize = function() { _.bindAll(this, 'toggleSidebar'); this.sidebar = this.options.sidebar; if (!this.sidebar) { this.sidebar = new IuguUI.ScrollableContainer(); } this.content = new IuguUI.ScrollableContainer(); this.sidebar_wrapper = null; this.content_wrapper = null; return this.views = []; }; ResponsiveBox.prototype.getSidebarWrapper = function() { return this.sidebar_wrapper; }; ResponsiveBox.prototype.getSidebar = function() { return this.sidebar; }; ResponsiveBox.prototype.getContent = function() { return this.content.getContainer(); }; ResponsiveBox.prototype.setTitle = function(title) { return this.$('.responsive-title').html(title); }; ResponsiveBox.prototype.getTitle = function() { return this.$('.responsive-title').html(); }; ResponsiveBox.prototype.pushRootView = function(view) { debug("PUSH ROOT VIEW"); this.views = []; return this.pushView(view); }; ResponsiveBox.prototype.pushView = function(view) { debug("PUSH VIEW"); this.views.push(view); return this.getContent().html(view.el); }; ResponsiveBox.prototype.popView = function(data) { var lastView, view; if (data == null) { data = null; } debug("POP VIEW"); lastView = _.last(this.views); this.views.pop(); view = _.last(this.views); if (view) { this.getContent().html(view.el); return view.trigger(lastView.identifier() + "pop", data); } }; ResponsiveBox.prototype.disableFeedback = function() { var preventContainer, uibox; uibox = this.$('.ui-responsive-box'); preventContainer = $(document.createElement('div')); preventContainer.css('position', 'absolute'); preventContainer.css('width', '100%'); preventContainer.css('height', '100%'); preventContainer.css('left', '0px'); preventContainer.css('top', '0px'); preventContainer.css('backgroundColor', 'transparent'); preventContainer.css('z-index', '5000'); uibox.append(preventContainer); return setTimeout(function() { return preventContainer.remove(); }, 500); }; ResponsiveBox.prototype.hasMovableSidebar = function() { var uibox, uisidebar; uibox = this.$('.ui-responsive-box'); uisidebar = uibox.children('.sidebar'); if (uisidebar.css('z-index') !== '1000') { return false; } return true; }; ResponsiveBox.prototype.configureDisplayForSidebar = function(type) { var uibox; uibox = this.$('.ui-responsive-box'); if (!uibox) { return; } switch (type) { case "open": if (!uibox.hasClass('open')) { return uibox.addClass('open'); } break; case "close": if (uibox.hasClass('open')) { return uibox.removeClass('open'); } break; default: return uibox.toggleClass('open'); } }; ResponsiveBox.prototype.toggleSidebar = function(evt) { if (evt) { evt.preventDefault(); } if (!this.hasMovableSidebar()) { return; } this.disableFeedback(); return this.configureDisplayForSidebar("toggle"); }; ResponsiveBox.prototype.openSidebar = function(evt) { if (evt) { evt.preventDefault(); } if (!this.hasMovableSidebar()) { return; } this.disableFeedback(); return this.configureDisplayForSidebar("open"); }; ResponsiveBox.prototype.closeSidebar = function(evt) { if (evt) { evt.preventDefault(); } if (!this.hasMovableSidebar()) { return; } this.disableFeedback(); return this.configureDisplayForSidebar("close"); }; ResponsiveBox.prototype.render = function() { var small_navigation, that; ResponsiveBox.__super__.render.apply(this, arguments); $(document.body).addClass('ui-box-background'); this.sidebar_wrapper = $(document.createElement('div')); this.content_wrapper = $(document.createElement('div')); this.sidebar_wrapper.addClass("sidebar"); this.content_wrapper.addClass("content-area handle-sidebar"); small_navigation = $(document.createElement('div')); small_navigation.addClass('small-navigation'); small_navigation.html('
'); this.sidebar.setElement(this.sidebar_wrapper).render(); this.content.setElement(this.content_wrapper).render(); this.content_wrapper.append(small_navigation); this.$('.ui-responsive-box').append(this.sidebar_wrapper, this.content_wrapper); that = this; if (window.TOUCH_SUPPORT) { this.$('.toggle-sidebar').bind('touchstart', that.toggleSidebar); } else { this.$('.toggle-sidebar').bind('click', that.toggleSidebar); } return this; }; return ResponsiveBox; })(IuguUI.Base); this.IuguUI.ResponsiveBox = IuguUI.ResponsiveBox; }).call(this); ; TI"dependency_digest; F"%470a375431847d800730d951eba60262I"required_paths; F["/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/iugu-ux/components/usecode/iugu-ui-responsive-box.js.coffeeI"dependency_paths; F[{I" path; F"/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/iugu-ux/components/usecode/iugu-ui-responsive-box.js.coffeeI" mtime; FI"2013-07-10T19:25:36-03:00; FI"digest; F"%f2c19e6011d56b5abc387a5bfac28c2bI" _version; F"%6776f581a4329e299531e1d52aa59832