- removed unused code from the calendar

- removed some unused css rules, simplified css a bit and made some rule grouping (nothing important)

git-svn-id: http://piwigo.org/svn/trunk@2101 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rvelices
2007-09-20 23:45:23 +00:00
parent c5970aba22
commit 179106efaf
10 changed files with 64 additions and 142 deletions
+11 -27
View File
@@ -3,8 +3,7 @@
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | branch : BSF (Best So Far)
// | file : $RCSfile$
// | file : $Id$
// | last update : $Date$
// | last modifier : $Author$
// | revision : $Revision$
@@ -133,14 +132,13 @@ class CalendarBase
*
* @param array date_components
* @param array items - hash of items to put in the bar (e.g. 2005,2006)
* @param array selected_item - item currently selected (e.g. 2005)
* @param string class_prefix - html class attribute prefix for span elements
* @param bool show_any - adds any link to the end of the bar
* @param bool show_empty - shows all labels even those without items
* @param array labels - optional labels for items (e.g. Jan,Feb,...)
* @return string the navigation bar
*/
function get_nav_bar_from_items($date_components, $items, $selected_item,
function get_nav_bar_from_items($date_components, $items,
$class_prefix, $show_any,
$show_empty=false, $labels=null)
{
@@ -167,12 +165,7 @@ class CalendarBase
{
$label = $labels[$item];
}
if (isset($selected_item) and $item == $selected_item)
{
$nav_bar .= '<span class="'.$class_prefix.'Sel">';
$nav_bar .= $label;
}
elseif ($nb_images==-1)
if ($nb_images==-1)
{
$nav_bar .= '<span class="'.$class_prefix.'Empty">';
$nav_bar .= $label;
@@ -199,22 +192,14 @@ class CalendarBase
count($date_components)<count($this->calendar_levels)-1 )
{
$label = l10n('calendar_any');
if (isset($selected_item) and 'any' === $selected_item)
{
$nav_bar .= '<span class="'.$class_prefix.'Sel">';
$nav_bar .= $label;
}
else
{
$nav_bar .= '<span class="'.$class_prefix.'">';
$url = duplicate_index_url(
array('chronology_date'=>array_merge($date_components,array('any'))),
array( 'start' )
);
$nav_bar .= '<a href="'.$url.'">';
$nav_bar .= $label;
$nav_bar .= '</a>';
}
$nav_bar .= '<span class="'.$class_prefix.'">';
$url = duplicate_index_url(
array('chronology_date'=>array_merge($date_components,array('any'))),
array( 'start' )
);
$nav_bar .= '<a href="'.$url.'">';
$nav_bar .= $label;
$nav_bar .= '</a>';
$nav_bar.= '</span>';
}
return $nav_bar;
@@ -271,7 +256,6 @@ SELECT DISTINCT('.$this->calendar_levels[$level]['sql']
$nav_bar = $this->get_nav_bar_from_items(
$dates,
$level_items,
null,
'calItem',
true,
true,
+2 -2
View File
@@ -257,7 +257,7 @@ function build_global_calendar()
$nav_bar .= '</span><br>';
$nav_bar .= $this->get_nav_bar_from_items( $chronology_date,
$year_data['children'], null, 'calCal', false, false, $lang['month'] );
$year_data['children'], 'calCal', false, false, $lang['month'] );
$template->assign_block_vars( 'calendar.calbar',
array( 'BAR' => $nav_bar)
@@ -308,7 +308,7 @@ function build_year_calendar()
$nav_bar .= '</span><br>';
$nav_bar .= $this->get_nav_bar_from_items( $chronology_date,
$month_data['children'], null, 'calCal', false );
$month_data['children'], 'calCal', false );
$template->assign_block_vars( 'calendar.calbar',
array( 'BAR' => $nav_bar)
+6 -5
View File
@@ -55,7 +55,7 @@ if ( $page['show_comments'] and isset( $_POST['content'] ) )
);
include_once(PHPWG_ROOT_PATH.'include/functions_comment.inc.php');
$comment_action = insert_user_comment($comm, @$_POST['key'], $infos );
switch ($comment_action)
@@ -65,7 +65,7 @@ if ( $page['show_comments'] and isset( $_POST['content'] ) )
case 'validate':
array_push( $infos, l10n('comment_added'));
break;
case 'reject':
case 'reject':
set_status_header(403);
array_push($infos, l10n('comment_not_added') );
break;
@@ -73,11 +73,12 @@ if ( $page['show_comments'] and isset( $_POST['content'] ) )
trigger_error('Invalid comment action '.$comment_action, E_USER_WARNING);
}
$block_var = ($comment_action=='reject') ? 'errors.error' : 'infos.info';
foreach ($infos as $info)
{
$template->assign_block_vars(
'information',
array( 'INFORMATION'=>$info )
$block_var,
array( 'TEXT'=>$info )
);
}
@@ -136,7 +137,7 @@ SELECT id,author,date,image_id,content
$template->assign_block_vars(
'comments.comment',
array(
'COMMENT_AUTHOR' => trigger_event('render_comment_author',
'COMMENT_AUTHOR' => trigger_event('render_comment_author',
empty($row['author'])
? l10n('guest')
: $row['author']),
+4 -1
View File
@@ -36,7 +36,8 @@ BODY#theNBMPage #content
}
#content .pageNumberSelected {
font-style: italic;
font-style: italic;
font-weight: bold;
}
#content .additional_info {
@@ -180,6 +181,7 @@ DIV.calImg {
position: absolute;
text-align: left;
vertical-align: top;
color: #000;
}
.calForeDate {
@@ -189,6 +191,7 @@ DIV.calImg {
position: absolute;
text-align: left;
vertical-align: top;
color: #fff;
}
/* Category thumbnails on main page, CSS code inspired from MOD subcatify */
+16 -17
View File
@@ -1,23 +1,14 @@
/* $Id$ */
/* others */
.pleaseNote {
background: #9c9c9c;
color: #ffff99;
padding: 1ex;
font-weight: bold;
}
#imageToolBar * {
background: inherit;
}
/* So that non-links are slightly greyed out */
#content .navigationBar {
color: #696969;
}
#content .pageNumberSelected {
color: #000000;
#content .navigationBar, SPAN.calItemEmpty, TD.calDayCellEmpty {
color: #b0b0b0;
}
/* Tables & forms */
@@ -68,26 +59,26 @@ INPUT.rateButton, INPUT.rateButtonSelected, INPUT.rateButtonStarFull, INPUT.rate
padding: 10px 50px 10px 10px;
}
.errors UL LI
{
font-weight: normal;
}
/**
* Informations box in administration
*/
.infos {
text-align: left;
color: #002000;
background-color: #98fb98; /* palegreen */
background-image: url(icon/admin/infos.png);
background-repeat: no-repeat;
background-position: top right;
color: #006400; /* darkgreen */
font-weight: bold;
margin: 5px;
padding: 10px 50px 10px 10px;
}
.infos UL LI
{
font-weight: normal;
}
/**
* Header message like upgrade or adviser mode
*/
@@ -117,3 +108,11 @@ INPUT.rateButton, INPUT.rateButtonSelected, INPUT.rateButtonStarFull, INPUT.rate
LEGEND {
font-style: italic;
}
/*calendar*/
SPAN.calItem, SPAN.calItemEmpty,
TD.calDayCellEmpty, TD.calDayCellFull {
border: 1px solid gray;
}
+18 -3
View File
@@ -1,6 +1,21 @@
<!-- BEGIN information -->
<div class="pleaseNote">{information.INFORMATION}</div>
<!-- END information -->
<!-- BEGIN errors -->
<div class="errors">
<ul>
<!-- BEGIN error -->
<li>{errors.error.TEXT}</li>
<!-- END error -->
</ul>
</div>
<!-- END errors -->
<!-- BEGIN infos -->
<div class="infos">
<ul>
<!-- BEGIN info -->
<li>{infos.info.TEXT}</li>
<!-- END info -->
</ul>
</div>
<!-- END infos -->
<div id="imageHeaderBar">
<div class="browsePath">
+1 -18
View File
@@ -34,7 +34,7 @@ H2, #menubar DT, #imageHeaderBar, #imageToolBar A:hover, .row1 {
}
FIELDSET, INPUT, SELECT, TEXTAREA,
#content DIV.comment A.illustration IMG, #infos,
#content DIV.comment A.illustration IMG,
#content DIV.thumbnailCategory {
border: 1px solid gray;
}
@@ -75,29 +75,12 @@ A.navThumb, A.navThumb:hover {
border-bottom: none;
}
/* others */
.pleaseNote {
background: #9c9c9c;
color: #ffff99;
padding: 1ex;
font-weight: bold;
}
/*calendar elements*/
SPAN.calItemEmpty { color: silver; }
SPAN.calItem, SPAN.calItemEmpty
{
border: 1px solid silver;
}
/* nice looking month calendar*/
TD.calDayCellEmpty, TD.calDayCellFull { border: 1px solid #7E7262;}
TD.calDayCellEmpty { color: silver; }
.calBackDate { color: #000; }
.calForeDate { color: #fff; }
.virtual_cat { background: #fff !important; }
#mbMenu #quicksearch > p { text-align: left; }
#qsearchInput { color: #d3d3d3; }
+1 -30
View File
@@ -10,13 +10,6 @@ H2, #menubar DT, .throw {
color: #fff48e;
}
#content .navigationBar {
color: #aaaaaa;
}
#content .pageNumberSelected {
color: #000000;
}
.tabsheet li,
.tabsheet li a { color: #fff; }
.tabsheet li a:hover { color: #fff48e; }
@@ -75,7 +68,7 @@ H2, #menubar DT, #imageToolBar {
}
FIELDSET, INPUT, SELECT, TEXTAREA,
#content DIV.comment A.illustration IMG, #infos,
#content DIV.comment A.illustration IMG,
#content DIV.thumbnailCategory {
border: 1px solid gray;
}
@@ -115,13 +108,6 @@ A.navThumb, A.navThumb:hover {
border-bottom: none;
}
/* others */
.pleaseNote {
background: #9c9c9c;
color: #ffff99;
padding: 1ex;
font-weight: bold;
}
#the_page {
border: 1px solid #e0e0e0;
padding-top: 5px;
@@ -130,20 +116,5 @@ A.navThumb, A.navThumb:hover {
display:block;
}
/*calendar elements*/
SPAN.calItemEmpty { color: silver; }
SPAN.calItem, SPAN.calItemEmpty
{
border: 1px solid gray;
}
/* nice looking month calendar*/
TD.calDayCellEmpty, TD.calDayCellFull { border: 1px solid gray;}
TD.calDayCellEmpty { color: silver; }
.calBackDate { color: #000; }
.calForeDate { color: #fff; }
.virtual_cat { background: #3f3f3f !important; }
#mbMenu #quicksearch > p { text-align: left; }
+4 -16
View File
@@ -18,7 +18,7 @@
/******************************************************************************/
/* Texts Only */
BODY, H1, H3, DT, H2, .throw { color: #369; }
H2, #menubar DT, .throw, TD H3, #theAdminPage H3, .calForeDate {
H2, #menubar DT, .throw, TD H3, #theAdminPage H3 {
color: #fff;
}
#menubar DT, #menubar DT A {
@@ -42,7 +42,6 @@ INPUT.rateButtonSelected /* <= why IE doesn't inherit this ? */ {
}
.infoTable,
#theAdminPage #content,
#content .navigationBar,
input#qsearchInput { color: #369; }
#content .infos { color: #036; }
#content .errors { color: #900; }
@@ -89,13 +88,7 @@ input.rateButtonSelected,
.tabsheet li a:hover, #content div.thumbnailCategory .description h3 a:hover {
color: #f92;
}
.pleaseNote {
color: #ff9;
font-weight: bold;
}
TD.calDayCellEmpty,
SPAN.calItemEmpty { color: silver; }
.calBackDate { color: #000; }
/******************************************************************************/
/* Backgrounds Only */
@@ -129,7 +122,7 @@ H2, #menubar DT, .throw, TD H3,
}
input#qsearchInput { background-color: #cde; }
.virtual_cat { background: #fff !important; }
.pleaseNote, .selected_tab { background-color: #69c !important; }
.selected_tab { background-color: #69c !important; }
/******************************************************************************/
/* Borders, Margins, Padding Only */
BODY { margin: 0px; padding: 0px; }
@@ -193,7 +186,7 @@ H2, #imageToolBar {
border: 0px;
}
FIELDSET, INPUT, SELECT, TEXTAREA,
#content DIV.comment A.illustration IMG, #infos,
#content DIV.comment A.illustration IMG,
#content DIV.thumbnailCategory {
border: 1px solid #69c;
background-color: #dfe8ff;
@@ -218,11 +211,6 @@ A.navThumb, A.navThumb:hover,
padding: 5px 0px 30px 0px;
margin: 0px;
}
.pleaseNote {
padding: 1ex;
}
SPAN.calItem, SPAN.calItemEmpty { border: 1px solid gray; }
TD.calDayCellEmpty, TD.calDayCellFull { border: 1px solid gray;}
#theAdminPage #content table td { padding: 2px 8px; }
ul.tabsheet { border-color: #369 !important; }
.tabsheet li { border: 1px solid #fff; }
+1 -23
View File
@@ -48,9 +48,6 @@ H2, .throw {
#theAdminPage #menubar DT:after {
content: '';
}
#content .navigationBar {
color: #aaaaaa;
}
#content .pageNumberSelected {
color: #f92;
}
@@ -191,7 +188,7 @@ H2, #imageToolBar {
border: 0px;
}
FIELDSET, INPUT, SELECT, TEXTAREA,
#content DIV.comment A.illustration IMG, #infos,
#content DIV.comment A.illustration IMG,
#content DIV.thumbnailCategory {
border: 1px solid gray;
}
@@ -238,13 +235,6 @@ A:hover {
A.navThumb, A.navThumb:hover {
border-bottom: none;
}
/* others */
.pleaseNote {
background: #9c9c9c;
color: #ffff99;
padding: 1ex;
font-weight: bold;
}
#the_page {
border: 1px dotted #f92;
padding-top: 5px;
@@ -256,13 +246,7 @@ A.navThumb, A.navThumb:hover {
#copyright {
color: #69c;
}
/*calendar elements*/
SPAN.calItemEmpty { color: silver; }
SPAN.calItem, SPAN.calItemEmpty
{
border: 1px solid gray;
}
label {
cursor:pointer
}
@@ -298,13 +282,7 @@ FORM#quickconnect INPUT[type=password] {
padding: 1px 3px;
}
/* nice looking month calendar*/
TD.calDayCellEmpty, TD.calDayCellFull { border: 1px solid gray;}
TD.calDayCellEmpty { color: silver; }
.calBackDate { color: #000; }
.calForeDate { color: #fff; }
.virtual_cat { background: #222 !important; }
.PWG {