now a cartoon cop will scare users away from uploading data to freebase they are not sure about

git-svn-id: http://google-refine.googlecode.com/svn/trunk@535 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Stefano Mazzocchi 2010-04-24 08:40:29 +00:00
parent 00e195dbd3
commit 2a8d9a5705
4 changed files with 56 additions and 1 deletions

View File

@ -330,6 +330,19 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
/* Dialog
----------------------------------*/
.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
.ui-dialog .ui-dialog-titlebar { padding: .5em 1em .3em; position: relative; }
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; }
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; }
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
.ui-draggable .ui-dialog-titlebar { cursor: move; }
/* Slider
----------------------------------*/
.ui-slider { position: relative; text-align: left; }

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

View File

@ -104,7 +104,8 @@ FreebaseLoadingDialog.prototype._createDialog = function() {
FreebaseLoadingDialog.prototype._load = function() {
var self = this;
var freebase = self._elmts.freebase.attr("checked");
if (!freebase || (freebase && confirm("Are you sure this data is clean enough to enter Freebase?"))) {
var doLoad = function() {
$.post("/command/upload-data",
{
project: theProject.id,
@ -138,6 +139,30 @@ FreebaseLoadingDialog.prototype._load = function() {
},
"json"
);
};
if (freebase) {
var dialog = $(
'<div id="freebase-confirmation-dialog" title="Are you sure?">' +
'<table><tr><td width="30%"><img src="/images/cop.png" width="150px"></td><td width="70%" style="text-align: center; vertical-align: middle; font-size: 120%">Are you sure this data is ready to be uplaoded into <a href="http://www.freebase.com/" target="_new">Freebase</a>?</td></tr></table>' +
'</div>'
).dialog({
resizable: false,
width: 400,
height: 230,
modal: true,
buttons: {
'yes': function() {
$(this).dialog('close');
doLoad();
},
'cancel': function() {
$(this).dialog('close');
}
}
});
} else {
doLoad();
}
}