ENHANCEMENT: Improved look and feel for report filtering

ENHANCEMNT: Added export and print buttons to reports (from r95815)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@98173 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-02-04 04:47:18 +00:00
parent c05cdf8dc1
commit 0782c0de4d
4 changed files with 25 additions and 4 deletions

View File

@ -214,6 +214,7 @@ class ReportAdmin extends LeftAndMain {
}
$form->setFormAction($this->Link() . '/EditForm?' . http_build_query($filteredCriteria));
$form->setTemplate('ReportAdminForm');
return $form;
}
@ -240,8 +241,7 @@ class ReportAdmin extends LeftAndMain {
}
public function updatereport() {
FormResponse::load_form($this->EditForm()->renderWith('Form'));
FormResponse::add("$('tab-Root_Report').onclick();");
FormResponse::load_form($this->EditForm()->forTemplate());
return FormResponse::respond();
}
}

View File

@ -233,6 +233,19 @@
clear: left;
}
/**
* Non-tabbed scrolling area that can be used in place of tabs in LeftAndMAin
*/
.right #ScrollPanel {
background: #fff;
clear: left;
overflow: auto;
border: 1px solid #aaa;
position: relative;
top: 0;
padding: 10px;
}
/**
* RHS Action Parameters boxes
*/

View File

@ -156,6 +156,11 @@ window.ontabschanged = function() {
fitToParent(_TAB_DIVS_ON_PAGE[i], 30);
}
}
// Non-tab alternative
if($('ScrollPanel')) {
fitToParent('ScrollPanel', 0);
}
}
window.onresize = function(init) {

View File

@ -11,6 +11,10 @@ Behaviour.register({
*/
prepareForm : function() {
ajaxActionsAtTop('Form_EditForm', 'form_actions', 'right');
// Custom code for reports section - link the search button to ajax
var updateReportButtonHolder = $('action_updatereport');
if(updateReportButtonHolder) prepareAjaxActions(updateReportButtonHolder, 'Form_EditForm');
},
/**
@ -107,7 +111,6 @@ Behaviour.register({
this.resetElements();
window.ontabschanged();
}
}
});
});