| Line 169... |
Line 169... |
| 169 |
}
|
169 |
}
|
| 170 |
|
170 |
|
| 171 |
// Refresh the progress bar.
|
171 |
// Refresh the progress bar.
|
| 172 |
function refreshProgress() {
|
172 |
function refreshProgress() {
|
| 173 |
$.ajax({
|
173 |
$.ajax({
|
| 174 |
url: "pbChecker.php?file=" + document.getElementById("sessionId").value + "_" + document.getElementById("sessionTab").value,
|
174 |
url: "pbChecker.php?file=" + document.getElementById("sessionId").value + "_" + document.getElementById("sessionTab").value + "&nonce=" + document.getElementById("nonce").value,
|
| 175 |
success: function(data) {
|
175 |
success: function(data) {
|
| 176 |
updateProgressBar(data.percent, data.message);
|
176 |
updateProgressBar(data.percent, data.message);
|
| 177 |
if (data.percent >= 100) {
|
177 |
if (data.percent >= 100) {
|
| 178 |
window.clearInterval(myTimer);
|
178 |
window.clearInterval(myTimer);
|
| 179 |
myTimer = window.setInterval(function() { completeProgress(); }, 1000);
|
179 |
myTimer = window.setInterval(function() { completeProgress(); }, 1000);
|
| Line 197... |
Line 197... |
| 197 |
|
197 |
|
| 198 |
function saveTransfer(url) {
|
198 |
function saveTransfer(url) {
|
| 199 |
var xhttp = new XMLHttpRequest();
|
199 |
var xhttp = new XMLHttpRequest();
|
| 200 |
xhttp.open("POST", "savetransfer.php", true);
|
200 |
xhttp.open("POST", "savetransfer.php", true);
|
| 201 |
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
201 |
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
| 202 |
xhttp.send("target=" + btoa(url) + "&sessionTab=" + document.getElementById("sessionTab").value);
|
202 |
xhttp.send("target=" + btoa(url) + "&sessionTab=" + document.getElementById("sessionTab").value + "&nonce=" + document.getElementById("nonce").value);
|
| 203 |
}
|
203 |
}
|
| 204 |
|
204 |
|
| 205 |
function addWishlist(id, field, cnt, wl) {
|
205 |
function addWishlist(id, field, cnt, wl) {
|
| 206 |
$(field).tooltip('hide');
|
206 |
$(field).tooltip('hide');
|
| 207 |
$(field).remove();
|
207 |
$(field).remove();
|
| Line 227... |
Line 227... |
| 227 |
alertAutoClose();
|
227 |
alertAutoClose();
|
| 228 |
}
|
228 |
}
|
| 229 |
};
|
229 |
};
|
| 230 |
xhttp.open("POST", "wishlistDB.php", true);
|
230 |
xhttp.open("POST", "wishlistDB.php", true);
|
| 231 |
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
231 |
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
| 232 |
xhttp.send("id=" + id + "&function=add&wl=" + wl + "&sessionTab=" + document.getElementById("sessionTab").value);
|
232 |
xhttp.send("id=" + id + "&function=add&wl=" + wl + "&sessionTab=" + document.getElementById("sessionTab").value + "&nonce=" + document.getElementById("nonce").value);
|
| 233 |
}
|
233 |
}
|
| 234 |
|
234 |
|
| 235 |
function deleteWishlist(id, field, title, artist) {
|
235 |
function deleteWishlist(id, field, title, artist) {
|
| 236 |
$(field).tooltip('hide');
|
236 |
$(field).tooltip('hide');
|
| 237 |
if (confirm('Remove ' + title + ' by ' + artist + ' from wishlist?')) {
|
237 |
if (confirm('Remove ' + title + ' by ' + artist + ' from wishlist?')) {
|
| 238 |
var parent = field.parentNode.parentNode.parentNode;
|
238 |
var parent = field.parentNode.parentNode.parentNode;
|
| 239 |
var xhttp = new XMLHttpRequest();
|
239 |
var xhttp = new XMLHttpRequest();
|
| 240 |
xhttp.open("POST", "wishlistDB.php", true);
|
240 |
xhttp.open("POST", "wishlistDB.php", true);
|
| 241 |
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
241 |
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
| 242 |
xhttp.send("function=delete&id=" + id + "&sessionTab=" + document.getElementById("sessionTab").value);
|
242 |
xhttp.send("function=delete&id=" + id + "&sessionTab=" + document.getElementById("sessionTab").value + "&nonce=" + document.getElementById("nonce").value);
|
| 243 |
parent.parentNode.removeChild(parent);
|
243 |
parent.parentNode.removeChild(parent);
|
| 244 |
}
|
244 |
}
|
| 245 |
}
|
245 |
}
|
| 246 |
|
246 |
|
| 247 |
function editWishlist(id, field) {
|
247 |
function editWishlist(id, field) {
|
| Line 309... |
Line 309... |
| 309 |
}
|
309 |
}
|
| 310 |
}
|
310 |
}
|
| 311 |
};
|
311 |
};
|
| 312 |
xhttp.open("POST", "wishlistDB.php", true);
|
312 |
xhttp.open("POST", "wishlistDB.php", true);
|
| 313 |
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
313 |
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
| 314 |
xhttp.send("function=update&id=" + id + "&artist=" + encodeURIComponent(artist) + "&title=" + encodeURIComponent(title) + "&barcode=" + encodeURIComponent(barcode) + "&cond=" + encodeURIComponent(cond) + "&format=" + encodeURIComponent(format) + "&price=" + encodeURIComponent(price) + "&sessionTab=" + document.getElementById("sessionTab").value);
|
314 |
xhttp.send("function=update&id=" + id + "&artist=" + encodeURIComponent(artist) + "&title=" + encodeURIComponent(title) + "&barcode=" + encodeURIComponent(barcode) + "&cond=" + encodeURIComponent(cond) + "&format=" + encodeURIComponent(format) + "&price=" + encodeURIComponent(price) + "&sessionTab=" + document.getElementById("sessionTab").value + "&nonce=" + document.getElementById("nonce").value);
|
| 315 |
}
|
315 |
}
|
| 316 |
|
316 |
|
| 317 |
// Flex Data List
|
317 |
// Flex Data List
|
| 318 |
function flexdatalistSetup() {
|
318 |
function flexdatalistSetup() {
|
| 319 |
if ($.fn.flexdatalist && $.fn.clearer) {
|
319 |
if ($.fn.flexdatalist && $.fn.clearer) {
|