vendor/assets/javascripts/bhf/classes/AjaxEdit.js in bhf-0.6.2 vs vendor/assets/javascripts/bhf/classes/AjaxEdit.js in bhf-0.6.3
- old
+ new
@@ -5,23 +5,15 @@
holderParent: document.body
},
Implements: [Options, Events],
- holder: new Element('div.quick_edit_holder'),
-
setup: function(_options) {
this.setOptions(_options);
- this.holder
- .removeEvents('click:relay(.open)')
- .removeEvents('click:relay(.cancel)')
- .removeEvents('click:relay(.save_and_next)')
- .removeEvents('click:relay(.save)')
- .removeEvents('submit:relay(form)')
- .addEvents({
+ this.holder = new Element('div.quick_edit_holder').addEvents({
'click:relay(.open)': function(e){
e.preventDefault();
- location.href = (this.wrapElement.getElement('a') || this.wrapElement).get('href');
+ Turbolinks.visit((this.wrapElement.getElement('a') || this.wrapElement).get('href'));
}.bind(this),
'click:relay(.cancel)': function(e){
e.preventDefault();
this.close();
}.bind(this),
\ No newline at end of file