*** empty log message ***
This commit is contained in:
parent
111b62de37
commit
162ea44857
5 changed files with 129 additions and 47 deletions
|
@ -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>
|
|
@ -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="2"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=%2B%2B')">>></a></td>
|
||||
<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 valign="top">
|
||||
<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}
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
{foreach from=$SCHEDULER->Week item="_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>
|
||||
{/if}
|
||||
</td>
|
||||
<td bgcolor="#ffcacb" width="70"><div style="padding: 1px"><small><b>{$_title}</b><br>{$_period}<br>{$_creator}</small></div></td>
|
||||
{else}
|
||||
<td bgcolor="#97bacf" width="100">
|
||||
</td>
|
||||
<td bgcolor="#ffcacb" width="70" onMouseover="mouseoverShow('<small><b>{$_title}</b><br>{$_period}<br>{$_creator}</small>')" onMouseout="mouseoverHide()"></td>
|
||||
{/if}
|
||||
{else}
|
||||
<td bgcolor="#97bacf" width="70"></td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
|
||||
</td>
|
||||
|
||||
{/foreach}
|
||||
</tr>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ 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) {
|
||||
|
@ -111,6 +111,7 @@ function showMenu(e) {
|
|||
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;
|
||||
|
@ -126,6 +127,7 @@ function hideMenu(e) {
|
|||
}
|
||||
|
||||
var passed = false;
|
||||
|
||||
function highlight()
|
||||
{
|
||||
//if (!passed) alert('try rightclick in lists...');
|
||||
|
|
49
livesupport/modules/htmlUI/var/templates/script/mouseOver.js.tpl
Executable file
49
livesupport/modules/htmlUI/var/templates/script/mouseOver.js.tpl
Executable 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}
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue