ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seanfi...@apache.org
Subject svn commit: r1665726 - /ctakes/site/trunk/content/people.mdtext
Date Tue, 10 Mar 2015 22:17:02 GMT
Author: seanfinan
Date: Tue Mar 10 22:17:02 2015
New Revision: 1665726

URL: http://svn.apache.org/r1665726
Log:
Attempting auto-population of list using https://projects-new.apache.org/json/foundation/committers.json
Need to be in same domain for json  query, so please forgive the checkins

Modified:
    ctakes/site/trunk/content/people.mdtext

Modified: ctakes/site/trunk/content/people.mdtext
URL: http://svn.apache.org/viewvc/ctakes/site/trunk/content/people.mdtext?rev=1665726&r1=1665725&r2=1665726&view=diff
==============================================================================
--- ctakes/site/trunk/content/people.mdtext (original)
+++ ctakes/site/trunk/content/people.mdtext Tue Mar 10 22:17:02 2015
@@ -46,15 +46,50 @@
 <!-- show enlarged image -->
 <script type="text/javascript">
 $(document).ready( function() {
-   $.getJSON( "https://projects-new.apache.org/json/foundation/committers.json",
-      function( data ) {
-         var persons = [];
-         persons.push( "<ul>" );
+   var exturl = "https://projects-new.apache.org/json/foundation/committers.json";
+   $.getJSON( exturl, function( data ) {
+         var persons = $("<ul>");
          $.each( data.ctakes, function( index, person ) {
-            persons.push( "<li>" + person + "</li>" );
+            persons.append( "<li>" + person + "</li>" );
          });
-         persons.push( "</ul>" );
-         $( "#people-names" ).append( persons.join( "" ) );
+         persons.append( "</ul>" );
+         $( "#people-names" ).append( persons );
       });
 });
+
+$(document).ready( function() {
+   var exturl = "https://projects-new.apache.org/json/foundation/committers.json";
+   $.getJSON( exturl, function( data ) {
+         var persons = $("<ul>");
+         $.each( data.ctakes, function( index, person ) {
+            persons.append( "<li>" + person + "</li>" );
+         });
+         persons.append( "</ul>" );
+         $( "#people-names" ).append( persons );
+         $( "#people-names" ).append( "<p>throwback " + data.ctakes[0] + "</p>"
);
+      }).error( function() {
+         $( "#people-names" ).append( "<p>error getting json</p>" );
+      });
+});
+
+$(document).ready( function() {
+      var data = { "tools" : ["wrench","pliers"], "gubers" : ["bob","joe","sue"] };
+         var persons = $("<ul>");
+         $.each( data.tools, function( index, person ) {
+            persons.append( "<li>" + person + "</li>" );
+         });
+         persons.append( "</ul>" );
+         $( "#people-names" ).append( persons );
+});
+
+$(document).ready( function() {
+      var data = ["bob","joe","sue"];
+         var persons = $("<ul>");
+         $.each( data, function( index, person ) {
+            persons.append( "<li>" + person + "</li>" );
+         });
+         persons.append( "</ul>" );
+         $( "#people-names" ).append( persons );
+});
+
 </script>



Mime
View raw message