Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Add a configuration file for global jquerymobile options

Roland Geidera20d5379b302
diff --git a/wger/manager/static/js/jquerymobile-conf.js b/wger/manager/static/js/jquerymobile-conf.js
new file mode 100644
index 000000000..340c1f479
--- /dev/null
+++ b/wger/manager/static/js/jquerymobile-conf.js
@@ -0,0 +1,7 @@
+/*
+ * Global jQueryMobile configurations
+ */
+$(document).bind("mobileinit", function () {
+ // Globally disable jQueryMobile's AJAX navigation
+ $.mobile.ajaxEnabled = false;
+});
\ No newline at end of file
diff --git a/wger/manager/static/js/workout-manager-mobile.js b/wger/manager/static/js/workout-manager-mobile.js
index a04769478..caed781ec 100644
--- a/wger/manager/static/js/workout-manager-mobile.js
+++ b/wger/manager/static/js/workout-manager-mobile.js
@@ -51,7 +51,4 @@ $(document).on('pageinit', function () {
} else {
console.debug('MozActivity not available, opening links as usual.');
}
-
- // Globally disable jQueryMobile's AJAX navigation
- $.mobile.ajaxEnabled = false;
});
\ No newline at end of file
diff --git a/wger/manager/templates/mobile/template.html b/wger/manager/templates/mobile/template.html
index a406f024a..57d723920 100644
--- a/wger/manager/templates/mobile/template.html
+++ b/wger/manager/templates/mobile/template.html
@@ -40,6 +40,7 @@
{% compress js %}
<script src="{% static 'js/jquery.js' %}" type="text/javascript"></script>
+ <script src="{% static 'js/jquerymobile-conf.js' %}" type="text/javascript"></script>
<script src="{% static 'js/jquery-ui.js' %}" type="text/javascript"></script>
<script src="{% static 'js/jquery-mobile.js' %}" type="text/javascript"></script>
<script src="{% static 'js/d3.js' %}"></script>