X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/9a96182c20b31868159f4ddd25bbb46abc4173e3..333700b34cb944ab49d1c9243f7193d50d25ebd1:/project/static/js/views/html.js?ds=sidebyside diff --git a/project/static/js/views/html.js b/project/static/js/views/html.js index a7f02dd4..4dc3d544 100644 --- a/project/static/js/views/html.js +++ b/project/static/js/views/html.js @@ -35,6 +35,25 @@ var HTMLView = View.extend({ this.freeze(this.model.get('error')); } }, + + + render: function() { + $('.html-print-link', this.element).unbind(); + + this._super(); + + $('.html-print-link', this.element).mouseover( + this.printView.bind(this) + ); + }, + + + printView: function(event) { + var base = $(event.target).attr('ui:baseref'); + $(event.target).attr('href', base + "?revision=" + this.model.get('revision') ); + + return true; + }, reload: function() { this.model.load(true);