mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUGFIX: Fixed tab layout for add form of model admin
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@76841 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
e99ef98e89
commit
1a1229cd96
@ -112,7 +112,7 @@ input.hidden {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Overrides - TODO Find a better place to put them */
|
/* Overrides - TODO Find a better place to put them */
|
||||||
form#Form_EditForm fieldset {
|
form#Form_EditForm fieldset, form#Form_AddForm fieldset {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
@ -126,6 +126,7 @@ Behaviour.register({
|
|||||||
|
|
||||||
window.ontabschanged = function() {
|
window.ontabschanged = function() {
|
||||||
var formEl = $('Form_EditForm');
|
var formEl = $('Form_EditForm');
|
||||||
|
if( !formEl ) formEl = $('Form_AddForm');
|
||||||
|
|
||||||
if( !formEl )
|
if( !formEl )
|
||||||
return;
|
return;
|
||||||
@ -156,7 +157,7 @@ window.onresize = function(init) {
|
|||||||
if(typeof fitToParent == 'function') {
|
if(typeof fitToParent == 'function') {
|
||||||
fitToParent('right', 12);
|
fitToParent('right', 12);
|
||||||
if($('ModelAdminPanel')) {
|
if($('ModelAdminPanel')) {
|
||||||
fitToParent('ModelAdminPanel',-30);
|
fitToParent('ModelAdminPanel',-60);
|
||||||
}
|
}
|
||||||
if($('contentPanel')) {
|
if($('contentPanel')) {
|
||||||
fitToParent('contentPanel', 12);
|
fitToParent('contentPanel', 12);
|
||||||
@ -175,7 +176,9 @@ window.onresize = function(init) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(typeof fitToParent == 'function') {
|
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") {
|
if($('Form_EditorToolbarImageForm') && $('Form_EditorToolbarImageForm').style.display == "block") {
|
||||||
fitToParent('Form_EditorToolbarImageForm', 5);
|
fitToParent('Form_EditorToolbarImageForm', 5);
|
||||||
fitToParent($('Form_EditorToolbarImageForm').getElementsByTagName('fieldset')[0]);
|
fitToParent($('Form_EditorToolbarImageForm').getElementsByTagName('fieldset')[0]);
|
||||||
|
@ -82,6 +82,8 @@ $(document).ready(function() {
|
|||||||
* to the response table, excluding the import form because
|
* to the response table, excluding the import form because
|
||||||
* file ($_FILES) submission doesn't work using AJAX
|
* file ($_FILES) submission doesn't work using AJAX
|
||||||
*
|
*
|
||||||
|
* Note: This is used for Form_CreateForm too
|
||||||
|
*
|
||||||
* @todo use livequery to manage ResultTable click handlers
|
* @todo use livequery to manage ResultTable click handlers
|
||||||
*/
|
*/
|
||||||
$('#SearchForm_holder .tab form:not(#Form_ImportForm)').submit(function () {
|
$('#SearchForm_holder .tab form:not(#Form_ImportForm)').submit(function () {
|
||||||
@ -98,6 +100,8 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
$('#form_actions_right').remove();
|
$('#form_actions_right').remove();
|
||||||
Behaviour.apply();
|
Behaviour.apply();
|
||||||
|
console.log(window.onresize);
|
||||||
|
if(window.onresize) window.onresize();
|
||||||
// Remove the loading indicators from the buttons
|
// Remove the loading indicators from the buttons
|
||||||
$('input[type=submit]', $form).removeClass('loading');
|
$('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.
|
// TODO/SAM: It seems a bit of a hack to have to list all the little updaters here.
|
||||||
// Is livequery a solution?
|
// Is livequery a solution?
|
||||||
Behaviour.apply(); // refreshes ComplexTableField
|
Behaviour.apply(); // refreshes ComplexTableField
|
||||||
|
if(window.onresize) window.onresize();
|
||||||
}, 'html');
|
}, 'html');
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user