*** empty log message ***

This commit is contained in:
sebastian 2005-03-10 12:09:36 +00:00
parent 546999a62b
commit dfde7d4dbe
5 changed files with 59 additions and 30 deletions

View file

@ -0,0 +1,8 @@
{include file="header.tpl"}
{include file="script/PL.changeTransition.js.tpl"}
{include file="sub/dynForm_plain.tpl"}
</body>
</html>

View file

@ -33,9 +33,13 @@
<td><input type="checkbox" name="all" onClick="form_switchAll('SP')"></th> <td><input type="checkbox" name="all" onClick="form_switchAll('SP')"></th>
<td align="center" colspan="2"> <td align="center" colspan="2">
<select> <select>
<option>Multiple Action:</option> <option selected>Multiple Action:</option>
<option onClick="form_submit('SP', 'SP.removeItem')">Remove</option> <option onClick="form_submit('SP', 'SP.removeItem')">Remove</option>
{if $_PL_activeId}
<option onClick="form_submit('SP', 'PL.addItem')">Add to Playlist</option> <option onClick="form_submit('SP', 'PL.addItem')">Add to Playlist</option>
{else}
<option onClick="form_submit('SP', 'PL.create')">New Playlist using Item</option>
{/if}
</select> </select>
</th> </th>
<td align="center" colspan="2"><a href="#" onClick="form_clearAll('SP', 'SP.removeItem')">[Clear]</a></th> <td align="center" colspan="2"><a href="#" onClick="form_clearAll('SP', 'SP.removeItem')">[Clear]</a></th>

View file

