phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] phpgwapi templates/verdilak/head.inc.php templa...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] phpgwapi templates/verdilak/head.inc.php templa...
Date: Sun, 03 Dec 2006 18:31:43 +0000

CVSROOT:        /sources/phpgwapi
Module name:    phpgwapi
Changes by:     Sigurd Nes <sigurdne>   06/12/03 18:31:43

Modified files:
        templates/verdilak: head.inc.php head.tpl navbar.inc.php 
                            navbar.tpl 
        templates/verdilak/css: styles.css 
Added files:
        inc            : class.csstooltip.inc.php 
        templates/base/css: tooltip.css 

Log message:
        css-tooltips from probusiness, and display sideboxmenu as "select" in 
verdilak (also from probusiness)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.csstooltip.inc.php?cvsroot=phpgwapi&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/templates/base/css/tooltip.css?cvsroot=phpgwapi&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/templates/verdilak/head.inc.php?cvsroot=phpgwapi&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/templates/verdilak/head.tpl?cvsroot=phpgwapi&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/templates/verdilak/navbar.inc.php?cvsroot=phpgwapi&r1=1.35&r2=1.36
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/templates/verdilak/navbar.tpl?cvsroot=phpgwapi&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/templates/verdilak/css/styles.css?cvsroot=phpgwapi&r1=1.6&r2=1.7

Patches:
Index: templates/verdilak/head.inc.php
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/templates/verdilak/head.inc.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- templates/verdilak/head.inc.php     25 Nov 2006 10:12:32 -0000      1.24
+++ templates/verdilak/head.inc.php     3 Dec 2006 18:31:43 -0000       1.25
@@ -5,7 +5,7 @@
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package phpgwapi
        * @subpackage gui
-       * @version $Id: head.inc.php,v 1.24 2006/11/25 10:12:32 sigurdne Exp $
+       * @version $Id: head.inc.php,v 1.25 2006/12/03 18:31:43 sigurdne Exp $
        */
        
        if ( !isset($GLOBALS['phpgw_info']['server']['site_title']) )
@@ -63,6 +63,7 @@
                'str_base_url'  => $GLOBALS['phpgw']->link('/', array(), true), 
        
                'website_title' => 
$GLOBALS['phpgw_info']['server']['site_title'] . $app,
                'win_on_events' => $GLOBALS['phpgw']->common->get_on_events(),
+               'phpgw_root'    => 
$GLOBALS['phpgw_info']['server']['webserver_url'] . '/',
        ));
 
        $GLOBALS['phpgw']->template->pfp('out','head');

Index: templates/verdilak/head.tpl
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/templates/verdilak/head.tpl,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- templates/verdilak/head.tpl 27 Nov 2006 18:23:37 -0000      1.15
+++ templates/verdilak/head.tpl 3 Dec 2006 18:31:43 -0000       1.16
@@ -11,6 +11,9 @@
                <link rel="icon" href="{img_icon}" type="image/x-ico">
                <link rel="shortcut icon" href="{img_shortcut}">
                {css}
+               <script language="JavaScript" type="text/javascript" 
src="{phpgw_root}folders/phplayersmenu/libjs/layersmenu-browser_detection.js"></script>
+               <script language="JavaScript" type="text/javascript" 
src="{phpgw_root}folders/phplayersmenu/libjs/layersmenu-library.js"></script>
+               <script language="JavaScript" type="text/javascript" 
src="{phpgw_root}folders/phplayersmenu/libjs/layersmenu.js"></script>
                <!-- BEGIN theme_stylesheet -->
                <link href="{theme_style}" type="text/css" rel="StyleSheet">
                <!-- END theme_stylesheet -->

Index: templates/verdilak/navbar.inc.php
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/templates/verdilak/navbar.inc.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- templates/verdilak/navbar.inc.php   26 Sep 2006 17:01:05 -0000      1.35
+++ templates/verdilak/navbar.inc.php   3 Dec 2006 18:31:43 -0000       1.36
@@ -5,7 +5,7 @@
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package phpgwapi
        * @subpackage gui
-       * @version $Id: navbar.inc.php,v 1.35 2006/09/26 17:01:05 sigurdne Exp $
+       * @version $Id: navbar.inc.php,v 1.36 2006/12/03 18:31:43 sigurdne Exp $
        */
 
 
@@ -147,6 +147,15 @@
                        $api_messages = lang('it has been more then %1 days 
since you changed your password',30);
                }
  
