-
Notifications
You must be signed in to change notification settings - Fork 13
GSoC2018 report generator #1
base: master
Are you sure you want to change the base?
Changes from 1 commit
7c71034
3db8a1b
b62f74a
ff73094
eae3984
2fc50a5
84cb384
2e6ac8d
33fc9c7
8536b8a
8d4896c
eae851d
877388b
b1cb778
780e21a
8e281b5
83de3ee
6b70601
c932ea5
4558a47
29bbb2b
00a4f22
bc024c6
7f33e3f
ecc9ebc
2320022
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<html lang="{{ app()->getLocale() }}"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="_token" content="{{ csrf_token() }}" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="author" content="Tigpezeghe Rodrige K. @ [email protected]"> | ||
<metan name="description" content="GSoC2018: Building a report generator for LibreHealthEHR"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oops There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Taken care of! |
||
<meta name="description" content="GSoC2018: Building a report generator for LibreHealthEHR"> | ||
<title>@yield('title') - LibreHealthEHR</title> | ||
|
||
<!-- Custom app.css in public/assets/css --> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,19 +43,32 @@ function generate(IDs) { | |
return i == IDs.indexOf(item); | ||
}); | ||
console.log(option_ids); | ||
$.ajaxSetup({ | ||
headers: { | ||
'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content') | ||
} | ||
}); | ||
$.ajax({ | ||
url: 'reportgenerator/generate', | ||
type: 'GET', | ||
type: 'get', | ||
data: { ids: option_ids }, | ||
dataType: 'json', | ||
success: function(response){ | ||
alert("You've successfully sent the unique ids"); | ||
console.log(response); | ||
//alert("You've successfully sent the unique ids"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Debug? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, debug. |
||
jQuery('.alert').show(); | ||
jQuery('.alert').html(response.option_ids); | ||
window.location.href = response.redirecturl; // your action should return an object having [redirecturl] property | ||
}, | ||
error: function (httpRequest, textStatus, errorThrown) { // detailed error messsage | ||
alert("Error: " + textStatus + " " + errorThrown + " " + httpRequest); | ||
} | ||
}); | ||
} | ||
|
||
$(document).ready(function() { | ||
$('#generate-button').click(function() { | ||
$('#generate-button').click(function(e) { | ||
e.preventDefault(); | ||
if (jQuery.isEmptyObject(IDs)) { // check if the user has dropped any component before trying to generate a report | ||
alert("Please drag and drop components before you can generate a report!"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Cannot create a blank report. Please drag and drop at least one component into your new report before attempting to generate it." There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought of that, and it escaped me. Handling it now! |
||
} else { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shoutcast port? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what this affects, but might need to be configurable/discoverable. For instance, this would not work in my production setup. localhost does one thing. 127.0.0.1 does something completely different.
-I am sure you have this under consideration, or it is actually a non-issue...I am just making sure you know I am here! 😺
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have this @aethelwulffe I'll use the $DB_HOST global.