2014-06-20 Alejandro Gallardo <alejandro.gallardo@artica.es>

* extensions/system_info.php: Error fixes.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10245 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
alexhigh 2014-06-20 12:14:07 +00:00
parent 653916e6dd
commit 55ac3db19b
2 changed files with 23 additions and 8 deletions

View File

@ -1,3 +1,7 @@
2014-06-20 Alejandro Gallardo <alejandro.gallardo@artica.es>
* extensions/system_info.php: Error fixes.
2014-06-20 Alejandro Gallardo <alejandro.gallardo@artica.es>
* extensions/system_info.php: Error fix.

View File

@ -521,23 +521,34 @@ function mainSystemInfo() {
$("#submit-generate").click(function(e) {
e.preventDefault();
generate_info();
if ($("#checkbox-pandora_diag").prop('checked')
|| $("#checkbox-system_info").prop('checked')
|| $("#checkbox-log_info").prop('checked')) {
generate_info();
} else {
alert('<?php echo __('At least one option must be selected'); ?>');
}
});
function generate_info () {
$("#submit-generate").hide();
$("#spinner_img").show();
console.log($("#checkbox-pandora_diag").prop('checked'));
console.log($("#checkbox-system_info").prop('checked'));
console.log($("#checkbox-log_info").prop('checked'));
$.ajax({
url: 'ajax.php',
type: 'POST',
dataType: 'json',
data: {
page: <?php echo json_encode(EXTENSIONS_DIR) ?> + '/system_info',
generate_info: 1,
pandora_diag: function() { return $("checkbox-pandora_diag").val(); },
system_info: function() { return $("checkbox-system_info").val(); },
log_info: function() { return $("checkbox-log_info").val(); }
page: <?php echo json_encode(EXTENSIONS_DIR) ?> + '/system_info',
generate_info: 1,
pandora_diag: Number($("#checkbox-pandora_diag").prop('checked')),
system_info: Number($("#checkbox-system_info").prop('checked')),
log_info: Number($("#checkbox-log_info").prop('checked'))
},
complete: function() {
$("#spinner_img").hide();
@ -546,7 +557,7 @@ function mainSystemInfo() {
success: function(data) {
if (data.success) {
$("#table_file-row_link-cell-link").find("a").prop("href", data.url);
$("#table_file-row_link-cell-link").find("a").prop("href", data.url).show();
$("#table_file-row_date-cell-date").html(data.date);
$("#table_file-row_location-cell-location").html(data.location);
$("#table_file_container").slideDown();
@ -564,7 +575,7 @@ function mainSystemInfo() {
$("#table_file-row_date-cell-date").html("");
$("#table_file-row_location-cell-location").html("");
$("#table_file_container").slideUp();
alert('Error');
alert('<?php echo __('Error'); ?>');
}
});
}