Commit 0560dc45 authored by mose's avatar mose

[MOD] calendar: implemented deisplay of custom colors

parent f2adfd21
......@@ -177,8 +177,11 @@ src='pics/icons/key.png' border='0' width='16' height='16' alt='{tr}permissions{
<tr class="formcolor"><td>{tr}End of day{/tr}:</td><td>
{html_select_time prefix="endday_" display_seconds=false display_minutes=false time=$endday}{tr}h{/tr}
</td></tr>
<tr class="formcolor"><td>{tr}Custom Color{/tr}:</td><td>
<input type="text" name="options[customcolor]" value="{$customcolor}" size="6" />
<tr class="formcolor"><td>{tr}Custom foreground color{/tr}:</td><td>
<input type="text" name="options[customfgcolor]" value="{$customfgcolor}" size="6" />
</td></tr>
<tr class="formcolor"><td>{tr}Custom background color{/tr}:</td><td>
<input type="text" name="options[custombgcolor]" value="{$custombgcolor}" size="6" />
</td></tr>
<tr class="formcolor"><td>&nbsp;</td><td><input type="submit" name="save" value="{tr}Save{/tr}" /></td></tr>
</table>
......
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-calendar.tpl,v 1.69 2006-12-08 13:46:14 mose Exp $ *}
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-calendar.tpl,v 1.70 2006-12-12 23:34:48 mose Exp $ *}
{popup_init src="lib/overlib.js"}
<div id="calscreen">
......@@ -11,17 +11,20 @@
<span class="button2"><a href="tiki-calendar_edit_item.php"class="linkbut">{tr}add item{/tr}</a></span>
{/if}
<a href="#" title="{tr}Click to select visible calendars{/tr}" class="linkbut" onclick="toggle('filtercal');">{tr}Visible Calendars{/tr}
<span style="background-color:#fff;margin-left:4px; padding:0 4px;">
<span class="button2"><a href="#" title="{tr}Click to select visible calendars{/tr}" class="linkbut" onclick="toggle('filtercal');">{tr}Visible Calendars{/tr}</a></span>
{if count($thiscal)}
{foreach item=k from=$listcals name=listc}
{if $thiscal.$k}
{$infocals.$k.name}
<span class="button2"><a href="#" class="linkbut" style="background-color:#{$infocals.$k.custombgcolor};color:#{$infocals.$k.customfgcolor}" onclick="toggle('filtercal');">{$infocals.$k.name}</a></span>
{/if}
{/foreach}
{/if}
{else}
<span class="button2" style="background-color:#fff;padding:0 4px;">
none
</span>
</a>
{/if}
<span class="button2">
{if $viewlist eq 'list'}
......
......@@ -4,7 +4,7 @@
{if $calendar_sticky_popup eq "y" and $cellid}&nbsp;<a onmouseover="javascript:cClick()" title="{tr}close{/tr}">{html_image file='img/icons/close.gif' alt="{tr}close{/tr}"}</a>{/if}
</div>
{if $show_calname eq 'y' and $cellcalname}<div class='box-title'><b>{$cellcalname}</b></div>{/if}
{if $show_calname eq 'y' and $cellcalname}<div class='box-title' style="background-color:#{$infocals.$cellcalendarId.custombgcolor};color:#{$infocals.$cellcalendarId.customfgcolor};"><b>{$cellcalname}</b></div>{/if}
{if $cellid}
<div style="text-align:right" class='box-title'>
......
......@@ -26,12 +26,14 @@
<div class="calcontent">
{section name=items loop=$cell[w][d].items}
{assign var=over value=$cell[w][d].items[items].over}
<div class="Cal{$cell[w][d].items[items].type} calId{$cell[w][d].items[items].calendarId}" {if $cell[w][d].items[items].calitemId eq $calitemId and $calitemId|string_format:"%d" ne 0}style="padding:5px;border:1px solid black;"{/if}>
<span class="calprio{$cell[w][d].items[items].prio}" style="padding-left:3px;padding-right:3px;"><a
{assign var=calendarId value=$cell[w][d].items[items].calendarId}
<span class="calprio{$cell[w][d].items[items].prio}" style="padding:0 2px;color:#666;float:left;">{$cell[w][d].items[items].prio}</span>
<div class="Cal{$cell[w][d].items[items].type} calId{$cell[w][d].items[items].calendarId}">
<a style="padding:0 3px;background-color:#{$infocals.$calendarId.custombgcolor};color:#{$infocals.$calendarId.customfgcolor};"
{if $cell[w][d].items[items].modifiable eq "y" || $cell[w][d].items[items].visible eq 'y'}href="{$cell[w][d].items[items].url}"{/if}
{if $calendar_sticky_popup eq "y" and $cell[w][d].items[items].calitemId}{popup sticky=true fullhtml="1" text=$over|escape:"javascript"|escape:"html"}{else}
{popup fullhtml="1" text=$over|escape:"javascript"|escape:"html"}{/if}
class="linkmenu">{$cell[w][d].items[items].name|truncate:$trunc:".."|default:"..."}</a></span>
class="linkmenu">{$cell[w][d].items[items].name|truncate:$trunc:".."|default:"..."}</a>
{if $cell[w][d].items[items].web}
<a href="{$cell[w][d].items[items].web}" target="_other" class="calweb" title="{$cell[w][d].items[items].web}"><img src="img/icons/external_link.gif" width="7" height="7" alt="&gt;" border="0"/></a>
{/if}
......
......@@ -13,7 +13,7 @@
{/if}
<br /><br />
&nbsp;
{if id}
{if $id}
{if $edit}
<a href="tiki-calendar_edit_item.php?viewcalitemId={$id}" class="linkbut">{tr}View event{/tr}</a>
{elseif $tiki_p_change_events eq 'y'}
......@@ -44,12 +44,15 @@
{if $edit}
<tr><td colspan="2"><input type="submit" name="act" value="Save" />
{tr}in{/tr}
<span class="linkbut" style="background-color:#{$listcals.$calendarId.custombgcolor};color:#{$listcals.$calendarId.customfgcolor}">{$listcals.$calendarId.name}</span>
{tr}or{/tr}
<input type="submit" name="act" value="{tr}Go to{/tr}" onclick="document.location='{$myurl}?calendarId='+document.getElementById('calid').value;return false;" />
<input type="submit" name="act" value="{tr}Duplicate to{/tr}" onclick="document.location='{$myurl}?calendarId='+document.getElementById('calid').value+'&amp;calitemId={$id}&amp;duplicate=1';return false;" />
<select name="save[calendarId]" id="calid">
{foreach item=it key=itid from=$listcals}
<option value="{$it.calendarId}"{if $calitem.calendarId eq $itid} selected="selected"{/if}>{$it.name}</option>
<option value="{$it.calendarId}"{if $calendarId eq $itid} selected="selected"{/if}>{$it.name}</option>
{/foreach}
</select>
{tr}or{/tr} <input type="submit" name="act" value="Go to" onclick="document.location='{$myurl}?calendarId='+document.getElementById('calid').value;return false;" />
</td></tr>
{else}
<tr class="formcolor"><td>
......@@ -68,7 +71,7 @@
{/if}
</td>
</tr>
<tr class="formcolor">
<tr >
<td>{tr}Start{/tr}</td><td>
{if $edit}
<table cellpadding="0" cellspacing="0" border="0" style="border:0;">
......@@ -104,7 +107,7 @@
{/if}
</td>
</tr>
<tr class="formcolor">
<tr >
<td>{tr}End{/tr}</td><td>
{if $edit}
<input type="hidden" name="save[end_or_duration]" value="end" id="end_or_duration" />
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/tiki-admin_calendars.php,v 1.29 2006-12-12 22:16:06 mose Exp $
// $Header: /cvsroot/tikiwiki/tiki/tiki-admin_calendars.php,v 1.30 2006-12-12 23:34:48 mose Exp $
// Copyright (c) 2002-2005, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
......@@ -44,7 +44,8 @@ if (isset($_REQUEST["save"])) {
$customflags["customsubscription"] = isset($_REQUEST["customsubscription"]) ? $_REQUEST["customsubscription"] : 'n';
$customflags["personal"] = $_REQUEST["personal"];
$options = $_REQUEST['options'];
if (!preg_match('/^[0-9a-fA-F]{3,6}$/',$options['customcolor'])) $options['customcolor'] = 'ffffff';
if (!preg_match('/^[0-9a-fA-F]{3,6}$/',$options['customfgcolor'])) $options['customfgcolor'] = '000000';
if (!preg_match('/^[0-9a-fA-F]{3,6}$/',$options['custombgcolor'])) $options['custombgcolor'] = 'ffffff';
$options['startday'] = $_REQUEST['startday_Hour']*60*60 - 1;
$options['endday'] = $_REQUEST['endday_Hour']*60*60 - 1;
$extra = array('calname','description','location','description','language','category','participants','url');
......@@ -97,7 +98,8 @@ if ($_REQUEST["calendarId"]) {
$info["custompriorities"] = 'n';
$info["customsubscription"] = 'n';
$info["customurl"] = 'n';
$info["customcolor"] = 'ffffff';
$info["customfgcolor"] = '000000';
$info["custombgcolor"] = 'ffffff';
$info["show_calname"] = 'y';
$info["show_description"] = 'y';
$info["show_category"] = 'n';
......@@ -121,7 +123,8 @@ $smarty->assign('customcategories', $info["customcategories"]);
$smarty->assign('custompriorities', $info["custompriorities"]);
$smarty->assign('customsubscription', $info["customsubscription"]);
$smarty->assign('customurl', $info["customurl"]);
$smarty->assign('customcolor', $info["customcolor"]);
$smarty->assign('customfgcolor', $info["customfgcolor"]);
$smarty->assign('custombgcolor', $info["custombgcolor"]);
$smarty->assign('show_calname', $info["show_calname"]);
$smarty->assign('show_description', $info["show_description"]);
$smarty->assign('show_category', $info["show_category"]);
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/tiki-calendar.php,v 1.62 2006-12-12 18:43:01 mose Exp $
// $Header: /cvsroot/tikiwiki/tiki/tiki-calendar.php,v 1.63 2006-12-12 23:34:48 mose Exp $
// Copyright (c) 2002-2005, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
......@@ -255,6 +255,7 @@ for ($i = 0; $i <= $numberofweeks; $i++) {
$lec = $infocals['data']["{$le['calendarId']}"];
$leday["{$le['time']}$e"] = $le;
$smarty->assign('cellcalendarId', $le["calendarId"]);
$smarty->assign('cellhead', $le["head"]);
$smarty->assign('cellprio', $le["prio"]);
$smarty->assign('cellcalname', $le["calname"]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment