diff --git a/css/layout.css b/css/layout.css index ee77909b..0b2bd9b4 100644 --- a/css/layout.css +++ b/css/layout.css @@ -112,7 +112,7 @@ input.hidden { } /* Overrides - TODO Find a better place to put them */ -form#Form_EditForm fieldset { +form#Form_EditForm fieldset, form#Form_AddForm fieldset { height: 100%; border: none; } diff --git a/javascript/LeftAndMain.js b/javascript/LeftAndMain.js index d2e54c6d..407ffb10 100644 --- a/javascript/LeftAndMain.js +++ b/javascript/LeftAndMain.js @@ -126,6 +126,7 @@ Behaviour.register({ window.ontabschanged = function() { var formEl = $('Form_EditForm'); + if( !formEl ) formEl = $('Form_AddForm'); if( !formEl ) return; @@ -156,7 +157,7 @@ window.onresize = function(init) { if(typeof fitToParent == 'function') { fitToParent('right', 12); if($('ModelAdminPanel')) { - fitToParent('ModelAdminPanel',-30); + fitToParent('ModelAdminPanel',-60); } if($('contentPanel')) { fitToParent('contentPanel', 12); @@ -175,7 +176,9 @@ window.onresize = function(init) { } if(typeof fitToParent == 'function') { - fitToParent('Form_EditForm', 4); + if($('Form_EditForm')) fitToParent('Form_EditForm', 4); + if($('Form_AddForm')) fitToParent('Form_AddForm', 4); + if($('Form_EditorToolbarImageForm') && $('Form_EditorToolbarImageForm').style.display == "block") { fitToParent('Form_EditorToolbarImageForm', 5); fitToParent($('Form_EditorToolbarImageForm').getElementsByTagName('fieldset')[0]); diff --git a/javascript/ModelAdmin.js b/javascript/ModelAdmin.js index eff950b0..659bfdba 100644 --- a/javascript/ModelAdmin.js +++ b/javascript/ModelAdmin.js @@ -82,6 +82,8 @@ $(document).ready(function() { * to the response table, excluding the import form because * file ($_FILES) submission doesn't work using AJAX * + * Note: This is used for Form_CreateForm too + * * @todo use livequery to manage ResultTable click handlers */ $('#SearchForm_holder .tab form:not(#Form_ImportForm)').submit(function () { @@ -98,6 +100,8 @@ $(document).ready(function() { $('#form_actions_right').remove(); Behaviour.apply(); + console.log(window.onresize); + if(window.onresize) window.onresize(); // Remove the loading indicators from the buttons $('input[type=submit]', $form).removeClass('loading'); }, @@ -204,6 +208,7 @@ $(document).ready(function() { // TODO/SAM: It seems a bit of a hack to have to list all the little updaters here. // Is livequery a solution? Behaviour.apply(); // refreshes ComplexTableField + if(window.onresize) window.onresize(); }, 'html'); return false;