+               // get sidebox content and parse it as a menu
+               // it's just a hack. You need to enable the folders module to 
get an ouput
+               if ( 
$GLOBALS['phpgw_info']['user']['apps']['folders']['enabled'] == true )
+               {
+                       
$GLOBALS['phpgw']->hooks->single('sidebox_menu',$GLOBALS['phpgw_info']['flags']['currentapp']);
+                       $var['sideboxcontent'] = parseMenu();
+               }
+
+
                // This is gonna change
                if (isset($cd))
                {
@@ -220,3 +229,50 @@
                $GLOBALS['phpgw']->hooks->process('navbar_end');
                echo $tpl->pfp('out','footer');
        }
+
+       /**
+       * Display sidebox
+       *
+       * @param string $appname
+       * @param string $menu_title
+       * @param string $file
+       * @ignore
+       */
+       function display_sidebox($appname,$menu_title,$file)
+       {
+
+       // workaround for old hook technique
+               
$GLOBALS['phpgw_info']['user']['apps']['phpgw']['sidebox'][$menu_title] = $file;
+       }
+
+       function parseMenu()
+       {
+               $content = 
(isset($GLOBALS['phpgw_info']['user']['apps']['phpgw']['sidebox'])?$GLOBALS['phpgw_info']['user']['apps']['phpgw']['sidebox']:'');
+
+               if (is_array($content) && 
$GLOBALS['phpgw_info']['flags']['currentapp'] != 'admin')
+               {
+                       include_once 
(PHPGW_SERVER_ROOT.'/folders/phplayersmenu/lib/PHPLIB.php');
+                       include_once 
(PHPGW_SERVER_ROOT.'/folders/phplayersmenu/lib/layersmenu-common.inc.php');
+                       include_once 
(PHPGW_SERVER_ROOT.'/folders/phplayersmenu/lib/layersmenu.inc.php');
+                       include_once 
(PHPGW_SERVER_ROOT.'/folders/inc/class.layersmenu.inc.php');
+
+                       $mid = new phpgwLayersMenu();
+
+                       
$mid->setLibjsdir(PHPGW_SERVER_ROOT.'/folders/phplayersmenu/libjs');
+
+                       
$mid->setImgwww($GLOBALS['phpgw_info']['server']['webserver_url'].'/folders/phplayersmenu/images/');
+                       
$mid->setImgdir(PHPGW_SERVER_ROOT.'/folders/phplayersmenu/images/');
+
+                       
$mid->setHorizontalMenuTpl(PHPGW_SERVER_ROOT.'/folders/phplayersmenu/templates/layersmenu-horizontal_menu.ihtml');
+                       
$mid->setSubMenuTpl(PHPGW_SERVER_ROOT.'/folders/phplayersmenu/templates/layersmenu-sub_menu.ihtml');
+
+                       $mid->parseStructureForMenu($content, 'sidebox');
+                       $mid->newHorizontalMenu('sidebox');
+
+                       $mid->printHeader();
+                       $return  = $mid->getMenu('sidebox');
+                       $mid->printFooter();
+
+                       return $return;
+               }
+       }

Index: templates/verdilak/navbar.tpl
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/templates/verdilak/navbar.tpl,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- templates/verdilak/navbar.tpl       9 May 2005 08:20:27 -0000       1.15
+++ templates/verdilak/navbar.tpl       3 Dec 2006 18:31:43 -0000       1.16
@@ -19,6 +19,7 @@
 <div style="text-align: center; font-weight: bold; background-color: {th_bg}; 
padding:5px">{current_app_header}</div>
 <!-- END app_header -->
 <div align="center">{messages}</div>
+<div align="center">{sideboxcontent}</div>
    <table border="0" cellpadding="5" width="100%">
     <tr>
      <td>

Index: templates/verdilak/css/styles.css
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/templates/verdilak/css/styles.css,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- templates/verdilak/css/styles.css   29 Nov 2006 14:24:54 -0000      1.6
+++ templates/verdilak/css/styles.css   3 Dec 2006 18:31:43 -0000       1.7
@@ -222,3 +222,110 @@
        text-align: center;
        white-space: nowrap;
 }
