From ba250309eb98e5956ca532b4823181745c9a9a55 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sun, 2 Dec 2012 13:48:29 +0000 Subject: Replace the list in popups with a table --- resources/map.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/resources/map.js b/resources/map.js index b9edc79..6d00c2e 100644 --- a/resources/map.js +++ b/resources/map.js @@ -2,18 +2,21 @@ $(document).ready(function() { var self = this; - self.popupTemplate = _.template('
<% _.each(properties, function(val, key) { %> \ + self.popupTemplate = _.template('\ + <% _.each(properties, function(val, key) { %> \ <% if (/\:/.exec(key)) { %> \ -
\ -
<%= key.split(":")[1] %>
\ -
<%= val %>
\ -
\ + \ + \ + \ + \ <% } else {%> \ -
<%= key %>
\ -
<%= val %>
\ + \ + \ + \ + \ <% } %> \ <% }); %> \ - '); +
KeyValue
<%= key.split(":")[1] %> <%= val %>
<%= key %> <%= val %>
'); // to filter them later self.hospitalAttributes = []; -- cgit v1.2.3