Commit 98c5a54f authored by S Anand's avatar S Anand

BUG: FormHandler column names allow spaces. Fixes #148 @tejesh.p

parent a9869ac3
Pipeline #76829 passed with stage
in 2 minutes and 15 seconds
......@@ -317,7 +317,7 @@ function editHandler($this, template_data, options, template) {
var rowIndex = edited_row.getAttribute('data-row')
for (key in data) {
// TODO: refactor to identify editable columns other than using data-key attrs on <td> tag
var editable_element = $('td[data-key=' + (remove_quotes(key)) + '] :input', $(edited_row))
var editable_element = $('td[data-key="' + (remove_quotes(key)) + '"] :input', $(edited_row))
if (editable_element.length) {
data[key] = template_data['data'][rowIndex][key] = editable_element.val()
}
......
Continent,Cross,ID,Name,Shapes,Stripes,Symbols,Text,Union-Flag,c1,c2,c3,c4,c5,c6,c7,c8,date_col
Continent,Cross,ID,Name,Shapes,Stripes,Symbols,Text,Union-Flag,c1,c2,c3,c4,c5,c6,c7,c8,date col
Europe,,AND,Andorra,,Horizontal,,,,35,1,26,0,32,0,0,4,16-01-2013
Asia,,ARE,United Arab Emirates,,Horizontal,,,,24.0,0.0,0.0,25.0,0.0,0.0,25.0,24.0,17-02-2013
Asia,,AFG,Afghanistan,,Vertical,,Country,,28.0,1.0,0.0,33.0,0.0,0.0,33.0,3.0,06-02-2013
......
......@@ -17,7 +17,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 4.0,
"date_col": "16-01-2013"
"date col": "16-01-2013"
},
{
"Continent": "Asia",
......@@ -37,7 +37,7 @@
"c6": 0.0,
"c7": 25.0,
"c8": 24.0,
"date_col": "17-02-2013"
"date col": "17-02-2013"
},
{
"Continent": "Asia",
......@@ -57,7 +57,7 @@
"c6": 0.0,
"c7": 33.0,
"c8": 3.0,
"date_col": "06-02-2013"
"date col": "06-02-2013"
},
{
"Continent": "North America",
......@@ -77,7 +77,7 @@
"c6": 10.0,
"c7": 25.0,
"c8": 7.0,
"date_col": "11-02-2013"
"date col": "11-02-2013"
},
{
"Continent": "Europe",
......@@ -97,7 +97,7 @@
"c6": 0.0,
"c7": 12.0,
"c8": 0.0,
"date_col": "18-01-2013"
"date col": "18-01-2013"
},
{
"Continent": "Asia",
......@@ -117,7 +117,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 0.0,
"date_col": "12-01-2013"
"date col": "12-01-2013"
},
{
"Continent": "Africa",
......@@ -137,7 +137,7 @@
"c6": 0.0,
"c7": 46.0,
"c8": 0.0,
"date_col": "27-01-2013"
"date col": "27-01-2013"
},
{
"Continent": "South America",
......@@ -157,7 +157,7 @@
"c6": 66.0,
"c7": 0.0,
"c8": 31.0,
"date_col": "02-02-2013"
"date col": "02-02-2013"
},
{
"Continent": "Europe",
......@@ -177,7 +177,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 33.0,
"date_col": "16-02-2013"
"date col": "16-02-2013"
},
{
"Continent": "Oceania",
......@@ -197,7 +197,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 11.0,
"date_col": "26-01-2013"
"date col": "26-01-2013"
},
{
"Continent": "Asia",
......@@ -217,7 +217,7 @@
"c6": 33.0,
"c7": 0.0,
"c8": 1.0,
"date_col": "26-02-2013"
"date col": "26-02-2013"
},
{
"Continent": "Europe",
......@@ -237,7 +237,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 4.0,
"date_col": "15-02-2013"
"date col": "15-02-2013"
},
{
"Continent": "North America",
......@@ -257,7 +257,7 @@
"c6": 0.0,
"c7": 3.0,
"c8": 0.0,
"date_col": "15-02-2013"
"date col": "15-02-2013"
},
{
"Continent": "Asia",
......@@ -277,7 +277,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 0.0,
"date_col": "20-01-2013"
"date col": "20-01-2013"
},
{
"Continent": "Europe",
......@@ -297,7 +297,7 @@
"c6": 0.0,
"c7": 33.0,
"c8": 0.0,
"date_col": "20-01-2013"
"date col": "20-01-2013"
},
{
"Continent": "Africa",
......@@ -317,7 +317,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 0.0,
"date_col": "08-02-2013"
"date col": "08-02-2013"
},
{
"Continent": "Europe",
......@@ -337,7 +337,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 33.0,
"date_col": "26-02-2013"
"date col": "26-02-2013"
},
{
"Continent": "Asia",
......@@ -357,7 +357,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 32.0,
"date_col": "04-01-2013"
"date col": "04-01-2013"
},
{
"Continent": "Africa",
......@@ -377,7 +377,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 34.0,
"date_col": "24-02-2013"
"date col": "24-02-2013"
},
{
"Continent": "Africa",
......@@ -397,7 +397,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 0.0,
"date_col": "25-01-2013"
"date col": "25-01-2013"
},
{
"Continent": "Asia",
......@@ -417,7 +417,7 @@
"c6": 0.0,
"c7": 17.0,
"c8": 21.0,
"date_col": "21-01-2013"
"date col": "21-01-2013"
},
{
"Continent": "South America",
......@@ -437,7 +437,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 0.0,
"date_col": "04-01-2013"
"date col": "04-01-2013"
},
{
"Continent": "South America",
......@@ -457,7 +457,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 1.0,
"date_col": "19-01-2013"
"date col": "19-01-2013"
},
{
"Continent": "North America",
......@@ -477,7 +477,7 @@
"c6": 57.0,
"c7": 21.0,
"c8": 0.0,
"date_col": "23-01-2013"
"date col": "23-01-2013"
},
{
"Continent": "Asia",
......@@ -497,7 +497,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 14.0,
"date_col": "18-01-2013"
"date col": "18-01-2013"
},
{
"Continent": "Africa",
......@@ -517,7 +517,7 @@
"c6": 74.0,
"c7": 16.0,
"c8": 8.0,
"date_col": "07-01-2013"
"date col": "07-01-2013"
},
{
"Continent": "Europe",
......@@ -537,7 +537,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 6.0,
"date_col": "09-02-2013"
"date col": "09-02-2013"
},
{
"Continent": "North America",
......@@ -557,7 +557,7 @@
"c6": 0.0,
"c7": 1.0,
"c8": 21.0,
"date_col": "28-01-2013"
"date col": "28-01-2013"
},
{
"Continent": "North America",
......@@ -577,7 +577,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 36.0,
"date_col": "27-01-2013"
"date col": "27-01-2013"
},
{
"Continent": "Africa",
......@@ -597,7 +597,7 @@
"c6": 67.0,
"c7": 0.0,
"c8": 0.0,
"date_col": "27-01-2013"
"date col": "27-01-2013"
},
{
"Continent": "Africa",
......@@ -617,7 +617,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 20.0,
"date_col": "03-02-2013"
"date col": "03-02-2013"
},
{
"Continent": "Africa",
......@@ -637,7 +637,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 0.0,
"date_col": "24-02-2013"
"date col": "24-02-2013"
},
{
"Continent": "Europe",
......@@ -657,7 +657,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 22.0,
"date_col": "08-02-2013"
"date col": "08-02-2013"
},
{
"Continent": "Africa",
......@@ -677,7 +677,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 33.0,
"date_col": "20-02-2013"
"date col": "20-02-2013"
},
{
"Continent": "South America",
......@@ -697,7 +697,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 34.0,
"date_col": "27-02-2013"
"date col": "27-02-2013"
},
{
"Continent": "Africa",
......@@ -717,7 +717,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 0.0,
"date_col": "31-01-2013"
"date col": "31-01-2013"
},
{
"Continent": "Asia",
......@@ -737,7 +737,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 0.0,
"date_col": "20-01-2013"
"date col": "20-01-2013"
},
{
"Continent": "South America",
......@@ -757,7 +757,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 0.0,
"date_col": "10-01-2013"
"date col": "10-01-2013"
},
{
"Continent": "North America",
......@@ -777,7 +777,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 33.0,
"date_col": "21-01-2013"
"date col": "21-01-2013"
},
{
"Continent": "North America",
......@@ -797,7 +797,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 30.0,
"date_col": "21-02-2013"
"date col": "21-02-2013"
},
{
"Continent": "Africa",
......@@ -817,7 +817,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 16.0,
"date_col": "25-01-2013"
"date col": "25-01-2013"
},
{
"Continent": "Asia",
......@@ -837,7 +837,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 90.0,
"date_col": "12-02-2013"
"date col": "12-02-2013"
},
{
"Continent": "Europe",
......@@ -857,7 +857,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 37.0,
"date_col": "20-01-2013"
"date col": "20-01-2013"
},
{
"Continent": "Europe",
......@@ -877,7 +877,7 @@
"c6": 0.0,
"c7": 33.0,
"c8": 0.0,
"date_col": "17-01-2013"
"date col": "17-01-2013"
},
{
"Continent": "Africa",
......@@ -897,7 +897,7 @@
"c6": 35.0,
"c7": 0.0,
"c8": 28.0,
"date_col": "03-01-2013"
"date col": "03-01-2013"
},
{
"Continent": "Europe",
......@@ -917,7 +917,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 23.0,
"date_col": "12-02-2013"
"date col": "12-02-2013"
},
{
"Continent": "North America",
......@@ -937,7 +937,7 @@
"c6": 0.0,
"c7": 8.0,
"c8": 8.0,
"date_col": "27-02-2013"
"date col": "27-02-2013"
},
{
"Continent": "North America",
......@@ -957,7 +957,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 30.0,
"date_col": "02-02-2013"
"date col": "02-02-2013"
},
{
"Continent": "Africa",
......@@ -977,7 +977,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 47.0,
"date_col": "10-01-2013"
"date col": "10-01-2013"
},
{
"Continent": "South America",
......@@ -997,7 +997,7 @@
"c6": 0.0,
"c7": 1.0,
"c8": 0.0,
"date_col": "01-01-2013"
"date col": "01-01-2013"
},
{
"Continent": "Europe",
......@@ -1017,7 +1017,7 @@
"c6": 33.0,
"c7": 33.0,
"c8": 33.0,
"date_col": "28-02-2013"
"date col": "28-02-2013"
},
{
"Continent": "Africa",
......@@ -1037,7 +1037,7 @@
"c6": 0.0,
"c7": 33.0,
"c8": 31.0,
"date_col": "18-01-2013"
"date col": "18-01-2013"
},
{
"Continent": "Africa",
......@@ -1057,7 +1057,7 @@
"c6": 0.0,
"c7": 29.0,
"c8": 22.0,
"date_col": "01-01-2013"
"date col": "01-01-2013"
},
{
"Continent": "Africa",
......@@ -1077,7 +1077,7 @@
"c6": 24.0,
"c7": 0.0,
"c8": 0.0,
"date_col": "03-01-2013"
"date col": "03-01-2013"
},
{
"Continent": "Europe",
......@@ -1097,7 +1097,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 1.0,
"date_col": "14-02-2013"
"date col": "14-02-2013"
},
{
"Continent": "Africa",
......@@ -1117,7 +1117,7 @@
"c6": 8.0,
"c7": 0.0,
"c8": 0.0,
"date_col": "10-01-2013"
"date col": "10-01-2013"
},
{
"Continent": "Europe",
......@@ -1137,7 +1137,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 60.0,
"date_col": "14-01-2013"
"date col": "14-01-2013"
},
{
"Continent": "Oceania",
......@@ -1157,7 +1157,7 @@
"c6": 66.0,
"c7": 0.0,
"c8": 11.0,
"date_col": "31-01-2013"
"date col": "31-01-2013"
},
{
"Continent": "Oceania",
......@@ -1177,7 +1177,7 @@
"c6": 97.0,
"c7": 0.0,
"c8": 2.0,
"date_col": "11-01-2013"
"date col": "11-01-2013"
},
{
"Continent": "Europe",
......@@ -1197,7 +1197,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 33.0,
"date_col": "07-02-2013"
"date col": "07-02-2013"
},
{
"Continent": "Africa",
......@@ -1217,7 +1217,7 @@
"c6": 33.0,
"c7": 0.0,
"c8": 0.0,
"date_col": "01-02-2013"
"date col": "01-02-2013"
},
{
"Continent": "Europe",
......@@ -1237,7 +1237,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 33.0,
"date_col": "18-01-2013"
"date col": "18-01-2013"
},
{
"Continent": "North America",
......@@ -1257,7 +1257,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 0.0,
"date_col": "13-01-2013"
"date col": "13-01-2013"
},
{
"Continent": "Asia",
......@@ -1277,7 +1277,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 64.0,
"date_col": "04-02-2013"
"date col": "04-02-2013"
},
{
"Continent": "Africa",
......@@ -1297,7 +1297,7 @@
"c6": 0.0,
"c7": 2.0,
"c8": 0.0,
"date_col": "13-01-2013"
"date col": "13-01-2013"
},
{
"Continent": "Africa",
......@@ -1317,7 +1317,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 11.0,
"date_col": "21-01-2013"
"date col": "21-01-2013"
},
{
"Continent": "Africa",
......@@ -1337,7 +1337,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 0.0,
"date_col": "23-02-2013"
"date col": "23-02-2013"
},
{
"Continent": "Africa",
......@@ -1357,7 +1357,7 @@
"c6": 16.0,
"c7": 0.0,
"c8": 22.0,
"date_col": "03-02-2013"
"date col": "03-02-2013"
},
{
"Continent": "Europe",
......@@ -1377,7 +1377,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 43.0,
"date_col": "18-01-2013"
"date col": "18-01-2013"
},
{
"Continent": "North America",
......@@ -1397,7 +1397,7 @@
"c6": 70.0,
"c7": 0.0,
"c8": 28.0,
"date_col": "08-01-2013"
"date col": "08-01-2013"
},
{
"Continent": "Africa",
......@@ -1417,7 +1417,7 @@
"c6": 0.0,
"c7": 1.0,
"c8": 0.0,
"date_col": "12-01-2013"
"date col": "12-01-2013"
},
{
"Continent": "South America",
......@@ -1437,7 +1437,7 @@
"c6": 0.0,
"c7": 5.0,
"c8": 7.0,
"date_col": "22-02-2013"
"date col": "22-02-2013"
},
{
"Continent": "North America",
......@@ -1457,7 +1457,7 @@
"c6": 67.0,
"c7": 0.0,
"c8": 32.0,
"date_col": "17-02-2013"
"date col": "17-02-2013"
},
{
"Continent": "Europe",
......@@ -1477,7 +1477,7 @@
"c6": 1.0,
"c7": 0.0,
"c8": 30.0,
"date_col": "12-02-2013"
"date col": "12-02-2013"
},
{
"Continent": "North America",
......@@ -1497,7 +1497,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 2.0,
"date_col": "01-02-2013"
"date col": "01-02-2013"
},
{
"Continent": "Europe",
......@@ -1517,7 +1517,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 33.0,
"date_col": "23-02-2013"
"date col": "23-02-2013"
},
{
"Continent": "Asia",
......@@ -1537,7 +1537,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 50.0,
"date_col": "04-02-2013"
"date col": "04-02-2013"
},
{
"Continent": "Europe",
......@@ -1557,7 +1557,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 33.0,
"date_col": "29-01-2013"
"date col": "29-01-2013"
},
{
"Continent": "Asia",
......@@ -1577,7 +1577,7 @@
"c6": 35.0,
"c7": 0.0,
"c8": 64.0,
"date_col": "04-02-2013"
"date col": "04-02-2013"
},
{
"Continent": "Asia",
......@@ -1597,7 +1597,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 31.0,
"date_col": "07-01-2013"
"date col": "07-01-2013"
},
{
"Continent": "Asia",
......@@ -1617,7 +1617,7 @@
"c6": 0.0,
"c7": 32.0,
"c8": 33.0,
"date_col": "01-01-2013"
"date col": "01-01-2013"
},
{
"Continent": "Asia",
......@@ -1637,7 +1637,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 38.0,
"date_col": "19-01-2013"
"date col": "19-01-2013"
},
{
"Continent": "Europe",
......@@ -1657,7 +1657,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 16.0,
"date_col": "18-01-2013"
"date col": "18-01-2013"
},
{
"Continent": "Europe",
......@@ -1677,7 +1677,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 33.0,
"date_col": "21-02-2013"
"date col": "21-02-2013"
},
{
"Continent": "North America",
......@@ -1697,7 +1697,7 @@
"c6": 0.0,
"c7": 32.0,
"c8": 0.0,
"date_col": "17-02-2013"
"date col": "17-02-2013"
},
{
"Continent": "Asia",
......@@ -1717,7 +1717,7 @@
"c6": 0.0,
"c7": 27.0,
"c8": 19.0,
"date_col": "20-02-2013"
"date col": "20-02-2013"
},
{
"Continent": "Asia",
......@@ -1737,7 +1737,7 @@
"c6": 0.0,
"c7": 0.0,
"c8": 81.0,
"date_col": "09-02-2013"
"date col": "09-02-2013"
},
{
"Continent": "Africa",
......@@ -1757,7 +1757,7 @@
"c6": 0.0,
"c7": 30.0,
"c8": 10.0,