Revamped theme

This commit is contained in:
Fergal Moran
2013-04-22 21:44:39 +01:00
parent f1335e1f49
commit 9cbccb9e61
12 changed files with 1061 additions and 623 deletions

View File

@@ -2,8 +2,7 @@ from tastypie.authentication import Authentication
from tastypie.authorization import Authorization
from spa.api.v1.BackboneCompatibleResource import BackboneCompatibleResource
from spa.models import UserProfile
from spa.models._Activity import _Activity
import pdb
from spa.models._Activity import _Activity
class ActivityResource(BackboneCompatibleResource):
@@ -19,7 +18,6 @@ class ActivityResource(BackboneCompatibleResource):
def dehydrate(self, bundle):
try:
pdb.set_trace()
if bundle.obj.user is not None and bundle.obj.user.get_profile() is not None:
user_name = bundle.obj.user.get_profile().get_nice_name()
user_image = bundle.obj.user.get_profile().get_small_profile_image()

View File

@@ -1,91 +1,91 @@
.bootstrap-timepicker.dropdown-menu {
border-radius: 4px 4px 4px 4px;
display: none;
left: 0;
margin-top: 1px;
padding: 4px;
top: 0;
}
.bootstrap-timepicker.dropdown-menu.open {
display: inline-block;
}
.bootstrap-timepicker.dropdown-menu:before {
border-bottom: 7px solid rgba(0, 0, 0, 0.2);
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: "";
left: 6px;
position: absolute;
top: -7px;
}
.bootstrap-timepicker.dropdown-menu:after {
border-bottom: 6px solid #FFFFFF;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
content: "";
left: 7px;
position: absolute;
top: -6px;
}
.bootstrap-timepicker.modal {
margin-left: -100px;
margin-top: 0;
top: 30%;
width: 200px;
}
.bootstrap-timepicker.modal .modal-content {
padding: 0;
}
.bootstrap-timepicker table {
margin: 0;
width: 100%;
}
.bootstrap-timepicker table td {
height: 30px;
margin: 0;
padding: 2px;
text-align: center;
width: 49%;
}
.bootstrap-timepicker table.show-meridian td, .bootstrap-timepicker table.show-seconds td {
width: 32%;
}
.bootstrap-timepicker table.show-seconds.show-meridian td {
width: 23.5%;
}
.bootstrap-timepicker table td.separator {
width: 2% !important;
}
.bootstrap-timepicker table td span {
width: 100%;
}
.bootstrap-timepicker table td a {
border: 1px solid transparent;
display: inline-block;
margin: 0;
outline: 0 none;
padding: 8px 0;
width: 90%;
}
.bootstrap-timepicker table td a:hover {
background-color: #EEEEEE;
border-color: #DDDDDD;
border-radius: 4px 4px 4px 4px;
}
.bootstrap-timepicker table td a i {
margin-top: 2px;
}
.bootstrap-timepicker table td input {
margin: 0;
text-align: center;
width: 25px;
}
.bootstrap-timepicker-component .add-on {
cursor: pointer;
}
.bootstrap-timepicker-component .add-on i {
display: block;
height: 16px;
width: 16px;
}
.bootstrap-timepicker.dropdown-menu {
border-radius: 4px 4px 4px 4px;
display: none;
left: 0;
margin-top: 1px;
padding: 4px;
top: 0;
}
.bootstrap-timepicker.dropdown-menu.open {
display: inline-block;
}
.bootstrap-timepicker.dropdown-menu:before {
border-bottom: 7px solid rgba(0, 0, 0, 0.2);
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: "";
left: 6px;
position: absolute;
top: -7px;
}
.bootstrap-timepicker.dropdown-menu:after {
border-bottom: 6px solid #FFFFFF;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
content: "";
left: 7px;
position: absolute;
top: -6px;
}
.bootstrap-timepicker.modal {
margin-left: -100px;
margin-top: 0;
top: 30%;
width: 200px;
}
.bootstrap-timepicker.modal .modal-content {
padding: 0;
}
.bootstrap-timepicker table {
margin: 0;
width: 100%;
}
.bootstrap-timepicker table td {
height: 30px;
margin: 0;
padding: 2px;
text-align: center;
width: 49%;
}
.bootstrap-timepicker table.show-meridian td, .bootstrap-timepicker table.show-seconds td {
width: 32%;
}
.bootstrap-timepicker table.show-seconds.show-meridian td {
width: 23.5%;
}
.bootstrap-timepicker table td.separator {
width: 2% !important;
}
.bootstrap-timepicker table td span {
width: 100%;
}
.bootstrap-timepicker table td a {
border: 1px solid transparent;
display: inline-block;
margin: 0;
outline: 0 none;
padding: 8px 0;
width: 90%;
}
.bootstrap-timepicker table td a:hover {
background-color: #EEEEEE;
border-color: #DDDDDD;
border-radius: 4px 4px 4px 4px;
}
.bootstrap-timepicker table td a i {
margin-top: 2px;
}
.bootstrap-timepicker table td input {
margin: 0;
text-align: center;
width: 25px;
}
.bootstrap-timepicker-component .add-on {
cursor: pointer;
}
.bootstrap-timepicker-component .add-on i {
display: block;
height: 16px;
width: 16px;
}

File diff suppressed because it is too large Load Diff

