Sha256: 7db09625d0380d72354ed54d5ec7196a0d5aa8d17c10724c70f274ae2aca4662
Contents?: true
Size: 1.85 KB
Versions: 2
Compression:
Stored size: 1.85 KB
Contents
{I" class:ETI"BundledAsset; FI"logical_path; TI"mercury/history_buffer.js; FI" pathname; TI"Ž/home/edik/.rvm/gems/ruby-2.0.0-p247@very_simple_cms/bundler/gems/mercury-3e0245e33195/app/assets/javascripts/mercury/history_buffer.js.coffee; FI"content_type; TI"application/javascript; TI" mtime; Tl+½¡9RI"length; TiQI"digest; TI"%826e9233863b82d6d90759c16195b131; FI"source; TI"Q(function() { this.Mercury.HistoryBuffer = (function() { function HistoryBuffer(maxLength) { this.maxLength = maxLength != null ? maxLength : 200; this.index = 0; this.stack = []; this.markerRegExp = /<em class="mercury-marker"><\/em>/g; } HistoryBuffer.prototype.push = function(item) { if (jQuery.type(item) === 'string') { if (this.stack[this.index] && this.stack[this.index].replace(this.markerRegExp, '') === item.replace(this.markerRegExp, '')) { return; } } else if (jQuery.type(item) === 'object' && item.html) { if (this.stack[this.index] && this.stack[this.index].html === item.html) { return; } } this.stack = this.stack.slice(0, this.index + 1); this.stack.push(item); if (this.stack.length > this.maxLength) { this.stack.shift(); } return this.index = this.stack.length - 1; }; HistoryBuffer.prototype.undo = function() { if (this.index < 1) { return null; } this.index -= 1; return this.stack[this.index]; }; HistoryBuffer.prototype.redo = function() { if (this.index >= this.stack.length - 1) { return null; } this.index += 1; return this.stack[this.index]; }; return HistoryBuffer; })(); }).call(this); ; TI"required_assets_digest; TI"%9981920759714726ce2a76557b4ebeb0; FI" _version; TI"%2cf3622cbba861b85d33ffabfa420c13; F
Version data entries
2 entries across 1 versions & 1 rubygems