o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1355470625.383331:@value"ô{I" class:EFI"BundledAsset; FI"logical_path; FI"mercury/region.js; FI" pathname; FI"x/Users/brownjohn/.rvm/gems/ruby-1.9.3-p194/gems/mercury-rails-0.8.0/app/assets/javascripts/mercury/region.js.coffee; FI"content_type; FI"application/javascript; FI" mtime; FI"2012-08-08T16:13:36+08:00; FI"length; FiúI"digest; F"%c98a9d12a63668f88a59997f67ec8d17I"source; FI"ú(function() { this.Mercury.Region = (function() { function Region(element, window, options) { this.element = element; this.window = window; this.options = options != null ? options : {}; Mercury.log("building " + (this.type()), this.element, this.options); this.document = this.window.document; this.name = this.element.attr(Mercury.config.regions.identifier); this.history = new Mercury.HistoryBuffer(); this.build(); this.bindEvents(); this.pushHistory(); this.element.data('region', this); } Region.prototype.type = function() { return 'unknown'; }; Region.prototype.build = function() {}; Region.prototype.focus = function() {}; Region.prototype.bindEvents = function() { var _this = this; Mercury.on('mode', function(event, options) { if (options.mode === 'preview') { return _this.togglePreview(); } }); Mercury.on('focus:frame', function() { if (_this.previewing || Mercury.region !== _this) { return; } return _this.focus(); }); Mercury.on('action', function(event, options) { if (_this.previewing || Mercury.region !== _this) { return; } if (options.action) { return _this.execCommand(options.action, options); } }); this.element.on('mousemove', function(event) { var snippet; if (_this.previewing || Mercury.region !== _this) { return; } snippet = jQuery(event.target).closest('[data-snippet]'); if (snippet.length) { _this.snippet = snippet; if (_this.snippet.data('snippet')) { return Mercury.trigger('show:toolbar', { type: 'snippet', snippet: _this.snippet }); } } }); return this.element.on('mouseout', function() { if (_this.previewing) { return; } return Mercury.trigger('hide:toolbar', { type: 'snippet', immediately: false }); }); }; Region.prototype.content = function(value, filterSnippets) { var container, snippet, _i, _len, _ref; if (value == null) { value = null; } if (filterSnippets == null) { filterSnippets = false; } if (value !== null) { return this.element.html(value); } else { container = jQuery('