fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3b9b115
)
Fix in the print button.
author
Łukasz Rekucki
<lrekucki@gmail.com>
Mon, 5 Oct 2009 11:24:02 +0000
(13:24 +0200)
committer
Łukasz Rekucki
<lrekucki@gmail.com>
Mon, 5 Oct 2009 11:24:02 +0000
(13:24 +0200)
project/static/js/views/html.js
patch
|
blob
|
history
diff --git
a/project/static/js/views/html.js
b/project/static/js/views/html.js
index
4dc3d54
..
a8eb4d0
100644
(file)
--- a/
project/static/js/views/html.js
+++ b/
project/static/js/views/html.js
@@
-20,6
+20,9
@@
var HTMLView = View.extend({
modelDataChanged: function(property, value) {
$('.htmlview', this.element).html(value);
modelDataChanged: function(property, value) {
$('.htmlview', this.element).html(value);
+
+ var base = this.$printLink.attr('ui:baseref');
+ this.$printLink.attr('href', base + "?revision=" + this.model.get('revision'));
},
modelStateChanged: function(property, value) {
},
modelStateChanged: function(property, value) {
@@
-38,21
+41,9
@@
var HTMLView = View.extend({
render: function() {
render: function() {
- $('.html-print-link', this.element).unbind();
-
+ if(this.$printLink) this.$printLink.unbind();
this._super();
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;
+ this.$printLink = $('.html-print-link', this.element);
},
reload: function() {
},
reload: function() {