Loading src/camogmgui/camogmgui.js +9 −5 Original line number Original line Diff line number Diff line Loading @@ -29,8 +29,8 @@ function reload() { makeRequest('camogm_interface.php', '?cmd=run_camogm'); makeRequest('camogm_interface.php', '?cmd=run_camogm'); setTimeout('makeRequest("camogm_interface.php", "?cmd=setmov")', 500); // set MOV as default container format setTimeout('makeRequest("camogm_interface.php", "?cmd=setmov")', 500); // set MOV as default container format } } function mount_hdd() { function mount_hdd(callback) { makeRequest('camogm_interface.php', '?cmd=mount'); makeRequest('camogm_interface.php','?cmd=mount',callback); document.getElementById('directory').value = "/var/hdd/"; document.getElementById('directory').value = "/var/hdd/"; document.getElementById('mount_hdd_button').style.display = "none"; document.getElementById('mount_hdd_button').style.display = "none"; } } Loading @@ -40,7 +40,7 @@ function process_mount_hdd(xmldoc) { if (response == "done") if (response == "done") { { //setTimeout('is_hdd_mounted()', 500); //setTimeout('is_hdd_mounted()', 500); //is_mounted(,"scan_devices()"); scan_devices("is_mounted(selected_device)"); console.log("mounted"); console.log("mounted"); } } } } Loading @@ -54,7 +54,7 @@ function mount_custom_partition(partition) { function unmount_custom_partition(mountpoint) { function unmount_custom_partition(mountpoint) { if (mountpoint != "") { if (mountpoint != "") { //calling back scan_devices() //calling back scan_devices() makeRequest('camogm_interface.php','?cmd=umount&mountpoint='+mountpoint,"scan_devices()"); makeRequest('camogm_interface.php','?cmd=umount&mountpoint='+mountpoint,"scan_devices(list_files(\"\"))"); } } } } Loading Loading @@ -213,6 +213,7 @@ function list_files(dir) { function process_list_file(xmldoc) { function process_list_file(xmldoc) { var can_continue = true; var can_continue = true; if (xmldoc.getElementsByTagName('list_files').length > 0) { if (xmldoc.getElementsByTagName('list_files').length > 0) { if (xmldoc.getElementsByTagName('list_files')[0].firstChild!=null){ if (xmldoc.getElementsByTagName('list_files')[0].firstChild.data != null) { if (xmldoc.getElementsByTagName('list_files')[0].firstChild.data != null) { if (xmldoc.getElementsByTagName('list_files')[0].firstChild.data == "no webshare found") { if (xmldoc.getElementsByTagName('list_files')[0].firstChild.data == "no webshare found") { console.log("webshare not found"); console.log("webshare not found"); Loading @@ -225,6 +226,7 @@ function process_list_file(xmldoc) { } } } } } } } if (can_continue){ if (can_continue){ console.log("Processing file list"); console.log("Processing file list"); var count = xmldoc.getElementsByTagName('file').length; var count = xmldoc.getElementsByTagName('file').length; Loading Loading @@ -284,6 +286,8 @@ function process_list_file(xmldoc) { } } response += "</table><br>"; response += "</table><br>"; document.getElementById('filelist').innerHTML = response; document.getElementById('filelist').innerHTML = response; }else{ } } } } function start_compressor(parent, port) { function start_compressor(parent, port) { Loading Loading
src/camogmgui/camogmgui.js +9 −5 Original line number Original line Diff line number Diff line Loading @@ -29,8 +29,8 @@ function reload() { makeRequest('camogm_interface.php', '?cmd=run_camogm'); makeRequest('camogm_interface.php', '?cmd=run_camogm'); setTimeout('makeRequest("camogm_interface.php", "?cmd=setmov")', 500); // set MOV as default container format setTimeout('makeRequest("camogm_interface.php", "?cmd=setmov")', 500); // set MOV as default container format } } function mount_hdd() { function mount_hdd(callback) { makeRequest('camogm_interface.php', '?cmd=mount'); makeRequest('camogm_interface.php','?cmd=mount',callback); document.getElementById('directory').value = "/var/hdd/"; document.getElementById('directory').value = "/var/hdd/"; document.getElementById('mount_hdd_button').style.display = "none"; document.getElementById('mount_hdd_button').style.display = "none"; } } Loading @@ -40,7 +40,7 @@ function process_mount_hdd(xmldoc) { if (response == "done") if (response == "done") { { //setTimeout('is_hdd_mounted()', 500); //setTimeout('is_hdd_mounted()', 500); //is_mounted(,"scan_devices()"); scan_devices("is_mounted(selected_device)"); console.log("mounted"); console.log("mounted"); } } } } Loading @@ -54,7 +54,7 @@ function mount_custom_partition(partition) { function unmount_custom_partition(mountpoint) { function unmount_custom_partition(mountpoint) { if (mountpoint != "") { if (mountpoint != "") { //calling back scan_devices() //calling back scan_devices() makeRequest('camogm_interface.php','?cmd=umount&mountpoint='+mountpoint,"scan_devices()"); makeRequest('camogm_interface.php','?cmd=umount&mountpoint='+mountpoint,"scan_devices(list_files(\"\"))"); } } } } Loading Loading @@ -213,6 +213,7 @@ function list_files(dir) { function process_list_file(xmldoc) { function process_list_file(xmldoc) { var can_continue = true; var can_continue = true; if (xmldoc.getElementsByTagName('list_files').length > 0) { if (xmldoc.getElementsByTagName('list_files').length > 0) { if (xmldoc.getElementsByTagName('list_files')[0].firstChild!=null){ if (xmldoc.getElementsByTagName('list_files')[0].firstChild.data != null) { if (xmldoc.getElementsByTagName('list_files')[0].firstChild.data != null) { if (xmldoc.getElementsByTagName('list_files')[0].firstChild.data == "no webshare found") { if (xmldoc.getElementsByTagName('list_files')[0].firstChild.data == "no webshare found") { console.log("webshare not found"); console.log("webshare not found"); Loading @@ -225,6 +226,7 @@ function process_list_file(xmldoc) { } } } } } } } if (can_continue){ if (can_continue){ console.log("Processing file list"); console.log("Processing file list"); var count = xmldoc.getElementsByTagName('file').length; var count = xmldoc.getElementsByTagName('file').length; Loading Loading @@ -284,6 +286,8 @@ function process_list_file(xmldoc) { } } response += "</table><br>"; response += "</table><br>"; document.getElementById('filelist').innerHTML = response; document.getElementById('filelist').innerHTML = response; }else{ } } } } function start_compressor(parent, port) { function start_compressor(parent, port) { Loading