@ -280,6 +280,7 @@ class uiBase
function _twoDigits($num) function _twoDigits($num)
{ {
if (strlen($num) == 1) if (strlen($num) == 1)
return "0$num"; return "0$num";
if (strlen($num) == 0) if (strlen($num) == 0)

View file

@ -133,7 +133,7 @@ class uiPlaylist
$r = $this->Base->gb->addAudioClipToPlaylist($this->token, $elemId, $this->Base->sessid); $r = $this->Base->gb->addAudioClipToPlaylist($this->token, $elemId, $this->Base->sessid);
if (PEAR::isError($r)) { if (PEAR::isError($r)) {
print_r($r); print_r($r);
$this->Base->_retMsg('Cannot add Item to Playlist'); $this->Base->_retMsg('Error on add item to Playlist');
return FALSE; return FALSE;
} }
} }
@ -173,7 +173,7 @@ class uiPlaylist
$this->Base->_retMsg('Cannot create Playlist'); $this->Base->_retMsg('Cannot create Playlist');
return FALSE; return FALSE;
} }
$this->Base->_setMDataValue($plid, 'dc:title', $datetime); $this->Base->_setMDataValue($plid, UI_MDATA_KEY_TITLE, $datetime);
if ($this->activate($plid)===FALSE) { if ($this->activate($plid)===FALSE) {
return FALSE; return FALSE;
} }
@ -208,10 +208,10 @@ class uiPlaylist
$this->flat[$parent]['attrs'] = $attrs; $this->flat[$parent]['attrs'] = $attrs;
} }
if ($sub['elementname']=='fadeinfo') { if ($sub['elementname']=='fadeinfo') {
$this->flat[$parent]['fadein'] = $this->_plTimeToSecs($sub['attrs']['fadein']); $this->flat[$parent]['fadein'] = GreenBox::_plTimeToSecs($sub['attrs']['fadein']);
$this->flat[$parent]['fadeout'] = $this->_plTimeToSecs($sub['attrs']['fadeout']); $this->flat[$parent]['fadeout'] = GreenBox::_plTimeToSecs($sub['attrs']['fadeout']);
$this->flat[$parent]['fadein_ms'] = $sub['attrs']['fadein'] ? $this->_plTimeToSecs($sub['attrs']['fadein']) * 1000 : 0; $this->flat[$parent]['fadein_ms'] = $sub['attrs']['fadein'] ? GreenBox::_plTimeToSecs($sub['attrs']['fadein']) * 1000 : 0;
$this->flat[$parent]['fadeout_ms'] = $sub['attrs']['fadeout'] ? $this->_plTimeToSecs($sub['attrs']['fadeout']) * 1000 : 0; $this->flat[$parent]['fadeout_ms'] = $sub['attrs']['fadeout'] ? GreenBox::_plTimeToSecs($sub['attrs']['fadeout']) * 1000 : 0;
} }
} }
} }
@ -226,34 +226,37 @@ class uiPlaylist
switch ($type) { switch ($type) {
case "fadeX": case "fadeX":
$item[$prev['attrs']['id']] = $item[$prev['attrs']['id']] =
array('fadeIn' => $this->_secsToPlTime($prev['fadein']), array('fadeIn' => GreenBox::_secsToPlTime($prev['fadein']),
'fadeOut' => $this->_secsToPlTime($duration/1000)); 'fadeOut' => GreenBox::_secsToPlTime($duration/1000));
$item[$id] = array('fadeIn' => $this->_secsToPlTime($duration/1000), $item[$id] = array('fadeIn' => GreenBox::_secsToPlTime($duration/1000),
'fadeOut' => $this->_secsToPlTime($curr['fadeout'])); 'fadeOut' => GreenBox::_secsToPlTime($curr['fadeout']));
break; break;
case "pause": case "pause":
$item[$prev['attrs']['id']] = $item[$prev['attrs']['id']] =
array('fadeIn' => $this->_secsToPlTime($prev['fadein']), array('fadeIn' => GreenBox::_secsToPlTime($prev['fadein']),
'fadeOut' => $this->_secsToPlTime(-$duration/1000)); 'fadeOut' => GreenBox::_secsToPlTime(-$duration/1000));
$item[$id] = array('fadeIn' => $this->_secsToPlTime(-$duration/1000), $item[$id] = array('fadeIn' => GreenBox::_secsToPlTime(-$duration/1000),
'fadeOut' => $this->_secsToPlTime($curr['fadeout'])); 'fadeOut' => GreenBox::_secsToPlTime($curr['fadeout']));
break; break;
case "fadeIn": case "fadeIn":
$item[$id] = array('fadeIn' => $this->_secsToPlTime($duration/1000), $item[$id] = array('fadeIn' => GreenBox::_secsToPlTime($duration/1000),
'fadeOut' => $this->_secsToPlTime($curr['fadeout'])); 'fadeOut' => GreenBox::_secsToPlTime($curr['fadeout']));
break; break;
case "fadeOut": case "fadeOut":
$item[$id] = array('fadeIn' => $this->_secsToPlTime($curr['fadein']), $item[$id] = array('fadeIn' => GreenBox::_secsToPlTime($curr['fadein']),
'fadeOut' => $this->_secsToPlTime($duration/1000)); 'fadeOut' => GreenBox::_secsToPlTime($duration/1000));
break; break;
} }
#print_r($item); #print_r($item);
foreach ($item as $i=>$val) { foreach ($item as $i=>$val) {
if ($this->Base->gb->changeFadeInfo($this->token, $i, $val['fadeIn'], $val['fadeOut'], $this->Base->sessid) === FALSE) $r = $this->Base->gb->changeFadeInfo($this->token, $i, $val['fadeIn'], $val['fadeOut'], $this->Base->sessid);
$this->Base->_retMsg('Feiled: changeFadeInfo'); #print_r($r);
if (PEAR::isError($r)) {
$this->Base->_retMsg('ChangeFadeInfo failed');
return FALSE; return FALSE;
} }
} }
}
function moveItem($id, $pos) function moveItem($id, $pos)

View file

