X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/8132fc186eb0c5fd02c86828c3a4735754296d02..5913c54d19b8f6775633176032161d49f9b2f1aa:/src/redakcja/static/js/wiki/view_column_diff.js?ds=sidebyside diff --git a/src/redakcja/static/js/wiki/view_column_diff.js b/src/redakcja/static/js/wiki/view_column_diff.js new file mode 100644 index 00000000..33ffb6a0 --- /dev/null +++ b/src/redakcja/static/js/wiki/view_column_diff.js @@ -0,0 +1,35 @@ +(function($){ + + function DiffPerspective(options) { + var old_callback = options.callback || function() {}; + var self = this; + + options.callback = function(){ + self.base_id = options.base_id; + old_callback.call(this); + }; + + $.wiki.Perspective.call(this, options); + }; + + DiffPerspective.prototype = new $.wiki.Perspective(); + + DiffPerspective.prototype.freezeState = function(){ + // must + }; + + DiffPerspective.prototype.destroy = function() { + $.wiki.switchToTab('#HistoryPerspective'); + $('#' + this.base_id).remove(); + $('#' + this.perspective_id).remove(); + }; + + DiffPerspective.prototype.onEnter = function(success, failure){ + $.wiki.Perspective.prototype.onEnter.call(this); + console.log("Entered diff view"); + }; + + $.wiki.DiffPerspective = DiffPerspective; + +})(jQuery); +