(function($) {
/**
* @class Base edit form, provides ajaxified saving
* and reloading itself through the ajax return values.
* Takes care of resizing tabsets within the layout container.
* @name ss.Form_EditForm
* @require jquery.changetracker
*
*
Events
* - ajaxsubmit: Form is about to be submitted through ajax
* - validate: Contains validation result
* - removeform: A form is about to be removed from the DOM
* - load: Form is about to be loaded through ajax
*/
$('#Form_EditForm').concrete('ss',function($){
return/** @lends ss.Form_EditForm */{
/**
* @type String HTML text to show when the form has been deleted.
* @todo i18n
*/
RemoveText: 'Removed',
/**
* @type Object
*/
ChangeTrackerOptions: {},
onmatch: function() {
var self = this;
this._setupChangeTracker();
// Can't bind this through jQuery
window.onbeforeunload = function(e) {return self._checkChangeTracker(false);};
$._super();
},
_setupChangeTracker: function() {
// Don't bind any events here, as we dont replace the
// full