o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1371506014.38711: @value"Ü{I" class:ETI"ProcessedAsset;FI"logical_path;TI"flms/admin/modularity.js;FI" pathname;TI"T/Users/maxwell/Desktop/flms/app/assets/javascripts/flms/admin/modularity.coffee;FI"content_type;TI"application/javascript;TI" mtime;TI"2013-06-17T14:52:19-07:00;TI" length;Ti>I" digest;TI"%2750f2558b308c209a2db2f09a7284d7;FI" source;TI">(function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __slice = [].slice; this.modularity = { assert: function(condition, message) { if (!condition || (condition != null ? condition.length : void 0) === 0) { alert(message); return false; } return true; }, bind_global_event: function(event_type, callback) { if (!modularity.assert(typeof event_type === 'string', "modularity.bind_global_event: parameter 'event_type' is empty")) { return; } if (typeof callback !== 'function') { return alert("modularity.bind_global_event: parameter 'callback' must be a function, " + callback + " (" + (typeof callback) + ") given."); } return modularity.global_event_container().bind(event_type, callback); }, fire_global_event: function(event_type, data) { modularity.assert(event_type, 'Module.fire_global_event: You must provide the event type to fire.'); if (typeof event_type !== 'string') { return alert("Module.fire_global_event: Event type must be a string, " + event_type + " (" + (typeof event_type) + ") given."); } return modularity.global_event_container().trigger(event_type, data != null ? data : data = []); }, global_event_container: function() { return modularity.global_event_container_cache || (modularity.global_event_container_cache = $(window)); } }; this.modularity.bindGlobalEvent = this.modularity.bind_global_event; this.modularity.fireGlobalEvent = this.modularity.fire_global_event; this.modularity.Module = (function() { function Module(container) { this.trigger = __bind(this.trigger, this); this.on = __bind(this.on, this); var method, methodName, mixin_data, _fn, _i, _len, _ref, _ref1, _ref2, _ref3, _this = this; if ((typeof container === 'string') && container !== 'testing') { container = $(container); } this.container = container; if (this.container == null) { return alert('Error in Module constructor: No container given.'); } if (container !== 'testing') { if (typeof container.jquery !== 'string') { return alert('Error in Module constructor: The given container must be a jQuery object.'); } if (!((container != null) && container.length > 0)) { return alert("Error in Module constructor: The given container ('" + container.selector + "') is empty."); } if (!((container != null) && container.length === 1)) { return alert("Error in Module constructor: The given container ('" + container.selector + "') has more than one element."); } } if (this.mixins != null) { _ref = this.mixins; for (_i = 0, _len = _ref.length; _i < _len; _i++) { mixin_data = _ref[_i]; _ref1 = mixin_data.mixin; _fn = function(methodName, method) { if (!_this[methodName]) { return _this[methodName] = function() { return method.apply(_this, arguments); }; } }; for (methodName in _ref1) { method = _ref1[methodName]; _fn(methodName, method); } if ((_ref2 = mixin_data.mixin) != null) { if ((_ref3 = _ref2.constructor) != null) { _ref3.apply(this, arguments); } } } } } Module.prototype.$ = function(query) { return this.container.find(query); }; Module.prototype.autobind = function() { var callback, element, event_name, field, my_callbacks, my_fields, _i, _j, _len, _len1; my_fields = []; my_callbacks = []; for (element in this) { switch (typeof this[element]) { case 'object': my_fields.push(element); break; case 'function': if (modularity.string_starts_with(element, 'on_')) { my_callbacks.push(element); } } } for (_i = 0, _len = my_fields.length; _i < _len; _i++) { field = my_fields[_i]; for (_j = 0, _len1 = my_callbacks.length; _j < _len1; _j++) { callback = my_callbacks[_j]; if (modularity.string_starts_with(callback, "on_" + field + "_")) { event_name = callback.substring(4 + field.length); this[field].on(event_name, this[callback]); } } } return false; }; Module.prototype.on = function(event_type, callback) { if (!modularity.assert(typeof event_type === 'string', "Module.bind_event: parameter 'event_type' is empty")) { return; } if (typeof callback !== 'function') { return alert("Module.bind_event: parameter 'callback' must be a function, " + callback + " (" + (typeof callback) + ") given."); } return this.container.bind(event_type, callback); }; Module.prototype.bindEvent = Module.prototype.bind_event; Module.prototype.bind_event = Module.prototype.bind_event; Module.prototype.trigger = function(event_type, data) { modularity.assert(event_type, 'Module.fire_event: You must provide the event type to fire.'); if (typeof event_type !== 'string') { return alert("Module.fire_event: Event type must be a string, " + event_type + " (" + (typeof event_type) + ") given."); } return this.container.trigger(event_type, data != null ? data : data = {}); }; Module.prototype.fireEvent = Module.prototype.fire_event; Module.prototype.fire_event = Module.prototype.fire_event; Module.prototype.hide = function() { this.container.hide(); return this.container.trigger('hide'); }; Module.mixin = function() { var mixin, p, _base; mixin = arguments[0], p = 2 <= arguments.length ? __slice.call(arguments, 1) : []; if (!mixin) { alert("mixin not found"); } (_base = this.prototype).mixins || (_base.mixins = []); return this.prototype.mixins.push({ mixin: mixin, params: p }); }; Module.prototype.show = function() { this.container.show(); return this.container.trigger('show'); }; Module.prototype.visible = function() { return this.container.is(':visible'); }; return Module; })(); }).call(this); ;TI"dependency_digest;TI"%339f210db5424bd90a981653dfacf302;FI"required_paths;T[I"i/Users/maxwell/.rvm/gems/ruby-2.0.0-p195/gems/jquery-rails-3.0.1/vendor/assets/javascripts/jquery.js;FI"T/Users/maxwell/Desktop/flms/app/assets/javascripts/flms/admin/modularity.coffee;FI"\/Users/maxwell/Desktop/flms/app/assets/javascripts/flms/admin/tools/string_tools.coffee;FI"dependency_paths;T[{I" path;TI"T/Users/maxwell/Desktop/flms/app/assets/javascripts/flms/admin/modularity.coffee;FI" mtime;TI"2013-06-17T14:52:19-07:00;TI" digest;TI"%38ca5de34dddee023347271a2c332aaa;F{I" path;TI"i/Users/maxwell/.rvm/gems/ruby-2.0.0-p195/gems/jquery-rails-3.0.1/vendor/assets/javascripts/jquery.js;FI" mtime;TI"2013-06-17T11:01:44-07:00;TI" digest;TI"%c8718773fc6322e89d7284ce7b3d66be;F{I" path;TI"\/Users/maxwell/Desktop/flms/app/assets/javascripts/flms/admin/tools/string_tools.coffee;FI" mtime;TI"2013-05-27T20:29:36-07:00;TI" digest;TI"%f74db47507eab6d91805cba8c05d10e2;FI" _version;TI"%ffd318ca8b794f42f5029101c2cf5d91;F