*** 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 align="center" colspan="2">
<select>
<option>Multiple Action:</option>
<option selected>Multiple Action:</option>
<option onClick="form_submit('SP', 'SP.removeItem')">Remove</option>
<option onClick="form_submit('SP', 'PL.addItem')">Add to Playlist</option>
{if $_PL_activeId}
<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>
</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)
{
if (strlen($num) == 1)
return "0$num";
if (strlen($num) == 0)

View file

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

View file

@ -97,11 +97,12 @@ class uiScheduler extends uiCalendar
require_once 'Calendar/Month/Weekdays.php';
$Period = new Calendar_Month_Weekdays($this->curr['year'], $this->curr['month'], $this->firstDayOfWeek);
$Period->build();
}
if ($period=='week') {
} elseif ($period=='week') {
require_once 'Calendar/Week.php';
$Period = new Calendar_Week ($this->curr['year'], $this->curr['month'], $this->curr['day'], $this->firstDayOfWeek);
$Period->build();
} else {
return array();
}
$d = $Period->fetch();
$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';
$dto = $dto.'T23:59:59';
$pArr = $this->displayScheduleMethod($dfrom, $dto);
#print_r($pArr);
if (($pArr = $this->displayScheduleMethod($dfrom, $dto)) === FALSE)
return array(FALSE);;
foreach ($pArr as $val) {
#print_r($val);
$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()
{
include_once dirname(__FILE__).'/SchedulerPhpClient.class.php';
@ -182,8 +193,8 @@ class uiScheduler extends uiCalendar
#echo "Schedule Gunid: $gunid At: ".$datetime;
$r = $this->spc->UploadPlaylistMethod($this->Base->sessid, $gunid, $datetime.UI_TIMEZONE);
#print_r($r);
if (is_array($r['error']))
$this->Base->_retMsg('Error: $1', $r['error']['message']);
if ($this->_isError($r))
return FALSE;
if (isset($r['scheduleEntryId']))
$this->Base->_retMsg('ScheduleId: $1', $r['scheduleEntryId']);
}
@ -193,6 +204,8 @@ class uiScheduler extends uiCalendar
{
#echo $from.$to;
$r = $this->spc->displayScheduleMethod($this->Base->sessid, $from, $to);
if ($this->_isError($r))
return FALSE;
return $r;
}
}