9
static/css/bootstrap.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -36,9 +36,13 @@ window.MixListItemView = Backbone.View.extend({
'<a href="/mixes/' + this.slug + '" class="dss-tag-button">' + this.text + '</a>');
});
com.podnoms.player.drawTimeline(
$('#player-timeline-' + id, this.el),
this.model.get('duration'));
if (com.podnoms.settings.drawTimelineOnMix) {
com.podnoms.player.drawTimeline(
$('#player-timeline-' + id, this.el),
this.model.get('duration'));
} else {
$('#player-timeline-' + id, this.el).hide();
}
var totalDuration = moment.duration(this.model.get('duration'), "seconds");
var totalDurationText = totalDuration.hours() != 0 ?
@@ -162,7 +166,11 @@ window.MixListView = Backbone.View.extend({
initialize: function () {
_.bindAll(this, "render");
this.render();
/*this.infiniScroll = new Backbone.InfiniScroll(this.collection);*/
this.infiniScroll = new Backbone.InfiniScroll(this.collection, {success: this.appendRender});
},
remove: function () {
this.infiniScroll.destroy();
return Backbone.View.prototype.remove.call(this);
},
render: function () {
var mixes = this.collection;

View File

@@ -1,6 +1,6 @@
// Created by Jonathan Eatherly, (https://github.com/joneath)
// MIT license
// Version 0.1
// Version 0.3
(function () {
Backbone.InfiniScroll = function (collection, options) {
@@ -17,22 +17,22 @@
self.collection = collection;
self.options = _.defaults(options, {
success:function () {
success: function () {
},
error:function () {
error: function () {
},
onFetch:function () {
onFetch: function () {
},
target:$(window),
param:"until",
extraParams:{},
pageSizeParam:"page_size",
untilAttr:"id",
pageSize:pageSize,
scrollOffset:100,
add:true,
strict:false,
includePage:false
target: $(window),
param: "until",
extraParams: {},
pageSizeParam: "page_size",
untilAttr: "id",
pageSize: pageSize,
scrollOffset: 100,
remove: false,
strict: false,
includePage: false
});
var initialize = function () {
@@ -93,10 +93,10 @@
self.onFetch();
self.disableFetch();
self.collection.fetch({
success:self.fetchSuccess,
error:self.fetchError,
add:self.options.add,
data:$.extend(buildQueryParams(lastModel), self.options.extraParams)
success: self.fetchSuccess,
error: self.fetchError,
remove: self.options.remove,
data: $.extend(buildQueryParams(lastModel), self.options.extraParams)
});
}
prevScrollY = scrollY;

View File

@@ -7,10 +7,10 @@
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
{% load compress %}
{% compress css %}
<link rel="stylesheet" href="{{ STATIC_URL }}css/bootstrap/bootstrap.min.css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/bootstrap/bootstrap-responsive.min.css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/bootstrap/bootstrap-datepicker.css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/bootstrap/bootstrap-timepicker.css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/bootstrap.css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/bootstrap-responsive.min.css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/bootstrap-datepicker.css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/bootstrap-timepicker.css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/jasny/jasny-bootstrap.min.css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/jasny/jasny-bootstrap-responsive.min.css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/select2.css">

View File

@@ -5,24 +5,24 @@ com.podnoms.settings = {
CHAT_HOST: '{{ CHAT_HOST }}',
REALTIME_HOST: '{{ CHAT_HOST }}',
REALTIME_PORT: '{{ CHAT_HOST }}',
urlRoot:'{{ API_URL }}',
liveStreamRoot:'http://{{ LIVE_STREAM_URL }}:{{ LIVE_STREAM_PORT }}/{{ LIVE_STREAM_MOUNT }}',
streamInfoUrl:'http://{{ LIVE_STREAM_INFO_URL }}',
volume:'{{ DEFAULT_AUDIO_VOLUME }}',
urlRoot: '{{ API_URL }}',
liveStreamRoot: 'http://{{ LIVE_STREAM_URL }}:{{ LIVE_STREAM_PORT }}/{{ LIVE_STREAM_MOUNT }}',
streamInfoUrl: 'http://{{ LIVE_STREAM_INFO_URL }}',
volume: '{{ DEFAULT_AUDIO_VOLUME }}',
smDebugMode: '{{ SM_DEBUG_MODE }}',
drawTimelineOnMix: false,
/** simple helper to take an api JSON object and initialise a player item */
setupPlayer:function (data, id) {
setupPlayer: function (data, id) {
com.podnoms.player.setupPlayer({
id:id,
boundingEl:$('#mix-container-'+ id),
waveFormEl:$('#waveform-' + id),
playHeadEl:$('#playhead-player-' + id),
loadingEl:$('#progress-player-' + id),
timeLineEl:$('#player-timeline-' + id),
seekHeadEl:$('#player-seekhead'),
playButtonEl:$('#play-pause-button-small-' + id),
url:data.stream_url
id: id,
boundingEl: $('#mix-container-' + id),
waveFormEl: $('#waveform-' + id),
playHeadEl: $('#playhead-player-' + id),
loadingEl: $('#progress-player-' + id),
timeLineEl: $('#player-timeline-' + id),
seekHeadEl: $('#player-seekhead'),
playButtonEl: $('#play-pause-button-small-' + id),
url: data.stream_url
});
}
};