X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/d0cbddd54807e6e43f2ab75bd234ddc0beaa8d86..333700b34cb944ab49d1c9243f7193d50d25ebd1:/project/static/js/views/html.js 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);