- 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
This commit is contained in:
David Huynh 2010-05-27 05:14:40 +00:00
parent bf1fb5ebcd
commit 98e1873272

View File

@ -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() {
$('<span>')
.text(suggestion.name)
.attr("title", suggestion.id)
.appendTo(menuItem);
if ("name2" in suggestion) {
$('<span>').html(" &raquo; ").appendTo(menuItem);
$('<span>')
.text(suggestion.name2)
.attr("title", suggestion.id2)
.appendTo(menuItem);
}
menuItem.click(function() {
commitProperty(suggestion);
});
};