|
@@ -4,6 +4,23 @@ var d3 = require("d3"),
|
4
|
4
|
video = require("./video.js"),
|
5
|
5
|
audio = require("./audio.js");
|
6
|
6
|
|
|
7
|
+d3.json("/settings/labels.json", function(err, labels){
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+ d3.select("#input-label")
|
|
11
|
+ .on("change", updateLabel)
|
|
12
|
+ .selectAll("option")
|
|
13
|
+ .data(labels.podcasts)
|
|
14
|
+ .enter()
|
|
15
|
+ .append("option")
|
|
16
|
+ .text(function(l){
|
|
17
|
+ return l;
|
|
18
|
+ });
|
|
19
|
+
|
|
20
|
+ d3.select("#input-label").each(updateLabel);
|
|
21
|
+
|
|
22
|
+});
|
|
23
|
+
|
7
|
24
|
d3.json("/settings/themes.json", function(err, themes){
|
8
|
25
|
|
9
|
26
|
var errorMessage;
|
|
@@ -134,13 +151,13 @@ function error(msg) {
|
134
|
151
|
}
|
135
|
152
|
|
136
|
153
|
|
137
|
|
-function initialize(err, themesWithImages) {
|
|
154
|
+function initialize(err, results) {
|
138
|
155
|
|
139
|
|
-
|
|
156
|
+
|
140
|
157
|
d3.select("#input-theme")
|
141
|
158
|
.on("change", updateTheme)
|
142
|
159
|
.selectAll("option")
|
143
|
|
- .data(themesWithImages)
|
|
160
|
+ .data(results)
|
144
|
161
|
.enter()
|
145
|
162
|
.append("option")
|
146
|
163
|
.text(function(d){
|
|
@@ -226,6 +243,10 @@ function updateTheme() {
|
226
|
243
|
preview.theme(d3.select(this.options[this.selectedIndex]).datum());
|
227
|
244
|
}
|
228
|
245
|
|
|
246
|
+function updateLabel() {
|
|
247
|
+
|
|
248
|
+}
|
|
249
|
+
|
229
|
250
|
function preloadImages(themes) {
|
230
|
251
|
|
231
|
252
|
|