moved styles of nextmatch- & tab-widget into etemplate's app.css file, which gets now loaded by every eT app. Allows template designers to modify the look of theses widgets too

This commit is contained in:
Ralf Becker 2007-03-09 11:25:08 +00:00
parent 41a7e43d1b
commit 3a8cf8dba3
7 changed files with 82 additions and 175 deletions

View File

@ -41,12 +41,15 @@ class sitemgr_module extends Module // the Module class get automatic included b
list($app) = explode('.',$this->etemplate_method); list($app) = explode('.',$this->etemplate_method);
$GLOBALS['egw']->translation->add_app($app); $GLOBALS['egw']->translation->add_app($app);
$css = ''; $css = "<style type=\"text/css\">\n<!--\n@import url(".$GLOBALS['egw_info']['server']['webserver_url'].
if (file_exists(EGW_SERVER_ROOT.'/'.$app.'/templates/default/app.css')) "/etemplate/templates/default/app.css);\n";
if ($app != 'etemplate' && file_exists(EGW_SERVER_ROOT.'/'.$app.'/templates/default/app.css'))
{ {
$css = "<style type=\"text/css\">\n<!--\n@import url(". $css .= "@import url(".$GLOBALS['egw_info']['server']['webserver_url'].
$GLOBALS['egw_info']['server']['webserver_url'].'/'.$app."/templates/default/app.css);\n-->\n</style>"; '/'.$app."/templates/default/app.css);\n";
} }
$css .= "-->\n</style>\n";
$ret = false; $ret = false;
if($_POST['etemplate_exec_id']) if($_POST['etemplate_exec_id'])
{ {

View File

@ -119,11 +119,11 @@
$tcell =& $tab_widget->empty_cell(); $tcell =& $tab_widget->empty_cell();
if ($value == $name) if ($value == $name)
{ {
$tcell['span'] = ',etemplate_tab_active th'; $tcell['span'] = ',etemplate_tab_active';
} }
else else
{ {
$tcell['span'] = ',etemplate_tab row_on'; $tcell['span'] = ',etemplate_tab';
} }
if ($dom_enabled) if ($dom_enabled)
{ {

View File

@ -211,7 +211,7 @@
if (!@$GLOBALS['egw_info']['etemplate']['hooked'] && (int) $output_mode != 1 && (int) $output_mode != -1) // not just returning the html if (!@$GLOBALS['egw_info']['etemplate']['hooked'] && (int) $output_mode != 1 && (int) $output_mode != -1) // not just returning the html
{ {
$GLOBALS['egw_info']['flags']['java_script'] .= $this->include_java_script(2); $GLOBALS['egw_info']['flags']['java_script'] .= $this->include_java_script(2);
/*
if ($GLOBALS['egw_info']['flags']['currentapp'] != 'etemplate') if ($GLOBALS['egw_info']['flags']['currentapp'] != 'etemplate')
{ {
$css_file = '/etemplate/templates/'.$GLOBALS['egw_info']['server']['template_set'].'/app.css'; $css_file = '/etemplate/templates/'.$GLOBALS['egw_info']['server']['template_set'].'/app.css';
@ -219,10 +219,10 @@
{ {
$css_file = '/etemplate/templates/default/app.css'; $css_file = '/etemplate/templates/default/app.css';
} }
$GLOBALS['egw_info']['flags']['css'] .= '@import('.$GLOBALS['egw_info']['server']['webserver_url']. $GLOBALS['egw_info']['flags']['css'] .= "\n\t\t</style>\n\t\t".'<link href="'.$GLOBALS['egw_info']['server']['webserver_url'].
$css_file.'?'.filemtime(EGW_SERVER_ROOT.$css_file).");\n"; $css_file.'?'.filemtime(EGW_SERVER_ROOT.$css_file).'" type="text/css" rel="StyleSheet" />'."\n\t\t<style>\n\t\t\t";
} }
*/
$GLOBALS['egw']->common->egw_header(); $GLOBALS['egw']->common->egw_header();
} }
elseif (!isset($GLOBALS['egw_info']['etemplate']['content'])) elseif (!isset($GLOBALS['egw_info']['etemplate']['content']))

File diff suppressed because one or more lines are too long

View File

@ -1,14 +1,44 @@
/* $Id$ */ /**
.redItalic { color: red; font-style: italic; } * eGroupWare - CSS Styles used by eTemplate widgets
.gray { color: gray; } *
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package etemplate
* @link http://www.egroupware.org
* @author Ralf Becker <RalfBecker@outdoor-training.de>
* @version $Id$
*/
/* Styles of the eT editor */ /*
.clickWidgetToEdit { cursor: pointer; display: inline; } * a few generic styles used in most eT apps
.clickWidgetToEdit:hover { background-color: pink; } */
.redItalic,.message {
color: red;
font-style: italic;
}
.gray {
color: gray;
}
/* Styles of the nextmatch widget */ /*
.activ_sortcolumn { font-weight: bold; } * Styles of the eT editor
.inactiv_sortcolumn { font-weight: normal; } */
.clickWidgetToEdit {
cursor: pointer;
display: inline;
}
.clickWidgetToEdit:hover {
background-color: pink;
}
/*
* Styles of the nextmatch widget
*/
.activ_sortcolumn {
font-weight: bold;
}
.inactiv_sortcolumn {
font-weight: normal;
}
.lettersearch,.lettersearch_active { .lettersearch,.lettersearch_active {
background-color: #D3DCE3; background-color: #D3DCE3;
width: 25px; width: 25px;
@ -34,3 +64,28 @@
top: 16px; top: 16px;
display: none; display: none;
} }
/*
* Styles for the tab widget
*/
.etemplate_tab,.etemplate_tab_active {
border-style:solid;
border-width:1px 1px 0px;
border-color:black;
padding:3px;
padding-left: 6px;
padding-right: 6px;
width: 60px;
white-space: nowrap;
}
.etemplate_tab {
cursor: pointer;
background-color: #E8F0F0;
}
.etemplate_tab_active {
border-width:2px 2px 0px;
background-color: #D3DCE3;
}
.tab_body {
border: black solid 2px;
}

View File

@ -87,35 +87,5 @@
</row> </row>
</rows> </rows>
</grid> </grid>
<styles>
.activ_sortcolumn { font-weight: bold; }
.inactiv_sortcolumn { font-weight: normal; }
.lettersearch,.lettersearch_active {
background-color: #D3DCE3;
width: 25px;
border: 1px solid #D3DCE3;
text-align: center;
cursor: pointer;
}
.lettersearch_active {
font-weight: bold;
background-color: #E8F0F0;
}
.lettersearch_active,.lettersearch:hover {
border: 1px solid black;
background-color: #E8F0F0;
}
.selectcols {
position: relative;
}
.colselection {
background-color: white;
position: absolute;
right: 0px;
top: 16px;
display: none;
}
</styles>
</template> </template>
</overlay> </overlay>

View File

@ -1,14 +1,14 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!-- $Id$ --> <!-- $Id$ -->
<overlay> <overlay>
<template id="etemplate.tab_widget" template="" lang="" group="0" version="1.0.1.001"> <template id="etemplate.tab_widget" template="" lang="" group="0" version="1.3.001">
<grid width="100%" spacing="0" padding="0"> <grid width="100%" spacing="0" padding="0">
<columns> <columns>
<column/> <column/>
</columns> </columns>
<rows> <rows>
<row> <row>
<hbox id="tabs"> <hbox id="tabs" class="TabHeader">
<description/> <description/>
</hbox> </hbox>
</row> </row>
@ -19,11 +19,5 @@
</row> </row>
</rows> </rows>
</grid> </grid>
<styles>
.etemplate_tab,.etemplate_tab_active { border-style:solid; border-width:1px 1px 0px; border-color:black; padding:3px; padding-left: 6px; padding-right: 6px; width: 60px; white-space: nowrap; }
.etemplate_tab { cursor: pointer; cursor: hand; }
.etemplate_tab_active { border-width:2px 2px 0px; }
.tab_body { border: black solid 2px; }
</styles>
</template> </template>
</overlay> </overlay>