From 0062becea70392c4a21f3ef8367f65e93d2c1f67 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 29 Aug 2012 02:34:31 -0400
Subject: [PATCH] Merge branch 'master' of github.com:roundcube/roundcubemail
---
program/include/rcube_output_html.php | 31 ++++++++++++++++++++++++++++++-
1 files changed, 30 insertions(+), 1 deletions(-)
diff --git a/program/include/rcube_output_html.php b/program/include/rcube_output_html.php
index a071ee3..9600021 100644
--- a/program/include/rcube_output_html.php
+++ b/program/include/rcube_output_html.php
@@ -400,7 +400,7 @@
'line' => __LINE__,
'file' => __FILE__,
'message' => 'Error loading template for '.$realname
- ), true, true);
+ ), true, $write);
return false;
}
@@ -696,6 +696,11 @@
if ($attrib['name'] || $attrib['command']) {
return $this->button($attrib);
}
+ break;
+
+ // frame
+ case 'frame':
+ return $this->frame($attrib);
break;
// show a label
@@ -1275,6 +1280,30 @@
}
+ /**
+ * 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 ************** */
--
Gitblit v1.9.1