more polish

git-svn-id: http://google-refine.googlecode.com/svn/trunk@555 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Stefano Mazzocchi 2010-04-27 08:13:45 +00:00
parent 0eb18633e6
commit b1375a8997
3 changed files with 10 additions and 10 deletions

View File

@ -254,8 +254,6 @@ public class ScatterplotFacet implements Facet {
boolean value = p.x >= from_x && p.x < to_x && p.y >= from_y && p.y < to_y; boolean value = p.x >= from_x && p.x < to_x && p.y >= from_y && p.y < to_y;
//System.out.println(p + " " + value);
return value; return value;
}; };
}; };

View File

@ -28,7 +28,6 @@ public class MQLWriteCommand extends Command {
if (access_credentials != null) { if (access_credentials != null) {
String query = request.getParameter("query"); String query = request.getParameter("query");
System.out.println(query);
String result = FreebaseUtils.mqlwrite(access_credentials, provider, query); String result = FreebaseUtils.mqlwrite(access_credentials, provider, query);
response.getWriter().write(result); response.getWriter().write(result);
} else { } else {

View File

@ -48,6 +48,7 @@ FreebaseLoadingDialog.prototype._createDialog = function() {
DOM.bind(authorization).signout.click(function() { DOM.bind(authorization).signout.click(function() {
self._signedin = false; self._signedin = false;
load_button.attr("disabled","disabled"); load_button.attr("disabled","disabled");
$("#freebase-loading-graph-selector-freebase").attr("disabled","disabled").button("refresh");
Sign.signout(check_authorization,provider); Sign.signout(check_authorization,provider);
}); });
load_button.unbind().click(function() { load_button.unbind().click(function() {
@ -89,19 +90,20 @@ FreebaseLoadingDialog.prototype._createDialog = function() {
}; };
var make_topic = function(new_topic_id, topic_type, cont) { var make_topic = function(new_topic_id, topic_type, cont) {
var mql_query = { var mql_query = [{
"create": "unless_exists", "create": "unless_exists",
"name": new_topic_id, "name": new_topic_id,
"type": topic_type, "a:type": topic_type,
"b:type": "/common/topic"
"id": null, "id": null,
"guid": null "guid": null
}; }];
$.post("/command/mqlwrite/" + provider, $.post("/command/mqlwrite/" + provider,
{ "query" : JSON.stringify(mql_query) }, { "query" : JSON.stringify(mql_query) },
function(data) { function(data) {
if ("status" in data && data.code == "/api/status/ok") { if ("status" in data && data.code == "/api/status/ok") {
self._elmts.source_id.val(data.result.id); self._elmts.source_id.val(data.result[0].id);
if (typeof cont == "function") cont(); if (typeof cont == "function") cont();
} else { } else {
self._show_error("Error creating new topic", data); self._show_error("Error creating new topic", data);
@ -125,7 +127,7 @@ FreebaseLoadingDialog.prototype._createDialog = function() {
'<p>Have you aligned it with the Freebase schemas yet?</p>' + '<p>Have you aligned it with the Freebase schemas yet?</p>' +
'</div>' '</div>'
); );
self._elmts = DOM.bind(frame);
self._end(); self._end();
} else { } else {
body.html( body.html(
@ -149,8 +151,9 @@ FreebaseLoadingDialog.prototype._createDialog = function() {
self._elmts.source_id.suggest({ self._elmts.source_id.suggest({
"type": "/dataworld/information_source", "type": "/dataworld/information_source",
"soft": true,
"suggest_new": "Click here to add a new information source" "suggest_new": "Click here to add a new information source"
}).bind("fb-select", function(e, data) {
self._elmts.source_id.val(data.id);
}).bind("fb-select-new", function(e, val) { }).bind("fb-select-new", function(e, val) {
make_topic(val, "/dataworld/information_source"); make_topic(val, "/dataworld/information_source");
}); });
@ -251,7 +254,7 @@ FreebaseLoadingDialog.prototype._show_error = function(msg, error) {
FreebaseLoadingDialog.prototype._end = function() { FreebaseLoadingDialog.prototype._end = function() {
var self = this; var self = this;
self._elmts.load.text("Close").unbind().click(function() { self._elmts.load.text("Close").removeAttr("disabled").unbind().click(function() {
self._dismiss(); self._dismiss();
}); });
self._elmts.cancel.hide(); self._elmts.cancel.hide();