*** empty log message ***

This commit is contained in:
sebastian 2005-03-15 22:48:44 +00:00
parent 111b62de37
commit 162ea44857
5 changed files with 129 additions and 47 deletions

View file

@ -7,6 +7,7 @@
{include file="script/basics.js.tpl"}
{include file="script/contextMenue.js.tpl"}
{include file="script/collector.js.tpl"}
{include file="script/mouseOver.js.tpl"}
</head>
<body>

View file

@ -1,47 +1,66 @@
{$SCHEDULER->buildWeek()}
{assign var="_divisor" value=180}
{assign var="_minwidth" value=20}
{assign var="_scale" value=$SCHEDULER->getDayTimingScale()}
<table border="1">
<tr>
<td rowspan="2"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=--')"><<</a> </td>
{foreach from=$SCHEDULER->Week item="_Weekday"}
<th>{$_Weekday.label.full}</th>
<td rowspan="3"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=--')"><<</a> </td>
{foreach from=$SCHEDULER->Week item="_Day"}
<th colspan="2" width="100">{$_Day.label.full}</th>
{/foreach}
<td rowspan="3"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=%2B%2B')">>></a></td>
</tr>
<tr>
{foreach from=$SCHEDULER->Week item="_Day"}
<td colspan="2">
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=day&day={$_Day.day}&month={$_Day.month}&year={$_Day.year}')"><b>{$_Day.day}</b></a>
</td>
{/foreach}
<td rowspan="2"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=%2B%2B')">>></a></td>
</tr>
<tr>
{foreach from=$SCHEDULER->Week item="_Day"}
<td valign="top">
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=day&day={$_Day.day}&month={$_Day.month}&year={$_Day.year}')"><b>{$_Day.day}</b></a>
{assign var="_oneday" value=$SCHEDULER->getDayTiming($_Day.year, $_Day.month, $_Day.day)}
{assign var="_oneday" value=$SCHEDULER->getDayTiming($_Day.year, $_Day.month, $_Day.day)}
<td valign="top">
<table border="1" cellspacing="0" cellpadding="0">
{foreach from=$_scale item="_hour"}
<tr height="20" style="font-family: monospace;" valign="top">
<td bgcolor="grey" {include file="scheduler/contextmenu.tpl"}>
<div style="padding: 1px">{$_hour|string_format:'%02d'}</div>
</td>
</tr>
{/foreach}
</table>
</td>
<td>
<table border="0" cellspacing="0" cellpadding="0">
{foreach from=$_oneday item="i"}
<tr height="{$SCHEDULER->_oneOrMore($i.length/$_divisor)}" style="font-family: monospace" valign="top">
{assign var = "_start" value = $i.entry.start|regex_replace:"/[0-9]+T/":""}
{assign var = "_end" value = $i.entry.end|regex_replace:"/[0-9]+T/":""}
{assign var = "_period" value = "$_start-$_end"}
{assign var = "_title" value = $i.entry.title}
{assign var = "_creator" value = $i.entry.creator}
<tr height="{$SCHEDULER->_oneOrMore($i.length/$_divisor)}" style="font-family: monospace;" valign="top">
{if is_array($i.entry)}
<td bgcolor="#ffcacb" width="100" onMouseover="" onMouseout="">
{if $i.length/$_divisor > $_minwidth}
<small>
<b>{$i.entry.title}</b>
<br>
{$i.entry.start|regex_replace:"/[0-9]+T/":""|truncate:5:""}-{$i.entry.end|regex_replace:"/[0-9]+T/":""|truncate:5:""}
<br>
{$i.entry.creator}
</small>
<td bgcolor="#ffcacb" width="70"><div style="padding: 1px"><small><b>{$_title}</b><br>{$_period}<br>{$_creator}</small></div></td>
{else}
<td bgcolor="#ffcacb" width="70" onMouseover="mouseoverShow('<small><b>{$_title}</b><br>{$_period}<br>{$_creator}</small>')" onMouseout="mouseoverHide()"></td>
{/if}
</td>
{else}
<td bgcolor="#97bacf" width="100">
</td>
<td bgcolor="#97bacf" width="70"></td>
{/if}
</tr>
{/foreach}
</table>
</td>
{/foreach}
</tr>

View file

