From 98e187327242ab551b06506f4d60080f2f7de6bb Mon Sep 17 00:00:00 2001 From: David Huynh Date: Thu, 27 May 2010 05:14:40 +0000 Subject: [PATCH] - Fix: Protograph link UI was showing 2 different popups when the link was clicked. - Fix: Protograph link UI's suggested compound properties were only rendered with the first segments. Now both segments are shown, and their names are shown, with their IDs as tooltips. git-svn-id: http://google-refine.googlecode.com/svn/trunk@867 7d457c2a-affb-35e4-300a-418c747d4874 --- .../protograph/schema-alignment-ui-link.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/scripts/protograph/schema-alignment-ui-link.js b/src/main/webapp/scripts/protograph/schema-alignment-ui-link.js index a09a4e7ff..c43f943df 100644 --- a/src/main/webapp/scripts/protograph/schema-alignment-ui-link.js +++ b/src/main/webapp/scripts/protograph/schema-alignment-ui-link.js @@ -146,6 +146,7 @@ SchemaAlignmentDialog.UILink._getPropertiesOfType = function(typeID, targetTypeI function(data) { if (done) return; + done = true; onDone(data.properties || []); } ); @@ -200,7 +201,22 @@ SchemaAlignmentDialog.UILink.prototype._showPropertySuggestPopup = function(elmt var createSuggestion = function(suggestion) { var menuItem = MenuSystem.createMenuItem().appendTo(menu); - menuItem.html(suggestion.id).click(function() { + + $('') + .text(suggestion.name) + .attr("title", suggestion.id) + .appendTo(menuItem); + + if ("name2" in suggestion) { + $('').html(" » ").appendTo(menuItem); + + $('') + .text(suggestion.name2) + .attr("title", suggestion.id2) + .appendTo(menuItem); + } + + menuItem.click(function() { commitProperty(suggestion); }); };