Rework url generation for excel export (#539, #540)

This commit is contained in:
jekkos
2016-05-10 18:36:20 +02:00
parent 3b4fbce6f6
commit 498f8a06b8
5 changed files with 5 additions and 47 deletions

View File

@@ -78,21 +78,7 @@ $(document).ready(function()
$("#generate_report").click(function()
{
var input_type = $("#input_type").val();
var location_id = $("#location_id").val();
var location = window.location + '/' + start_date + '/' + end_date;
if (input_type)
{
location += '/' + input_type;
}
if (location_id)
{
location += '/' + location_id;
}
window.location = location;
window.location = [window.location, start_date, end_date, $("#input_type").val() || 0, $("#location_id").val()].join("/");
});
});
</script>

View File

@@ -57,11 +57,7 @@ $(document).ready(function()
$("#generate_report").click(function()
{
var sale_type = $("#sale_type").val();
var location = window.location + '/' + start_date + '/' + end_date + '/' + sale_type;
location += '/' + $("input[name='export_excel']:checked").val();
window.location = location;
window.location = [window.location, start_date, end_date, $("#sale_type").val() || 0, $("input[name='export_excel']:checked").val()].join("/");
});
});
</script>

View File

@@ -39,13 +39,7 @@ $(document).ready(function()
{
$("#generate_report").click(function()
{
var export_excel = 0;
if ($("#export_excel_yes").attr('checked'))
{
export_excel = 1;
}
window.location = window.location+'/' + export_excel;
window.location = [window.location, $("input[name='export_excel']").val()].join("/");
});
});
</script>

View File

@@ -53,13 +53,7 @@ $(document).ready(function()
{
$("#generate_report").click(function()
{
var export_excel = 0;
if ($("#export_excel_yes").attr('checked'))
{
export_excel = 1;
}
window.location = window.location+'/' + export_excel + '/' + $("#location_id").val() + '/' + $("#item_count").val();
window.location = [window.location, $("input[name='export_excel']").is(':checked'), $("#location_id").val(), $("#item_count").val()].join("/");
});
});
</script>

View File

@@ -64,19 +64,7 @@ $(document).ready(function()
$("#generate_report").click(function()
{
var sale_type = $("#sale_type").val();
var location = window.location + '/' + start_date + '/' + end_date + '/' + $('#specific_input_data').val() + '/' + sale_type;
if ($("#export_excel_yes").attr('checked'))
{
location += '/' + 1;
}
else
{
location += '/' + 0;
}
window.location = location;
window.location = [window.location, start_date, end_date, $('#specific_input_data').val(), $("#sale_type").val(), $("input[name='export_excel']").val()].join("/");
});
});
</script>