|
161 | 161 | for (var i=0; i<scenarios.length; i++) |
162 | 162 | { |
163 | 163 | var ncn_id = scenarios[i].ncn_id; |
| 164 | + var enc_id = ncn_id.replace(".","\\."); |
164 | 165 | var sc_id = scenarios[i].id; |
165 | 166 |
|
166 | | - that.$('#btn-ingest-scenario-' + ncn_id).on |
| 167 | + that.$('#btn-ingest-scenario-' + enc_id).on |
167 | 168 | ("click", _.bind(that.run_iet5_ajax, that, "ingestScenario", "Ingest", sc_id, ncn_id)); |
168 | | - that.$('#btn-delete-scenario-' + ncn_id).on |
| 169 | + that.$('#btn-delete-scenario-' + enc_id).on |
169 | 170 | ("click", _.bind(that.run_iet5_ajax, that, "deleteScenario", "Delete", sc_id, ncn_id)); |
170 | | - that.$('#btn-stop-scenario-' + ncn_id).on |
| 171 | + that.$('#btn-stop-scenario-' + enc_id).on |
171 | 172 | ("click", _.bind(that.run_iet5_ajax, that, "stopScenario", "Stop", sc_id, ncn_id)); |
172 | | - that.$('#btn-add-product-' + ncn_id).on("click", _.bind(that.onAddLocalProduct, that, sc_id, ncn_id)); |
173 | | - that.$('#btn-edit-scenario-' + ncn_id).on("click", _.bind(that.onEditScenario, that, ncn_id)); |
| 173 | + that.$('#btn-add-product-' + enc_id).on("click", _.bind(that.onAddLocalProduct, that, sc_id, ncn_id)); |
| 174 | + that.$('#btn-edit-scenario-' + enc_id).on("click", _.bind(that.onEditScenario, that, ncn_id)); |
174 | 175 |
|
175 | 176 | } |
176 | 177 | } |
|
186 | 187 | return; |
187 | 188 | } |
188 | 189 |
|
189 | | - if (ss.st_isav==0) { |
| 190 | + if (op != 'Stop' && ss.st_isav==0) { |
190 | 191 | alert('Scenario '+ncn_id+'is locked - operation in progress'); |
191 | 192 | return; |
192 | 193 | } |
|
196 | 197 | var req = $.get(url); |
197 | 198 |
|
198 | 199 | this.change_pending = true; |
| 200 | + if (op == 'Stop') { this.change_pending = false; } |
| 201 | + |
199 | 202 | req.success(_.bind(function(result) { |
200 | 203 | var st = JSON.parse(result).status; |
201 | 204 | console.log("IngAdmT5: Axax status: " + st); |
|
0 commit comments