Skip to content

Commit

Permalink
Merge pull request #107 from midas-isg/front-end-updates
Browse files Browse the repository at this point in the history
Front end updates
  • Loading branch information
JohnLevander authored Oct 27, 2017
2 parents 9d7f366 + 7e047de commit d9ba5a2
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 181 deletions.
2 changes: 2 additions & 0 deletions app/views/country_selector.scala.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<div class="form-group horizontal-padding">
<label for="country">Country</label>
<button hidden class="btn btn-sm btn-default" id="get-all-countries">Get All Countries</button>

<select id="country" class="form-control">
<option disabled selected value="-1">(not selected)</option>
</select>
Expand Down
2 changes: 1 addition & 1 deletion conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ play.evolutions.enabled=false
play.http.context="/ls"

# Application version. This is read by build.sbt
app.version="1.2.1"
app.version="2.0.2"

# Set max post text (body) size
#parsers.text.maxLength=10240K
Expand Down
23 changes: 13 additions & 10 deletions public/javascripts/translator.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
}

for(i = 0; i < responseData.length; i++) {
displayResultRow(responseData[i].features[0].properties, maxCodesLength, codeTypes);
displayResultRow(responseData[i].features[0].properties, codeTypes);
}
},
error: function(xhr,status,error) {
Expand All @@ -131,28 +131,31 @@
return;
}

function displayResultRow(properties, maxCodesLength, codeTypes) {
function displayResultRow(properties, codeTypes) {
var name = properties.name,
codes = properties.codes,
row = document.createElement("tr"),
th = document.createElement("th"),
td,
i;
i,
j;

th.innerHTML = name;
th.headers = "results-names";
row.appendChild(th);

for(i = 0; i < maxCodesLength; i++) {
for(i = 0; i < codeTypes.length; i++) {
td = document.createElement("td");

if(codes[i]) {
while(codes[i].codeTypeName !== codeTypes[row.children.length - 1]) {
row.appendChild(td);
td = document.createElement("td");
for(j = 0; j < codes.length; j++) {
if(codes[j].codeTypeName === codeTypes[i]) {
if(td.innerHTML.length === 0) {
td.innerHTML = codes[j].code;
}
else {
td.innerHTML += ", " + codes[j].code;
}
}

td.innerHTML = codes[i].code;
}

td.headers = "results-codes";
Expand Down
44 changes: 0 additions & 44 deletions public/stylesheets/create.css.x

This file was deleted.

29 changes: 0 additions & 29 deletions public/stylesheets/index.css.x

This file was deleted.

97 changes: 0 additions & 97 deletions public/stylesheets/search.css.x

This file was deleted.

0 comments on commit d9ba5a2

Please sign in to comment.