Skip to content

Commit

Permalink
Dev: moved activating ajax to the bottom of the page
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Nov 14, 2017
1 parent d0a70a4 commit 40bdc02
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 20 deletions.
9 changes: 9 additions & 0 deletions templates/default/views/layout_global.twig
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,14 @@
<div id="bottomScripts">
<###end###>
</div>
{# Ajax mode #}
{% if(aSurveyInfo.options.ajaxmode == "on") %}
<script type="text/javascript">
var ajaxHandler = new AjaxSubmitObject();
$(document).ready(function () {
ajaxHandler.bindActions();
});
</script>
{% endif %}
</body>
</html>
10 changes: 0 additions & 10 deletions templates/default/views/subviews/head.twig
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,5 @@

<link rel="shortcut icon" href="{{ aSurveyInfo.oTemplate.sTemplateurl }}/favicon.ico" />

{# Ajax mode #}
{% if(aSurveyInfo.options.ajaxmode == "on") %}
<script type="text/javascript">
var ajaxHandler = new AjaxSubmitObject();
$(document).on('ready pjax:complete', function () {
ajaxHandler.bindActions();
});
</script>
{% endif %}

{{ include('./subviews/google_analytics.twig') }}
</head>
9 changes: 9 additions & 0 deletions templates/material/views/layout_global.twig
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,14 @@
<div id="bottomScripts">
<###end###>
</div>
{# Ajax mode #}
{% if(aSurveyInfo.options.ajaxmode == "on") %}
<script type="text/javascript">
var ajaxHandler = new AjaxSubmitObject();
$(document).on('ready pjax:complete', function () {
ajaxHandler.bindActions();
});
</script>
{% endif %}
</body>
</html>
10 changes: 0 additions & 10 deletions templates/material/views/subviews/head.twig
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,6 @@

<link rel="shortcut icon" href="{{ aSurveyInfo.oTemplate.sTemplateurl }}/favicon.ico" />

{# Ajax mode #}
{% if(aSurveyInfo.options.ajaxmode == "on") %}
<script type="text/javascript">
var ajaxHandler = new AjaxSubmitObject();
$(document).ready(function () {
ajaxHandler.bindActions();
});
</script>
{% endif %}

{{ include('./subviews/google_analytics.twig') }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
</head>

0 comments on commit 40bdc02

Please sign in to comment.