Self hosted FLOSS fitness/workout, nutrition and weight tracker
Remove check for presence of jquery UI
Roland Geiderccd9336c1f5b
diff --git a/wger/core/static/js/wger-core.js b/wger/core/static/js/wger-core.jsindex 34db64cfd..3b6228831 100644--- a/wger/core/static/js/wger-core.js+++ b/wger/core/static/js/wger-core.js@@ -480,40 +480,38 @@ function init_remove_exercise_formset() {function init_edit_set() {// Initialise the autocompleter (our widget, defined above)- if (jQuery.ui) {- $('#exercise-search').devbridgeAutocomplete({- serviceUrl: '/api/v2/exercise/search/?language=' + get_current_language(),- onSelect: function (suggestion) {- // Add the exercise to the list- add_exercise({id: suggestion.data.id,- value: suggestion.value});-- // Load formsets- get_exercise_formset(suggestion.data.id);-- // Init the remove buttons- init_remove_exercise_formset();-- // Reset the autocompleter- $(this).val("");- return false;- },- groupBy: 'category',- paramName: 'term',- transformResult: function(response) {- // why is response not already a JSON object??- var jsonResponse = $.parseJSON(response);- return {- suggestions: $.map(jsonResponse, function(item) {- return {value: item.value, data: {id: item.id,- category: item.category,- image: item.image,- thumbnail: item.image_thumbnail}};- })- };- }- });- }+ $('#exercise-search').devbridgeAutocomplete({+ serviceUrl: '/api/v2/exercise/search/?language=' + get_current_language(),+ onSelect: function (suggestion) {+ // Add the exercise to the list+ add_exercise({id: suggestion.data.id,+ value: suggestion.value});++ // Load formsets+ get_exercise_formset(suggestion.data.id);++ // Init the remove buttons+ init_remove_exercise_formset();++ // Reset the autocompleter+ $(this).val("");+ return false;+ },+ groupBy: 'category',+ paramName: 'term',+ transformResult: function(response) {+ // why is response not already a JSON object??+ var jsonResponse = $.parseJSON(response);+ return {+ suggestions: $.map(jsonResponse, function(item) {+ return {value: item.value, data: {id: item.id,+ category: item.category,+ image: item.image,+ thumbnail: item.image_thumbnail}};+ })+ };+ }+ });// Mobile select box$('#id_exercise_list').change(function (e) {