comparison app/controller/Proben.js @ 500:ad7f574b382a

Fixed some js related issues (unused vars, arrays, etc.) and code style.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 06 Nov 2014 11:20:47 +0100
parents 8b4ec61c5752
children
comparison
equal deleted inserted replaced
499:8b4ec61c5752 500:ad7f574b382a
8 8
9 /** 9 /**
10 * Controller for Proben 10 * Controller for Proben
11 */ 11 */
12 12
13 // TODO: Move these functions into the controller.
13 function numOfErrors(proben) { 14 function numOfErrors(proben) {
14 var errors = 0; 15 var errors = 0;
15 for (var key in proben) { 16 for (var key in proben) {
16 if (proben[key].length > 0) { 17 if (proben[key].length > 0) {
17 errors = errors + 1; 18 errors = errors + 1;
18 } 19 }
19 } 20 }
20 return errors; 21 return errors;
21 } 22 }
22 23
24 // TODO: Use tpl to generate the html document.
23 function buildImportReport(filename, msg, errors, warnings) { 25 function buildImportReport(filename, msg, errors, warnings) {
24 var out = []; 26 var out = [];
25 // There is a entry for each imported proben in the errors dict (might be 27 // There is a entry for each imported proben in the errors dict (might be
26 // empty) 28 // empty)
27 var numProben = (Object.keys(errors).length > 0); 29 var numProben = (Object.keys(errors).length > 0);

http://lada.wald.intevation.org