Created
May 14, 2014 19:11
-
-
Save jonasalmeida/3a9c16d321acf86ea06a to your computer and use it in GitHub Desktop.
ESTE module to display Patient entries as JSON
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('<li> <a href="javascript:myPatientsFun()">JSON_Patients</a></li>').appendTo($('.navbar-nav')[0]); | |
myPatientsFun = function() { | |
if($('#JSON_Patients').length>0){$('#JSON_Patients').remove()} | |
else{ | |
var myPatients = Patients.find().fetch(); | |
$('.row-fluid').prepend($('<div id="JSON_Patients"><a style="color:red" href="javascript:myPatientsFun()">Hide ('+myPatients.length+')</a></div>')); | |
$('#JSON_Patients').append($('<pre>'+JSON.stringify(myPatients,undefined,3)+'</pre>')); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
URL for loading module:
https://gist.githubusercontent.com/jonasalmeida/3a9c16d321acf86ea06a/raw/a3de1e33a605a779efad20dcde35f225c53216c0/JSON%20Patients