summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-08-28 12:59:29 +0200
committerAleksander Machniak <alec@alec.pl>2012-08-28 12:59:29 +0200
commitb7d33e35186d47dcd3609e1ef97cdb011c6f82f6 (patch)
tree552c8863b45e1a77759f8a21c6781f5d0174b3d6 /program/include
parent397cf794b975e8128a6d155957229106cd065d0c (diff)
Added template object 'frame'
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_output_html.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/program/include/rcube_output_html.php b/program/include/rcube_output_html.php
index 00378d7d2..960002112 100644
--- a/program/include/rcube_output_html.php
+++ b/program/include/rcube_output_html.php
@@ -698,6 +698,11 @@ class rcube_output_html extends rcube_output
}
break;
+ // frame
+ case 'frame':
+ return $this->frame($attrib);
+ break;
+
// show a label
case 'label':
if ($attrib['name'] || $attrib['command']) {
@@ -1275,6 +1280,30 @@ class rcube_output_html extends rcube_output
}
+ /**
+ * Returns iframe object, registers some related env variables
+ *
+ * @param array $attrib HTML attributes
+ *
+ * @return string IFRAME element
+ */
+ public function frame($attrib)
+ {
+ if (!$attrib['id']) {
+ $attrib['id'] = 'rcmframe';
+ }
+
+ if (!$attrib['name']) {
+ $attrib['name'] = $attrib['id'];
+ }
+
+ $this->set_env('contentframe', $attrib['name']);
+ $this->set_env('blankpage', $attrib['src'] ? $this->abs_url($attrib['src']) : 'program/resources/blank.gif');
+
+ return html::iframe($attrib);
+ }
+
+
/* ************* common functions delivering gui objects ************** */