style(legacy): format (#2039)
This commit is contained in:
parent
7082c9693d
commit
1550d44ac5
122 changed files with 18369 additions and 15819 deletions
|
@ -1,16 +1,16 @@
|
|||
<script language="JavaScript">
|
||||
function autoResize(id){
|
||||
function autoResize(id) {
|
||||
var newheight;
|
||||
var newwidth;
|
||||
|
||||
if(document.getElementById){
|
||||
newheight=document.getElementById(id).contentWindow.document.body.scrollHeight;
|
||||
if (document.getElementById) {
|
||||
newheight = document.getElementById(id).contentWindow.document.body.scrollHeight;
|
||||
// Hack to get height in Firefox
|
||||
if (newheight == 0) newheight = newheight = document.getElementById(id).contentWindow.document.documentElement.scrollHeight;
|
||||
newwidth=document.getElementById(id).contentWindow.document.body.scrollWidth;
|
||||
newwidth = document.getElementById(id).contentWindow.document.body.scrollWidth;
|
||||
}
|
||||
document.getElementById(id).height= (newheight) + "px";
|
||||
document.getElementById(id).width= (newwidth) + "px";
|
||||
document.getElementById(id).height = (newheight) + "px";
|
||||
document.getElementById(id).width = (newwidth) + "px";
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -19,12 +19,12 @@
|
|||
<div class="bck_cover"></div>
|
||||
|
||||
<?php if ($this->stationLogo === DEFAULT_LOGO_PLACEHOLDER) {
|
||||
echo "<a href='#' class='logo'><img src='".DEFAULT_LOGO_FILE."'></a>";
|
||||
echo "<a href='#' class='logo'><img src='" . DEFAULT_LOGO_FILE . "'></a>";
|
||||
} else {
|
||||
echo "<a href='#' class='logo'><img src='data:image/png;base64," . $this->stationLogo . "'></a>";
|
||||
} ?>
|
||||
|
||||
<?php if ($this->displayLoginButton): ?>
|
||||
<?php if ($this->displayLoginButton) : ?>
|
||||
<div class='login-btn'>
|
||||
<a href='/login' target='_parent'>
|
||||
<span><?php echo _('Login'); ?></span>
|
||||
|
@ -53,7 +53,7 @@
|
|||
</div>
|
||||
|
||||
<?php
|
||||
if ($this->displayRssTab) {?>
|
||||
if ($this->displayRssTab) { ?>
|
||||
<div id="tab-4" class="podcast tab_content">
|
||||
<div class="rss-title-wrapper">
|
||||
<div id="rss-subscribe">
|
||||
|
@ -67,78 +67,79 @@
|
|||
<div id="jquery_jplayer_1" class="jp-player">
|
||||
</div>
|
||||
<div class="podcast_bck">
|
||||
<div id="jp_container_1" class="jp-audio">
|
||||
<div class="jp-type-playlist">
|
||||
<div id="jp_container_1" class="jp-audio">
|
||||
<div class="jp-type-playlist">
|
||||
|
||||
<div class="current-track track-overflow"><?php echo _("Now Playing:") ?><span class="track-overflow"></span></div>
|
||||
<div class="jp-gui jp-interface">
|
||||
<div class="playbar playbar-buttons">
|
||||
<ul class="jp-controls rss-buttons">
|
||||
<li class="ui-corner-all jp-play">
|
||||
<span class="icon-play icon-white" tabindex="1"><?php /*echo _("play") */?></span>
|
||||
</li>
|
||||
<div class="current-track track-overflow"><?php echo _("Now Playing:") ?><span class="track-overflow"></span></div>
|
||||
<div class="jp-gui jp-interface">
|
||||
<div class="playbar playbar-buttons">
|
||||
<ul class="jp-controls rss-buttons">
|
||||
<li class="ui-corner-all jp-play">
|
||||
<span class="icon-play icon-white" tabindex="1"><?php /*echo _("play") */ ?></span>
|
||||
</li>
|
||||
|
||||
<li class="ui-corner-all jp-pause">
|
||||
<span class="icon-pause icon-white" tabindex="1"><?php /*echo _("pause") */?></span>
|
||||
</li>
|
||||
<li class="ui-corner-all jp-stop">
|
||||
<span class="icon-stop icon-white" tabindex="1"><?php /*echo _("stop") */?></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="playbar playbar-progress">
|
||||
<div class="jp-time-block">
|
||||
<div class="jp-progress">
|
||||
<div class="jp-seek-bar">
|
||||
<div class="jp-play-bar"></div>
|
||||
<li class="ui-corner-all jp-pause">
|
||||
<span class="icon-pause icon-white" tabindex="1"><?php /*echo _("pause") */ ?></span>
|
||||
</li>
|
||||
<li class="ui-corner-all jp-stop">
|
||||
<span class="icon-stop icon-white" tabindex="1"><?php /*echo _("stop") */ ?></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="playbar playbar-progress">
|
||||
<div class="jp-time-block">
|
||||
<div class="jp-progress">
|
||||
<div class="jp-seek-bar">
|
||||
<div class="jp-play-bar"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="jp-time-holder">
|
||||
<div class="jp-current-time"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="jp-time-holder">
|
||||
<div class="jp-current-time"></div>
|
||||
|
||||
<div class="playbar playbar-progress">
|
||||
<div class="jp-volume-block">
|
||||
<div class="jp-mute">
|
||||
<span class="ui-icon" tabindex="1" title="mute"><?php /*echo _("mute") */ ?></span>
|
||||
</div>
|
||||
<div class="jp-unmute">
|
||||
<span class="ui-icon" tabindex="1" title="unmute"><?php /*echo _("unmute") */ ?></span>
|
||||
</div>
|
||||
<div class="jp-volume-bar">
|
||||
<div class="jp-volume-bar-value"></div>
|
||||
</div>
|
||||
<div class="jp-volume-max">
|
||||
<span class="ui-icon" tabindex="1" title="max volume"><?php /*echo _("max volume") */ ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="playbar playbar-progress">
|
||||
<div class="jp-volume-block">
|
||||
<div class="jp-mute">
|
||||
<span class="ui-icon" tabindex="1" title="mute"><?php /*echo _("mute") */?></span>
|
||||
</div>
|
||||
<div class="jp-unmute">
|
||||
<span class="ui-icon" tabindex="1" title="unmute"><?php /*echo _("unmute") */?></span>
|
||||
</div>
|
||||
<div class="jp-volume-bar">
|
||||
<div class="jp-volume-bar-value"></div>
|
||||
</div>
|
||||
<div class="jp-volume-max">
|
||||
<span class="ui-icon" tabindex="1" title="max volume"><?php /*echo _("max volume") */?></span>
|
||||
</div>
|
||||
<div class="rss-tracks">
|
||||
<ul class="jp-playlist">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="rss-tracks">
|
||||
<ul class="jp-playlist">
|
||||
<ul class="pagination">
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ul class="pagination">
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var playlist;
|
||||
|
||||
function buildJplayerPlaylist(page, data) {
|
||||
playlist = new Array();
|
||||
var media;
|
||||
|
||||
$('.rss-tracks ul').html('');
|
||||
$.each(data[Object.keys(data)[page]], function (index, value) {
|
||||
$.each(data[Object.keys(data)[page]], function(index, value) {
|
||||
var media_mime_supported = true;
|
||||
media = {
|
||||
title: value.CcFiles.track_title,
|
||||
|
@ -157,12 +158,12 @@
|
|||
media_mime_supported = false;
|
||||
}
|
||||
|
||||
var podcast_title_link = "<a class='podcast_title jp-playlist-item' tabindex='0' href='#'>"+value.CcFiles.track_title+"</a>";
|
||||
var podcast_title_no_link = "<div class='podcast_title'>"+value.CcFiles.track_title+"</div>";
|
||||
var playlist_metadata = "<span class='podcast_date'>"+value.publication_date+"</span>" +
|
||||
"<span class='podcast_length'>"+value.CcFiles.length+"</span>" +
|
||||
"<span class='podcast_desc_btn'>Description</span>" +
|
||||
"<div class='podcast_desc'>"+value.CcFiles.description+"</div>";
|
||||
var podcast_title_link = "<a class='podcast_title jp-playlist-item' tabindex='0' href='#'>" + value.CcFiles.track_title + "</a>";
|
||||
var podcast_title_no_link = "<div class='podcast_title'>" + value.CcFiles.track_title + "</div>";
|
||||
var playlist_metadata = "<span class='podcast_date'>" + value.publication_date + "</span>" +
|
||||
"<span class='podcast_length'>" + value.CcFiles.length + "</span>" +
|
||||
"<span class='podcast_desc_btn'>Description</span>" +
|
||||
"<div class='podcast_desc'>" + value.CcFiles.description + "</div>";
|
||||
|
||||
if (media_mime_supported) {
|
||||
playlist.push(media);
|
||||
|
@ -171,9 +172,9 @@
|
|||
|
||||
playlist_item += podcast_title_link + playlist_metadata;
|
||||
|
||||
playlist_item += "<div class='podcast_btn_group'>"+
|
||||
"<span class='podcast_play podcast_action_btn'><a href='#' id='rss-track' data-rss-playlist-id='"+index+"'><img src='css/radio-page/img/podcast_play.png'></a></span>" +
|
||||
"<span class='podcast_download podcast_action_btn'><a id='rss-download-link' href='"+value.download_url+"'><img src='css/radio-page/img/podcast_download.png'></a></span> </div></div></li>";
|
||||
playlist_item += "<div class='podcast_btn_group'>" +
|
||||
"<span class='podcast_play podcast_action_btn'><a href='#' id='rss-track' data-rss-playlist-id='" + index + "'><img src='css/radio-page/img/podcast_play.png'></a></span>" +
|
||||
"<span class='podcast_download podcast_action_btn'><a id='rss-download-link' href='" + value.download_url + "'><img src='css/radio-page/img/podcast_download.png'></a></span> </div></div></li>";
|
||||
|
||||
} else {
|
||||
// add empty media item to playlist so indexes stay inline with the corret
|
||||
|
@ -182,9 +183,9 @@
|
|||
|
||||
var playlist_item = "<div class='playlist-item-no-preview podcast_info'>";
|
||||
playlist_item += podcast_title_no_link + playlist_metadata;
|
||||
playlist_item += "<div class='podcast_btn_group'>"+
|
||||
"<span class='podcast_no_play'><img src='css/radio-page/img/podcast_no_play.png'></span>" +
|
||||
"<span class='podcast_download podcast_action_btn'><a id='rss-download-link' href='"+value.download_url+"'><img src='css/radio-page/img/podcast_download.png'></a></span> </div></div>";
|
||||
playlist_item += "<div class='podcast_btn_group'>" +
|
||||
"<span class='podcast_no_play'><img src='css/radio-page/img/podcast_no_play.png'></span>" +
|
||||
"<span class='podcast_download podcast_action_btn'><a id='rss-download-link' href='" + value.download_url + "'><img src='css/radio-page/img/podcast_download.png'></a></span> </div></div>";
|
||||
}
|
||||
|
||||
$('.rss-tracks ul').append(playlist_item);
|
||||
|
@ -196,7 +197,7 @@
|
|||
// we have to set the player to play the first track on page load
|
||||
// or else the play button won't work at first. make sure nothing
|
||||
// is playing first
|
||||
if($("#jquery_jplayer_1").data().jPlayer.status.paused == true){
|
||||
if ($("#jquery_jplayer_1").data().jPlayer.status.paused == true) {
|
||||
// jPlayer is not currently playing
|
||||
_playlist_jplayer.play(0);
|
||||
$("#jquery_jplayer_1").jPlayer("stop");
|
||||
|
@ -211,7 +212,7 @@
|
|||
return false;
|
||||
});
|
||||
|
||||
$('.podcast_desc_btn').click(function(){
|
||||
$('.podcast_desc_btn').click(function() {
|
||||
$(this).toggleClass('current');
|
||||
$(this).next('.podcast_desc').slideToggle();
|
||||
});
|
||||
|
@ -221,7 +222,7 @@
|
|||
_playlist_jplayer = new jPlayerPlaylist({
|
||||
jPlayer: "#jquery_jplayer_1",
|
||||
cssSelectorAncestor: "#jp_container_1"
|
||||
},[], //array of songs will be filled with below's json call
|
||||
}, [], //array of songs will be filled with below's json call
|
||||
{
|
||||
swfPath: baseUrl + "js/jplayer",
|
||||
supplied: "oga, mp3, m4v, m4a, wav",
|
||||
|
@ -240,7 +241,7 @@
|
|||
removeTime: 0,
|
||||
shuffleTime: 0
|
||||
},
|
||||
ready: function () {
|
||||
ready: function() {
|
||||
|
||||
var episodes = <?php echo $this->episodes ?>;
|
||||
var empty_podcast_message = "<?php echo $this->emptyPodcastMessage ?>";
|
||||
|
@ -252,14 +253,14 @@
|
|||
|
||||
|
||||
// update current track metadata on player bar
|
||||
$("#jquery_jplayer_1").bind(jQuery.jPlayer.event.play, function (event) {
|
||||
$("#jquery_jplayer_1").bind(jQuery.jPlayer.event.play, function(event) {
|
||||
var current = _playlist_jplayer.current;
|
||||
$('.current-track span').html(playlist[current].title);
|
||||
});
|
||||
|
||||
// build pagination menu
|
||||
var pages = "<li data-page-index='0'><</li>";
|
||||
$.each(episodes, function (index, value) {
|
||||
$.each(episodes, function(index, value) {
|
||||
var page_number = +index + 1;
|
||||
pages += "<li data-page-index='" + index + "'>" + page_number + "</li>";
|
||||
});
|
||||
|
@ -269,7 +270,7 @@
|
|||
$("ul.pagination").find("li:contains('1')").addClass('current');
|
||||
|
||||
// pagination click
|
||||
$("ul.pagination li").click(function () {
|
||||
$("ul.pagination li").click(function() {
|
||||
buildJplayerPlaylist($(this).attr("data-page-index"), episodes);
|
||||
$(this).siblings().removeClass('current');
|
||||
if ($(this).text() === "<") {
|
||||
|
@ -283,7 +284,7 @@
|
|||
});
|
||||
|
||||
//turn off player bar when podcast track is played
|
||||
$("a.jp-playlist-item, .jp-play, .podcast_play").click(function () {
|
||||
$("a.jp-playlist-item, .jp-play, .podcast_play").click(function() {
|
||||
if ($("#player_iframe").contents().find('.play').hasClass('pause')) {
|
||||
$("#player_iframe").contents().find('.play').click();
|
||||
}
|
||||
|
@ -292,7 +293,6 @@
|
|||
}
|
||||
}
|
||||
);
|
||||
|
||||
</script>
|
||||
</div>
|
||||
<?php
|
||||
|
@ -304,11 +304,11 @@
|
|||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
|
||||
$("#player_iframe").load(function () {
|
||||
$("#player_iframe").load(function() {
|
||||
|
||||
$("#player_iframe").contents().find('.bottom_bar').append("<div class='flex_spacer' data-tab='tab-1'></div>");
|
||||
$("#player_iframe").contents().find('.bottom_bar').append("<div class='schedule_btn button current' data-tab='tab-1'></div>");
|
||||
|
@ -316,26 +316,26 @@
|
|||
|
||||
<?php
|
||||
// Is there a better way to do this?
|
||||
if ($this->displayRssTab) {?>
|
||||
if ($this->displayRssTab) { ?>
|
||||
$("#player_iframe").contents().find('.bottom_bar').append("<div class='station_rss_btn button' data-tab='tab-4'></div>");
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
$("#player_iframe").contents().find('.bottom_bar .button').click(function(){
|
||||
$("#player_iframe").contents().find('.bottom_bar .button').click(function() {
|
||||
var tab_id = $(this).attr('data-tab');
|
||||
|
||||
$("#player_iframe").contents().find('.bottom_bar .button').removeClass('current');
|
||||
$('.tab_content').removeClass('current');
|
||||
|
||||
window.scrollTo(0,0);
|
||||
window.scrollTo(0, 0);
|
||||
$(this).addClass('current');
|
||||
$("#"+tab_id).addClass('current');
|
||||
$("#" + tab_id).addClass('current');
|
||||
});
|
||||
|
||||
//turn off jplayer if it's playing and someone clicks to play the player bar
|
||||
$("#player_iframe").contents().find('.play').click(function () {
|
||||
$("#player_iframe").contents().find('.play').click(function() {
|
||||
if ($('.jp-play').is(':hidden')) {
|
||||
$('.jp-pause').click();
|
||||
}
|
||||
|
@ -343,16 +343,15 @@
|
|||
});
|
||||
|
||||
// schedule widget tabs
|
||||
$('.tabs li').click(function(){
|
||||
$('.tabs li').click(function() {
|
||||
var tab_id = $(this).attr('data-tab');
|
||||
|
||||
$('.tabs li').removeClass('active');
|
||||
$('.schedule_item').removeClass('active');
|
||||
|
||||
$(this).addClass('active');
|
||||
$("#"+tab_id).addClass('active');
|
||||
$("#" + tab_id).addClass('active');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue