From cc77563dcaaadd7d71963721c2e154a766ab4a01 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Sat, 5 Oct 2013 06:36:47 +0200 Subject: [PATCH] js helper function 'get_value' not defined globally anymore, use unfold.get_velue instead --- plugins/googlemap/static/js/googlemap.js | 4 ++-- plugins/lists/static/js/simplelist.js | 8 ++++---- plugins/query_editor/static/js/query_editor.js | 4 ++-- .../resources_selected/static/js/resources_selected.js | 2 +- unfold/static/js/unfold-helper.js | 2 -- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/plugins/googlemap/static/js/googlemap.js b/plugins/googlemap/static/js/googlemap.js index 3876e9f2..8cb652f4 100644 --- a/plugins/googlemap/static/js/googlemap.js +++ b/plugins/googlemap/static/js/googlemap.js @@ -158,8 +158,8 @@ googlemap_debug_detailed=false; if (!(record['latitude'])) return false; // get the coordinates - var latitude=get_value(record['latitude']); - var longitude=get_value(record['longitude']); + var latitude=unfold.get_value(record['latitude']); + var longitude=unfold.get_value(record['longitude']); var lat_lon = latitude + longitude; // check if we've seen anything at that place already diff --git a/plugins/lists/static/js/simplelist.js b/plugins/lists/static/js/simplelist.js index 545c04cd..6a65673a 100644 --- a/plugins/lists/static/js/simplelist.js +++ b/plugins/lists/static/js/simplelist.js @@ -67,10 +67,10 @@ $plugindiv.closest('.need-spin').spin(false); if (rows.length == 0) { - if (use_datatables) - datatables_set_message ($table, $tbody, unfold.warning("No result")); - else - regular_set_message ($table, $tbody, unfold.warning("No result")); + if (use_datatables) + datatables_set_message ($table, $tbody, unfold.warning("No result")); + else + regular_set_message ($table, $tbody, unfold.warning("No result")); return; } diff --git a/plugins/query_editor/static/js/query_editor.js b/plugins/query_editor/static/js/query_editor.js index 8b739f02..51a9c0e9 100644 --- a/plugins/query_editor/static/js/query_editor.js +++ b/plugins/query_editor/static/js/query_editor.js @@ -190,7 +190,7 @@ //console.log(record); availableTags = this.availableTags; jQuery.each(record,function(key,value){ - value = get_value(value); + value = unfold.get_value(value); if(!availableTags.hasOwnProperty(key)){availableTags[key]=new Array();} //availableTags[key].push(value); var currentArray = availableTags[key]; @@ -292,7 +292,7 @@ var availableTags={}; jQuery.each (rows, function(index, obj) { jQuery.each(obj,function(key,value){ - value = get_value(value); + value = unfold.get_value(value); if(!availableTags.hasOwnProperty(key)){availableTags[key]=new Array();} //availableTags[key].push(value); var currentArray=availableTags[key]; diff --git a/plugins/resources_selected/static/js/resources_selected.js b/plugins/resources_selected/static/js/resources_selected.js index 30ffbc5a..a16d4d51 100644 --- a/plugins/resources_selected/static/js/resources_selected.js +++ b/plugins/resources_selected/static/js/resources_selected.js @@ -340,7 +340,7 @@ var remove_urn = this.id; var current_resources = event.data.instance.current_resources; var list_resources = $.grep(current_resources, function(x) {return x.urn != remove_urn}); - //jQuery.publish('selected', 'cancel/'+this.id+'/'+get_value(firstCellVal)); + //jQuery.publish('selected', 'cancel/'+this.id+'/'+unfold.get_value(firstCellVal)); $.publish('/update-set/' + event.data.instance.options.resource_query_uuid, [list_resources, true]); }, diff --git a/unfold/static/js/unfold-helper.js b/unfold/static/js/unfold-helper.js index 27f54fc3..1564e6fb 100644 --- a/unfold/static/js/unfold-helper.js +++ b/unfold/static/js/unfold-helper.js @@ -31,5 +31,3 @@ var unfold = { } // global unfold -// xxx tmp - until all plugins are ported -get_value = unfold.get_value; -- 2.43.0