Skip to content
Snippets Groups Projects
Commit 94085b15 authored by Shane Tomlinson's avatar Shane Tomlinson
Browse files

Now the cancel/back buttons work correctly

parent 0bfbb034
No related branches found
No related tags found
No related merge requests found
......@@ -17,11 +17,15 @@
this.renderTemplates(bodyTemplate, bodyVars, footerTemplate, footerVars);
$("form").bind("submit", this.onSubmit.bind(this));
$("#cancel").click(this.onCancel.bind(this));
$("#back").click(this.onBack.bind(this));
},
destroy: function() {
$("form").unbind("submit");
$("input").unbind("keyup");
$("#cancel").unbind("click");
$("#back").unbind("click");
this._super();
},
......@@ -81,16 +85,17 @@
$("#error_dialog").fadeIn(500);
},
"#cancel click": function() {
onCancel: function(event) {
event.preventDefault();
event.stopPropagation();
this.close("cancel");
},
"#back click": function(event) {
onBack: function(event) {
event.preventDefault();
event.stopPropagation();
this.close("start");
}
});
}());
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment