Commit c42dfd72 authored by bbaer's avatar bbaer
Browse files

External save buttons now work. Use class: external-save and set data-target to the URL

parent b84c83dd
......@@ -96,6 +96,12 @@ var QfqNS = QfqNS || {};
this.getNewButton().click(this.handleNewClick.bind(this));
this.getDeleteButton().click(this.handleDeleteClick.bind(this));
var that = this;
$('.external-save').click(function(e) {
var uri = $(this).data('target');
that.callSave(uri);
});
this.setupFormUpdateHandler();
if (!!$('#' + QfqNS.escapeJqueryIdSelector(this.formId)).data('disable-return-key-submit')) {
// Nothing to do
......@@ -524,6 +530,7 @@ var QfqNS = QfqNS || {};
};
n.QfqForm.prototype.callSave = function(uri) {
console.log("target: " + uri);
this.handleSaveClick();
this.goToAfterSave = uri;
};
......@@ -830,6 +837,7 @@ var QfqNS = QfqNS || {};
};
/**
* @private
*/
......@@ -961,6 +969,7 @@ var QfqNS = QfqNS || {};
}
if (this.goToAfterSave) {
console.log("Called goToAfterSave = " + this.goToAfterSave);
window.location = this.goToAfterSave;
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment