Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
Martin Konecny 2012-09-17 15:55:53 -04:00
commit 0e82083ba1
15 changed files with 404 additions and 320 deletions

View File

@ -420,8 +420,9 @@ class ApiController extends Zend_Controller_Action
$this->uploadRecordedActionParam($show_instance_id, $file_id); $this->uploadRecordedActionParam($show_instance_id, $file_id);
} }
// The paramterized version of the uploadRecordedAction controller. We want this controller's action // The paramterized version of the uploadRecordedAction controller.
// to be invokable from other controllers instead being of only through http // We want this controller's action to be invokable from other
// controllers instead being of only through http
public function uploadRecordedActionParam($show_instance_id, $file_id) public function uploadRecordedActionParam($show_instance_id, $file_id)
{ {
$showCanceled = false; $showCanceled = false;
@ -435,10 +436,10 @@ class ApiController extends Zend_Controller_Action
} catch (Exception $e) { } catch (Exception $e) {
//we've reached here probably because the show was //we've reached here probably because the show was
//cancelled, and therefore the show instance does not //cancelled, and therefore the show instance does not exist
//exist anymore (ShowInstance constructor threw this error). //anymore (ShowInstance constructor threw this error). We've
//We've done all we can do (upload the file and put it in //done all we can do (upload the file and put it in the
//the library), now lets just return. //library), now lets just return.
$showCanceled = true; $showCanceled = true;
} }
@ -449,7 +450,7 @@ class ApiController extends Zend_Controller_Action
if (!$showCanceled && Application_Model_Preference::GetAutoUploadRecordedShowToSoundcloud()) { if (!$showCanceled && Application_Model_Preference::GetAutoUploadRecordedShowToSoundcloud()) {
$id = $file->getId(); $id = $file->getId();
$res = exec("/usr/lib/airtime/utils/soundcloud-uploader $id > /dev/null &"); Application_Model_Soundcloud::uploadSoundcloud($id);
} }
} }

View File

@ -25,9 +25,7 @@ class DashboardController extends Zend_Controller_Action
$user = new Application_Model_User($userInfo->id); $user = new Application_Model_User($userInfo->id);
$show = Application_Model_Show::getCurrentShow(); $show = Application_Model_Show::getCurrentShow();
$show_id = isset($show[0]['id'])?$show[0]['id']:0;
$show_id = isset($show['id'])?$show['id']:0;
$source_connected = Application_Model_Preference::GetSourceStatus($sourcename); $source_connected = Application_Model_Preference::GetSourceStatus($sourcename);
if ($user->canSchedule($show_id) && $source_connected) { if ($user->canSchedule($show_id) && $source_connected) {

View File

@ -469,7 +469,7 @@ class LibraryController extends Zend_Controller_Action
public function uploadFileSoundcloudAction() public function uploadFileSoundcloudAction()
{ {
$id = $this->_getParam('id'); $id = $this->_getParam('id');
$res = exec("/usr/lib/airtime/utils/soundcloud-uploader $id > /dev/null &"); Application_Model_Soundcloud::uploadSoundcloud($id);
// we should die with ui info // we should die with ui info
die(); die();
} }
@ -486,10 +486,12 @@ class LibraryController extends Zend_Controller_Action
$this->view->error_code = $file->getSoundCloudErrorCode(); $this->view->error_code = $file->getSoundCloudErrorCode();
$this->view->error_msg = $file->getSoundCloudErrorMsg(); $this->view->error_msg = $file->getSoundCloudErrorMsg();
} elseif ($type == "file") { } elseif ($type == "file") {
$file = Application_Model_StoredFile::Recall($id); $file = Application_Model_StoredFile::Recall($id);
$this->view->sc_id = $file->getSoundCloudId(); $this->view->sc_id = $file->getSoundCloudId();
$this->view->error_code = $file->getSoundCloudErrorCode(); $this->view->error_code = $file->getSoundCloudErrorCode();
$this->view->error_msg = $file->getSoundCloudErrorMsg(); $this->view->error_msg = $file->getSoundCloudErrorMsg();
} else {
Logging::warn("Trying to upload unknown type: $type with id: $id");
} }
} }
} }

View File

@ -206,7 +206,6 @@ class ScheduleController extends Zend_Controller_Action
public function uploadToSoundCloudAction() public function uploadToSoundCloudAction()
{ {
global $CC_CONFIG;
$show_instance = $this->_getParam('id'); $show_instance = $this->_getParam('id');
try { try {
$show_inst = new Application_Model_ShowInstance($show_instance); $show_inst = new Application_Model_ShowInstance($show_instance);
@ -218,7 +217,8 @@ class ScheduleController extends Zend_Controller_Action
$file = $show_inst->getRecordedFile(); $file = $show_inst->getRecordedFile();
$id = $file->getId(); $id = $file->getId();
$res = exec("/usr/lib/airtime/utils/soundcloud-uploader $id > /dev/null &"); //$res = exec("/usr/lib/airtime/utils/soundcloud-uploader $id > /dev/null &");
Application_Model_Soundcloud::uploadSoundcloud($id);
// we should die with ui info // we should die with ui info
die(); die();
} }

View File

@ -1100,7 +1100,17 @@ class Application_Model_Preference
return function ($x) { return $x; }; return function ($x) { return $x; };
} else { } else {
$ds = unserialize($v); $ds = unserialize($v);
return function ($x) use ($ds) { return $ds['ColReorder'][$x]; } ; return function ($x) use ($ds) {
if ( in_array($x, $ds['ColReorder'] ) ) {
return $ds['ColReorder'][$x];
} else {
Logging::warn("Index $x does not exist preferences");
Logging::warn("Defaulting to identity and printing
preferences");
Logging::warn($ds);
return $x;
}
} ;
} }
} }

View File

@ -344,12 +344,12 @@ SELECT showt.name AS show_name,
JOIN cc_show AS showt ON (showt.id = si.show_id) JOIN cc_show AS showt ON (showt.id = si.show_id)
WHERE si.modified_instance = FALSE WHERE si.modified_instance = FALSE
$showPredicate $showPredicate
AND (si.starts >= '{$p_start}' AND ((si.starts >= '{$p_start}'
AND si.starts < '{$p_end}') AND si.starts < '{$p_end}')
OR (si.ends > '{$p_start}' OR (si.ends > '{$p_start}'
AND si.ends <= '{$p_end}') AND si.ends <= '{$p_end}')
OR (si.starts <= '{$p_start}' OR (si.starts <= '{$p_start}'
AND si.ends >= '{$p_end}') AND si.ends >= '{$p_end}'))
ORDER BY si_starts, ORDER BY si_starts,
sched_starts; sched_starts;
SQL; SQL;

View File

@ -23,7 +23,8 @@ class Application_Model_Soundcloud
return $token; return $token;
} }
public function uploadTrack($filepath, $filename, $description, $tags=array(), $release=null, $genre=null) public function uploadTrack($filepath, $filename, $description,
$tags=array(), $release=null, $genre=null)
{ {
if ($this->getToken()) { if ($this->getToken()) {
if (count($tags)) { if (count($tags)) {
@ -33,7 +34,7 @@ class Application_Model_Soundcloud
$tags = Application_Model_Preference::GetSoundCloudTags(); $tags = Application_Model_Preference::GetSoundCloudTags();
} }
$downloadable = Application_Model_Preference::GetSoundCloudDownloadbleOption() == '1'?true:false; $downloadable = Application_Model_Preference::GetSoundCloudDownloadbleOption() == '1';
$track_data = array( $track_data = array(
'track[sharing]' => 'private', 'track[sharing]' => 'private',
@ -51,7 +52,6 @@ class Application_Model_Soundcloud
//YYYY-MM-DD-HH-mm-SS //YYYY-MM-DD-HH-mm-SS
$release = explode("-", $release); $release = explode("-", $release);
$track_data['track[release_year]'] = $release[0]; $track_data['track[release_year]'] = $release[0];
$track_data['track[release_month]'] = $release[1]; $track_data['track[release_month]'] = $release[1];
$track_data['track[release_day]'] = $release[2]; $track_data['track[release_day]'] = $release[2];
@ -86,6 +86,13 @@ class Application_Model_Soundcloud
throw new NoSoundCloundToken(); throw new NoSoundCloundToken();
} }
} }
public static function uploadSoundcloud($id)
{
$cmd = "/usr/lib/airtime/utils/soundcloud-uploader $id > /dev/null &";
Logging::info("Uploading soundcloud with command: $cmd");
exec($cmd);
}
} }
class NoSoundCloundToken extends Exception {} class NoSoundCloundToken extends Exception {}

View File

