quintel / etmoses

Online decision support tool to create local energy situations for neighbourhoods, cities and regions with a time resolution of 15 minutes created and maintained by Quintel – Not maintained
https://moses.energytransitionmodel.com
MIT License
11 stars 3 forks source link

Manually reload heat asset list #1577

Closed grdw closed 7 years ago

grdw commented 7 years ago

Fixes: #1562

antw commented 7 years ago

Looks good in that the heat asset attributes no longer get overwritten by changing the sources.

For me the "Rescale" button isn't updating the heat asset list table. The backend action is completing and refreshing the page does show the new values. The returned JS does seem to include a line to do this ($(".primary-table").html(...)), but doesn't have any effect for me; I think the JavaScript isn't being executed?

grdw commented 7 years ago

The code did got executed but there was a intermediary form submit that caused the code after that submit not to be executed (I have no idea why, probably because you bounce of the page somewhow?). To elaborate:

// js.erb

$("form").submit()
$("...").html("<%= render .... %>") //<-- didn't got executed.

I edited it and it should now work.