<body <?php echo $body_tag_js; ?>>
<?php
- /** if preview pane turned on, do not show menubar above message view */
- global $data_dir, $username, $PHP_SELF;
+ /** if preview pane turned on, do not show menubar above message */
+ global $data_dir, $username, $pp_skip_menubar;
$use_previewPane = getPref($data_dir, $username, 'use_previewPane', 0);
$show_preview_pane = checkForJavascript() && $use_previewPane;
- $current_page_is_read_body = (strpos($PHP_SELF, '/read_body.php') !== FALSE);
- if (!$current_page_is_read_body || !$show_preview_pane) {
+ $current_page_is_read_body = (defined('PAGE_NAME') && 'PAGE_NAME' == 'read_body');
+ if (!$pp_skip_menubar && (!$current_page_is_read_body || !$show_preview_pane)) {
+// Note: If we want to hide menubar on compose screen, we could do the following,
+// but the compose screen when in the message list frame should not have the menubar
+// hidden... which would require some javascript to detect the current frame name
+// and then use document.write() to output the menubar if needed... and we'll
+// leave that for some other time
+//- if (!$pp_skip_menubar && (!$current_page_is_read_body || !$show_preview_pane)) {
+//+ $current_page_is_compose = (defined('PAGE_NAME') && 'PAGE_NAME' == 'compose');
+//+ if (!$pp_skip_menubar
+//+ && ((!$current_page_is_read_body && !$current_page_is_compose)
+//+ || !$show_preview_pane)) {
?>
<div id="page_header">
</td>
</tr>
<tr>
- <td class="sqm_topNavigation"<?php echo ($hide_sm_attributions ? ' colspan="2"' : ''); ?>>
+ <td class="sqm_topNavigation">
<?php echo $compose_link; ?>
<?php echo $address_link; ?>
<?php echo $folders_link; ?>
<?php echo $options_link; ?>
<?php echo $search_link; ?>
<?php echo $help_link; ?>
- <?php /* FIXME: no hooks in templates!! */ global $null; do_hook('menuline', $null); ?>
+ <?php if (!empty($plugin_output['menuline'])) echo $plugin_output['menuline']; ?>
+ </td>
+ <td class="sqm_providerInfo">
+ <?php
+ if (!empty($plugin_output['provider_link_before']))
+ echo $plugin_output['provider_link_before'];
+ if (!empty($provider_link))
+ echo $provider_link;
+ if (!empty($plugin_output['provider_link_after']))
+ echo $plugin_output['provider_link_after'];
+ ?>
</td>
- <?php if (!empty($sm_attribute_str))
- echo '<td class="sqm_providerInfo">'
- . $sm_attribute_str
- . "</td>\n"; ?>
</tr>
</table>
</div>
<br />
<!-- End Header Navigation Table -->
-<script type="text/javascript">
+<?php
+ }
+
+ // now, some generic javascript for use with preview pane
+
+?>
+<script type="text/javascript" language="JavaScript">
<!--
var delayed_page_load_uri = '';
function delayed_page_load(page_uri)
- { page_load_uri = page_uri; setTimeout('page_load()', 500); }
+ { delayed_page_load_uri = page_uri; setTimeout('page_load()', 500); }
function page_load()
- { document.location = page_load_uri; }
+ { document.location = delayed_page_load_uri; }
+ function refresh_message_list()
+ {
+<?php if (!empty($message_list_href)) { ?>
+ if (typeof(parent.right.delayed_page_load) != 'undefined')
+ parent.right.delayed_page_load("<?php echo $message_list_href; ?>");
+<?php } ?>
+ }
+<?php
+
+ // autohide the preview pane if desired when not viewing messages,
+ // also maximize any frame with a compose screen in it
+ if ($show_preview_pane
+ && getPref($data_dir, $username, 'previewPane_autohide', 0) == 1)
+ {
+ $previewPane_vertical_split = getPref($data_dir, $username, 'previewPane_vertical_split', 0);
+ if ($previewPane_vertical_split)
+ $orientation = 'cols';
+ else
+ $orientation = 'rows';
+
+ // spit out javascript to maximize compose frame
+ if (defined('PAGE_NAME') && PAGE_NAME=='compose')
+ {
+?>
+ var first_frame = 0;
+ var second_frame = 0;
+ if (self.name == 'right')
+ {
+ first_frame = '100%';
+ second_frame = '*';
+ }
+ else if (self.name == 'bottom')
+ {
+ first_frame = '*';
+ second_frame = '100%';
+ }
+ if (first_frame != 0)
+ {
+ if (document.all)
+ {
+ parent.document.all["fs2"].<?php echo $orientation; ?> = first_frame + ", " + second_frame;
+ }
+ else if (this.document.getElementById)
+ {
+ parent.document.getElementById("fs2").<?php echo $orientation; ?> = first_frame + ", " + second_frame;
+ }
+ }
+<?php
+
+ // not on the compose screen, either hide or restore preview pane
+ } else {
+
+ $previewPane_size = getPref($data_dir, $username, 'previewPane_size', 300);
+ if (defined('PAGE_NAME') && (PAGE_NAME=='right_main'||PAGE_NAME=='search')) {
+ $new_size = $previewPane_size;
+ } else {
+ $new_size = 0;
+ }
+?>
+ if (self.name == 'right')
+ {
+ if (document.all)
+ {
+ parent.document.all["fs2"].<?php echo $orientation; ?> = "*, " + <?php echo $new_size; ?>;
+ }
+ else if (this.document.getElementById)
+ {
+ parent.document.getElementById("fs2").<?php echo $orientation; ?> = "*, " + <?php echo $new_size; ?>;
+ }
+ }
+
+ // restores the preview pane if it sucked up the whole page for composing a message
+ else if (self.name == 'bottom')
+ {
+ if (document.all)
+ {
+ if (parent.document.all["fs2"].<?php echo $orientation; ?> == "*, 100%")
+ parent.document.all["fs2"].<?php echo $orientation; ?> = "*, " + <?php echo $previewPane_size; ?>;
+ }
+ else if (this.document.getElementById)
+ {
+ if (parent.document.getElementById("fs2").<?php echo $orientation; ?> == "*, 100%")
+ parent.document.getElementById("fs2").<?php echo $orientation; ?> = "*, " + <?php echo $previewPane_size; ?>;
+ }
+ }
+<?php } } ?>
// -->
</script>
-<?php }