mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Re-added Requirements::clear() to ComplexTableField_Popup initialization to avoid including the dozens of javascript files required by CMSMain and LeftAndMain, they're not needed in a popup, and cause side-effects like missing scrollbars, weird CSS styling and generally slow loading time.
BUGFIX Removed overflow:autio CSS rule in ComplexTableField.css which was causing double scrollbars in a popup. This was a hack to work around <body style="overflow:hidden"> which was set by LeftAndMain.js - this file is no longer included in the popup HTML. BUGFIX Removed unnecessary requirements from ComplexTableField_Popup: LeftAndMain.js, LeftAndMain_right.js, TableField.js, ComplexTableField.js - they will be included by the fields if necessary git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@74904 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
2cb4b43320
commit
a869951638
@ -21,12 +21,6 @@
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
/* popup */
|
||||
.ComplexTableField_ItemRequest_Popup {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* table */
|
||||
.ComplexTableField {
|
||||
margin-bottom: 10px;
|
||||
|
@ -941,6 +941,7 @@ class ComplexTableField_Item extends TableListField_Item {
|
||||
*/
|
||||
class ComplexTableField_Popup extends Form {
|
||||
protected $sourceClass;
|
||||
|
||||
protected $dataObject;
|
||||
|
||||
function __construct($controller, $name, $fields, $validator, $readonly, $dataObject) {
|
||||
@ -950,7 +951,7 @@ class ComplexTableField_Popup extends Form {
|
||||
* WARNING: DO NOT CHANGE THE ORDER OF THESE JS FILES
|
||||
* Some have special requirements.
|
||||
*/
|
||||
//Requirements::css(CMS_DIR . '/css/layout.css');
|
||||
Requirements::clear();
|
||||
Requirements::css(SAPPHIRE_DIR . '/css/Form.css');
|
||||
Requirements::css(SAPPHIRE_DIR . '/css/ComplexTableField_popup.css');
|
||||
Requirements::css(CMS_DIR . '/css/typography.css');
|
||||
@ -962,10 +963,6 @@ class ComplexTableField_Popup extends Form {
|
||||
Requirements::javascript(THIRDPARTY_DIR . "/scriptaculous/controls.js");
|
||||
Requirements::javascript(THIRDPARTY_DIR . "/layout_helpers.js");
|
||||
Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
|
||||
Requirements::javascript(CMS_DIR . "/javascript/LeftAndMain.js");
|
||||
Requirements::javascript(CMS_DIR . "/javascript/LeftAndMain_right.js");
|
||||
Requirements::javascript(SAPPHIRE_DIR . "/javascript/TableField.js");
|
||||
Requirements::javascript(SAPPHIRE_DIR . "/javascript/ComplexTableField.js");
|
||||
Requirements::javascript(SAPPHIRE_DIR . "/javascript/ComplexTableField_popup.js");
|
||||
|
||||
if($this->dataObject->hasMethod('getRequirementsForPopup')) {
|
||||
|
Loading…
Reference in New Issue
Block a user