@ -1170,7 +1170,9 @@ SQL;
$release = $file->getDbYear(); $release = $file->getDbYear();
try { try {
$soundcloud = new Application_Model_Soundcloud(); $soundcloud = new Application_Model_Soundcloud();
$soundcloud_res = $soundcloud->uploadTrack($this->getFilePath(), $this->getName(), $description, $tag, $release, $genre); $soundcloud_res = $soundcloud->uploadTrack(
$this->getFilePath(), $this->getName(), $description,
$tag, $release, $genre);
$this->setSoundCloudFileId($soundcloud_res['id']); $this->setSoundCloudFileId($soundcloud_res['id']);
$this->setSoundCloudLinkToFile($soundcloud_res['permalink_url']); $this->setSoundCloudLinkToFile($soundcloud_res['permalink_url']);
$this->setSoundCloudUploadTime(new DateTime("now"), new DateTimeZone("UTC")); $this->setSoundCloudUploadTime(new DateTime("now"), new DateTimeZone("UTC"));

View File

@ -35,7 +35,6 @@ class Application_Model_User
public function isHostOfShow($showId) public function isHostOfShow($showId)
{ {
$userId = $this->_userInstance->getDbId(); $userId = $this->_userInstance->getDbId();
return CcShowHostsQuery::create() return CcShowHostsQuery::create()
->filterByDbShow($showId) ->filterByDbShow($showId)
->filterByDbHost($userId)->count() > 0; ->filterByDbHost($userId)->count() > 0;
@ -63,10 +62,9 @@ class Application_Model_User
if ($type === UTYPE_ADMIN || if ($type === UTYPE_ADMIN ||
$type === UTYPE_PROGRAM_MANAGER || $type === UTYPE_PROGRAM_MANAGER ||
CcShowHostsQuery::create()->filterByDbShow($p_showId)->filterByDbHost($this->getId())->count() > 0) { self::isHostOfShow($p_showId)) {
$result = true; $result = true;
} }
return $result; return $result;
} }
@ -210,7 +208,7 @@ class Application_Model_User
$this->_userInstance->delete(); $this->_userInstance->delete();
} }
} }
public function getOwnedFiles() public function getOwnedFiles()
{ {
$user = $this->_userInstance; $user = $this->_userInstance;
// do we need a find call at the end here? // do we need a find call at the end here?

View File

@ -35,9 +35,15 @@ if ($item['type'] == 2) {
<span class="spl_cue ui-state-default"></span> <span class="spl_cue ui-state-default"></span>
<?php } else if ($item['type'] == 2) { <?php } else if ($item['type'] == 2) {
if ($staticBlock) {?> if ($staticBlock) {?>
<span class="spl_block_expand close" blockId="<?php echo $item["item_id"]; ?>" id="expand_block_<?php echo $item["id"]?>">Static Block Expand</span> <span class="spl_block_expand close" blockId="<?php echo $item["item_id"]; ?>" id="expand_block_<?php echo $item["id"]?>">
<span class="ui-icon ui-icon-triangle-2-n-s"></span>
Expand Static Block
</span>
<?php } else { ?> <?php } else { ?>
<span class="spl_block_expand close" blockId="<?php echo $item["item_id"]; ?>" id="expand_block_<?php echo $item["id"]?>">Dynamic Block</span> <span class="spl_block_expand close" blockId="<?php echo $item["item_id"]; ?>" id="expand_block_<?php echo $item["id"]?>">
<span class="ui-icon ui-icon-triangle-2-n-s"></span>
Expand Dynamic Block
</span>
<?php } <?php }
} ?> } ?>
<span class="spl_title"><?php echo $item['track_title'] ?></span> <span class="spl_title"><?php echo $item['track_title'] ?></span>
@ -79,7 +85,7 @@ if ($item['type'] == 2) {
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if ($item['type'] == 2) {?> <?php if ($item['type'] == 2) {?>
<div id="block_<?php echo $item["id"]?>_info"></div> <ul style='display:none' id="block_<?php echo $item["id"]?>_info" class="smart-block-info"></ul>
<?php } ?> <?php } ?>
</li> </li>
<?php $i = $i+1; ?> <?php $i = $i+1; ?>

View File

@ -1,71 +1,63 @@
#side_playlist { #side_playlist {
width: 40%; width: 40%;
font-size: 16px; font-size: 16px;
overflow: auto; overflow: auto;
} }
#side_playlist, #side_playlist,#side_playlist ul,#side_playlist li {
#side_playlist ul, float: left;
#side_playlist li {
float: left;
} }
#spl_sortable, #spl_sortable,#spl_sortable>li,#side_playlist>div,#spl_editor,.spl_artist,.spl_cue_in,.spl_fade_in,.spl_cue_out,.spl_fade_out
#spl_sortable > li, {
#side_playlist > div, clear: left;
#spl_editor,
.spl_artist,
.spl_cue_in,
.spl_fade_in,
.spl_cue_out,
.spl_fade_out {
clear: left;
} }
#spl_sortable > li {
width: 100%; #spl_sortable>li {
margin-bottom:-1px; width: 100%;
position:relative; margin-bottom: -1px;
-moz-box-sizing: border-box; position: relative;
-webkit-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; -webkit-box-sizing: border-box;
box-sizing: border-box;
} }
/*#side_playlist button { /*#side_playlist button {
float: left; float: left;
font-size: 12px; font-size: 12px;
height: 28px; height: 28px;
margin: 0 7px 20px 0; margin: 0 7px 20px 0;
}*/ }*/
#side_playlist input,#side_playlist textarea {
#side_playlist input, width: 200px;
#side_playlist textarea {
width: 200px;
} }
#side_playlist textarea { #side_playlist textarea {
height: 100px; height: 100px;
} }
#spl_sortable { #spl_sortable {
list-style: none; list-style: none;
padding:0; padding: 0;
padding-bottom:50px; padding-bottom: 50px;
width:100%; width: 100%;
min-height: 320px; min-height: 320px;
margin-top:0; margin-top: 0;
margin-bottom:0; margin-bottom: 0;
} }
#side_playlist li div.list-item-container, #side_playlist li div.list-item-container.ui-state-active { #side_playlist li div.list-item-container,#side_playlist li div.list-item-container.ui-state-active
height:56px; {
border: none; height: 56px;
border: none;
} }
#spl_name { #spl_name {
} }
.ui-icon-closethick { .ui-icon-closethick {
margin-top: 7px; margin-top: 7px;
} }
.sp-closethick-center { .sp-closethick-center {
@ -73,266 +65,297 @@
} }
.spl_title { .spl_title {
font-size:14px; font-size: 14px;
} }
.spl_playlength { .spl_playlength {
float:right; float: right;
font-size:14px; font-size: 14px;
padding:0 5px 0 0; padding: 0 5px 0 0;
width:100px; width: 100px;
text-align:right; text-align: right;
} }
.spl_block_expand, .spl_block_expand.close { .spl_block_expand,.spl_block_expand.close {
float:right; float: right;
font-size: 9px; font-size: 9px;
height: 15px; height: 15px;
/*right: 35px;*/ /*right: 35px;*/
width: 120px; width: 120px;
margin-top:2px; margin-top: 2px;
cursor:pointer; cursor: pointer;
color:#fff; color: #fff;
font-weight: normal; font-weight: normal;
text-shadow:none; text-shadow: none;
opacity:1; opacity: 1;
} }
.spl_block_expand:hover, .spl_block_expand.close:hover {
color:#FF611F; .spl_block_expand:hover,.spl_block_expand.close:hover {
text-shadow:none; color: #FF611F;
opacity:1; text-shadow: none;
} opacity: 1;
.spl_block_expand .ui-icon { }
float:left;
} .spl_block_expand .ui-icon {
float: left;
}
.spl_artist { .spl_artist {
font-size:12px; font-size: 12px;
color:#d5d5d5; color: #d5d5d5;
} }
.spl_offset { .spl_offset {
float: right; float: right;
text-align: right; text-align: right;
padding: 0 5px 0 0; padding: 0 5px 0 0;
color: #D5D5D5; color: #D5D5D5;
} }
.ui-state-active .spl_artist, .ui-state-active .spl_offset {
.ui-state-active .spl_artist,.ui-state-active .spl_offset {
color: #606060 !important; color: #606060 !important;
} }
#spl_editor > div > span { #spl_editor>div>span { /* display: inline-block;
/* display: inline-block;
width: 150px;*/ width: 150px;*/
} }
.ui-icon-closethick, .ui-icon-closethick,.spl_fade_control,.spl_text_input {
.spl_fade_control, cursor: pointer;
.spl_text_input {
cursor: pointer;
} }
.spl_text_input input { .spl_text_input input {
cursor: text; cursor: text;
} }
#spl_error { #spl_error {
font-size: 14px; font-size: 14px;
padding: 0.3em; padding: 0.3em;
/*width: 440px;*/ /*width: 440px;*/
text-align: center; text-align: center;
} }
#side_playlist h3 { #side_playlist h3 {
font-size:20px; font-size: 20px;
margin:9px 0 3px 0; margin: 9px 0 3px 0;
padding:0; padding: 0;
color:#444444; color: #444444;
font-weight:normal; font-weight: normal;
clear:both; clear: both;
float:left; float: left;
}
#side_playlist h4 {
font-size:15px;
margin:8px 0 10px 0;
padding:0;
color:#4f4f4f;
font-weight:normal;
clear:both;
float:left;
}
#side_playlist h3 + h4 {
margin:0 0 11px 0;
}
#spl_sortable div.big_play {
display:block;
width:20px;
height:50px;
margin:2px 0 0 2px;
text-align:center;
border:1px solid #5b5b5b;
float:left;
background-color: #707070;
background: -moz-linear-gradient(top, #707070 0, #666666 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #707070), color-stop(100%, #666666));
}
#spl_sortable div.big_play_disabled {
display:block;
width:20px;
height:50px;
margin:2px 0 0 2px;
text-align:center;
border:1px solid #5b5b5b;
float:left;
background-color: #707070;
background: -moz-linear-gradient(top, #707070 0, #666666 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #707070), color-stop(100%, #666666));
}
#spl_sortable div.big_play:hover {
border:1px solid #282828;
background-color: #3b3b3b;
background: -moz-linear-gradient(top, #3b3b3b 0, #292929 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #3b3b3b), color-stop(100%, #292929));
cursor: pointer;
}
#spl_sortable div.big_play .ui-icon {
margin: 17px 0 0 1px;
}
#spl_sortable div.big_play_disabled .ui-icon {
margin: 17px 0 0 1px;
} }
#spl_sortable div.big_play:hover .ui-icon-play, #spl_sortable div.big_play:hover .ui-icon-pause { #side_playlist h4 {
background-image:url(redmond/images/ui-icons_ff5d1a_256x240.png); font-size: 15px;
margin: 8px 0 10px 0;
padding: 0;
color: #4f4f4f;
font-weight: normal;
clear: both;
float: left;
} }
#side_playlist h3+h4 {
margin: 0 0 11px 0;
}
#spl_sortable div.big_play {
display: block;
width: 20px;
height: 50px;
margin: 2px 0 0 2px;
text-align: center;
border: 1px solid #5b5b5b;
float: left;
background-color: #707070;
background: -moz-linear-gradient(top, #707070 0, #666666 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #707070),
color-stop(100%, #666666) );
}
#spl_sortable div.big_play_disabled {
display: block;
width: 20px;
height: 50px;
margin: 2px 0 0 2px;
text-align: center;
border: 1px solid #5b5b5b;
float: left;
background-color: #707070;
background: -moz-linear-gradient(top, #707070 0, #666666 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #707070),
color-stop(100%, #666666) );
}
#spl_sortable div.big_play:hover {
border: 1px solid #282828;
background-color: #3b3b3b;
background: -moz-linear-gradient(top, #3b3b3b 0, #292929 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #3b3b3b),
color-stop(100%, #292929) );
cursor: pointer;
}
#spl_sortable div.big_play .ui-icon {
margin: 17px 0 0 1px;
}
#spl_sortable div.big_play_disabled .ui-icon {
margin: 17px 0 0 1px;
}
#spl_sortable div.big_play:hover .ui-icon-play,#spl_sortable div.big_play:hover .ui-icon-pause
{
background-image: url(redmond/images/ui-icons_ff5d1a_256x240.png);
}
#spl_sortable .ui-icon-closethick { #spl_sortable .ui-icon-closethick {
position:absolute; position: absolute;
top:3px; top: 3px;
right:6px; right: 6px;
z-index:3; z-index: 3;
} }
#spl_sortable .ui-icon-closethick:hover { #spl_sortable .ui-icon-closethick:hover {
background-image:url(redmond/images/ui-icons_ff5d1a_256x240.png) background-image: url(redmond/images/ui-icons_ff5d1a_256x240.png)
} }
#spl_sortable .spl_fade_control { #spl_sortable .spl_fade_control {
position:absolute; position: absolute;
right:35px; right: 35px;
z-index: 6; z-index: 6;
height:15px; height: 15px;
width:33px; width: 33px;
font-size:9px; font-size: 9px;
background-color:transparent; background-color: transparent;
} }
#spl_sortable li .container { #spl_sortable li .container {
} }
#spl_sortable .text-row { #spl_sortable .text-row {
height: 20px; height: 20px;
line-height: 19px; line-height: 19px;
overflow: hidden; overflow: hidden;
padding: 0 30px 0 10px; padding: 0 30px 0 10px;
text-indent: 2px; text-indent: 2px;
margin:-1px 0 0 0; margin: -1px 0 0 0;
float:none; float: none;
} }
#spl_sortable .top { #spl_sortable .top {
padding-top:9px; padding-top: 9px;
} }
#spl_sortable li .spl_fade_control.ui-state-default { #spl_sortable li .spl_fade_control.ui-state-default {
background: transparent url(images/crossfade_playlist.png) no-repeat 0 0; background: transparent url(images/crossfade_playlist.png) no-repeat 0 0;
border:none; border: none;
} }
#spl_sortable li .spl_fade_control.ui-state-active { #spl_sortable li .spl_fade_control.ui-state-active {
background: transparent url(images/crossfade_playlist.png) no-repeat 0 -30px; background: transparent url(images/crossfade_playlist.png) no-repeat 0
border:none; -30px;
border: none;
} }
#spl_sortable li .crossfade, #spl_sortable li .cue-edit {
background:#debc9e url(images/crossfade_bg.png) repeat-x 0 0 !important; #spl_sortable li .crossfade,#spl_sortable li .cue-edit {
border:1px solid #5d5d5d; background: #debc9e url(images/crossfade_bg.png) repeat-x 0 0 !important;
border-width: 1px 0 0 0; border: 1px solid #5d5d5d;
min-height:35px; border-width: 1px 0 0 0;
min-height: 35px;
} }
#spl_sortable li .cue-edit { #spl_sortable li .cue-edit {
background:#b6d1d5 url(images/cue-editor_bg.png) repeat-x 0 0 !important; background: #b6d1d5 url(images/cue-editor_bg.png) repeat-x 0 0
!important;
} }
#spl_sortable dl.inline-list { #spl_sortable dl.inline-list {
margin:10px 0 0 37px; margin: 10px 0 0 37px;
} }
#spl_sortable li .spl_fade_start,#spl_sortable li .spl_fade_end {
#spl_sortable li .spl_fade_start, #spl_sortable li .spl_fade_end {
background-color: transparent; background-color: transparent;
float:right; float: right;
font-size: 9px; font-size: 9px;
height: 15px; height: 15px;
right: 35px; right: 35px;
width: 33px; width: 33px;
margin-top:2px; margin-top: 2px;
} }
#spl_sortable li .spl_fade_start.ui-state-default { #spl_sortable li .spl_fade_start.ui-state-default {
background: transparent url(images/fade_in.png) no-repeat 0 0; background: transparent url(images/fade_in.png) no-repeat 0 0;
border:none; border: none;
} }
#spl_sortable li .spl_fade_start.ui-state-active { #spl_sortable li .spl_fade_start.ui-state-active {
background: transparent url(images/fade_in.png) no-repeat 0 -30px; background: transparent url(images/fade_in.png) no-repeat 0 -30px;
border:none; border: none;
} }
#spl_sortable li .spl_fade_end.ui-state-default { #spl_sortable li .spl_fade_end.ui-state-default {
background: transparent url(images/fade_out.png) no-repeat 0 0; background: transparent url(images/fade_out.png) no-repeat 0 0;
border:none; border: none;
} }
#spl_sortable li .spl_fade_end.ui-state-active { #spl_sortable li .spl_fade_end.ui-state-active {
background: transparent url(images/fade_out.png) no-repeat 0 -30px; background: transparent url(images/fade_out.png) no-repeat 0 -30px;
border:none; border: none;
} }
.crossfade dl.inline-list, .cue-edit dl.inline-list, .crossfade-main dl.inline-list {
padding-bottom:5px;
clear:left;
.crossfade dl.inline-list,.cue-edit dl.inline-list,.crossfade-main dl.inline-list
{
padding-bottom: 5px;
clear: left;
} }
.crossfade dl.inline-list dt, .cue-edit dl.inline-list dt, .crossfade-main dl.inline-list dt {
min-width: 90px;
.crossfade dl.inline-list dt,.cue-edit dl.inline-list dt,.crossfade-main dl.inline-list dt
{
min-width: 90px;
} }
.crossfade dl.inline-list dd, .cue-edit dl.inline-list dd, .crossfade-main dl.inline-list dd {
.crossfade dl.inline-list dd,.cue-edit dl.inline-list dd,.crossfade-main dl.inline-list dd
{
float: left; float: left;
font-size: 12px; font-size: 12px;
margin: 0; margin: 0;
}
}
.edit-error { .edit-error {
color:#b80000; color: #b80000;
margin:0; margin: 0;
padding-bottom:0; padding-bottom: 0;
font-size:12px; font-size: 12px;
display:none; display: none;
} }
/*.edit-error:last-child { /*.edit-error:last-child {
padding-bottom:10px; padding-bottom:10px;
}*/ }*/
.spl_text_input { .spl_text_input {
color:#fff; color: #fff;
} }
.crossfade-main { .crossfade-main {
background:#debc9e; background: #debc9e;
border:1px solid #5b5b5b; border: 1px solid #5b5b5b;
padding:10px 10px 0 10px; padding: 10px 10px 0 10px;
margin:0 1px 16px 0; margin: 0 1px 16px 0;
position:relative; position: relative;
} }
.crossfade-main .edit-error { .crossfade-main .edit-error {
padding-bottom:4px; padding-bottom: 4px;
margin:0; margin: 0;
} }
.crossfade-main .edit-error:last-child { .crossfade-main .edit-error:last-child {
padding-bottom:2px; padding-bottom: 2px;
} }
.crossfade-main .ui-icon-closethick { .crossfade-main .ui-icon-closethick {
position: absolute; position: absolute;
right: 6px; right: 6px;
@ -342,65 +365,73 @@
#spl_sortable li .spl_cue { #spl_sortable li .spl_cue {
background-color: transparent; background-color: transparent;
float:right; float: right;
font-size: 9px; font-size: 9px;
height: 15px; height: 15px;
right: 35px; right: 35px;
width: 33px; width: 33px;
margin-top:2px; margin-top: 2px;
cursor:pointer; cursor: pointer;
} }
#spl_sortable li .spl_cue.ui-state-default { #spl_sortable li .spl_cue.ui-state-default {
background: transparent url(images/cue_playlist.png) no-repeat 0 0; background: transparent url(images/cue_playlist.png) no-repeat 0 0;
border:none; border: none;
} }
#spl_sortable li .spl_cue.ui-state-default:hover { #spl_sortable li .spl_cue.ui-state-default:hover {
background: transparent url(images/cue_playlist.png) no-repeat 0 -15px; background: transparent url(images/cue_playlist.png) no-repeat 0 -15px;
border:none; border: none;
} }
#spl_sortable li .spl_cue.ui-state-active, #spl_sortable li .spl_cue.ui-state-active:hover {
background: transparent url(images/cue_playlist.png) no-repeat 0 -30px; #spl_sortable li .spl_cue.ui-state-active,#spl_sortable li .spl_cue.ui-state-active:hover
border:none; {
background: transparent url(images/cue_playlist.png) no-repeat 0 -30px;
border: none;
} }
/*--/////////////// Changes 16.05.2011 ////////////--*/ /*--/////////////// Changes 16.05.2011 ////////////--*/
.playlist_title { .playlist_title {
margin: 16px 0 10px 0; margin: 16px 0 10px 0;
height:26px; height: 26px;
clear:both; clear: both;
} }
#side_playlist .playlist_title h3, #side_playlist .playlist_title h4 {
#side_playlist .playlist_title h3,#side_playlist .playlist_title h4 {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
#side_playlist .playlist_title h3 { #side_playlist .playlist_title h3 {
float:left; float: left;
width:84%; width: 84%;
} }
#side_playlist .playlist_title h4 { #side_playlist .playlist_title h4 {
float:right; float: right;
clear:none; clear: none;
font-size: 16px; font-size: 16px;
padding-top:4px; padding-top: 4px;
} }
#side_playlist .playlist_title h3 a { #side_playlist .playlist_title h3 a {
padding: 0 22px 0 2px; padding: 0 22px 0 2px;
background:url(images/icon_edit_l.png) no-repeat right center; background: url(images/icon_edit_l.png) no-repeat right center;
text-decoration:none; text-decoration: none;
}
}
#side_playlist .playlist_title h3 a:hover { #side_playlist .playlist_title h3 a:hover {
background-color:#D8D8D8; background-color: #D8D8D8;
} }
.element_hidden { .element_hidden {
display: none; display: none;
} }
#side_playlist .playlist_title h3 input[type="text"] { #side_playlist .playlist_title h3 input[type="text"] {
background-color: #dddddd; background-color: #dddddd;
border: 1px solid #8F8F8F; border: 1px solid #8F8F8F;
font-family: Arial,Helvetica,sans-serif; font-family: Arial, Helvetica, sans-serif;
font-size: 12px; font-size: 12px;
height: 23px; height: 23px;
margin: 0; margin: 0;
@ -409,31 +440,34 @@
-moz-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); -moz-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1);
-webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); -webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1);
box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1);
width:95%; width: 95%;
margin-bottom:10px; margin-bottom: 10px;
} }
#side_playlist .zend_form { #side_playlist .zend_form {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
#side_playlist .zend_form dt, #side_playlist .zend_form dd {
#side_playlist .zend_form dt,#side_playlist .zend_form dd {
display: block; display: block;
float: none; float: none;
margin: 4px 0 0; margin: 4px 0 0;
padding: 0; padding: 0;
width:100%; width: 100%;
} }
#side_playlist .zend_form dd.buttons { #side_playlist .zend_form dd.buttons {
margin-top: 8px; margin-top: 8px;
text-align:right; text-align: right;
} }
#side_playlist .zend_form dd.buttons .ui-button { #side_playlist .zend_form dd.buttons .ui-button {
margin: 0 0 0 10px; margin: 0 0 0 10px;
} }
#side_playlist .zend_form dt { #side_playlist .zend_form dt {
color:#5B5B5B; color: #5B5B5B;
font-weight: bold; font-weight: bold;
margin: 9px 0 0; margin: 9px 0 0;
padding: 0 2px; padding: 0 2px;
@ -446,14 +480,14 @@
#side_playlist .zend_form dd textarea { #side_playlist .zend_form dd textarea {
background-color: #dddddd; background-color: #dddddd;
border: 1px solid #5B5B5B; border: 1px solid #5B5B5B;
font-family: Arial,Helvetica,sans-serif; font-family: Arial, Helvetica, sans-serif;
font-size: 12px; font-size: 12px;
margin: 0; margin: 0;
padding: 2px 0 0 0; padding: 2px 0 0 0;
-moz-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); -moz-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1);
-webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); -webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1);
box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1);
width:99.7%; width: 99.7%;
} }
#side_playlist fieldset { #side_playlist fieldset {
@ -461,28 +495,34 @@
margin: 0 0 8px 0; margin: 0 0 8px 0;
padding: 8px; padding: 8px;
} }
#side_playlist fieldset.closed .zend_form { #side_playlist fieldset.closed .zend_form {
display:none; display: none;
} }
#side_playlist fieldset.closed { #side_playlist fieldset.closed {
border-width: 1px 0 0; border-width: 1px 0 0;
margin-bottom: -6px; margin-bottom: -6px;
margin-left:1px; margin-left: 1px;
} }
fieldset > legend {
fieldset>legend {
color: #4f4f4f; color: #4f4f4f;
font-size: 12px; font-size: 12px;
line-height: 140%; line-height: 140%;
} }
.ui-widget-content fieldset legend .ui-icon { .ui-widget-content fieldset legend .ui-icon {
float: left; float: left;
background-image:url(redmond/images/ui-icons_454545_256x240.png); background-image: url(redmond/images/ui-icons_454545_256x240.png);
} }
#side_playlist .zend_form input, #side_playlist .zend_form textarea {
#side_playlist .zend_form input,#side_playlist .zend_form textarea {
width: auto; width: auto;
} }
#fieldset-metadate_change { #fieldset-metadate_change {
clear:both; clear: both;
} }
div.helper li { div.helper li {
@ -494,34 +534,42 @@ li.spl_empty {
} }
/*---////// SMART BLOCK /////---*/ /*---////// SMART BLOCK /////---*/
.smart-block-info { .smart-block-info {
padding: 5px 35px 10px 36px; padding: 5px 35px 10px 36px;
width: 100%; width: 100%;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
} }
.smart-block-info > li {
display: block;
float: none;
margin-bottom: 4px;
width: 100%;
font-size: 13px;
}
.smart-block-info > li span.block-item-time {
text-align: right;
float: right;
color: #D5D5D5;
font-size: 12px;
}
.smart-block-info > li span.block-item-title {
font-weight: bold;
display: inline-block;
padding-right: 6px;
}
.smart-block-info > li span.block-item-author {
font-weight: normal;
display: inline-block;
}
.smart-block-info>li {
display: block;
float: none;
margin-bottom: 4px;
width: 100%;
font-size: 13px;
}
.smart-block-info>li span.block-item-time {
text-align: right;
float: right;
color: #D5D5D5;
font-size: 12px;
}
.smart-block-info>li span.block-item-title {
font-weight: bold;
display: inline-block;
padding-right: 6px;
}
.smart-block-info>li span.block-item-author {
font-weight: normal;
display: inline-block;
}
.smart-block-info>li span.block-item-criteria {
font-weight: normal;
display: inline-block;
padding-right: 6px;
}

View File

@ -529,7 +529,7 @@ input.input_text.sp_input_text{
} }
input.input_text.sp_extra_input_text{ input.input_text.sp_extra_input_text{
width: 87px !important; width: 90px !important;
} }
.sp_text_font{ .sp_text_font{

View File

@ -17,6 +17,7 @@ var AIRTIME = (function(AIRTIME) {
"comments" : "s", "comments" : "s",
"composer" : "s", "composer" : "s",
"conductor" : "s", "conductor" : "s",
"copyright" : "s",
"utime" : "n", "utime" : "n",
"mtime" : "n", "mtime" : "n",
"lptime" : "n", "lptime" : "n",
@ -382,14 +383,16 @@ var AIRTIME = (function(AIRTIME) {
} }
var inputClass = 'filter_column filter_number_text'; var inputClass = 'filter_column filter_number_text';
var labelStyle = "style='margin-right:35px;'";
if (criteriaTypes[ele.mDataProp] != "s") { if (criteriaTypes[ele.mDataProp] != "s") {
inputClass = 'filterColumn filter_number_range'; inputClass = 'filterColumn filter_number_range';
labelStyle = "";
} }
if (ele.bVisible) { if (ele.bVisible) {
advanceSearchDiv.append("<div id='advanced_search_col_"+currentColId+" class='control-group'><label class='control-label'>"+ele.sTitle+label+" : </label><div id='"+ele.mDataProp+"' class='controls "+inputClass+"'></div></div>"); advanceSearchDiv.append("<div id='advanced_search_col_"+currentColId+" class='control-group'><label class='control-label'"+labelStyle+">"+ele.sTitle+label+" : </label><div id='"+ele.mDataProp+"' class='controls "+inputClass+"'></div></div>");
} else { } else {
advanceSearchDiv.append("<div id='advanced_search_col_"+currentColId+"' class='control-group' style='display:none;'><label class='control-label'>"+ele.sTitle+label+"</label><div id='"+ele.mDataProp+"' class='controls "+inputClass+"'></div></div>"); advanceSearchDiv.append("<div id='advanced_search_col_"+currentColId+"' class='control-group' style='display:none;'><label class='control-label'"+labelStyle+">"+ele.sTitle+label+"</label><div id='"+ele.mDataProp+"' class='controls "+inputClass+"'></div></div>");
} }
if (criteriaTypes[ele.mDataProp] == "s") { if (criteriaTypes[ele.mDataProp] == "s") {

View File

@ -369,7 +369,6 @@ var AIRTIME = (function(AIRTIME){
$.each($(".big_play"), function(index, value){ $.each($(".big_play"), function(index, value){
if ($(value).attr('blockId') === undefined) { if ($(value).attr('blockId') === undefined) {
var mime = $(value).attr("data-mime-type"); var mime = $(value).attr("data-mime-type");
console.log($(value));
if (isAudioSupported(mime)) { if (isAudioSupported(mime)) {
$(value).bind("click", openAudioPreview); $(value).bind("click", openAudioPreview);
} else { } else {
@ -429,24 +428,33 @@ var AIRTIME = (function(AIRTIME){
if (isStatic) { if (isStatic) {
$.each(data, function(index, ele){ $.each(data, function(index, ele){
if (ele.track_title !== undefined) { if (ele.track_title !== undefined) {
$html += "<div>"+ele.track_title+" "+ele.creator+" "+ele.length+"</div>"; $html += "<li>" +
"<span class='block-item-title'>"+ele.track_title+"</span>" +
"<span class='block-item-author'>"+ele.creator+"</span>" +
"<span class='block-item-time'>"+ele.length+"</span>" +
"</li>";
} }
}) })
} else { } else {
for (var key in data.crit){ for (var key in data.crit){
$.each(data.crit[key], function(index, ele){ $.each(data.crit[key], function(index, ele){
var extra = (ele['extra']==null)?"":ele['extra']; var extra = (ele['extra']==null)?"":"- "+ele['extra'];
$html += "<div>"+ele['display_name']+" "+ele['modifier']+" "+ele['value']+" "+extra+"</div>"; $html += "<li>" +
"<span class='block-item-title'>"+ele['display_name']+"</span>" +
"<span class='block-item-criteria'>"+ele['modifier']+"</span>" +
"<span class='block-item-criteria'>"+ele['value']+"</span>" +
"<span class='block-item-criteria'>"+extra+"</span>" +
"</li>";
}); });
} }
$html += "<div>"+data.limit.value+" "+data.limit.modifier; $html += "<li><br /><span class='block-item-title'>Limit to: "+data.limit.value+" "+data.limit.modifier+"</span></li>";
} }
$pl.find("#block_"+id+"_info").html($html); $pl.find("#block_"+id+"_info").html($html).show();
mod.enableUI(); mod.enableUI();
}); });
$(this).removeClass('close'); $(this).removeClass('close');
} else { } else {
$pl.find("#block_"+id+"_info").html(""); $pl.find("#block_"+id+"_info").html("").hide();
$(this).addClass('close'); $(this).addClass('close');
} }
}}); }});

View File

@ -24,15 +24,16 @@ require_once($CC_CONFIG['phpDir'].'/application/configs/conf.php');
$CC_CONFIG['phpDir'] = $values['general']['airtime_dir']; $CC_CONFIG['phpDir'] = $values['general']['airtime_dir'];
// Ensure library/ is on include_path // Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array( set_include_path(implode(PATH_SEPARATOR, array(
get_include_path(), get_include_path(),
realpath($CC_CONFIG['phpDir'] . '/library') realpath($CC_CONFIG['phpDir'] . '/library')
))); )));
require_once($CC_CONFIG['phpDir'].'/application/models/StoredFile.php'); require_once($CC_CONFIG['phpDir'].'/application/models/StoredFile.php');
require_once($CC_CONFIG['phpDir'].'/application/models/Preference.php'); require_once($CC_CONFIG['phpDir'].'/application/models/Preference.php');
require_once($CC_CONFIG['phpDir'].'/application/models/MusicDir.php'); require_once($CC_CONFIG['phpDir'].'/application/models/MusicDir.php');
require_once($CC_CONFIG['phpDir'].'/application/common/OsPath.php');
set_include_path($CC_CONFIG['phpDir'].'/library' . PATH_SEPARATOR . get_include_path()); set_include_path($CC_CONFIG['phpDir'].'/library' . PATH_SEPARATOR . get_include_path());
require_once($CC_CONFIG['phpDir'].'/application/models/Soundcloud.php'); require_once($CC_CONFIG['phpDir'].'/application/models/Soundcloud.php');