FIXED - task 576: Use relative paths so works under a Java server named context - patch supplied by sergio@wikier.org
http://code.google.com/p/google-refine/issues/detail?id=576 git-svn-id: http://google-refine.googlecode.com/svn/trunk@2584 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
068e0916a2
commit
03d997be8e
@ -43,7 +43,7 @@
|
||||
<property name="classes.dir" value="${modinf.dir}/classes" />
|
||||
|
||||
<path id="class.path">
|
||||
<fileset dir="${lib.dir}">
|
||||
<fileset dir="${lib.dir}" erroronmissingdir="false">
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
<fileset dir="${refine.lib.dir}">
|
||||
|
@ -168,7 +168,7 @@ ExtendDataPreviewDialog.prototype._update = function() {
|
||||
};
|
||||
|
||||
$.post(
|
||||
"/command/freebase/preview-extend-data?" + $.param(params),
|
||||
"command/freebase/preview-extend-data?" + $.param(params),
|
||||
{
|
||||
rowIndices: JSON.stringify(this._rowIndices),
|
||||
extension: JSON.stringify(this._extension)
|
||||
|
@ -47,7 +47,7 @@ FreebaseLoadingDialog.prototype._createDialog = function() {
|
||||
var loadButton = this._elmts.loadButton;
|
||||
|
||||
var check_authorization = function(cont) {
|
||||
var check_authorization_url = "/command/freebase/check-authorization/" + provider;
|
||||
var check_authorization_url = "command/freebase/check-authorization/" + provider;
|
||||
$.get(check_authorization_url, function(data) {
|
||||
if ("status" in data && data.code == "/api/status/ok") {
|
||||
authorization.html('Signed in as: <a target="_new" href="http://www.freebase.com/view/user/' + data.username + '">' + data.username + '</a> | <a href="javascript:{}" bind="signout">Sign Out</a>').show();
|
||||
@ -96,7 +96,7 @@ FreebaseLoadingDialog.prototype._createDialog = function() {
|
||||
"guid": null
|
||||
}];
|
||||
|
||||
$.post("/command/freebase/mqlwrite/" + provider,
|
||||
$.post("command/freebase/mqlwrite/" + provider,
|
||||
{ "query" : JSON.stringify(mql_query) },
|
||||
function(data) {
|
||||
if ("status" in data && data.code == "/api/status/ok") {
|
||||
@ -112,7 +112,7 @@ FreebaseLoadingDialog.prototype._createDialog = function() {
|
||||
|
||||
var show_triples = function(cont) {
|
||||
$.post(
|
||||
"/command/freebase/preview-protograph?" + $.param({ project: theProject.id }),
|
||||
"command/freebase/preview-protograph?" + $.param({ project: theProject.id }),
|
||||
{
|
||||
protograph: JSON.stringify(theProject.overlayModels.freebaseProtograph || {}),
|
||||
engine: JSON.stringify(ui.browsingEngine.getJSON())
|
||||
@ -144,7 +144,7 @@ FreebaseLoadingDialog.prototype._createDialog = function() {
|
||||
});
|
||||
|
||||
$.getJSON(
|
||||
"/command/core/get-preference?" + $.param({ project: theProject.id, name: "freebase.load.jobName" }),
|
||||
"command/core/get-preference?" + $.param({ project: theProject.id, name: "freebase.load.jobName" }),
|
||||
null,
|
||||
function(data) {
|
||||
self._elmts.source_name[0].value = (data.value) ? data.value : theProject.metadata.name;
|
||||
@ -182,7 +182,7 @@ FreebaseLoadingDialog.prototype._load = function() {
|
||||
var dismissBusy = DialogSystem.showBusy();
|
||||
|
||||
$.post(
|
||||
"/command/freebase/upload-data",
|
||||
"command/freebase/upload-data",
|
||||
{
|
||||
"project" : theProject.id,
|
||||
"qa" : qa,
|
||||
|
@ -285,7 +285,7 @@ SchemaAlignmentDialog.prototype.preview = function(initial) {
|
||||
|
||||
var protograph = this.getJSON();
|
||||
$.post(
|
||||
"/command/freebase/preview-protograph?" + $.param({ project: theProject.id }),
|
||||
"command/freebase/preview-protograph?" + $.param({ project: theProject.id }),
|
||||
{ protograph: JSON.stringify(protograph), engine: JSON.stringify(ui.browsingEngine.getJSON()) },
|
||||
function(data) {
|
||||
if ("mqllike" in data) {
|
||||
|
@ -37,7 +37,7 @@ FreebaseExtension.handlers.setFreebaseApiKey = function() {
|
||||
var value = window.prompt("Set Freebase API Key:");
|
||||
if (value !== null) {
|
||||
$.post(
|
||||
"/command/core/set-preference",
|
||||
"command/core/set-preference",
|
||||
{
|
||||
name : "freebase.api.key",
|
||||
value : JSON.stringify(value)
|
||||
@ -75,7 +75,7 @@ FreebaseExtension.handlers.browseToDataLoad = function() {
|
||||
var w = window.open("about:blank", "dataload");
|
||||
|
||||
$.getJSON(
|
||||
"/command/core/get-preference?" + $.param({ project: theProject.id, name: "freebase.load.jobID" }),
|
||||
"command/core/get-preference?" + $.param({ project: theProject.id, name: "freebase.load.jobID" }),
|
||||
null,
|
||||
function(data) {
|
||||
if (data.value == null) {
|
||||
|
@ -54,7 +54,7 @@ Refine.GDataSourceUI.prototype.attachUI = function(body) {
|
||||
);
|
||||
});
|
||||
this._body.find('.gdata-signout.button').click(function() {
|
||||
$.get("/command/gdata/deauthorize" );
|
||||
$.get("command/gdata/deauthorize" );
|
||||
self._body.find('.gdata-page').hide();
|
||||
self._elmts.signinPage.show();
|
||||
});
|
||||
@ -92,7 +92,7 @@ Refine.GDataSourceUI.prototype._listDocuments = function() {
|
||||
|
||||
var self = this;
|
||||
$.post(
|
||||
"/command/core/importing-controller?" + $.param({
|
||||
"command/core/importing-controller?" + $.param({
|
||||
"controller": "gdata/gdata-importing-controller",
|
||||
"subCommand": "list-documents"
|
||||
}),
|
||||
|
@ -49,11 +49,11 @@ Refine.GDataImportingController.prototype.startImportingDocument = function(doc)
|
||||
|
||||
var self = this;
|
||||
$.post(
|
||||
"/command/core/create-importing-job",
|
||||
"command/core/create-importing-job",
|
||||
null,
|
||||
function(data) {
|
||||
$.post(
|
||||
"/command/core/importing-controller?" + $.param({
|
||||
"command/core/importing-controller?" + $.param({
|
||||
"controller": "gdata/gdata-importing-controller",
|
||||
"subCommand": "initialize-parser-ui",
|
||||
"docUrl": doc.docSelfLink,
|
||||
@ -272,7 +272,7 @@ Refine.GDataImportingController.prototype._updatePreview = function() {
|
||||
this._parsingPanelElmts.progressPanel.show();
|
||||
|
||||
$.post(
|
||||
"/command/core/importing-controller?" + $.param({
|
||||
"command/core/importing-controller?" + $.param({
|
||||
"controller": "gdata/gdata-importing-controller",
|
||||
"jobID": this._jobID,
|
||||
"subCommand": "parse-preview"
|
||||
@ -303,7 +303,7 @@ Refine.GDataImportingController.prototype._getPreviewData = function(callback, n
|
||||
var result = {};
|
||||
|
||||
$.post(
|
||||
"/command/core/get-models?" + $.param({ "importingJobID" : this._jobID }),
|
||||
"command/core/get-models?" + $.param({ "importingJobID" : this._jobID }),
|
||||
null,
|
||||
function(data) {
|
||||
for (var n in data) {
|
||||
@ -313,7 +313,7 @@ Refine.GDataImportingController.prototype._getPreviewData = function(callback, n
|
||||
}
|
||||
|
||||
$.post(
|
||||
"/command/core/get-rows?" + $.param({
|
||||
"command/core/get-rows?" + $.param({
|
||||
"importingJobID" : self._jobID,
|
||||
"start" : 0,
|
||||
"limit" : numRows || 100 // More than we parse for preview anyway
|
||||
@ -342,7 +342,7 @@ Refine.GDataImportingController.prototype._createProject = function() {
|
||||
var options = this.getOptions();
|
||||
options.projectName = projectName;
|
||||
$.post(
|
||||
"/command/core/importing-controller?" + $.param({
|
||||
"command/core/importing-controller?" + $.param({
|
||||
"controller": "gdata/gdata-importing-controller",
|
||||
"jobID": this._jobID,
|
||||
"subCommand": "create-project"
|
||||
|
@ -38,7 +38,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
if (name) {
|
||||
var dismiss = DialogSystem.showBusy('Uploading...');
|
||||
$.post(
|
||||
"/command/gdata/upload",
|
||||
"command/gdata/upload",
|
||||
{
|
||||
"project" : theProject.id,
|
||||
"engine" : exportAllRows ? '' : JSON.stringify(ui.browsingEngine.getJSON()),
|
||||
|
@ -43,7 +43,7 @@
|
||||
<property name="classes.dir" value="${modinf.dir}/classes" />
|
||||
|
||||
<path id="class.path">
|
||||
<fileset dir="${lib.dir}">
|
||||
<fileset dir="${lib.dir}" erroronmissingdir="false">
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
<fileset dir="${refine.lib.dir}">
|
||||
|
@ -24,7 +24,7 @@ butterfly.default.mountpoint = /extension
|
||||
# ---------- Module ------
|
||||
|
||||
butterfly.modules.path = modules
|
||||
butterfly.modules.path = ../../extensions/
|
||||
butterfly.modules.path = ../../extensions
|
||||
# Add more paths here if your extensions live elsewhere.
|
||||
# Relative paths are relative to refine/main/webapp/
|
||||
|
||||
|
@ -5,6 +5,8 @@
|
||||
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
|
||||
|
||||
<web-app>
|
||||
<display-name>Google Refine</display-name>
|
||||
<description>Google Refine Webapp</description>
|
||||
|
||||
<!--+
|
||||
| This forces all the session cookies to default to the root path.
|
||||
@ -17,7 +19,7 @@
|
||||
<param-name>org.mortbay.jetty.servlet.SessionPath</param-name>
|
||||
<param-value>/</param-value>
|
||||
</context-param>
|
||||
|
||||
|
||||
<servlet>
|
||||
<servlet-name>refine</servlet-name>
|
||||
<servlet-class>com.google.refine.RefineServlet</servlet-class>
|
||||
@ -29,6 +31,12 @@
|
||||
<param-name>refine.revision</param-name>
|
||||
<param-value>$REVISION</param-value>
|
||||
</init-param>
|
||||
<!-- added by Wikier, unused by us
|
||||
<init-param>
|
||||
<param-name>refine.data</param-name>
|
||||
<param-value>/tmp/refine</param-value>
|
||||
</init-param>
|
||||
-->
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
|
@ -521,7 +521,7 @@ function process(path, request, response) {
|
||||
);
|
||||
} else {
|
||||
if (path == "/" || path == "") {
|
||||
path = "/index";
|
||||
path = "index";
|
||||
} else if (path.endsWith("/")) {
|
||||
path = path.substring(0, path.length - 1);
|
||||
}
|
||||
@ -585,7 +585,7 @@ function process(path, request, response) {
|
||||
var styleInjection = [];
|
||||
for each (var qualifiedPath in styles) {
|
||||
styleInjection.push(
|
||||
'<link type="text/css" rel="stylesheet" href="' + qualifiedPath.fullPath + '" />');
|
||||
'<link type="text/css" rel="stylesheet" href="' + qualifiedPath.fullPath.substring(1) + '" />');
|
||||
}
|
||||
context.styleInjection = styleInjection.join("\n");
|
||||
|
||||
@ -596,7 +596,7 @@ function process(path, request, response) {
|
||||
var scriptInjection = [];
|
||||
for each (var qualifiedPath in scripts) {
|
||||
scriptInjection.push(
|
||||
'<script type="text/javascript" src="' + qualifiedPath.fullPath + '"></script>');
|
||||
'<script type="text/javascript" src="' + qualifiedPath.fullPath.substring(1) + '"></script>');
|
||||
}
|
||||
context.scriptInjection = scriptInjection.join("\n");
|
||||
}
|
||||
|
@ -38,11 +38,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=8;IE=9;chrome=1;">
|
||||
<title>Error - Google Refine</title>
|
||||
<link rel="icon" type="image/png" href="images/favicon.png">
|
||||
<link rel="stylesheet" href="/styles/common.less" />
|
||||
<link rel="stylesheet" href="styles/common.less" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<a id="app-home-button" href="/"><img alt="Google Refine" src="/images/logo-googlerefine-30.png" width="129" height="29" /></a>
|
||||
<a id="app-home-button" href="/"><img alt="Google Refine" src="images/logo-googlerefine-30.png" width="129" height="29" /></a>
|
||||
</div>
|
||||
<div id="body-info">
|
||||
<h1>Something went wrong!</h1>
|
||||
|
@ -59,7 +59,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="http://code.google.com/p/google-refine/wiki/DocumentationForUsers">Help</a></li>
|
||||
<li><a href="/about.html">About</a></li>
|
||||
<li><a href="about.html">About</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div></div> <!-- left-panel -->
|
||||
|
@ -232,13 +232,13 @@ ClusteringDialog.prototype._cluster = function() {
|
||||
var self = this;
|
||||
|
||||
var container = this._elmts.tableContainer.html(
|
||||
'<div style="margin: 1em; font-size: 130%; color: #888;">Clustering... <img src="/images/small-spinner.gif"></div>'
|
||||
'<div style="margin: 1em; font-size: 130%; color: #888;">Clustering... <img src="images/small-spinner.gif"></div>'
|
||||
);
|
||||
|
||||
this._elmts.resultSummary.empty();
|
||||
|
||||
$.post(
|
||||
"/command/core/compute-clusters?" + $.param({ project: theProject.id }),
|
||||
"command/core/compute-clusters?" + $.param({ project: theProject.id }),
|
||||
{
|
||||
engine: JSON.stringify(ui.browsingEngine.getJSON()),
|
||||
clusterer: JSON.stringify({
|
||||
|
@ -154,7 +154,7 @@ ExpressionPreviewDialog.Widget.prototype.getExpression = function(commit) {
|
||||
s = this._getLanguage() + ":" + s;
|
||||
if (commit) {
|
||||
$.post(
|
||||
"/command/core/log-expression?" + $.param({ project: theProject.id, expression: s }),
|
||||
"command/core/log-expression?" + $.param({ project: theProject.id, expression: s }),
|
||||
null,
|
||||
function(data) {
|
||||
},
|
||||
@ -172,7 +172,7 @@ ExpressionPreviewDialog.Widget.prototype._getLanguage = function() {
|
||||
ExpressionPreviewDialog.Widget.prototype._renderHelpTab = function() {
|
||||
var self = this;
|
||||
$.getJSON(
|
||||
"/command/core/get-expression-language-info",
|
||||
"command/core/get-expression-language-info",
|
||||
null,
|
||||
function(data) {
|
||||
self._renderHelp(data);
|
||||
@ -253,7 +253,7 @@ ExpressionPreviewDialog.Widget.prototype._renderHelp = function(data) {
|
||||
ExpressionPreviewDialog.Widget.prototype._renderExpressionHistoryTab = function() {
|
||||
var self = this;
|
||||
$.getJSON(
|
||||
"/command/core/get-expression-history?" + $.param({ project: theProject.id }),
|
||||
"command/core/get-expression-history?" + $.param({ project: theProject.id }),
|
||||
null,
|
||||
function(data) {
|
||||
self._renderExpressionHistory(data);
|
||||
@ -280,7 +280,7 @@ ExpressionPreviewDialog.Widget.prototype._renderExpressionHistory = function(dat
|
||||
.appendTo(tr.insertCell(0))
|
||||
.click(function() {
|
||||
$.post(
|
||||
"/command/core/toggle-starred-expression",
|
||||
"command/core/toggle-starred-expression",
|
||||
{ expression: entry.code },
|
||||
function(data) {
|
||||
entry.starred = !entry.starred;
|
||||
@ -319,7 +319,7 @@ ExpressionPreviewDialog.Widget.prototype._renderExpressionHistory = function(dat
|
||||
ExpressionPreviewDialog.Widget.prototype._renderStarredExpressionsTab = function() {
|
||||
var self = this;
|
||||
$.getJSON(
|
||||
"/command/core/get-starred-expressions",
|
||||
"command/core/get-starred-expressions",
|
||||
null,
|
||||
function(data) {
|
||||
self._renderStarredExpressions(data);
|
||||
@ -344,7 +344,7 @@ ExpressionPreviewDialog.Widget.prototype._renderStarredExpressions = function(da
|
||||
|
||||
$('<a href="javascript:{}">Remove</a>').appendTo(tr.insertCell(0)).click(function() {
|
||||
$.post(
|
||||
"/command/core/toggle-starred-expression",
|
||||
"command/core/toggle-starred-expression",
|
||||
{ expression: entry.code, returnList: true },
|
||||
function(data) {
|
||||
self._renderStarredExpressions(data);
|
||||
@ -394,7 +394,7 @@ ExpressionPreviewDialog.Widget.prototype.update = function() {
|
||||
this._prepareUpdate(params);
|
||||
|
||||
$.post(
|
||||
"/command/core/preview-expression?" + $.param(params),
|
||||
"command/core/preview-expression?" + $.param(params),
|
||||
{
|
||||
rowIndices: JSON.stringify(this._rowIndices)
|
||||
},
|
||||
|
@ -78,14 +78,14 @@ ScatterplotDialog.prototype._renderMatrix = function() {
|
||||
var self = this;
|
||||
|
||||
var container = this._elmts.tableContainer.html(
|
||||
'<div style="margin: 1em; font-size: 130%; color: #888; background-color: white;">Processing... <img src="/images/small-spinner.gif"></div>'
|
||||
'<div style="margin: 1em; font-size: 130%; color: #888; background-color: white;">Processing... <img src="images/small-spinner.gif"></div>'
|
||||
);
|
||||
|
||||
if (theProject.columnModel.columns.length > 0) {
|
||||
var params = {
|
||||
project: theProject.id
|
||||
};
|
||||
$.getJSON("/command/core/get-columns-info?" + $.param(params),function(data) {
|
||||
$.getJSON("command/core/get-columns-info?" + $.param(params),function(data) {
|
||||
if (data === null || typeof data.length == 'undefined') {
|
||||
container.html("Error calling 'get-columns-info'");
|
||||
return;
|
||||
@ -122,7 +122,7 @@ ScatterplotDialog.prototype._renderMatrix = function() {
|
||||
engine: JSON.stringify(ui.browsingEngine.getJSON()),
|
||||
plotter: JSON.stringify(plotter_params)
|
||||
};
|
||||
var url = "/command/core/get-scatterplot?" + $.param(params);
|
||||
var url = "command/core/get-scatterplot?" + $.param(params);
|
||||
|
||||
var attrs = [
|
||||
'width="' + self._plot_size + '"',
|
||||
|
@ -60,7 +60,7 @@ TemplatingExporterDialog.prototype._createDialog = function() {
|
||||
|
||||
TemplatingExporterDialog.prototype._getSavedTemplate = function(f) {
|
||||
$.getJSON(
|
||||
"/command/core/get-preference?" + $.param({ project: theProject.id, name: "exporters.templating.template" }),
|
||||
"command/core/get-preference?" + $.param({ project: theProject.id, name: "exporters.templating.template" }),
|
||||
null,
|
||||
function(data) {
|
||||
if (data.value !== null) {
|
||||
@ -113,7 +113,7 @@ TemplatingExporterDialog.prototype._dismiss = function() {
|
||||
TemplatingExporterDialog.prototype._updatePreview = function() {
|
||||
var self = this;
|
||||
$.post(
|
||||
"/command/core/export-rows/preview.txt",
|
||||
"command/core/export-rows/preview.txt",
|
||||
{
|
||||
"project" : theProject.id,
|
||||
"format" : "template",
|
||||
@ -139,7 +139,7 @@ TemplatingExporterDialog.prototype._export = function() {
|
||||
$(form)
|
||||
.css("display", "none")
|
||||
.attr("method", "post")
|
||||
.attr("action", "/command/core/export-rows/" + name + ".txt")
|
||||
.attr("action", "command/core/export-rows/" + name + ".txt")
|
||||
.attr("target", "refine-export");
|
||||
|
||||
var appendField = function(name, value) {
|
||||
|
@ -702,7 +702,7 @@ ListFacet.prototype._setChoiceCountLimit = function(choiceCount) {
|
||||
if (!isNaN(n)) {
|
||||
var self = this;
|
||||
$.post(
|
||||
"/command/core/set-preference",
|
||||
"command/core/set-preference",
|
||||
{
|
||||
name : "ui.browsing.listFacet.limit",
|
||||
value : n
|
||||
|
@ -273,7 +273,7 @@ ScatterplotFacet.prototype._formulateImageUrl = function(engineConfig, conf) {
|
||||
engine: JSON.stringify(engineConfig),
|
||||
plotter: JSON.stringify(options)
|
||||
};
|
||||
return "/command/core/get-scatterplot?" + $.param(params);
|
||||
return "command/core/get-scatterplot?" + $.param(params);
|
||||
};
|
||||
|
||||
ScatterplotFacet.prototype.updateState = function(data) {
|
||||
|
@ -70,7 +70,7 @@ $(function() {
|
||||
|
||||
var showVersion = function() {
|
||||
$.getJSON(
|
||||
"/command/core/get-version",
|
||||
"command/core/get-version",
|
||||
null,
|
||||
function(data) {
|
||||
GoogleRefineVersion = data;
|
||||
|
@ -50,7 +50,7 @@ Refine.CreateProjectUI = function(elmt) {
|
||||
this._errorPanel.html(DOM.loadHTML("core", "scripts/index/create-project-error-panel.html"));
|
||||
|
||||
$.post(
|
||||
"/command/core/get-importing-configuration",
|
||||
"command/core/get-importing-configuration",
|
||||
null,
|
||||
function(data) {
|
||||
Refine.importingConfig = data.config;
|
||||
@ -177,7 +177,7 @@ Refine.CreateProjectUI.prototype.showImportProgressPanel = function(progressMess
|
||||
Refine.CreateProjectUI.prototype.pollImportJob = function(start, jobID, timerID, checkDone, callback, onError) {
|
||||
var self = this;
|
||||
$.post(
|
||||
"/command/core/get-importing-job-status?" + $.param({ "jobID": jobID }),
|
||||
"command/core/get-importing-job-status?" + $.param({ "jobID": jobID }),
|
||||
null,
|
||||
function(data) {
|
||||
if (!(data)) {
|
||||
@ -264,5 +264,5 @@ Refine.CreateProjectUI.composeErrorMessage = function(job) {
|
||||
};
|
||||
|
||||
Refine.CreateProjectUI.cancelImportingJob = function(jobID) {
|
||||
$.post("/command/core/cancel-importing-job?" + $.param({ "jobID": jobID }));
|
||||
$.post("command/core/cancel-importing-job?" + $.param({ "jobID": jobID }));
|
||||
};
|
||||
|
@ -74,7 +74,7 @@ Refine.DefaultImportingController.prototype._startOver = function() {
|
||||
Refine.DefaultImportingController.prototype.startImportJob = function(form, progressMessage, callback) {
|
||||
var self = this;
|
||||
$.post(
|
||||
"/command/core/create-importing-job",
|
||||
"command/core/create-importing-job",
|
||||
null,
|
||||
function(data) {
|
||||
var jobID = self._jobID = data.jobID;
|
||||
@ -83,7 +83,7 @@ Refine.DefaultImportingController.prototype.startImportJob = function(form, prog
|
||||
.attr("enctype", "multipart/form-data")
|
||||
.attr("accept-charset", "UTF-8")
|
||||
.attr("target", "create-project-iframe")
|
||||
.attr("action", "/command/core/importing-controller?" + $.param({
|
||||
.attr("action", "command/core/importing-controller?" + $.param({
|
||||
"controller": "core/default-importing-controller",
|
||||
"jobID": jobID,
|
||||
"subCommand": "load-raw-data"
|
||||
@ -176,7 +176,7 @@ Refine.DefaultImportingController.prototype._ensureFormatParserUIHasInitializati
|
||||
var self = this;
|
||||
var dismissBusy = DialogSystem.showBusy("Inspecting selected files ...");
|
||||
$.post(
|
||||
"/command/core/importing-controller?" + $.param({
|
||||
"command/core/importing-controller?" + $.param({
|
||||
"controller": "core/default-importing-controller",
|
||||
"jobID": this._jobID,
|
||||
"subCommand": "initialize-parser-ui",
|
||||
@ -201,7 +201,7 @@ Refine.DefaultImportingController.prototype._ensureFormatParserUIHasInitializati
|
||||
Refine.DefaultImportingController.prototype.updateFormatAndOptions = function(options, callback) {
|
||||
var self = this;
|
||||
$.post(
|
||||
"/command/core/importing-controller?" + $.param({
|
||||
"command/core/importing-controller?" + $.param({
|
||||
"controller": "core/default-importing-controller",
|
||||
"jobID": this._jobID,
|
||||
"subCommand": "update-format-and-options"
|
||||
@ -232,7 +232,7 @@ Refine.DefaultImportingController.prototype.getPreviewData = function(callback,
|
||||
var result = {};
|
||||
|
||||
$.post(
|
||||
"/command/core/get-models?" + $.param({ "importingJobID" : this._jobID }),
|
||||
"command/core/get-models?" + $.param({ "importingJobID" : this._jobID }),
|
||||
null,
|
||||
function(data) {
|
||||
for (var n in data) {
|
||||
@ -242,7 +242,7 @@ Refine.DefaultImportingController.prototype.getPreviewData = function(callback,
|
||||
}
|
||||
|
||||
$.post(
|
||||
"/command/core/get-rows?" + $.param({
|
||||
"command/core/get-rows?" + $.param({
|
||||
"importingJobID" : self._jobID,
|
||||
"start" : 0,
|
||||
"limit" : numRows || 100 // More than we parse for preview anyway
|
||||
@ -272,7 +272,7 @@ Refine.DefaultImportingController.prototype._createProject = function() {
|
||||
var options = this._formatParserUI.getOptions();
|
||||
options.projectName = projectName;
|
||||
$.post(
|
||||
"/command/core/importing-controller?" + $.param({
|
||||
"command/core/importing-controller?" + $.param({
|
||||
"controller": "core/default-importing-controller",
|
||||
"jobID": this._jobID,
|
||||
"subCommand": "create-project"
|
||||
|
@ -316,7 +316,7 @@ Refine.DefaultImportingController.prototype._commitFileSelection = function() {
|
||||
var self = this;
|
||||
var dismissBusy = DialogSystem.showBusy("Inspecting<br/>selected files ...");
|
||||
$.post(
|
||||
"/command/core/importing-controller?" + $.param({
|
||||
"command/core/importing-controller?" + $.param({
|
||||
"controller": "core/default-importing-controller",
|
||||
"jobID": this._jobID,
|
||||
"subCommand": "update-file-selection"
|
||||
|
@ -1,4 +1,4 @@
|
||||
<form id="project-upload-form" method="post" enctype="multipart/form-data" action="/command/core/import-project" accept-charset="UTF-8">
|
||||
<form id="project-upload-form" method="post" enctype="multipart/form-data" action="command/core/import-project" accept-charset="UTF-8">
|
||||
<div class="grid-layout layout-normal"><table>
|
||||
<tr>
|
||||
<td colspan="2">Locate an existing Google Refine project file (.tar or .tar.gz):</td>
|
||||
|
@ -60,7 +60,7 @@ Refine.OpenProjectUI = function(elmt) {
|
||||
$('#projects-workspace-open').click(function() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/command/core/open-workspace-dir",
|
||||
url: "command/core/open-workspace-dir",
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code != "ok" && "message" in data) {
|
||||
@ -89,7 +89,7 @@ Refine.OpenProjectUI.prototype.resize = function() {
|
||||
Refine.OpenProjectUI.prototype._fetchProjects = function() {
|
||||
var self = this;
|
||||
$.getJSON(
|
||||
"/command/core/get-all-project-metadata",
|
||||
"command/core/get-all-project-metadata",
|
||||
null,
|
||||
function(data) {
|
||||
self._renderProjects(data);
|
||||
@ -136,12 +136,12 @@ Refine.OpenProjectUI.prototype._renderProjects = function(data) {
|
||||
.attr("title","Delete this project")
|
||||
.attr("href","")
|
||||
.css("visibility", "hidden")
|
||||
.html("<img src='/images/close.png' />")
|
||||
.html("<img src='images/close.png' />")
|
||||
.click(function() {
|
||||
if (window.confirm("Are you sure you want to delete project \"" + project.name + "\"?")) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/command/core/delete-project",
|
||||
url: "command/core/delete-project",
|
||||
data: { "project" : project.id },
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
@ -174,7 +174,7 @@ Refine.OpenProjectUI.prototype._renderProjects = function(data) {
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/command/core/rename-project",
|
||||
url: "command/core/rename-project",
|
||||
data: { "project" : project.id, "name" : name },
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
@ -198,7 +198,7 @@ Refine.OpenProjectUI.prototype._renderProjects = function(data) {
|
||||
var nameLink = $('<a></a>')
|
||||
.addClass("project-name")
|
||||
.text(project.name)
|
||||
.attr("href", "/project?project=" + project.id)
|
||||
.attr("href", "project?project=" + project.id)
|
||||
.appendTo(tr.insertCell(tr.cells.length));
|
||||
|
||||
$(tr).mouseenter(function() {
|
||||
@ -227,7 +227,7 @@ Refine.OpenProjectUI.prototype._onClickUploadFileButton = function(evt) {
|
||||
|
||||
} else {
|
||||
$("#file-upload-form").attr("action",
|
||||
"/command/core/create-project-from-upload?" + [
|
||||
"command/core/create-project-from-upload?" + [
|
||||
"url=" + escape(dataURL),
|
||||
"split-into-columns=" + $("#split-into-columns-input")[0].checked,
|
||||
"separator=" + $("#separator-input")[0].value,
|
||||
|
@ -49,7 +49,7 @@ function PreferenceUI(tr, key, value) {
|
||||
if (newValue !== null) {
|
||||
$(td1).text(newValue);
|
||||
$.post(
|
||||
"/command/core/set-preference",
|
||||
"command/core/set-preference",
|
||||
{
|
||||
name : key,
|
||||
value : JSON.stringify(newValue)
|
||||
@ -67,7 +67,7 @@ function PreferenceUI(tr, key, value) {
|
||||
$('<button class="button">').text("Delete").appendTo(td2).click(function() {
|
||||
if (window.confirm("Delete preference key " + key + "?")) {
|
||||
$.post(
|
||||
"/command/core/set-preference",
|
||||
"command/core/set-preference",
|
||||
{
|
||||
name : key
|
||||
},
|
||||
@ -120,7 +120,7 @@ function populatePreferences(prefs) {
|
||||
preferenceUIs.push(new PreferenceUI(tr, key, value));
|
||||
|
||||
$.post(
|
||||
"/command/core/set-preference",
|
||||
"command/core/set-preference",
|
||||
{
|
||||
name : key,
|
||||
value : JSON.stringify(value)
|
||||
@ -139,7 +139,7 @@ function populatePreferences(prefs) {
|
||||
|
||||
function onLoad() {
|
||||
$.post(
|
||||
"/command/core/get-all-preferences",
|
||||
"command/core/get-all-preferences",
|
||||
null,
|
||||
populatePreferences,
|
||||
"json"
|
||||
|
@ -155,7 +155,7 @@ Refine.setTitle = function(status) {
|
||||
|
||||
Refine.reinitializeProjectData = function(f, fError) {
|
||||
$.getJSON(
|
||||
"/command/core/get-project-metadata?" + $.param({ project: theProject.id }), null,
|
||||
"command/core/get-project-metadata?" + $.param({ project: theProject.id }), null,
|
||||
function(data) {
|
||||
if (data.status == 'error') {
|
||||
alert(data.message);
|
||||
@ -165,7 +165,7 @@ Refine.reinitializeProjectData = function(f, fError) {
|
||||
} else {
|
||||
theProject.metadata = data;
|
||||
$.getJSON(
|
||||
"/command/core/get-models?" + $.param({ project: theProject.id }), null,
|
||||
"command/core/get-models?" + $.param({ project: theProject.id }), null,
|
||||
function(data) {
|
||||
for (var n in data) {
|
||||
if (data.hasOwnProperty(n)) {
|
||||
@ -195,7 +195,7 @@ Refine._renameProject = function() {
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/command/core/rename-project",
|
||||
url: "command/core/rename-project",
|
||||
data: { "project" : theProject.id, "name" : name },
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
@ -339,7 +339,7 @@ Refine.postProcess = function(moduleName, command, params, body, updateOptions,
|
||||
Refine.setAjaxInProgress();
|
||||
|
||||
$.post(
|
||||
"/command/" + moduleName + "/" + command + "?" + $.param(params),
|
||||
"command/" + moduleName + "/" + command + "?" + $.param(params),
|
||||
body,
|
||||
onDone,
|
||||
"json"
|
||||
@ -404,7 +404,7 @@ Refine.fetchRows = function(start, limit, onDone, sorting) {
|
||||
}
|
||||
|
||||
$.post(
|
||||
"/command/core/get-rows?" + $.param({ project: theProject.id, start: start, limit: limit }) + "&callback=?",
|
||||
"command/core/get-rows?" + $.param({ project: theProject.id, start: start, limit: limit }) + "&callback=?",
|
||||
body,
|
||||
function(data) {
|
||||
theProject.rowModel = data;
|
||||
|
@ -243,7 +243,7 @@ BrowsingEngine.prototype.update = function(onDone) {
|
||||
this._elmts.indicator.css("visibility", "visible");
|
||||
|
||||
$.post(
|
||||
"/command/core/compute-facets?" + $.param({ project: theProject.id }),
|
||||
"command/core/compute-facets?" + $.param({ project: theProject.id }),
|
||||
{ engine: JSON.stringify(this.getJSON(true)) },
|
||||
function(data) {
|
||||
var facetData = data.facets;
|
||||
|
@ -139,7 +139,7 @@ ExporterManager.prepareExportRowsForm = function(format, includeEngine, ext) {
|
||||
$(form)
|
||||
.css("display", "none")
|
||||
.attr("method", "post")
|
||||
.attr("action", "/command/core/export-rows/" + name + ((ext) ? ("." + ext) : ""))
|
||||
.attr("action", "command/core/export-rows/" + name + ((ext) ? ("." + ext) : ""))
|
||||
.attr("target", "refine-export");
|
||||
|
||||
$('<input />')
|
||||
@ -166,7 +166,7 @@ ExporterManager.handlers.exportProject = function() {
|
||||
$(form)
|
||||
.css("display", "none")
|
||||
.attr("method", "post")
|
||||
.attr("action", "/command/core/export-project/" + name + ".google-refine.tar.gz")
|
||||
.attr("action", "command/core/export-project/" + name + ".google-refine.tar.gz")
|
||||
.attr("target", "refine-export");
|
||||
$('<input />')
|
||||
.attr("name", "project")
|
||||
|
@ -54,7 +54,7 @@ HistoryPanel.prototype.resize = function() {
|
||||
HistoryPanel.prototype.update = function(onDone) {
|
||||
var self = this;
|
||||
Ajax.chainGetJSON(
|
||||
"/command/core/get-history?" + $.param({ project: theProject.id }), null,
|
||||
"command/core/get-history?" + $.param({ project: theProject.id }), null,
|
||||
function(data) {
|
||||
self._data = data;
|
||||
self._render();
|
||||
@ -171,7 +171,7 @@ HistoryPanel.prototype._onClickHistoryEntry = function(evt, entry, lastDoneID) {
|
||||
HistoryPanel.prototype._extractOperations = function() {
|
||||
var self = this;
|
||||
$.getJSON(
|
||||
"/command/core/get-operations?" + $.param({ project: theProject.id }),
|
||||
"command/core/get-operations?" + $.param({ project: theProject.id }),
|
||||
null,
|
||||
function(data) {
|
||||
if ("entries" in data) {
|
||||
|
@ -81,7 +81,7 @@ ProcessPanel.prototype.update = function(updateOptions, onDone) {
|
||||
|
||||
var self = this;
|
||||
Ajax.chainGetJSON(
|
||||
"/command/core/get-processes?" + $.param({ project: theProject.id }), null,
|
||||
"command/core/get-processes?" + $.param({ project: theProject.id }), null,
|
||||
function(data) {
|
||||
self._latestHistoryEntry = null;
|
||||
self._render(data);
|
||||
@ -120,7 +120,7 @@ ProcessPanel.prototype.undo = function() {
|
||||
ProcessPanel.prototype._cancelAll = function() {
|
||||
var self = this;
|
||||
$.post(
|
||||
"/command/core/cancel-processes?" + $.param({ project: theProject.id }),
|
||||
"command/core/cancel-processes?" + $.param({ project: theProject.id }),
|
||||
null,
|
||||
function(o) {
|
||||
self._data = null;
|
||||
@ -195,7 +195,7 @@ ProcessPanel.prototype._render = function(newData) {
|
||||
if (window.confirm('The last operation encountered some errors:\n' + messages +
|
||||
'\n\nContinue with the remaining operations?')) {
|
||||
$.post(
|
||||
"/command/core/apply-operations?" + $.param({ project: theProject.id }),
|
||||
"command/core/apply-operations?" + $.param({ project: theProject.id }),
|
||||
{ operations: '[]' },
|
||||
function(o) {},
|
||||
"json"
|
||||
|
@ -128,7 +128,7 @@ ReconciliationManager.save = function(f) {
|
||||
$.ajax({
|
||||
async: false,
|
||||
type: "POST",
|
||||
url: "/command/core/set-preference?" + $.param({
|
||||
url: "command/core/set-preference?" + $.param({
|
||||
name: "reconciliation.standardServices"
|
||||
}),
|
||||
data: { "value" : JSON.stringify(ReconciliationManager.standardServices) },
|
||||
@ -147,7 +147,7 @@ ReconciliationManager.save = function(f) {
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
url: "/command/core/get-preference?" + $.param({
|
||||
url: "command/core/get-preference?" + $.param({
|
||||
name: "reconciliation.standardServices"
|
||||
}),
|
||||
success: function(data) {
|
||||
|
@ -45,7 +45,7 @@ ReconStandardServicePanel.prototype._guessTypes = function(f) {
|
||||
var dismissBusy = DialogSystem.showBusy();
|
||||
|
||||
$.post(
|
||||
"/command/core/guess-types-of-column?" + $.param({
|
||||
"command/core/guess-types-of-column?" + $.param({
|
||||
project: theProject.id,
|
||||
columnName: this._column.name,
|
||||
service: this._service.url
|
||||
|
@ -164,7 +164,7 @@ CustomSuggest.setFreebaseAPIKey = function(freebaseAPIKey) {
|
||||
);
|
||||
|
||||
// Use Freebase API Key
|
||||
$.ajax("/command/core/get-preference",
|
||||
$.ajax("command/core/get-preference",
|
||||
{
|
||||
async: false,
|
||||
data: {name: "freebase.api.key"},
|
||||
|
@ -105,7 +105,7 @@ DOM._resolveIdInDOMChildren = function(elmt, idmap) {
|
||||
|
||||
DOM._loadedHTML = {};
|
||||
DOM.loadHTML = function(module, path) {
|
||||
var fullPath = ModuleWirings[module] + path;
|
||||
var fullPath = (ModuleWirings[module] + path).substring(1);
|
||||
if (!(fullPath in DOM._loadedHTML)) {
|
||||
$.ajax({
|
||||
async: false,
|
||||
|
@ -153,7 +153,7 @@ MenuSystem.createAndShowStandardMenu = function(items, elmt, options) {
|
||||
menuItem.html(
|
||||
'<table width="100%" cellspacing="0" cellpadding="0" class="menu-item-layout"><tr>' +
|
||||
'<td>' + item.label + '</td>' +
|
||||
'<td width="1%"><img src="/images/right-arrow.png" /></td>' +
|
||||
'<td width="1%"><img src="images/right-arrow.png" /></td>' +
|
||||
'</tr></table>'
|
||||
);
|
||||
menuItem.mouseenter(function() {
|
||||
@ -289,4 +289,4 @@ MenuSystem.insertAfter = function(rootItems, path, what) {
|
||||
|
||||
Array.prototype.splice.apply(menuItems, spliceArgs);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -93,7 +93,7 @@ if (typeof window.Sign == 'undefined') {
|
||||
},
|
||||
|
||||
signin : function(success, provider, check_authorization_url, width, height) {
|
||||
var newwin = window.Sign.popup("/command/core/authorize/" + provider, width, height);
|
||||
var newwin = window.Sign.popup("command/core/authorize/" + provider, width, height);
|
||||
|
||||
if (newwin !== null) {
|
||||
newwin.opener = window;
|
||||
@ -123,7 +123,7 @@ if (typeof window.Sign == 'undefined') {
|
||||
|
||||
signout : function(success,provider) {
|
||||
$.ajax({
|
||||
url: "/command/core/deauthorize/" + provider,
|
||||
url: "command/core/deauthorize/" + provider,
|
||||
success: function() {
|
||||
if (typeof success == 'undefined') {
|
||||
window.location.reload();
|
||||
|
@ -162,7 +162,7 @@ a img {
|
||||
}
|
||||
|
||||
.button-menu, a.button-menu {
|
||||
background: url(/images/down-arrow.png) no-repeat right 6px;
|
||||
background: url(images/down-arrow.png) no-repeat right 6px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
padding: 20px 0 0 10px;
|
||||
font-size: 1.15em;
|
||||
font-weight: bold;
|
||||
background: url(/images/logo-gem-40.png) no-repeat right top;
|
||||
background: url(../../images/logo-gem-40.png) no-repeat right top;
|
||||
}
|
||||
|
||||
.browsing-panel-help p, .history-panel-help p {
|
||||
|
Loading…
Reference in New Issue
Block a user