Skip to content

Commit

Permalink
Merged from trunk
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@77326 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
ajoneil authored and Sam Minnee committed Feb 2, 2011
1 parent 03aa331 commit 1f3b3f4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion css/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
7 changes: 5 additions & 2 deletions javascript/LeftAndMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ Behaviour.register({

window.ontabschanged = function() {
var formEl = $('Form_EditForm');
if( !formEl ) formEl = $('Form_AddForm');

if( !formEl )
return;
Expand Down Expand Up @@ -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);
Expand All @@ -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]);
Expand Down
9 changes: 7 additions & 2 deletions javascript/ModelAdmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,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 () {
Expand All @@ -90,6 +92,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');
},
Expand Down Expand Up @@ -192,7 +196,8 @@ $(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;
});
Expand Down Expand Up @@ -375,4 +380,4 @@ function prepareAjaxActions(actions, formName, tabName) {
// @todo HACK Overwrites LeftAndMain.js version of this method to avoid double form actions
// (by new jQuery and legacy prototype)
return false;
}
}

0 comments on commit 1f3b3f4

Please sign in to comment.