mirror of
https://github.com/silverstripe/silverstripe-iframe
synced 2024-10-22 09:05:51 +00:00
Disable dynamic height for now, until i can get it working
This commit is contained in:
parent
0f2de8f7ed
commit
04e5b3fc22
@ -12,7 +12,7 @@ class IFramePage extends Page {
|
|||||||
|
|
||||||
$fields->removeFieldFromTab('Root.Content.Main', 'Content');
|
$fields->removeFieldFromTab('Root.Content.Main', 'Content');
|
||||||
$fields->addFieldToTab('Root.Content.Main', new TextField('IFrameUrl', 'IFrame URL'));
|
$fields->addFieldToTab('Root.Content.Main', new TextField('IFrameUrl', 'IFrame URL'));
|
||||||
$fields->addFieldToTab('Root.Content.Main', new CheckboxField('DynamicHeight', 'Dynamically resize the IFrame height (this doesn\'t work if IFrame URL is on a different domain)'));
|
//$fields->addFieldToTab('Root.Content.Main', new CheckboxField('DynamicHeight', 'Dynamically resize the IFrame height (this doesn\'t work if IFrame URL is on a different domain)'));
|
||||||
$fields->addFieldToTab('Root.Content.Main', new NumericField('FixedHeight', 'Fixed Height (in pixels)'));
|
$fields->addFieldToTab('Root.Content.Main', new NumericField('FixedHeight', 'Fixed Height (in pixels)'));
|
||||||
$fields->addFieldToTab('Root.Content.Main', new HtmlEditorField('Content', 'Alternate Content'));
|
$fields->addFieldToTab('Root.Content.Main', new HtmlEditorField('Content', 'Alternate Content'));
|
||||||
|
|
||||||
@ -22,11 +22,11 @@ class IFramePage extends Page {
|
|||||||
|
|
||||||
class IFramePage_Controller extends Page_Controller {
|
class IFramePage_Controller extends Page_Controller {
|
||||||
function Height() {
|
function Height() {
|
||||||
if($this->DynamicHeight) {
|
/*if($this->DynamicHeight) {
|
||||||
return 'class="iframeautosize"';
|
return 'class="iframeautosize"';
|
||||||
} else {
|
} else {*/
|
||||||
return 'style="height: ' . $this->FixedHeight . 'px;"';
|
return 'style="height: ' . $this->FixedHeight . 'px;"';
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user