+
+  /*
+   * Sidebox menu style
+   */
+ 
+ .horbar       {
+       color: #212020;
+       background-color: #ECE9D8;
+       border: 1px solid #FFFFFF;
+}
+
+.horbaritem    {
+       float: left;
+       white-space: nowrap;
+       font-family: luxi sans, verdana, geneva, arial, helvetica, sans-serif;
+       font-size: 14px;
+}
+
+.horbaritem a  {
+       display: block;
+       text-decoration: none;
+}
+
+.horbaritem a:link     {
+       color: #000000;
+}
+
+.horbaritem a:visited  {
+       color: #000000;
+}
+
+.horbaritem a:hover    {
+       color: #ffffff;
+       background-color: #808080;
+}
+
+.horbaritem a:active   {
+       color: #ff0000;
+}
+
+.verbar        {
+       color: black;
+       background-color: #dcdad5;
+       border: 2px outset #cecac1;
+}
+
+.submenu       {
+       position: absolute;
+       left: 0;
+       top: 0;
+       visibility: hidden;
+}
+
+.subframe      {
+       position: relative;
+       display: block;
+       background-color: #dcdad5;
+       border: 2px solid #cecac1;
+}
+
+.item  {
+       position: relative;
+       text-align: left;
+       white-space: nowrap;
+       font-family: luxi sans, verdana, geneva, arial, helvetica, sans-serif;
+       font-size: 14px;
+}
+
+.item a        {
+       position: relative;
+       display: block;
+       text-decoration: none;
+}
+
+.item a:link   {
+       color: #000000;
+}
+
+.item a:visited        {
+       color: #000000;
+}
+
+.item a:hover  {
+       color: #ffffff;
+       background-color: #808080;
+}
+
+.item a:active {
+       color: #ff0000;
+}
+
+.item .fwdarr  {
+       position: absolute;
+       top: 5px;
+/*     right: 4px; */
+       right: 7px;
+}
+
+TR.passed
+{
+       background-color: #d5d7d7;
+}
+
+TR.notpassed
+{
+       background-color: #bd6767;
+}

Index: inc/class.csstooltip.inc.php
===================================================================
RCS file: inc/class.csstooltip.inc.php
diff -N inc/class.csstooltip.inc.php
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ inc/class.csstooltip.inc.php        3 Dec 2006 18:31:43 -0000       1.1
@@ -0,0 +1,135 @@
+<?php
+       /**
+       * csstooltip wrapper-class
+       *
+       *       Example:
+       * <code>
+       * $tooltip = new csstooltip();
+       *       $html = $tooltip->createHelpTooltip(lang('select your 
language'));
+       * // insert $html in your template
+       * </code>
+       *
+       * @author Dirk Schaller <address@hidden>
+       * @copyright Copyright (C) 2005 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @license http://www.fsf.org/licenses/gpl.html GNU General Public 
License
+       * @package phpgwapi
+       * @subpackage gui
+       * @version $Id: class.csstooltip.inc.php,v 1.1 2006/12/03 18:31:43 
sigurdne Exp $
+       */
+       
+       /**
+       * csstooltip wrapper-class
+       *
+       * @package phpgwapi
+       * @subpackage gui
+       * @internal The constructor load the necessary css-files
+       */
+       class csstooltip
+       {
+               /**
+               * Constructor of class csstooltip
+               *
+               * @access public
+               */
+               function csstooltip()
+               {
+                       if(!is_object($GLOBALS['phpgw']->css))
+                       {
+                               $GLOBALS['phpgw']->css = 
CreateObject('phpgwapi.css');
+                       }
+       
+                       $GLOBALS['phpgw']->css->validate_file("tooltip", 
"tooltip");
+               }
+               
+               /**
+               * Creates a help tooltip with a question mark as tooltip link 
and 'help' as tooltip headline
+               *
+               * @access public
+               * @param string $tooltip_content content to show in toottip
+               * @return string xhtml tooltip
+               */
+               function createHelpTooltip($tooltip_content)
+               {
+                       $link_content = '<span class="helptooltip">?</span>';
+                       return $this->createTextTooltip($link_content, 
$tooltip_content, lang('help'));
+               }
+       
+               /**
+               * Creates an info tooltip with a 'i' as tooltip link and 'info' 
as tooltip headline
+               *
+               * @access public
+               * @param string $tooltip_content content to show in toottip
+               * @return string xhtml tooltip
+               */
+               function createInfoTooltip($tooltip_content)
+               {
+                       $link_content = '<span class="infotooltip">i</span>';
+                       return $this->createTextTooltip($link_content, 
$tooltip_content, lang('info'));
+               }
+       
+               /**
+               * Creates a text tooltip with individual output text and 
tooltip headline
+               *
+               * @access public
+               * @param string $link_content content to show as tooltip link
+               * @param string $tooltip_content content to show in toottip
+               * @param string $tooltip_headline content to show in toottip 
headline, default is 'help'
+               * @return string xhtml tooltip
+               */
+               function createTextTooltip($link_content, $tooltip_content, 
$tooltip_headline='')
+               {
+                       if (!$tooltip_headline)
+                               $tooltip_headline = lang('help');
+                       return $this->_createTooltipHTML($link_content, 
$tooltip_content, $tooltip_headline);
+               }
+               
+               /**
+               * Creates a image tooltip
+               *
+               * @access public
+               * @param string $image_src url of the image to show as tooltip 
link.
+               * @param string $tooltip_content content to show in toottip
+               * @param string $tooltip_headline content to show in toottip 
headline, default is 'help'. Is used as the image alt attribute.
+               * @return string xhtml tooltip
+               */
+               function createImageTooltip($image_src='', $tooltip_content, 
$tooltip_headline='')
+               {
+                       if (!$image_src)
+                               $image_src = 
$GLOBALS['phpgw']->common->image('phpgwapi','tooltip');
+                       if (!$tooltip_headline)
+                               $tooltip_headline = lang('help');
+       
+                       $link_content = '<img src="'.$image_src.'" border="0" 
alt="'.$tooltip_headline.'">';
+       
+                       return $this->_createTooltipHTML($link_content, 
$tooltip_content, $tooltip_headline);
+               }
+       
+               /**
+               * Creates a individual tooltip 
+               *
+               * @access public
+               * @param string $link_content content to show as tooltip link
+               * @param string $tooltip_content content to show in toottip
+               * @param string $tooltip_headline content to show in toottip 
headline
+               * @return string xhtml tooltip
+               */
+               function createTooltip($link_content, $tooltip_content, 
$tooltip_headline)
+               {
+                       return $this->_createTooltipHTML($link_content, 
$tooltip_content, $tooltip_headline);
+               }
+               
+               /**
+               * Creates the tooltip output
+               *
+               * @access private
+               * @param string $link_content content to show as tooltip link
+               * @param string $tooltip_content content to show in toottip
+               * @param string $tooltip_headline content to show in toottip 
headline
+               * @return string xhtml tooltip
+               */
+               function _createTooltipHTML($link_content, $tooltip_content, 
$tooltip_headline)
+               {
+                       return '<a href="#" 
class="tooltip">'.$link_content.'<span class="tooltip"><span 
class="tooltip_headline">'.$tooltip_headline.'</span><span 
class="tooltip_line">&nbsp;</span><span 
class="tooltip_content">'.$tooltip_content.'</span></span></a>';
+               }
+       }
+?>
\ No newline at end of file

