<< |
@@ -14,24 +16,31 @@
{foreach from=$SCHEDULER->Week item="_Day"}
{$_Day.day}
- {if $_Day.isSelected}
+
{assign var="_oneday" value=$SCHEDULER->getDayTiming($_Day.year, $_Day.month, $_Day.day)}
-
+
+
{foreach from=$_oneday item="i"}
-
-
- {if is_array($i.entry)}
- Start:{$i.entry.start|regex_replace:"/[0-9]+T/":""}
-
- End: {$i.entry.end|regex_replace:"/[0-9]+T/":""}
- {else}
- Gap
- {/if}
- |
+
+ {if is_array($i.entry)}
+
+ {if $i.length/$_divisor > $_minwidth}
+
+ Start:{$i.entry.start|regex_replace:"/[0-9]+T/":""}
+
+ End: {$i.entry.end|regex_replace:"/[0-9]+T/":""}
+
+ {/if}
+ |
+ {else}
+
+ |
+ {/if}
{/foreach}
+
- {/if}
+
{/foreach}
diff --git a/livesupport/modules/htmlUI/var/ui_handler.class.php b/livesupport/modules/htmlUI/var/ui_handler.class.php
index c395f36ef..e5d6d0d6f 100644
--- a/livesupport/modules/htmlUI/var/ui_handler.class.php
+++ b/livesupport/modules/htmlUI/var/ui_handler.class.php
@@ -266,12 +266,13 @@ class uiHandler extends uiBase {
}
}
$data = $this->_dateArr2Str($mData);
- foreach ($data as $key=>$val) { echo "\n".$key.": ".$val."\n";
+ foreach ($data as $key=>$val) {
$r = $this->gb->setMDataValue($id, $key, $this->sessid, $val);
- print_r($r);
+ if (PEAR::isError($r)) {
+ $this->_retMsg('Unable to set $1: $2', $key, $val);
+ }
}
$this->_retMsg('Metadata saved');
- $type = $this->gb->getFileType($id)=='webstream' ? 'Webstream' : 'File';
$this->redirUrl = UI_BROWSER."?act=editItem&id=$id";
}
diff --git a/livesupport/modules/htmlUI/var/ui_scheduler.class.php b/livesupport/modules/htmlUI/var/ui_scheduler.class.php
index d2d435e4a..92b442105 100755
--- a/livesupport/modules/htmlUI/var/ui_scheduler.class.php
+++ b/livesupport/modules/htmlUI/var/ui_scheduler.class.php
@@ -84,44 +84,46 @@ class uiScheduler extends uiCalendar
function getDayTiming($year, $month, $day)
{
- if (!$arr = $this->getDayUsage($year, $month, $day))
- return false;
-
## !! bug in strtotime. zeigt 8h später an als reines datum, wenn Txx:xx:xx verwendet wird !!
-
$day_start = $this->_datetime2timestamp($year.$month.$day.'T00:00:00');
$day_end = $this->_datetime2timestamp($year.$month.$day.'T23:59:59');
+ if (!$arr = $this->getDayUsage($year, $month, $day))
+ return array(array( ## empty day
+ 'type' => 'gap',
+ 'length' => $day_end - $day_start
+ ));
+
$curr = current($arr);
if (strtotime($curr['start']) > $day_start) ## insert gap if first entry start after 00:00:00
$list[] = array(
- 'type' => 'firstgap',
- 'pos' => 0,
- 'length' => strtotime($curr['start']) - $day_start -1
+ 'type' => 'gap',
+ #'pos' => 0,
+ 'length' => strtotime($curr['start']) - $day_start
);
while ($curr = current($arr)) {
$list[] = array(
'type' => 'entry',
- 'pos' => strtotime($curr['start']) - $day_start,
+ #'pos' => strtotime($curr['start']) - $day_start,
'length' => strtotime($curr['end']) - strtotime($curr['start']),
'entry' => $curr
);
if ($next = next($arr)) {
- if ($next['start'] > $curr['end']+1) ## insert gap between entrys
+ if (strtotime($next['start']) > strtotime($curr['end'])+1) ## insert gap between entrys
$list[] = array(
'type' => 'gap',
- 'pos' => strtotime($curr['start'])-$day_start,
- 'length' => strtotime($next['start']) - strtotime($curr['end']) -1,
+ #'pos' => strtotime($curr['start'])-$day_start,
+ 'length' => strtotime($next['start']) - strtotime($curr['end']),
);
}
else {
if (strtotime($curr['end']) < $day_end) ## insert gap if prev entry was not until midnight
$list[] = array(
- 'type' => 'lastgap',
- 'pos' => strtotime($curr['end']) - $day_start,
- 'length' => $day_end-strtotime($curr['end']),
+ 'type' => 'gap',
+ #'pos' => strtotime($curr['end']) - $day_start,
+ 'length' => $day_end - strtotime($curr['end']),
);
}
@@ -131,6 +133,11 @@ class uiScheduler extends uiCalendar
}
+ function _oneOrMore($in)
+ {
+ return $id < 1 ? ceil($in) : round($in);
+ }
+
function _scheduledDays($period)
{
if ($period=='month') {
|