Skip to content

Commit 3df1dbc

Browse files
committed
fix bower install, fix static update, keep old waves loaders
1 parent 02639ba commit 3df1dbc

9 files changed

Lines changed: 32 additions & 34019 deletions

File tree

app/deploy/start_app.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ source "$SCRIPT_DIR/start_app_base.sh"
55

66
# django init
77
python $manage migrate --noinput
8+
python $manage bower_install -- --allow-root
89
python $manage collectstatic --noinput
910

1011
python $manage timeside-create-admin-user
1112
python $manage timeside-create-boilerplate
12-
python $manage bower_install -- --allow-root
1313

1414

1515
# static files auto update
1616
watchmedo shell-command --patterns="*.js;*.css" --recursive \
17-
--command='python '$manage' collectstatic --noinput' $static &
17+
--command='python '$manage' collectstatic --noinput' $src &
1818

1919
# app start
2020
if [ $1 == "--runserver" ]

app/deploy/start_app_base.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# paths
44
app='/srv/app'
5+
src='/srv/src'
56
manage=$app'/manage.py'
67
wsgi=$app'/wsgi.py'
78
static='/srv/static/'

app/sandbox/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194

195195
from celery_app import app
196196

197-
BOWER_COMPONENTS_ROOT = '/srv/bower'
197+
BOWER_COMPONENTS_ROOT = '/srv/bower/'
198198
BOWER_PATH = '/usr/local/bin/bower'
199199
BOWER_INSTALLED_APPS = (
200200
'jquery',

timeside/player/static/timeside/js/timeside-waves.js

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function waveform(div_id) {
5353
function update_segment() {
5454
seg_start = graph_sub.xScale.domain()[0]
5555
seg_end = graph_sub.xScale.domain()[1]
56-
56+
5757
if ( seg_start < 0 || seg_end > audioBuffer.duration) {
5858
seg_start = Math.max(0, seg_start);
5959
seg_end = Math.min(audioBuffer.duration, seg_end);
@@ -70,7 +70,7 @@ function waveform(div_id) {
7070

7171
};
7272

73-
73+
7474
segmentLayer.on('drag', function(item, e) {
7575
update_waveform(graph_sub, data)
7676
});
@@ -81,7 +81,7 @@ function waveform(div_id) {
8181

8282
// 4. draw graph
8383
d3.select(id).call(graph.draw);
84-
84+
8585
var graph_sub = wavesUI.timeline()
8686
.xDomain([0, audioBuffer.duration])
8787
.width(graph_width)
@@ -95,7 +95,7 @@ function waveform(div_id) {
9595

9696
graph_sub.add(waveformLayerSub);
9797
update_waveform(graph_sub, data)
98-
98+
9999
d3.select(id_sub).call(graph_sub.draw);
100100

101101
// Add X-Ticks addTicks(id_sub, graph_sub);
@@ -134,15 +134,15 @@ function waveform(div_id) {
134134

135135
// update axis
136136
axis.call(xAxis);
137-
137+
138138
})
139139
.on('mouseup', function(e) {
140140
// set the final xZoom value of the graph
141141
graph_sub.xZoomSet();
142142
// update axis
143143
axis.call(xAxis);
144144
});
145-
145+
146146
} catch (err) {
147147
console.log(err);
148148
}
@@ -163,11 +163,11 @@ function timeline_get_data(json_url, div_id) {
163163
.xDomain([0, duration])
164164
.width(graph_width)
165165
.height(height);
166-
166+
167167
for (var i = 0; i < data_list.length; i++) {
168168
var data = data_list[i];
169169
var ytop = i * (graph_height + 10)
170-
170+
171171
timeline_result(data, graph, ytop);
172172
}
173173

@@ -225,7 +225,7 @@ function timeline_result(data, graph, ytop) {
225225
timeline_framewise_value(data, graph, ytop);
226226
break;
227227
case 'label':
228-
timeline_framewise_label(data, graph, ytop);
228+
timeline_framewise_label(data, graph, ytop);
229229
break;
230230
}
231231
break;
@@ -248,15 +248,15 @@ function timeline_framewise_value(data, graph, ytop) {
248248
}
249249

250250

251-
251+
252252
if (dim == 0) {
253253
// format data
254254
var min_value = 1;
255255
var max_value = -1;
256256
var data = values.map(function(dummy, index) {
257257
min_value = Math.min(min_value, values[index])
258258
max_value = Math.max(max_value, values[index])
259-
259+
260260
return {
261261
cx: (blocksize / 2 + stepsize * index ) / samplerate,
262262
cy: values[index]
@@ -272,21 +272,21 @@ function timeline_framewise_value(data, graph, ytop) {
272272
.data(data)
273273
.color('steelblue')
274274
.opacity(0.8);
275-
275+
276276
// 3. add layers to graph
277277
graph.add(breakpointLayer);
278-
278+
279279
} else {
280280
var colors = d3.scale.category20().domain(d3.set(Math.min(dim, 20)).values()).range();
281-
281+
282282
for (var i = 0; i < dim; i++) {
283283
// format data
284284
var min_value = 0;
285285
var max_value = 0;
286286
var data = values.map(function(dummy, index) {
287287
min_value = Math.min(min_value, values[index][i])
288288
max_value = Math.max(max_value, values[index][i])
289-
289+
290290
return {
291291
cx: (blocksize / 2 + stepsize * index ) / samplerate,
292292
cy: values[index][i]
@@ -302,7 +302,7 @@ function timeline_framewise_value(data, graph, ytop) {
302302
.data(data)
303303
.color(colors[i % 20])
304304
.opacity(0.8);
305-
305+
306306
// 3. add layers to graph
307307
graph.add(breakpointLayer);
308308
};
@@ -322,7 +322,7 @@ function timeline_segment_value(data, graph, ytop) {
322322
height: values[index]
323323
};
324324
});
325-
325+
326326

327327
// var minValue = Math.min.apply(null, values);
328328
var max_value = Math.max.apply(null, values);
@@ -336,10 +336,10 @@ function timeline_segment_value(data, graph, ytop) {
336336
top: ytop,
337337
yDomain: [0, max_value]
338338
});
339-
339+
340340
// 3. add layers to graph
341341
graph.add(segmentLayer);
342-
342+
343343
}
344344

345345
function timeline_segment_label(data, graph, ytop) {
@@ -358,7 +358,7 @@ function timeline_segment_label(data, graph, ytop) {
358358
});
359359

360360
var colors = d3.scale.category10().domain(d3.set(labels).values()).range();
361-
361+
362362
var segmentLayer = wavesUI.segment()
363363
.data(data)
364364
.color(function(d) { return colors[d.label]})
@@ -368,11 +368,11 @@ function timeline_segment_label(data, graph, ytop) {
368368
top: ytop,
369369
handlerOpacity: 1
370370
});
371-
371+
372372

373373
// 3. add layers to graph
374374
graph.add(segmentLayer);
375-
375+
376376
}
377377

378378
function timeline_event_label(data, graph, ytop) {
@@ -400,7 +400,7 @@ function timeline_event_label(data, graph, ytop) {
400400
top: ytop,
401401
yDomain: [0, max_value],
402402
});
403-
403+
404404
// 3. add layers to graph
405405
graph.add(markerLayer);
406406

@@ -426,7 +426,7 @@ function timeline_framewise_label(data, graph, ytop) {
426426
});
427427

428428
var colors = d3.scale.category10().domain(d3.set(labels).values()).range();
429-
429+
430430
var segmentLayer = wavesUI.segment()
431431
.data(data)
432432
.color(function(d) { return colors[d.label]})
@@ -436,9 +436,9 @@ function timeline_framewise_label(data, graph, ytop) {
436436
top: ytop,
437437
handlerOpacity: 1
438438
});
439-
439+
440440

441441
// 3. add layers to graph
442442
graph.add(segmentLayer);
443-
443+
444444
}

timeside/player/static/timeside/lib/angular-resource.min.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

timeside/player/static/timeside/lib/jquery-1.6.min.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

timeside/player/static/timeside/lib/raphael-min.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)