Commit 65e064f4 authored by Matija Obreza's avatar Matija Obreza

JS fixes

parent 6fe724c6
...@@ -109,7 +109,8 @@ var BrowseUtil = { ...@@ -109,7 +109,8 @@ var BrowseUtil = {
}, },
applySuggestions: function (jsonData, messages) { applySuggestions: function (jsonData, messages) {
$.ajax({ console.log('applySuggestions /explore/listFilterSuggestions');
$.ajax({
url: '/explore/listFilterSuggestions', url: '/explore/listFilterSuggestions',
method: 'get', method: 'get',
data: { data: {
...@@ -120,6 +121,7 @@ var BrowseUtil = { ...@@ -120,6 +121,7 @@ var BrowseUtil = {
} }
}); });
console.log('applySuggestions /explore/booleanSuggestions');
$.ajax({ $.ajax({
url: '/explore/booleanSuggestions', url: '/explore/booleanSuggestions',
method: 'get', method: 'get',
...@@ -131,6 +133,7 @@ var BrowseUtil = { ...@@ -131,6 +133,7 @@ var BrowseUtil = {
} }
}); });
console.log('applySuggestions /explore/cropSuggestions');
$.ajax({ $.ajax({
url: '/explore/cropSuggestions', url: '/explore/cropSuggestions',
method: 'get', method: 'get',
......
...@@ -132,6 +132,7 @@ var GenesysChart = { ...@@ -132,6 +132,7 @@ var GenesysChart = {
var opts = $.extend(true, defaultOptions, options); var opts = $.extend(true, defaultOptions, options);
console.log('chart Getting ' + url);
$.ajax(url, { $.ajax(url, {
success : function(data) { success : function(data) {
...@@ -338,11 +339,10 @@ var GenesysFilterUtil = { ...@@ -338,11 +339,10 @@ var GenesysFilterUtil = {
GenesysFilterUtil.showFilter(filterId); GenesysFilterUtil.showFilter(filterId);
return; return;
} }
console.log('Getting /additional-filter');
$.ajax('/' + document.documentElement.lang + '/additional-filter', { $.ajax('/' + document.documentElement.lang + '/additional-filter', {
type : 'GET', type : 'GET',
data : 'filter=' + filter, data : 'filter=' + filter,
async: false,
success: function (data) { success: function (data) {
if (filter.startsWith('gm:')) { if (filter.startsWith('gm:')) {
...@@ -681,7 +681,7 @@ var GenesysFilter = { ...@@ -681,7 +681,7 @@ var GenesysFilter = {
var XUtil = { var XUtil = {
x01: function (path, handler, object) { x01: function (path, handler, object) {
console.log('x01 Getting ' + path);
$.ajax(path, $.extend({}, { $.ajax(path, $.extend({}, {
type: 'POST', type: 'POST',
dataType: 'json', dataType: 'json',
...@@ -782,6 +782,7 @@ $(document).ready(function() { ...@@ -782,6 +782,7 @@ $(document).ready(function() {
body.on('click', '.get_widget', function() { body.on('click', '.get_widget', function() {
var clientId = $(this).val(); var clientId = $(this).val();
console.log('getWidget Getting /get_widget');
$.ajax('/' + document.documentElement.lang + '/get_widget', { $.ajax('/' + document.documentElement.lang + '/get_widget', {
type : 'GET', type : 'GET',
data : 'clientId=' + clientId, data : 'clientId=' + clientId,
...@@ -797,6 +798,7 @@ $(document).ready(function() { ...@@ -797,6 +798,7 @@ $(document).ready(function() {
var sc = $('#selcounter'); var sc = $('#selcounter');
console.log('Getting /sel/json/selection');
$.ajax({ $.ajax({
url : '/sel/json/selection', url : '/sel/json/selection',
type : 'GET', type : 'GET',
...@@ -817,6 +819,7 @@ $(document).ready(function() { ...@@ -817,6 +819,7 @@ $(document).ready(function() {
var aid = foo.attr('x-aid'); var aid = foo.attr('x-aid');
var action = foo.hasClass('picked') ? 'remove' : 'add'; var action = foo.hasClass('picked') ? 'remove' : 'add';
console.log('Getting /sel/json');
$.ajax({ $.ajax({
url : '/sel/json', url : '/sel/json',
type : 'POST', type : 'POST',
......
...@@ -337,10 +337,10 @@ ...@@ -337,10 +337,10 @@
cropNames = function(){ cropNames = function(){
var data = null; var data = null;
console.log('cropNames /explore/getCrops');
$.ajax({ $.ajax({
url: "/explore/getCrops", url: "/explore/getCrops",
method: 'get', method: 'get',
async: false
}).done(function (response) { }).done(function (response) {
data = response; data = response;
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment