Disable dynamic height for now, until i can get it working

This commit is contained in:
Andrew O'Neil 2009-03-03 05:41:44 +00:00
parent 0f2de8f7ed
commit 04e5b3fc22

View File

@ -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;"';
} //}
} }
} }