@ -97,11 +97,12 @@ class uiScheduler extends uiCalendar
require_once 'Calendar/Month/Weekdays.php'; require_once 'Calendar/Month/Weekdays.php';
$Period = new Calendar_Month_Weekdays($this->curr['year'], $this->curr['month'], $this->firstDayOfWeek); $Period = new Calendar_Month_Weekdays($this->curr['year'], $this->curr['month'], $this->firstDayOfWeek);
$Period->build(); $Period->build();
} } elseif ($period=='week') {
if ($period=='week') {
require_once 'Calendar/Week.php'; require_once 'Calendar/Week.php';
$Period = new Calendar_Week ($this->curr['year'], $this->curr['month'], $this->curr['day'], $this->firstDayOfWeek); $Period = new Calendar_Week ($this->curr['year'], $this->curr['month'], $this->curr['day'], $this->firstDayOfWeek);
$Period->build(); $Period->build();
} else {
return array();
} }
$d = $Period->fetch(); $d = $Period->fetch();
$corrMonth = $d->thisMonth()<=12 ? $this->Base->_twoDigits($d->thisMonth()) : '01'; ## due to bug in $corrMonth = $d->thisMonth()<=12 ? $this->Base->_twoDigits($d->thisMonth()) : '01'; ## due to bug in
@ -135,8 +136,9 @@ class uiScheduler extends uiCalendar
{ {
$dfrom = $dfrom.'T00:00:00'; $dfrom = $dfrom.'T00:00:00';
$dto = $dto.'T23:59:59'; $dto = $dto.'T23:59:59';
$pArr = $this->displayScheduleMethod($dfrom, $dto); if (($pArr = $this->displayScheduleMethod($dfrom, $dto)) === FALSE)
#print_r($pArr); return array(FALSE);;
foreach ($pArr as $val) { foreach ($pArr as $val) {
#print_r($val); #print_r($val);
$pStampArr[] = array('start' => $this->_datetime2timestamp($val['start']), $pStampArr[] = array('start' => $this->_datetime2timestamp($val['start']),
@ -167,7 +169,16 @@ class uiScheduler extends uiCalendar
} }
} }
## XML-RPC methods ############################################################################################ function _isError($r)
{
if (is_array($r['error'])) {
$this->Base->_retMsg('Error: $1', $r['error']['message']);
return TRUE;
}
return FALSE;
}
## XML-RPC wrapper methods ############################################################################################
function initXmlRpc() function initXmlRpc()
{ {
include_once dirname(__FILE__).'/SchedulerPhpClient.class.php'; include_once dirname(__FILE__).'/SchedulerPhpClient.class.php';
@ -182,8 +193,8 @@ class uiScheduler extends uiCalendar
#echo "Schedule Gunid: $gunid At: ".$datetime; #echo "Schedule Gunid: $gunid At: ".$datetime;
$r = $this->spc->UploadPlaylistMethod($this->Base->sessid, $gunid, $datetime.UI_TIMEZONE); $r = $this->spc->UploadPlaylistMethod($this->Base->sessid, $gunid, $datetime.UI_TIMEZONE);
#print_r($r); #print_r($r);
if (is_array($r['error'])) if ($this->_isError($r))
$this->Base->_retMsg('Error: $1', $r['error']['message']); return FALSE;
if (isset($r['scheduleEntryId'])) if (isset($r['scheduleEntryId']))
$this->Base->_retMsg('ScheduleId: $1', $r['scheduleEntryId']); $this->Base->_retMsg('ScheduleId: $1', $r['scheduleEntryId']);
} }
@ -193,6 +204,8 @@ class uiScheduler extends uiCalendar
{ {
#echo $from.$to; #echo $from.$to;
$r = $this->spc->displayScheduleMethod($this->Base->sessid, $from, $to); $r = $this->spc->displayScheduleMethod($this->Base->sessid, $from, $to);
if ($this->_isError($r))
return FALSE;
return $r; return $r;
} }
} }