Commit f7640ee7445f6cefed7f5cde3679e8f922230f88
- Diff rendering mode:
- inline
- side by side
mouchak/static/js/leaflet.js
(1 / 1)
  | |||
50 | 50 | // info.policyExplain(props.rating) + '</small></p>' | |
51 | 51 | new L.Popup() | |
52 | 52 | .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>>> "+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>>> "+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>") | ||
54 | 54 | .openOn(map); | |
55 | 55 | ||
56 | 56 | // info.update(layer.feature.properties); |
mouchak/static/js/mouchak.js
(14 / 0)
  | |||
202 | 202 | } | |
203 | 203 | }); | |
204 | 204 | ||
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 | |||
205 | 219 | // hashmap to maintain one-to-one lookup among page ids and | |
206 | 220 | // their names | |
207 | 221 | var nameIdMap = {}; |