{I" class:ETI"ProcessedAsset;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>/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"dependency_digest;TI"%9981920759714726ce2a76557b4ebeb0;FI"required_paths;T[I"Ž/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"dependency_paths;T[{I" path;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" mtime;TI"2013-09-18T16:51:09+04:00;TI" digest;TI"%02b5b956831da750f0af40d84d82e3fc;FI" _version;TI"%2cf3622cbba861b85d33ffabfa420c13;F