Mercurial > lada > lada-client
comparison app/view/window/ProbeEdit.js @ 582:a241362cda68
Use indexOf instead of contains to check if a substring exists.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Wed, 11 Mar 2015 10:13:43 +0100 |
parents | ea2c35cd9c19 |
children | e24bc8cf8e1d |
comparison
equal
deleted
inserted
replaced
581:424802824648 | 582:a241362cda68 |
---|---|
131 var content; | 131 var content; |
132 var i; | 132 var i; |
133 var keyText; | 133 var keyText; |
134 var i18n = Lada.getApplication().bundle; | 134 var i18n = Lada.getApplication().bundle; |
135 for (key in errors) { | 135 for (key in errors) { |
136 if (key && key.contains('Ort')) { | 136 if (key && key.indexOf('Ort') > -1) { |
137 errorOrt = true; | 137 errorOrt = true; |
138 content = errors[key]; | 138 content = errors[key]; |
139 keyText = i18n.getMsg(key); | 139 keyText = i18n.getMsg(key); |
140 for (i = 0; i < content.length; i++) { | 140 for (i = 0; i < content.length; i++) { |
141 errorOrtText += keyText + ': ' + | 141 errorOrtText += keyText + ': ' + |
142 i18n.getMsg(content[i].toString()) + '\n'; | 142 i18n.getMsg(content[i].toString()) + '\n'; |
143 } | 143 } |
144 } | 144 } |
145 } | 145 } |
146 for (key in warnings) { | 146 for (key in warnings) { |
147 if (key && key.contains('Ort')) { | 147 if (key && key.indexOf('Ort') > -1) { |
148 warningOrt = true; | 148 warningOrt = true; |
149 content = warnings[key]; | 149 content = warnings[key]; |
150 keyText = i18n.getMsg(key); | 150 keyText = i18n.getMsg(key); |
151 for (i = 0; i < content.length; i++) { | 151 for (i = 0; i < content.length; i++) { |
152 warningOrtText += keyText + ': ' + | 152 warningOrtText += keyText + ': ' + |