summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2005-12-06 00:10:10 +0000
committerMax Kremmel <xing@synapse.plus.com>2005-12-06 00:10:10 +0000
commit5d2d8f414a1bf3c3be02fc70cd1af6d9d2fdc3f8 (patch)
tree1d54869228acb19152a4c98edc5caad516784bc8
parent4d35dabfa161ae449b777c3bb2827baa036ba0a0 (diff)
downloadcalendar-5d2d8f414a1bf3c3be02fc70cd1af6d9d2fdc3f8.tar.gz
calendar-5d2d8f414a1bf3c3be02fc70cd1af6d9d2fdc3f8.tar.bz2
calendar-5d2d8f414a1bf3c3be02fc70cd1af6d9d2fdc3f8.zip
merge recent changes into HEAD
-rw-r--r--Calendar.php4
-rw-r--r--index.php4
-rw-r--r--modules/mod_calendar.tpl2
-rw-r--r--styles/plain.css3
-rw-r--r--templates/calendar.tpl8
-rw-r--r--templates/calendar_nav_inc.tpl35
-rw-r--r--templates/calendar_options_inc.tpl9
7 files changed, 36 insertions, 29 deletions
diff --git a/Calendar.php b/Calendar.php
index 6d65bfd..cbfee77 100644
--- a/Calendar.php
+++ b/Calendar.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_calendar/Calendar.php,v 1.25 2005/10/07 07:25:31 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_calendar/Calendar.php,v 1.26 2005/12/06 00:10:10 squareing Exp $
* @package calendar
*/
@@ -167,6 +167,7 @@ class Calendar extends LibertyContent {
**/
function buildCalendarNavigation( $pDateHash ) {
$focus = $this->mDate->getdate( $pDateHash['focus_date'] );
+ $today = $this->mDate->getdate( mktime() );
$ret = array(
'before' => array(
@@ -184,6 +185,7 @@ class Calendar extends LibertyContent {
'focus_month' => $focus['mon'],
'focus_year' => $focus['year'],
'focus_date' => $focus[0],
+ 'today' => $this->mDate->gmmktime( 0, 0, 0, $today['mon'], $today['mday'], $today['year'] ),
'display_focus_date' => $focus[0],
);
diff --git a/index.php b/index.php
index 9899ed8..27451a0 100644
--- a/index.php
+++ b/index.php
@@ -1,6 +1,6 @@
<?php
-// $Header: /cvsroot/bitweaver/_bit_calendar/index.php,v 1.35 2005/09/06 08:43:58 lsces Exp $
+// $Header: /cvsroot/bitweaver/_bit_calendar/index.php,v 1.36 2005/12/06 00:10:10 squareing Exp $
// Copyright( c ) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
@@ -121,5 +121,5 @@ $gBitSmarty->assign( 'dayNames', $dayNames );
// TODO: make this a pref
$gBitSmarty->assign( 'trunc', $gBitSystem->getPreference( 'title_truncate', 12 ) );
-$gBitSystem->display( 'bitpackage:calendar/calendar.tpl' );
+$gBitSystem->display( 'bitpackage:calendar/calendar.tpl', tra( 'Calendar' ) );
?>
diff --git a/modules/mod_calendar.tpl b/modules/mod_calendar.tpl
index c8498d6..746835f 100644
--- a/modules/mod_calendar.tpl
+++ b/modules/mod_calendar.tpl
@@ -37,7 +37,7 @@
{cycle values="notmonth" print=false advance=false}
{/if}
- <td class="calday {cycle}">
+ <td class="calday{if $day.day eq $navigation.today} highlight{/if} {cycle}">
{if $day.day|date_format:"%m" eq $modCalNavigation.focus_month}
{if $day.day eq $modCalNavigation.focus_date}<strong>{/if}
<a href="{$smarty.const.CALENDAR_PKG_URL}index.php?todate={$day.day}&amp;{$url_string}">{$day.day|date_format:"%d"}</a>
diff --git a/styles/plain.css b/styles/plain.css
index 3302bdf..82d64e6 100644
--- a/styles/plain.css
+++ b/styles/plain.css
@@ -3,7 +3,8 @@
/* hopefully we can select calendar styling options for the admin area soon */
.caltable th,.caltable td {vertical-align:top;}
.body .caltable td {height:6em;}
-.caltable .current {border:2px solid red; background:#ffc;}
+.caltable .current {border:2px solid #900; background:#fed;}
+.caltable .highlight {border:2px solid #aad;}
.caloptions div {border-width:0 0 3px 0; border-style:solid; padding:2px 0 0 0;}
.calitems div a {border-width:0 0 3px 0; border-style:solid; display:block; padding:3px 2px 1px 2px;}
.calitems .calnumber a {border-width:0; padding:0;}
diff --git a/templates/calendar.tpl b/templates/calendar.tpl
index 46dddea..f28093b 100644
--- a/templates/calendar.tpl
+++ b/templates/calendar.tpl
@@ -1,6 +1,5 @@
-{* $Header: /cvsroot/bitweaver/_bit_calendar/templates/calendar.tpl,v 1.35 2005/10/07 07:09:32 squareing Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_calendar/templates/calendar.tpl,v 1.36 2005/12/06 00:10:10 squareing Exp $ *}
{strip}
-
{if !$gBitSystem->isFeatureActive( 'feature_helppopup' )}
{popup_init src="`$smarty.const.THEMES_PKG_URL`js/overlib.js"}
{/if}
@@ -52,8 +51,7 @@
</th>
</tr>
<tr>
- {cycle values="odd,even" print=false advance=false}
- <td class="calitems {if $day.day eq $navigation.display_focus_date}current{/if} {cycle}">
+ <td class="calitems {if $day.day eq $navigation.display_focus_date} current{/if}{if $day.day eq $navigation.today} highlight{/if} {cycle}">
{if $day.day|cal_date_format:"%m" eq $navigation.focus_month or $smarty.session.calendar.view_mode eq "week"}
{foreach from=$day.items item=item}
{assign var=over value=$item.over}
@@ -92,7 +90,7 @@
{cycle values="odd,even" print=false advance=false}
{/if}
- <td class="calitems {if $day.day eq $navigation.display_focus_date}current{/if} {cycle}">
+ <td class="calitems {if $day.day eq $navigation.display_focus_date} current{/if}{if $day.day eq $navigation.today} highlight{/if} {cycle}">
{if $day.day|cal_date_format:"%m" eq $navigation.focus_month or $smarty.session.calendar.view_mode eq "week"}
<div class="calnumber">
<a href="{$smarty.const.CALENDAR_PKG_URL}index.php?view_mode=day&amp;todate={$day.day}&amp;{$url_string}">{$day.day|cal_date_format:"%d"}</a>
diff --git a/templates/calendar_nav_inc.tpl b/templates/calendar_nav_inc.tpl
index 7fa3406..92e0390 100644
--- a/templates/calendar_nav_inc.tpl
+++ b/templates/calendar_nav_inc.tpl
@@ -13,42 +13,46 @@
<div class="clear"></div>
<br />
-{if $gBitSystemPrefs.feature_jscalendar eq 'y'}
+{if $gBitSystem->isFeatureActive( 'feature_jscalendar' )}
<table>
<tr>
<td>
- <form action="{$gBitLoc.CALENDAR_PKG_URL}index.php" method="get" id="f">
- <input type="hidden" id="todate" name="todate" value="{$focus_date|cal_date_format:"%B %e, %Y %H:%M %Z"}" />
- <span title="{tr}Date Selector{/tr}" id="datrigger">{$focus_date|bit_long_date}</span>
- &lt;- {tr}click to navigate{/tr}
- </form>
+ <div>
+ {form method="get" id="f"}
+ <input type="hidden" id="todate" name="todate" value="{$navigation.focus_date|cal_date_format:"%B %e, %Y %H:%M %Z"}" />
+ <span class="highlight" style="cursor:pointer;" title="{tr}Date Selector{/tr}" id="datrigger">{$navigation.focus_date|bit_long_date}</span>
+ &nbsp;&nbsp;&nbsp;<small>&laquo;&nbsp;{tr}click to navigate{/tr}</small>
+ {/form}
+ </div>
- <script type="text/javascript">
+ <script type="text/javascript">//<![CDATA[
function gotocal() {ldelim}
window.location = '{$gBitLoc.CALENDAR_PKG_URL}index.php?todate='+document.getElementById('todate').value;
{rdelim}
Calendar.setup( {ldelim}
- date : "{$focus_date|bit_date_format:"%m/%d/%Y %H:%M"}", // initial date
- inputField : "todate", // ID of the input field
- ifFormat : "%s", // the date format
- displayArea : "datrigger", // ID of the span where the date is to be shown
- daFormat : "{"%d/%m/%Y %H:%M"}", // format of the displayed date
+ date : "{$navigation.focus_date|bit_date_format:"%m/%d/%Y %H:%M"}", // initial date
+ inputField : "todate", // ID of the input field
+ ifFormat : "%s", // the date format
+ displayArea : "datrigger", // ID of the span where the date is to be shown
+ daFormat : "{"%d/%m/%Y %H:%M"}", // format of the displayed date
electric : false,
onUpdate : gotocal
{rdelim} );
- </script>
+ //]]></script>
</td>
-
- <td nowrap="nowrap" width="120" align="right">
+{strip}
+ <td style="white-space:nowrap; width:140px; text-align:right;">
<a href="{$gBitLoc.CALENDAR_PKG_URL}index.php?view_mode=day&amp;{$url_string}" class="{if $smarty.session.calendar.view_mode eq 'day'}highlight{/if}">{biticon ipackage=calendar iname=day iexplain=Day}</a>
<a href="{$gBitLoc.CALENDAR_PKG_URL}index.php?view_mode=week&amp;{$url_string}" class="{if $smarty.session.calendar.view_mode eq 'week'}highlight{/if}">{biticon ipackage=calendar iname=week iexplain=Week}</a>
<a href="{$gBitLoc.CALENDAR_PKG_URL}index.php?view_mode=weeklist&amp;{$url_string}" class="{if $smarty.session.calendar.view_mode eq 'weeklist'}highlight{/if}">{biticon ipackage=calendar iname=weeklist iexplain=Weeklist}</a>
<a href="{$gBitLoc.CALENDAR_PKG_URL}index.php?view_mode=month&amp;{$url_string}" class="{if $smarty.session.calendar.view_mode eq 'month'}highlight{/if}">{biticon ipackage=calendar iname=month iexplain=Month}</a>
</td>
+{/strip}
</tr>
</table>
{else}
+{strip}
<table>
<tr>
<td rowspan="2" style="text-align:left;">
@@ -79,4 +83,5 @@
</td>
</tr>
</table>
+{/strip}
{/if}
diff --git a/templates/calendar_options_inc.tpl b/templates/calendar_options_inc.tpl
index f8be6e7..9e04469 100644
--- a/templates/calendar_options_inc.tpl
+++ b/templates/calendar_options_inc.tpl
@@ -2,16 +2,17 @@
<div class="row caloptions">
{forminput}
{foreach from=$contentTypes key=value item=type}
- <label>
- <div class="cal{$value}">
+ <div class="cal{$value}">
+ <label>
<input type="checkbox" value="{$value}" name="content_type_guid[]"
{foreach from=$smarty.session.calendar.content_type_guid item=selected}
{if $selected eq $value}
checked="checked"
{/if}
{/foreach}
- /> {$type}</label><br />
- </div>
+ /> {$type}
+ </label>
+ </div>
{/foreach}
<script type="text/javascript">//<![CDATA[
document.write("<label><input name=\"switcher\" id=\"switcher\" type=\"checkbox\" onclick=\"switchCheckboxes(this.form.id,'content_type_guid[]','switcher')\" /> {tr}Select all{/tr}</label><br />");