Self hosted FLOSS fitness/workout, nutrition and weight tracker
Remove datepicker
Roland Geiderf786a1402f79
diff --git a/wger/core/static/js/workout-manager.js b/wger/core/static/js/workout-manager.jsindex a105bff85..c03258537 100644--- a/wger/core/static/js/workout-manager.js+++ b/wger/core/static/js/workout-manager.js@@ -298,12 +298,6 @@ function form_modal_dialog() {$("#ajax-info-content").load(targetUrl + " .form-horizontal",function(responseText, textStatus, XMLHttpRequest){- // Initialise datepickers for any date input- if (typeof $.datepicker !== "undefined") {- $('#ajax-info-content input[type="date"]').datepicker({autoclose: true,- language: $('html').attr('lang')});- }-if (textStatus == "error") {$("#ajax-info-title").html("Sorry but an error occured")$("#ajax-info-content").html(XMLHttpRequest.status + " " + XMLHttpRequest.statusText);diff --git a/wger/core/templates/template.html b/wger/core/templates/template.htmlindex 858ebcbde..e1c25601a 100644--- a/wger/core/templates/template.html+++ b/wger/core/templates/template.html@@ -51,7 +51,6 @@<link rel="stylesheet" type="text/css" href="{% static 'css/jquery-ui-custom.css' %}"><link rel="stylesheet" type="text/css" href="{% static 'bower_components/bootstrap/dist/css/bootstrap.min.css' %}"><link rel="stylesheet" type="text/css" href="{% static 'css/bootstrap-custom.css' %}">- <link rel="stylesheet" type="text/css" href="{% static 'bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker3.css' %}"><link rel="stylesheet" type="text/css" href="{% static 'bower_components/shariff/build/shariff.min.css' %}">{% endcompress %}@@ -64,16 +63,11 @@<script src="{% static 'js/workout-manager.js' %}"></script><script src="{% static 'js/ubuntu-unity.js' %}"></script><script src="{% static 'bower_components/bootstrap/dist/js/bootstrap.min.js' %}"></script>- <script src="{% static 'bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js' %}"></script><script src="{% static 'js/exercises.js' %}"></script><script src="{% static 'js/weight.js' %}"></script><script src="{% static 'js/nutrition.js' %}"></script>{% endcompress %}- {% if language.short_name != 'en' %}- <script src="{% static datepicker_i18n_path %}" type="text/javascript"></script>- {% endif %}-{% block header %}{% endblock %}<script>@@ -92,11 +86,6 @@// Check for RO-access before allowing sharingtoggle_ro_access();-- $('input[type="date"]').datepicker({- autoclose: true,- language: $('html').attr('lang')- });});</script>diff --git a/wger/core/templates/template_features.html b/wger/core/templates/template_features.htmlindex 631d5f938..909492f53 100644--- a/wger/core/templates/template_features.html+++ b/wger/core/templates/template_features.html@@ -50,7 +50,6 @@<link rel="stylesheet" type="text/css" href="{% static 'css/jquery-ui-custom.css' %}"><link rel="stylesheet" type="text/css" href="{% static 'bower_components/bootstrap/dist/css/bootstrap.min.css' %}"><link rel="stylesheet" type="text/css" href="{% static 'css/bootstrap-custom.css' %}">- <link rel="stylesheet" type="text/css" href="{% static 'bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker3.css' %}"><link rel="stylesheet" type="text/css" href="{% static 'bower_components/shariff/build/shariff.min.css' %}">{% endcompress %}@@ -63,7 +62,6 @@<script src="{% static 'js/workout-manager.js' %}"></script><script src="{% static 'js/ubuntu-unity.js' %}"></script><script src="{% static 'bower_components/bootstrap/dist/js/bootstrap.min.js' %}"></script>- <script src="{% static 'bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js' %}"></script><script src="{% static 'js/exercises.js' %}"></script><script src="{% static 'js/weight.js' %}"></script><script src="{% static 'js/nutrition.js' %}"></script>diff --git a/wger/manager/views/log.py b/wger/manager/views/log.pyindex 96e5057ec..66eefbcc8 100644--- a/wger/manager/views/log.py+++ b/wger/manager/views/log.py@@ -226,8 +226,7 @@ def add(request, pk):# (we only add new logs here and that seems to be the fastest way)formset = WorkoutLogFormSet(queryset=WorkoutLog.objects.none())- dateform = HelperDateForm(initial={'date': formats.date_format(datetime.date.today(),- "SHORT_DATE_FORMAT")})+ dateform = HelperDateForm(initial={'date': datetime.date.today()})# Depending on whether there is already a workout session for today, update# the current one or create a new one (this will be the most usual case)diff --git a/wger/settings_global.py b/wger/settings_global.pyindex 6ab8f71d8..d855a00ab 100644--- a/wger/settings_global.py+++ b/wger/settings_global.py@@ -94,7 +94,6 @@ INSTALLED_APPS = (BOWER_INSTALLED_APPS = ('jquery','bootstrap',- 'bootstrap-datepicker','d3','shariff','tinymce-dist',diff --git a/wger/software/templates/changelog.html b/wger/software/templates/changelog.htmlindex cf3b112da..9008040ff 100644--- a/wger/software/templates/changelog.html+++ b/wger/software/templates/changelog.html@@ -11,6 +11,10 @@<h4>2015-XX-XX</h4><ul>+ <li>+ Fix problem with datepicker+ <a href="https://github.com/rolandgeider/wger/issues/192">#192</a>+ </li><li>Use hostname for submitted exercises<a href="https://github.com/rolandgeider/wger/issues/159">#159</a>diff --git a/wger/utils/context_processor.py b/wger/utils/context_processor.pyindex 090e1e806..542fcd12f 100644--- a/wger/utils/context_processor.py+++ b/wger/utils/context_processor.py@@ -52,10 +52,6 @@ def processor(request):# Translation links'i18n_path': i18n_path,- # Translation links- 'datepicker_i18n_path': 'bower_components/bootstrap-datepicker/dist/locales'- '/bootstrap-datepicker.{0}.min.js'.format(language.short_name),-# Flag for guest users'has_demo_data': request.session.get('has_demo_data', False),diff --git a/wger/weight/views.py b/wger/weight/views.pyindex b4c3c8bc1..357025c4d 100644--- a/wger/weight/views.py+++ b/wger/weight/views.py@@ -64,7 +64,7 @@ class WeightAddView(WgerFormMixin, CreateView):to pass the user here.'''return {'user': self.request.user,- 'date': formats.date_format(datetime.date.today(), "SHORT_DATE_FORMAT")}+ 'date': datetime.date.today()}def form_valid(self, form):'''