NEW VERSION OUT NOW
http://forum.subsonic.org/forum/viewtopic.php?t=1967
Moderator: moderators
loadImage_mini = icons/updisk_mini.png
loadImage_mini = icons/up.png
<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>
<c:if test="${model.user.uploadRole}">
<td style="width:4em;padding-right:1.5em"> <A HREF="javascript:newwindow()" ><img src="<spring:theme code="loadImage_mini"/>" title="Upload" alt="${more}"><br>Upload</a></td>
</c:if>
<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>
Return to Mods, Apps and Clients
Users browsing this forum: No registered users and 6 guests