* Copyright 2010, Antoine Mercadal - Capgemini
* Copyright 2010, Marc-Etienne Vargenau, Alcatel-Lucent
* Copyright 2011, Franck Villaume - Capgemini
- * Copyright 2011, Franck Villaume - TrivialDev
+ * Copyright 2011 - 2012, Franck Villaume - TrivialDev
* Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
*
* This file is part of FusionForge. FusionForge is free software;
$this->themeurl = util_make_url('themes/funky/');
$this->imgbaseurl = $this->themeurl . 'images/';
$this->imgroot = $this->imgbaseurl;
- // $this->doctype = 'strict';
$this->addStylesheet('/themes/funky/css/theme.css');
$this->addStylesheet('/themes/funky/css/theme-pages.css');
if (!isset($params['title'])) {
$params['title'] = forge_get_config('forge_name');
} else {
- $params['title'] = $params['title'] . " - forge_get_config('forge_name') ";
+ $params['title'] = $params['title'] . " - ".forge_get_config('forge_name');
}
echo '<table id="header" class="width-100p100">' . "\n";
* @param string The box background color
*/
function boxTop($title, $id = '') {
+ if ($id) {
+ $id = $this->toSlug($id);
+ $idid = ' id="' . $id . '"';
+ $idtitle = ' id="' . $id . '-title"';
+ $idtcont = ' id="' . $id . '-title-content"';
+ } else {
+ $idid = "";
+ $idtitle = "";
+ $idtcont = "";
+ }
+
$t_result = '';
- $t_result .= '<div id="' . $this->toSlug($id) . '" class="box-surround">';
- $t_result .= '<div id="'. $this->toSlug($id) . '-title" class="box-title">';
- $t_result .= '<div class="box-title-content" id="'. $this->toSlug($id) .'-title-content">'. $title .'</div>';
+ $t_result .= '<div' . $idid . ' class="box-surround">';
+ $t_result .= '<div' . $idtitle . ' class="box-title">';
+ $t_result .= '<div' . $idtcont . ' class="box-title-content">'. $title .'</div>';
$t_result .= '</div> <!-- class="box-title" -->';
return $t_result;
* @param string The box background color
*/
function boxMiddle($title, $id = '') {
- $t_result ='<div id="title-'. $this->toSlug($id).'" class="box-middle">'.$title.'</div>';
+ if ($id) {
+ $id = $this->toSlug($id);
+ $idtitle = ' id="' . $id . '-title"';
+ } else {
+ $idtitle = "";
+ }
+
+ $t_result ='<div' . $idtitle . ' class="box-middle">'.$title.'</div>';
return $t_result;
}
* @param string Box content
*/
function boxContent($content, $id = '') {
- $t_result ='<div id="'. $this->toSlug($id) .'-content" class="box-content">'.$content.'</div>';
+ if ($id) {
+ $id = $this->toSlug($id);
+ $idcont = ' id="' . $id . '-content"';
+ } else {
+ $idcont = "";
+ }
+
+ $t_result ='<div' . $idcont . ' class="box-content">'.$content.'</div>';
return $t_result;
}
if ($count < 1)
return;
- $use_tooltips = 1;
-
- if (session_loggedin()) {
- $u =& user_get_object(user_getid());
- if (!$u || !is_object($u)) {
- exit_error(_('Could Not Get User'));
- } elseif ($u->isError()) {
- exit_error($u->getErrorMessage(), 'my');
- }
- $use_tooltips = $u->usesTooltips();
+ global $use_tooltips;
+
+ if ($use_tooltips) {
+ ?>
+ <script type="text/javascript">//<![CDATA[
+ if (typeof(jQuery(window).tipsy) == 'function') {
+ jQuery(document).ready(
+ function() {
+ jQuery('.tabtitle').tipsy({delayIn: 500, delayOut: 0, fade: true});
+ jQuery('.tabtitle-nw').tipsy({gravity: 'nw', delayIn: 500, delayOut: 0, fade: true});
+ jQuery('.tabtitle-ne').tipsy({gravity: 'ne', delayIn: 500, delayOut: 0, fade: true});
+ jQuery('.tabtitle-w').tipsy({gravity: 'w', delayIn: 500, delayOut: 0, fade: true});
+ jQuery('.tabtitle-e').tipsy({gravity: 'e', delayIn: 500, delayOut: 0, fade: true});
+ jQuery('.tabtitle-sw').tipsy({gravity: 'sw', delayIn: 500, delayOut: 0, fade: true});
+ jQuery('.tabtitle-se').tipsy({gravity: 'se', delayIn: 500, delayOut: 0, fade: true});
+ }
+ );
+ }
+ //]]></script>
+ <?php
}
$return = '<!-- start tabs -->';
- $return .= '<table class="tabGenerator width-100p100" summary="" ';
+ $return .= '<table class="tabGenerator width-100p100" ';
if ($total_width != '100%')
$return .= 'style="width:' . $total_width . ';"';
$return .= "\n";
// middle part
- $return .= '<td class="tg-middle" style="width:'.$tabwidth.'%;"><a href="'.$TABS_DIRS[$i].'">' . "\n";
- $return .= '<span';
-
+ $return .= '<td class="tg-middle" style="width:'.$tabwidth.'%;"><a ';
+ $return .= 'id="'.md5($TABS_DIRS[$i]).'" ';
if ($use_tooltips)
- $return .= ' title="'.$TABS_TOOLTIPS[$i].'"';
+ $return .= 'class="tabtitle" title="'.$TABS_TOOLTIPS[$i].'"';
+ $return .= 'href="'.$TABS_DIRS[$i].'">' . "\n";
+ $return .= '<span';
if ($selected == $i)
$return .= ' class="selected"';
$return .= '</span>';
$return .= '</span>' . "\n";
$return .= '</a></td>' . "\n";
-
+
}
$return .= '</tr></table><!-- end tabs -->';
*/
function headerJS()
{
- html_use_jquery();
-
echo '<script type="text/javascript" src="'. util_make_uri('/js/common.js') .'"></script>';
echo '<script type="text/javascript" src="/scripts/codendi/LayoutManager.js"></script>';
echo '<script type="text/javascript" src="/scripts/codendi/ReorderColumns.js"></script>';
echo '<script type="text/javascript" src="/scripts/codendi/validate.js"></script>';
echo '<script type="text/javascript" src="/scripts/codendi/Tooltip.js"></script>';
- plugin_hook("javascript_file",false);
- echo $this->getJavascripts();
-
+ plugin_hook("javascript_file", false);
+
// invoke the 'javascript' hook for custom javascript addition
$params = array('return' => false);
plugin_hook("javascript", $params);
$javascript = $params['return'];
if($javascript) {
- echo '<script language="JavaScript" type="text/javascript">/* <![CDATA[ */'."\n";
+ echo '<script type="text/javascript">//<![CDATA['."\n";
echo $javascript;
- echo "\n/* ]]> */</script>\n";
+ echo "\n//]]></script>\n";
}
+ html_use_tooltips();
+ html_use_storage();
+ html_use_simplemenu();
+ html_use_coolfieldset();
+ html_use_jqueryui();
+ echo $this->getJavascripts();
+ echo $this->getStylesheets();
?>
- <script language="JavaScript" type="text/javascript">/* <![CDATA[ */
+ <script type="text/javascript">//<![CDATA[
jQuery.noConflict();
jQuery(window).load(function(){
jQuery(".quicknews").hide();
setTimeout("jQuery('.feedback').hide('slow')", 5000);
});
- /* ]]> */</script>
+ //]]></script>
<?php
}
}