Commit f7640ee7445f6cefed7f5cde3679e8f922230f88

  • avatar
  • arvind
  • Mon Sep 23 16:47:52 IST 2013
Changing order of links in popup for world map
  
5050 // info.policyExplain(props.rating) + '</small></p>'
5151 new L.Popup()
5252 .setLatLng(e.latlng)
53 .setContent("<div style='height:250px;overflow-y:scroll;'><b>"+e.target.feature.properties.name+"</b></br><span class='yellow'>Rating:"+M.filterTags(['rating'], e.target.feature.id)[0].attributes.data.match(/Rating: (\d+)/)[1] +"</span>/<span class='red'>10</span><small>&gt;&gt; "+info.policyExplain(M.filterTags(['rating'], e.target.feature.id)[0].attributes.data.match(/Rating: (\d+)/)[1])+"</small></br>Pros:"+M.filterTags(["pros"], e.target.feature.id)[0].attributes.data+"</br>Cons:"+M.filterTags(["cons"], e.target.feature.id)[0].attributes.data +"</br><a href='#/funding'>Funding</a><br/><a href='#/policies/"+e.target.feature.id+"'>Read more...</a></br></div>")
53 .setContent("<div style='height:250px;overflow-y:scroll;'><b>"+e.target.feature.properties.name+"</b></br><span class='yellow'>Rating:"+M.filterTags(['rating'], e.target.feature.id)[0].attributes.data.match(/Rating: (\d+)/)[1] +"</span>/<span class='red'>10</span><small>&gt;&gt; "+info.policyExplain(M.filterTags(['rating'], e.target.feature.id)[0].attributes.data.match(/Rating: (\d+)/)[1])+"</small></br>Pros:"+M.filterTags(["pros"], e.target.feature.id)[0].attributes.data+"</br>Cons:"+M.filterTags(["cons"], e.target.feature.id)[0].attributes.data +"</br><a href='#/policies/"+e.target.feature.id+"'>Read more...</a><br/><a href='#/funding'>Funding</a></br></div>")
5454 .openOn(map);
5555
5656 // info.update(layer.feature.properties);
  
202202 }
203203});
204204
205
206 M.downloadable_files = [];
207
208 M.showDownloadModal = function(){
209 var el = $("#list_of_file");
210 if(el.children().length !== M.downloadable_files.length){
211 _.each(M.downloadable_files, function(file){
212 el.append("<li><a href='"+file+"'>"+file+"</a></li>");
213 });
214 }
215 $(".modal").modal();
216
217 };
218
205219// hashmap to maintain one-to-one lookup among page ids and
206220// their names
207221var nameIdMap = {};