Skip to content

Commit

Permalink
assets/js: Move onload_warning out of global assets again
Browse files Browse the repository at this point in the history
This reverts parts of 80fe4e6 as it caused
us to warn e.g. when having filters set in the project overview.

Closes #2910
  • Loading branch information
rmader authored and fuzzylogic2000 committed May 4, 2020
1 parent 2e82396 commit b303036
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 0 additions & 1 deletion meinberlin/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ require('../../apps/maps/assets/map-address.js')
require('../../apps/moderatorremark/assets/idea_remarks.js')
require('../../apps/newsletters/assets/dynamic_fields.js')
require('../../apps/dashboard/assets/ajax_modal.js')
require('../../assets/js/unload_warning.js')
require('../../apps/dashboard/assets/init_accordeons_cookie.js')

// This function is overwritten with custom behavior in embed.js.
Expand Down
4 changes: 4 additions & 0 deletions meinberlin/templates/a4dashboard/base_dashboard_project.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,7 @@
</div>
</div>
{% endblock %}

{% block extra_js %}
<script src="{% static 'unload_warning.js' %}"></script>
{% endblock %}
3 changes: 3 additions & 0 deletions webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ module.exports = {
'bootstrap/js/dist/modal.js',
'./meinberlin/apps/embed/assets/embed.js'
],
unload_warning: [
'./meinberlin/assets/js/unload_warning.js'
],
// A4 dependencies - we want all of them to go through webpack
mb_plans_map: [
'leaflet/dist/leaflet.css',
Expand Down

0 comments on commit b303036

Please sign in to comment.