Index: templates/base/css/tooltip.css
===================================================================
RCS file: templates/base/css/tooltip.css
diff -N templates/base/css/tooltip.css
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ templates/base/css/tooltip.css      3 Dec 2006 18:31:43 -0000       1.1
@@ -0,0 +1,83 @@
+/**
+ * Tooltip Style Sheet
+ * Author Dirk Schaller <address@hidden>
+ * Copyright Copyright (C) 2005 Free Software Foundation, Inc. 
http://www.fsf.org/
+ * License http://www.fsf.org/licenses/gpl.html GNU General Public License
+ * Version $Id: tooltip.css,v 1.1 2006/12/03 18:31:43 sigurdne Exp $
+ */
+ 
+/* styles for tooltip link */
+a.tooltip, a.tooltip:link, a.tooltip:visited, a.tooltip:active
+{
+       position: relative; 
+       text-decoration: none;
+       cursor: help; 
+       padding: 0;
+       z-index: 100;
+}
+
+/* styles for tooltip link on hover */
+a.tooltip:hover
+{
+       background: transparent;
+       z-index: 101;
+}
+
+/* styles for tooltip container */
+a.tooltip span.tooltip
+{
+       display: none;
+       z-index: 100;
+}
+
+/* styles for tooltip container on hover */
+a.tooltip:hover span.tooltip
+{
+       position: absolute;
+       display: block;
+       top: 25px;
+       left: -90px;
+       width: 130px;
+       padding: 4px 5px 4px 5px;
+       margin: 0px;
+       background: #FFFFCC;
+       border: 1px solid #000000;
+       z-index: 101;
+       text-decoration: none;
+       text-align: left;
+       color: #000000;
+       -moz-border-radius: 10px;
+}
+
+/* styles for tooltip headline */
+span.tooltip_headline
+{
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       font-size: 9px;
+       font-weight: bold;
+}
+
+/* styles for tooltip line (separator beetween headline and conent) */
+span.tooltip_line
+{
+       display: block;
+       border-top: 1px solid #000000;
+       font-size: 2px;
+}
+
+/* styles for tooltip content */
+span.tooltip_content
+{
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       font-size: 9px;
+}
+
+/* styles for predefined help and info tooltip link*/
+span.helptooltip, span.infotooltip
+{
+       padding: 1px;
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       font-weight: bold;
+       font-size: 12px;
+       color: #000066;
+}
\ No newline at end of file




reply via email to

[Prev in Thread] Current Thread [Next in Thread]