mirror of
https://github.com/fergalmoran/dss.git
synced 2025-12-22 09:38:18 +00:00
Changed layout of sidebar content.
This commit is contained in:
0
_working/create
Normal file → Executable file
0
_working/create
Normal file → Executable file
0
static/bin/sm/soundmanager2.swf
Normal file → Executable file
0
static/bin/sm/soundmanager2.swf
Normal file → Executable file
0
static/bin/sm/soundmanager2_debug.swf
Normal file → Executable file
0
static/bin/sm/soundmanager2_debug.swf
Normal file → Executable file
0
static/bin/sm/soundmanager2_flash9.swf
Normal file → Executable file
0
static/bin/sm/soundmanager2_flash9.swf
Normal file → Executable file
0
static/bin/sm/soundmanager2_flash9_debug.swf
Normal file → Executable file
0
static/bin/sm/soundmanager2_flash9_debug.swf
Normal file → Executable file
0
static/img/whats-on.png
Normal file → Executable file
0
static/img/whats-on.png
Normal file → Executable file
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
@@ -30,6 +30,7 @@ window.HeaderView = Backbone.View.extend({
|
|||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
playLive:function () {
|
playLive:function () {
|
||||||
|
var ref = this;
|
||||||
dssSoundHandler.playLive();
|
dssSoundHandler.playLive();
|
||||||
_eventAggregator.trigger("track_playing")
|
_eventAggregator.trigger("track_playing")
|
||||||
var button = $(this.el).find('#header-play-pause-button');
|
var button = $(this.el).find('#header-play-pause-button');
|
||||||
@@ -37,7 +38,8 @@ window.HeaderView = Backbone.View.extend({
|
|||||||
$.getJSON(
|
$.getJSON(
|
||||||
'ajax/live_now_playing/',
|
'ajax/live_now_playing/',
|
||||||
function (data) {
|
function (data) {
|
||||||
_eventAggregator.trigger("track_changed", data);
|
alert(data.title);
|
||||||
|
$(ref.el).find('#live-now-playing').text(data.title);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
togglePlayState:function () {
|
togglePlayState:function () {
|
||||||
|
|||||||
@@ -12,6 +12,11 @@ window.SidebarView = Backbone.View.extend({
|
|||||||
_eventAggregator.bind("track_changed", this.trackChanged);
|
_eventAggregator.bind("track_changed", this.trackChanged);
|
||||||
_eventAggregator.bind("track_playing", this.trackPlaying);
|
_eventAggregator.bind("track_playing", this.trackPlaying);
|
||||||
_eventAggregator.bind("track_paused", this.trackPaused);
|
_eventAggregator.bind("track_paused", this.trackPaused);
|
||||||
|
$.getJSON(
|
||||||
|
'ajax/live_now_playing/',
|
||||||
|
function (data) {
|
||||||
|
$("#live-now-playing", this.el).text(data.title);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
render: function(){
|
render: function(){
|
||||||
$(this.el).html(this.template());
|
$(this.el).html(this.template());
|
||||||
@@ -35,7 +40,7 @@ window.SidebarView = Backbone.View.extend({
|
|||||||
$(this.el).find('#header-play-button-icon').addClass('icon-play');
|
$(this.el).find('#header-play-button-icon').addClass('icon-play');
|
||||||
},
|
},
|
||||||
playLive:function () {
|
playLive:function () {
|
||||||
dssSoundHandler.playLive();
|
com.podnoms.player.playLive();
|
||||||
_eventAggregator.trigger("track_playing")
|
_eventAggregator.trigger("track_playing")
|
||||||
var button = $(this.el).find('#sidebar-play-pause-button-small');
|
var button = $(this.el).find('#sidebar-play-pause-button-small');
|
||||||
var el = this.el;
|
var el = this.el;
|
||||||
|
|||||||
@@ -148,6 +148,24 @@ com.podnoms.player = {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
playLive:function () {
|
||||||
|
var ref = this;
|
||||||
|
this._destroyCurrent(function () {
|
||||||
|
ref.currentSound = soundManager.createSound({
|
||||||
|
id:'com.podnoms.player-live',
|
||||||
|
url:com.podnoms.settings.liveStreamRoot,
|
||||||
|
volume:50,
|
||||||
|
stream:true,
|
||||||
|
useMovieStar:true
|
||||||
|
});
|
||||||
|
if (ref.currentSound) {
|
||||||
|
ref.currentSound.play();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
com.podnoms.utils.showError('Oooopsies', 'Error playing sound..');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
play:function () {
|
play:function () {
|
||||||
this.currentSound.play();
|
this.currentSound.play();
|
||||||
|
|||||||
0
static/js/libs/sm/soundmanager2.js
Normal file → Executable file
0
static/js/libs/sm/soundmanager2.js
Normal file → Executable file
@@ -19,22 +19,36 @@
|
|||||||
<div class="row" id="side-player-area">
|
<div class="row" id="side-player-area">
|
||||||
<div id="whats-on">
|
<div id="whats-on">
|
||||||
<h3>Now playing
|
<h3>Now playing
|
||||||
|
</button>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h5>DSS Radio
|
||||||
<button id="sidebar-listen-live" class="btn btn-mini btn-primary push-right btn-inverse"
|
<button id="sidebar-listen-live" class="btn btn-mini btn-primary push-right btn-inverse"
|
||||||
data-toggle="button" type="button">
|
data-toggle="button" type="button">
|
||||||
Listen Live
|
Listen Live
|
||||||
</button>
|
</button>
|
||||||
</h3>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="side-player">
|
<div class="side-player">
|
||||||
<span class="content">
|
<span class="content">
|
||||||
<div>
|
<div>
|
||||||
You: <a href="#" id="now-playing">Nothing currently on</a>
|
<span id="live-now-playing"></span>
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
Live: <span id="live-now-playing"></span>
|
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="side-player">
|
||||||
|
<span class="content">
|
||||||
|
<div>
|
||||||
|
<span class="content">
|
||||||
|
<div>
|
||||||
|
<a href="#" id="now-playing">Nothing currently on</a>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{% include 'inc/twitter.html' %}
|
{% include 'inc/twitter.html' %}
|
||||||
|
|||||||
Reference in New Issue
Block a user