Index: /main/trunk/model-sites-dev/von-sparql/js/von-sparql-comparison-setup.js =================================================================== --- /main/trunk/model-sites-dev/von-sparql/js/von-sparql-comparison-setup.js (revision 29443) +++ /main/trunk/model-sites-dev/von-sparql/js/von-sparql-comparison-setup.js (revision 29444) @@ -62,8 +62,8 @@ //Draw buttons, etc for each side of page - drawSide("left",leftCollection); - apply_functions("left",leftCollection); - drawSide("right",rightCollection); - apply_functions("right",rightCollection); + drawSide("left"); + apply_functions("left"); + drawSide("right"); + apply_functions("right"); //apply css to generated objects @@ -100,5 +100,6 @@ //Redraw a side, given the collection name -function drawSide(side, collectionName){ +function drawSide(side){ + var collectionName = $("#sel_" + side + "Collection").val(); $('#span_' + side + 'Name').html(collectionName); drawOverview(collectionName, ("div_" + side + "Overview")); @@ -186,12 +187,13 @@ //Apply functions to various elements -function apply_functions(side, collection){ +function apply_functions(side){ //Create jquery UI comboboxes $('#div_' + side + 'RefineControls select').combobox({ select: function(event, ui) { + var collectionValue = $("#sel_" + side + "Collection").val(); var id = event.target.id; if(id == "sel_" + side + "Predicate") - updateValueSelector(this.value,"sel_"+ side + "PredicateValue", collection); + updateValueSelector(this.value,"sel_"+ side + "PredicateValue", collectionValue); } }); @@ -199,10 +201,12 @@ $('#btn_' + side + 'ShowChart').on('click',function(){ hardLimit=2000; - drawFilteredDataset(side, collection); + var collectionValue = $("#sel_" + side + "Collection").val(); + drawFilteredDataset(side, collectionValue); }); $('#btn_' + side + 'ShowQuery').on('click',function(){ + var collectionValue = $("#sel_" + side + "Collection").val(); hardLimit=2000; - alert(generateQuery(side,collection)); + alert(generateQuery(side,collectionValue)); }); @@ -215,5 +219,6 @@ //When a