kinlane
5/12/2013 - 8:00 PM

Federal Agency Digital Strategy 2.1 Listing

Federal Agency Digital Strategy 2.1 Listing

<!-- Being Federal Agency Digital Strategy 2.1 Listing --->
<table id="agency21Listing">
<tbody>
  <tr>
		<td colspan="2">
			<table cellpadding="1" width="100%">
			<tbody>
				<tr>
					<td width="80%" align="left"><strong>Federal Agency Digital Strategies</strong></td>
					<td width="10%" align="center"><a href="https://gist.github.com/kinlane/5564677" target="_blank" title="Script for Display"> <img src="https://s3.amazonaws.com/kinlane-productions/bw-icons/bw-code.png" border="0" width="25" /> </a></td>
					<td width="10%" align="center"><a href="https://raw.github.com/kinlane/federal-government/gh-pages/data/federal-agencies-digital-strategy-2-1-2-with-social.json" target="_blank" title="Raw JSON Data"> <img src="https://s3.amazonaws.com/kinlane-productions/bw-icons/bw-json-data-store.png" border="0" width="25" /> </a></td>
				</tr>
			</tbody>
			</table>
		</td>
	</tr>
</tbody>
</table>
<script id="agencyStrategy21ListingTemplate" type="text/template">       
    <tr>
        <td width="75" align="center" valign="middle">
            <a href="{{url}}" target="_blank">
                <img src="{{logo}}" width="75" align="center" style="padding: 15px;padding-left: 40px;" />
            </a>
        </td>        
        <td>
            <ul style="padding-left: 25px; font-size: 11px; list-style: circle;" id="two-{{agency_id}}"></ul>  
        </td>
    </tr>  
	<tr>
    	<td colspan="2"><hr /></td>
    </tr>                                                                                              
</script>

<script type="text/javascript">
    
    function listAgencies21DigitalStrategy()
        {
        $.getJSON('ederal-agencies-digital-strategy.json', function(data) {
            item21count = 0;
             $.each(data['agencies'], function(key, val) {
                 
                agency_id = val['agency_id']; 
                
                var template = $('#agencyStrategy21ListingTemplate').html();
                var html = Mustache.to_html(template, val);
                $('#agency21Listing').append(html);     
                
                two = val['2.2'];
                
                $.each(two, function(key, val) {
                     name = val['name'];
                     description = val['description'];
                     if(name.length>2)
	                     {                     
                    	 $('#two-'+agency_id).append('<li style="list-style: circle;">' + name+  '</li>');
                    	 item21count++;
                    	 }  
                });
                 
                 $('#AgencyDigitalStrategy22Count').html(item21count);   
                                     
                });
            });
        }  
    
    listAgencies21DigitalStrategy();
    
</script>
<!-- End Federal Agency Digital Strategy 2.2 Listing --->