/** * File: LeftAndMain.EditForm.js */ (function($) { // Can't bind this through jQuery window.onbeforeunload = function(e) { var form = $('.cms-edit-form'); form.trigger('beforesubmitform'); 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. * * Change tracking is enabled on all fields within the form. If you want * to disable change tracking for a specific field, add a "no-change-track" * class to it. * * @name ss.Form_EditForm * @require jquery.changetracker * * Events: * ajaxsubmit - Form is about to be submitted through ajax * validate - Contains validation result * 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