Difference between revisions of "Team:William and Mary/Outreach DB/Details"

 
(9 intermediate revisions by 3 users not shown)
Line 14: Line 14:
 
   <script src='https://2017.igem.org/Team:William_and_Mary/Outreach_DB/scripts/tabletop?action=raw&ctype=text/javascript'></script>
 
   <script src='https://2017.igem.org/Team:William_and_Mary/Outreach_DB/scripts/tabletop?action=raw&ctype=text/javascript'></script>
 
   <script src="https://2017.igem.org/Team:William_and_Mary/Outreach_DB/scripts/alasql?action=raw&ctype=text/javascript"></script>
 
   <script src="https://2017.igem.org/Team:William_and_Mary/Outreach_DB/scripts/alasql?action=raw&ctype=text/javascript"></script>
  <scipt type='text/javascript'>
+
 
    Handlebars.registerHelper( "padInt5", function ( i ){
+
      i.toString().padStart(5, '0')
+
    });
+
  </scipt>
+
 
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
 
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
 
   <script src='outreach_db.js' type='text/javascript'></script>
 
   <script src='outreach_db.js' type='text/javascript'></script>
Line 24: Line 20:
 
     <div class='search-result'>
 
     <div class='search-result'>
 
<div style='padding-top: 80px;'></div>
 
<div style='padding-top: 80px;'></div>
       <center><div class='project-title' style='font-size: 50px;'>{{[Outreach Project]}}</div></center>
+
       <center><div class='project-title' style='font-size: 40px;line-height: 50px;'>{{[Outreach Project]}}</div></center>
 
<div style='padding-top: 20px;'></div>
 
<div style='padding-top: 20px;'></div>
  
Line 32: Line 28:
  
 
<center><div style='padding-top: 0px;font-size: 16px;'>
 
<center><div style='padding-top: 0px;font-size: 16px;'>
         {{{[Product Description]}}}
+
         {{{[Description]}}}
 
       </div></center>
 
       </div></center>
  
Line 43: Line 39:
  
 
       <span class='outreach-category'  style='font-size: 18px;padding-left: 30px;padding-right: 30px;' >{{[Outreach Category]}}</span><i class="fa fa-circle" aria-hidden="true"  style='font-size: 5px;'></i></center>
 
       <span class='outreach-category'  style='font-size: 18px;padding-left: 30px;padding-right: 30px;' >{{[Outreach Category]}}</span><i class="fa fa-circle" aria-hidden="true"  style='font-size: 5px;'></i></center>
<div style='padding-top: 40px;padding-bottom: 2px;'></div>
+
<div style='padding-top: 20px;padding-bottom: 2px;'></div>
  
  
Line 52: Line 48:
 
<!------Colored box 1----->
 
<!------Colored box 1----->
 
<div style="background-color:#DBDBDB; text-align:left; vertical-align: middle; padding:10px 30px; margin: 30px; column-width: 400px;font-size: 16px;">
 
<div style="background-color:#DBDBDB; text-align:left; vertical-align: middle; padding:10px 30px; margin: 30px; column-width: 400px;font-size: 16px;">
<div><b>ID: </b>{{#padInt5 [id]}}</div>
+
<div><b>ID: </b>{{id}}</div>
 
<div><b>Section: </b>{{[Section]}}</div>
 
<div><b>Section: </b>{{[Section]}}</div>
  
Line 140: Line 136:
 
       $('#show-details').html(datastring);
 
       $('#show-details').html(datastring);
 
       obj = JSON.parse(datastring);
 
       obj = JSON.parse(datastring);
       console.log(obj)
+
      var padInt5 = function ( i ){
       show_details(obj)
+
          return i.toString().padStart(5, '0');
 +
      };
 +
      obj.id = padInt5(obj.id);
 +
       console.log(obj);
 +
       show_details(obj);
 
     }
 
     }
 
   )
 
   )

Latest revision as of 02:47, 2 November 2017