Finish list viewer
This commit is contained in:
@@ -124,7 +124,7 @@ var ListNavigator = {
|
||||
var navigatorItems = $("#listNavigatorItems").children().toArray();
|
||||
|
||||
for (i = startPos; i <= endPos; i++){
|
||||
var thumb = this.data[i].thumbnail;
|
||||
var thumb = "/api/file/" + this.data[i].id + "/thumbnail";
|
||||
var name = this.data[i].file_name;
|
||||
|
||||
var itemHtml = escapeHTML(name) + "<br>"
|
||||
|
@@ -51,27 +51,26 @@ function createList(){
|
||||
}
|
||||
|
||||
function listCreated(response){
|
||||
if(response.status === "success"){
|
||||
resultString = "<div class=\"uploadHistory\">List creation finished!<br/>"
|
||||
if(response.success){
|
||||
resultString = "<div class=\"uploadItem\">List creation finished!<br/>"
|
||||
+ "Your List URL: <br/>"
|
||||
+ "<a href=\"/l/" + response.id + "\" target=\"_blank\" style=\"font-weight: bold;\">/l/" + response.id + "</a>"
|
||||
+ "<a href=\"/l/" + response.id + "\" target=\"_blank\" style=\"font-weight: bold;\">"+window.location.hostname+"/l/" + response.id + "</a>"
|
||||
+ "</div>";
|
||||
|
||||
$('#uploads-container').prepend(
|
||||
$('#uploads-completed').prepend(
|
||||
$(resultString).hide().fadeIn('slow')
|
||||
);
|
||||
}else{
|
||||
resultString = "<div class=\"uploadHistory\">List creation failed<br/>"
|
||||
resultString = "<div class=\"uploadItem\">List creation failed<br/>"
|
||||
+ "The server responded with this: <br/>"
|
||||
+ response.type + ": " + response.value
|
||||
+ "</div>";
|
||||
|
||||
$('#uploads-container').prepend(
|
||||
$('#uploads-completed').prepend(
|
||||
$(resultString).hide().fadeIn('slow')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//$("#btnAddToList").click(function (evt) {
|
||||
// var fileId = $("#txtListId").val();
|
||||
// var fileDesc = $("#txtListDesc").val();
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{.FileName}} ~ PixelDrain File</title>
|
||||
<title>{{.Title}}</title>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<link rel="stylesheet" href="/res/style/viewer.css"/>
|
||||
|
Reference in New Issue
Block a user