blob: 18be91fec4c62f1ce173faa9fe8deea2af1ee438 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="iso-8859-1"%>
<html><head>
<%@ include file="head.jsp" %>
<style type="text/css">
#progressBar {width: 350px; height: 10px; border: 1px solid black; display:none;}
#progressBarContent {width: 0; height: 10px; background: url("<c:url value="/icons/progress.png"/>") repeat;}
</style>
<script type="text/javascript" src="<c:url value="/dwr/interface/transferService.js"/>"></script>
<script type="text/javascript" src="<c:url value="/dwr/engine.js"/>"></script>
<script type="text/javascript" src="<c:url value="/dwr/util.js"/>"></script>
<script type="text/javascript">
function refreshProgress() {
transferService.getUploadInfo(updateProgress);
}
function updateProgress(uploadInfo) {
var progressBar = document.getElementById("progressBar");
var progressBarContent = document.getElementById("progressBarContent");
var progressText = document.getElementById("progressText");
if (uploadInfo.bytesTotal > 0) {
var percent = Math.ceil((uploadInfo.bytesUploaded / uploadInfo.bytesTotal) * 100);
var width = parseInt(percent * 3.5) + 'px';
progressBarContent.style.width = width;
progressText.innerHTML = percent + "<fmt:message key="more.upload.progress"/>";
progressBar.style.display = "block";
progressText.style.display = "block";
window.setTimeout("refreshProgress()", 1000);
} else {
progressBar.style.display = "none";
progressText.style.display = "none";
window.setTimeout("refreshProgress()", 5000);
}
}
</script>
</head>
<body class="mainframe bgcolor1" onload="${model.user.uploadRole ? "refreshProgress()" : ""}">
<h1>
<img src="<spring:theme code="moreImage"/>" alt=""/>
<fmt:message key="more.title"/>
</h1>
<c:if test="${model.user.streamRole}">
<h2><img src="<spring:theme code="randomImage"/>" alt=""/> <fmt:message key="more.random.title"/></h2>
<form method="post" action="randomPlayQueue.view?">
<table>
<tr>
<td><fmt:message key="more.random.text"/></td>
<td>
<select name="size">
<option value="5"><fmt:message key="more.random.songs"><fmt:param value="5"/></fmt:message></option>
<option value="10" selected="true"><fmt:message key="more.random.songs"><fmt:param value="10"/></fmt:message></option>
<option value="20"><fmt:message key="more.random.songs"><fmt:param value="20"/></fmt:message></option>
<option value="50"><fmt:message key="more.random.songs"><fmt:param value="50"/></fmt:message></option>
</select>
</td>
<td><fmt:message key="more.random.genre"/></td>
<td>
<select name="genre">
<option value="any"><fmt:message key="more.random.anygenre"/></option>
<c:forEach items="${model.genres}" var="genre">
<option value="${genre}"><str:truncateNicely upper="20">${genre}</str:truncateNicely></option>
</c:forEach>
</select>
</td>
<td><fmt:message key="more.random.year"/></td>
<td>
<select name="year">
<option value="any"><fmt:message key="more.random.anyyear"/></option>
<c:forEach begin="0" end="${model.currentYear - 2006}" var="yearOffset">
<c:set var="year" value="${model.currentYear - yearOffset}"/>
<option value="${year} ${year}">${year}</option>
</c:forEach>
<option value="2005 2010">2005 – 2010</option>
<option value="2000 2005">2000 – 2005</option>
<option value="1990 2000">1990 – 2000</option>
<option value="1980 1990">1980 – 1990</option>
<option value="1970 1980">1970 – 1980</option>
<option value="1960 1970">1960 – 1970</option>
<option value="1950 1960">1950 – 1960</option>
<option value="0 1949">< 1950</option>
</select>
</td>
<td><fmt:message key="more.random.folder"/></td>
<td>
<select name="musicFolderId">
<option value="-1"><fmt:message key="more.random.anyfolder"/></option>
<c:forEach items="${model.musicFolders}" var="musicFolder">
<option value="${musicFolder.id}">${musicFolder.name}</option>
</c:forEach>
</select>
</td>
<td>
<input type="submit" value="<fmt:message key="more.random.ok"/>">
</td>
</tr>
<c:if test="${not model.clientSidePlaylist}">
<tr>
<td colspan="9">
<input type="checkbox" name="autoRandom" id="autoRandom" class="checkbox"/>
<label for="autoRandom"><fmt:message key="more.random.auto"/></label>
</td>
</tr>
</c:if>
</table>
</form>
</c:if>
<h2><img src="<spring:theme code="androidImage"/>" alt=""/> <fmt:message key="more.apps.title"/></h2>
<fmt:message key="more.apps.text"/>
<h2><img src="<spring:theme code="wapImage"/>" alt=""/> <fmt:message key="more.mobile.title"/></h2>
<fmt:message key="more.mobile.text"><fmt:param value="${model.brand}"/></fmt:message>
<h2><img src="<spring:theme code="podcastImage"/>" alt=""/> <fmt:message key="more.podcast.title"/></h2>
<fmt:message key="more.podcast.text"/>
<c:if test="${model.user.uploadRole}">
<h2><img src="<spring:theme code="uploadImage"/>" alt=""/> <fmt:message key="more.upload.title"/></h2>
<form method="post" enctype="multipart/form-data" action="upload.view">
<table>
<tr>
<td><fmt:message key="more.upload.source"/></td>
<td colspan="2"><input type="file" id="file" name="file" size="40"/></td>
</tr>
<tr>
<td><fmt:message key="more.upload.target"/></td>
<td><input type="text" id="dir" name="dir" size="37" value="${model.uploadDirectory}"/></td>
<td><input type="submit" value="<fmt:message key="more.upload.ok"/>"/></td>
</tr>
<tr>
<td colspan="2">
<input type="checkbox" checked name="unzip" id="unzip" class="checkbox"/>
<label for="unzip"><fmt:message key="more.upload.unzip"/></label>
</td>
</tr>
</table>
</form>
<p class="detail" id="progressText"/>
<div id="progressBar">
<div id="progressBarContent"/>
</div>
</c:if>
</body></html>
|