@ -3,22 +3,22 @@
// www.jjam.de - Kontextmenü mit JavaScript - Version 15.12.2002
// Nur für IE 5+ und NN 6+
ie5=(document.getElementById && document.all && document.styleSheets)?1:0;
nn6=(document.getElementById && !document.all)?1:0;
ie5 = (document.getElementById && document.all && document.styleSheets) ? 1 : 0;
nn6 = (document.getElementById && !document.all) ? 1 : 0;
menuStatus = 0;
document.onmouseup = hideMenu;
document.write('<div id="menucontainer"></div>');
menuWidth = 180,
menuWidth = 0,
menuHeight = 0;
function menu(param) {
var menuHeader = "<div id='menu' style='position:absolute;top:-250;left:0;z-index:100'>"+
"<table cellpadding='5' cellspacing='0' width='"+menuWidth+"' height='"+menuHeight+"' style='border-style:outset;border-width:1;border-color:#3a6c96;background-color:#4682B4'>";
var menuHeader = "<div id='menu' style='position: absolute; top: -250; left: 0; z-index: 100'>" +
"<table cellpadding='5' cellspacing='0' width='" + menuWidth + "' height='" + menuHeight + "' style='border-style: outset; border-width: 1; border-color: #3a6c96 ;background-color: #4682B4'>";
var menuFooter = "</table></div>";
var menuHtml = '';
var sp2 = "&nbsp;&nbsp;";
var sp5 = sp2+sp2+"&nbsp;"; // Leerzeichen als Abstandshalter (flexibler und code-sparender als eine aufwendige Tabellenkonstruktion) ;
var oF = "onfocus='if(this.blur)this.blur()'"; // Um hässlichen Linkrahmen in einigen Browsern zu vermeiden;
var sp5 = sp2 + sp2 + "&nbsp;"; // Leerzeichen als Abstandshalter (flexibler und code-sparender als eine aufwendige Tabellenkonstruktion) ;
var oF = "onfocus = 'if (this.blur) this.blur()'"; // Um hässlichen Linkrahmen in einigen Browsern zu vermeiden;
var entry = new Array();
//menuStatus = 0;
@ -99,33 +99,35 @@ function menu(param) {
function showMenu(e) {
if(ie5) {
if(event.clientX>menuWidth) xPos=event.clientX-menuWidth+document.body.scrollLeft;
else xPos=event.clientX+document.body.scrollLeft;
if (event.clientY>menuHeight) yPos=event.clientY-menuHeight+document.body.scrollTop;
else yPos=event.clientY+document.body.scrollTop;
if (ie5) {
if (event.clientX > menuWidth) xPos = event.clientX - menuWidth + document.body.scrollLeft;
else xPos = event.clientX + document.body.scrollLeft;
if (event.clientY > menuHeight) yPos = event.clientY - menuHeight + document.body.scrollTop;
else yPos = event.clientY + document.body.scrollTop;
}
else {
if(e.pageX>menuWidth+window.pageXOffset) xPos=e.pageX-menuWidth;
else xPos=e.pageX;
if(e.pageY>menuHeight+window.pageYOffset) yPos=e.pageY-menuHeight;
else yPos=e.pageY;
if (e.pageX > menuWidth + window.pageXOffset) xPos = e.pageX - menuWidth;
else xPos = e.pageX;
if (e.pageY > menuHeight + window.pageYOffset) yPos = e.pageY - menuHeight;
else yPos = e.pageY;
}
document.getElementById("menu").style.left=xPos;
document.getElementById("menu").style.top=yPos;
menuStatus=1;
document.getElementById("menu").style.left = xPos;
document.getElementById("menu").style.top = yPos;
menuStatus = 1;
document.oncontextmenu = null;
}
function hideMenu(e) {
if (menuStatus==1) {
setTimeout("document.getElementById('menu').style.top=-250", 100);
menuStatus=0;
if (menuStatus == 1) {
setTimeout("document.getElementById('menu').style.top =- 250", 100);
menuStatus = 0;
}
}
var passed=false;
var passed = false;
function highlight()
{
//if (!passed) alert('try rightclick in lists...');
@ -139,9 +141,9 @@ function darklight()
</script>
<style type="text/css">
a.menu {text-decoration:none;font-family:Verdana,Arial;font-size:80%}
a.menu:link,a.menu:visited {text-decoration:none;color:#F0F8FF}
a.menu:hover,a.menu:active {text-decoration:none;background-color:#F0F8FF;color:#000040}
hr.menu {border:0px;height:1px;background-color:#B0C4DE;color:#B0C4DE}
a.menu {text-decoration:none;font-family: Verdana, Arial; font-size: 80%}
a.menu:link,a.menu:visited {text-decoration: none; color : #F0F8FF}
a.menu:hover,a.menu:active {text-decoration: none; background-color: #F0F8FF; color: #000040}
hr.menu {border: 0px; height: 1px; background-color: #B0C4DE; color: #B0C4DE}
</style>
{/literal}

View file

@ -0,0 +1,49 @@
{literal}
<script type="text/javascript">
var mouseoverWidth = 150;
var mouseoverHeight = 0;
var duration = 0;
var mouseoverHeader = "<div id='mouseoverText' style='position:absolute; top: -250; left: 0; z-index: 100; background-color: #ffcacb; padding: 2px; width: " + mouseoverWidth + "'>";
var mouseoverFooter = "</div>";
document.write('<div id="mouseoverContainer"></div>');
function mouseoverShow(text)
{
document.getElementById('mouseoverContainer').innerHTML = mouseoverHeader + text + mouseoverFooter;
document.onmouseover = mouseoverPlace;
}
function mouseoverPlace(e)
{
if (ie5) {
var corr = 5;
if (event.clientX > mouseoverWidth) xPos = event.clientX - mouseoverWidth + document.body.scrollLeft;
else xPos = event.clientX + document.body.scrollLeft;
if (event.clientY > mouseoverHeight) yPos = event.clientY - mouseoverHeight + document.body.scrollTop;
else yPos = event.clientY + document.body.scrollTop;
}
else {
var corr = 10;
if (e.pageX > mouseoverWidth + window.pageXOffset) xPos = e.pageX - mouseoverWidth;
else xPos = e.pageX;
if (e.pageY > mouseoverHeight + window.pageYOffset) yPos = e.pageY - mouseoverHeight;
else yPos = e.pageY;
}
document.getElementById("mouseoverText").style.left = xPos - corr;
document.getElementById("mouseoverText").style.top = yPos;
mouseoverStatus = 1;
document.onmouseover = null;
}
function mouseoverHide(e) {
if (mouseoverStatus == 1) {
setTimeout("document.getElementById('mouseoverText').style.top =- 250", duration);
mouseoverStatus = 0;
}
}
</script>
{/literal}

View file

@ -151,6 +151,17 @@ class uiScheduler extends uiCalendar
}
function getDayTimingScale()
{
for ($n = 0; $n <= 23; $n++) {
$scale[] = $n;
}
#print_r($scale);
return $scale;
}
function _oneOrMore($in)
{
return $id < 1 ? ceil($in) : round($in);