/** * File: LeftAndMain.EditForm.js */ (function($) { // Can't bind this through jQuery window.onbeforeunload = function(e) { var form = $('.cms-edit-form'); form.trigger('beforesave'); if(form.is('.changed')) return ss.i18n._t('LeftAndMain.CONFIRMUNSAVEDSHORT'); }; $.entwine('ss', function($){ /** * Class: .cms-edit-form * * 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 */ $('.cms-edit-form').entwine(/** @lends ss.Form_EditForm */{ /** * Variable: PlaceholderHtml * (String_ HTML text to show when no form content is chosen. * Will show inside the