From 03d997be8ef8a58cef13f92e18a61cf0be5a4d92 Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Sat, 13 Oct 2012 17:47:08 +0000 Subject: [PATCH] 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 --- extensions/freebase/build.xml | 2 +- .../scripts/dialogs/extend-data-preview-dialog.js | 2 +- .../scripts/dialogs/freebase-loading-dialog.js | 10 +++++----- .../scripts/dialogs/schema-alignment/dialog.js | 2 +- extensions/freebase/module/scripts/extension.js | 4 ++-- .../gdata/module/scripts/index/gdata-source-ui.js | 4 ++-- .../module/scripts/index/importing-controller.js | 12 ++++++------ .../gdata/module/scripts/project/exporters.js | 2 +- extensions/sample/build.xml | 2 +- main/webapp/WEB-INF/butterfly.properties | 2 +- main/webapp/WEB-INF/web.xml | 10 +++++++++- main/webapp/modules/core/MOD-INF/controller.js | 6 +++--- main/webapp/modules/core/error.vt | 4 ++-- main/webapp/modules/core/index.vt | 2 +- .../core/scripts/dialogs/clustering-dialog.js | 4 ++-- .../scripts/dialogs/expression-preview-dialog.js | 14 +++++++------- .../core/scripts/dialogs/scatterplot-dialog.js | 6 +++--- .../scripts/dialogs/templating-exporter-dialog.js | 6 +++--- .../modules/core/scripts/facets/list-facet.js | 2 +- .../core/scripts/facets/scatterplot-facet.js | 2 +- main/webapp/modules/core/scripts/index.js | 2 +- .../core/scripts/index/create-project-ui.js | 6 +++--- .../default-importing-controller/controller.js | 14 +++++++------- .../file-selection-panel.js | 2 +- .../core/scripts/index/import-project-ui.html | 2 +- .../modules/core/scripts/index/open-project-ui.js | 14 +++++++------- main/webapp/modules/core/scripts/preferences.js | 8 ++++---- main/webapp/modules/core/scripts/project.js | 10 +++++----- .../core/scripts/project/browsing-engine.js | 2 +- .../modules/core/scripts/project/exporters.js | 4 ++-- .../modules/core/scripts/project/history-panel.js | 4 ++-- .../modules/core/scripts/project/process-panel.js | 6 +++--- .../core/scripts/reconciliation/recon-manager.js | 4 ++-- .../reconciliation/standard-service-panel.js | 2 +- .../modules/core/scripts/util/custom-suggest.js | 2 +- main/webapp/modules/core/scripts/util/dom.js | 2 +- main/webapp/modules/core/scripts/util/menu.js | 4 ++-- main/webapp/modules/core/scripts/util/sign.js | 4 ++-- main/webapp/modules/core/styles/common.less | 2 +- .../modules/core/styles/project/sidebar.less | 2 +- 40 files changed, 101 insertions(+), 93 deletions(-) diff --git a/extensions/freebase/build.xml b/extensions/freebase/build.xml index a5f1d937f..f2afc2bbd 100644 --- a/extensions/freebase/build.xml +++ b/extensions/freebase/build.xml @@ -43,7 +43,7 @@ - + diff --git a/extensions/freebase/module/scripts/dialogs/extend-data-preview-dialog.js b/extensions/freebase/module/scripts/dialogs/extend-data-preview-dialog.js index 8b9596d83..b5639f797 100644 --- a/extensions/freebase/module/scripts/dialogs/extend-data-preview-dialog.js +++ b/extensions/freebase/module/scripts/dialogs/extend-data-preview-dialog.js @@ -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) diff --git a/extensions/freebase/module/scripts/dialogs/freebase-loading-dialog.js b/extensions/freebase/module/scripts/dialogs/freebase-loading-dialog.js index e8eaa918d..b81e68f11 100644 --- a/extensions/freebase/module/scripts/dialogs/freebase-loading-dialog.js +++ b/extensions/freebase/module/scripts/dialogs/freebase-loading-dialog.js @@ -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: ' + data.username + ' | Sign Out').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, diff --git a/extensions/freebase/module/scripts/dialogs/schema-alignment/dialog.js b/extensions/freebase/module/scripts/dialogs/schema-alignment/dialog.js index 210bf44be..0394591c6 100644 --- a/extensions/freebase/module/scripts/dialogs/schema-alignment/dialog.js +++ b/extensions/freebase/module/scripts/dialogs/schema-alignment/dialog.js @@ -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) { diff --git a/extensions/freebase/module/scripts/extension.js b/extensions/freebase/module/scripts/extension.js index bee6f4881..d5c9d6dd8 100644 --- a/extensions/freebase/module/scripts/extension.js +++ b/extensions/freebase/module/scripts/extension.js @@ -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) { diff --git a/extensions/gdata/module/scripts/index/gdata-source-ui.js b/extensions/gdata/module/scripts/index/gdata-source-ui.js index 5306914ca..570bce2fb 100644 --- a/extensions/gdata/module/scripts/index/gdata-source-ui.js +++ b/extensions/gdata/module/scripts/index/gdata-source-ui.js @@ -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" }), diff --git a/extensions/gdata/module/scripts/index/importing-controller.js b/extensions/gdata/module/scripts/index/importing-controller.js index ce87e5b97..ce77eb55b 100644 --- a/extensions/gdata/module/scripts/index/importing-controller.js +++ b/extensions/gdata/module/scripts/index/importing-controller.js @@ -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" diff --git a/extensions/gdata/module/scripts/project/exporters.js b/extensions/gdata/module/scripts/project/exporters.js index 00399b0be..e65c31ddc 100644 --- a/extensions/gdata/module/scripts/project/exporters.js +++ b/extensions/gdata/module/scripts/project/exporters.js @@ -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()), diff --git a/extensions/sample/build.xml b/extensions/sample/build.xml index 54e9ddc52..964b1150f 100644 --- a/extensions/sample/build.xml +++ b/extensions/sample/build.xml @@ -43,7 +43,7 @@ - + diff --git a/main/webapp/WEB-INF/butterfly.properties b/main/webapp/WEB-INF/butterfly.properties index ca73e3601..81393533c 100644 --- a/main/webapp/WEB-INF/butterfly.properties +++ b/main/webapp/WEB-INF/butterfly.properties @@ -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/ diff --git a/main/webapp/WEB-INF/web.xml b/main/webapp/WEB-INF/web.xml index d5f8a2687..4de8ff326 100644 --- a/main/webapp/WEB-INF/web.xml +++ b/main/webapp/WEB-INF/web.xml @@ -5,6 +5,8 @@ "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> + Google Refine + Google Refine Webapp diff --git a/main/webapp/modules/core/MOD-INF/controller.js b/main/webapp/modules/core/MOD-INF/controller.js index 2dc6fb61c..45177f03b 100644 --- a/main/webapp/modules/core/MOD-INF/controller.js +++ b/main/webapp/modules/core/MOD-INF/controller.js @@ -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( - ''); + ''); } context.styleInjection = styleInjection.join("\n"); @@ -596,7 +596,7 @@ function process(path, request, response) { var scriptInjection = []; for each (var qualifiedPath in scripts) { scriptInjection.push( - ''); + ''); } context.scriptInjection = scriptInjection.join("\n"); } diff --git a/main/webapp/modules/core/error.vt b/main/webapp/modules/core/error.vt index 1f9cdefb7..f885d2d83 100644 --- a/main/webapp/modules/core/error.vt +++ b/main/webapp/modules/core/error.vt @@ -38,11 +38,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Error - Google Refine - +

Something went wrong!

diff --git a/main/webapp/modules/core/index.vt b/main/webapp/modules/core/index.vt index 081e88ee5..1c343c3a7 100644 --- a/main/webapp/modules/core/index.vt +++ b/main/webapp/modules/core/index.vt @@ -59,7 +59,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/main/webapp/modules/core/scripts/dialogs/clustering-dialog.js b/main/webapp/modules/core/scripts/dialogs/clustering-dialog.js index 97f0ad4b6..c85f4249e 100644 --- a/main/webapp/modules/core/scripts/dialogs/clustering-dialog.js +++ b/main/webapp/modules/core/scripts/dialogs/clustering-dialog.js @@ -232,13 +232,13 @@ ClusteringDialog.prototype._cluster = function() { var self = this; var container = this._elmts.tableContainer.html( - '
Clustering...
' + '
Clustering...
' ); 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({ diff --git a/main/webapp/modules/core/scripts/dialogs/expression-preview-dialog.js b/main/webapp/modules/core/scripts/dialogs/expression-preview-dialog.js index 51516249a..85225a68d 100644 --- a/main/webapp/modules/core/scripts/dialogs/expression-preview-dialog.js +++ b/main/webapp/modules/core/scripts/dialogs/expression-preview-dialog.js @@ -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 $('Remove').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) }, diff --git a/main/webapp/modules/core/scripts/dialogs/scatterplot-dialog.js b/main/webapp/modules/core/scripts/dialogs/scatterplot-dialog.js index d0861688d..1d063bb56 100644 --- a/main/webapp/modules/core/scripts/dialogs/scatterplot-dialog.js +++ b/main/webapp/modules/core/scripts/dialogs/scatterplot-dialog.js @@ -78,14 +78,14 @@ ScatterplotDialog.prototype._renderMatrix = function() { var self = this; var container = this._elmts.tableContainer.html( - '
Processing...
' + '
Processing...
' ); 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 + '"', diff --git a/main/webapp/modules/core/scripts/dialogs/templating-exporter-dialog.js b/main/webapp/modules/core/scripts/dialogs/templating-exporter-dialog.js index 1727bdbbc..6e1fb9237 100644 --- a/main/webapp/modules/core/scripts/dialogs/templating-exporter-dialog.js +++ b/main/webapp/modules/core/scripts/dialogs/templating-exporter-dialog.js @@ -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) { diff --git a/main/webapp/modules/core/scripts/facets/list-facet.js b/main/webapp/modules/core/scripts/facets/list-facet.js index 0ba90db13..38656b57e 100644 --- a/main/webapp/modules/core/scripts/facets/list-facet.js +++ b/main/webapp/modules/core/scripts/facets/list-facet.js @@ -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 diff --git a/main/webapp/modules/core/scripts/facets/scatterplot-facet.js b/main/webapp/modules/core/scripts/facets/scatterplot-facet.js index 0c58a7dfa..2c1b2e8e4 100644 --- a/main/webapp/modules/core/scripts/facets/scatterplot-facet.js +++ b/main/webapp/modules/core/scripts/facets/scatterplot-facet.js @@ -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) { diff --git a/main/webapp/modules/core/scripts/index.js b/main/webapp/modules/core/scripts/index.js index 6e1a93f77..2dc7bda58 100644 --- a/main/webapp/modules/core/scripts/index.js +++ b/main/webapp/modules/core/scripts/index.js @@ -70,7 +70,7 @@ $(function() { var showVersion = function() { $.getJSON( - "/command/core/get-version", + "command/core/get-version", null, function(data) { GoogleRefineVersion = data; diff --git a/main/webapp/modules/core/scripts/index/create-project-ui.js b/main/webapp/modules/core/scripts/index/create-project-ui.js index 9ecc75e4a..6a9fa915a 100644 --- a/main/webapp/modules/core/scripts/index/create-project-ui.js +++ b/main/webapp/modules/core/scripts/index/create-project-ui.js @@ -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 })); }; diff --git a/main/webapp/modules/core/scripts/index/default-importing-controller/controller.js b/main/webapp/modules/core/scripts/index/default-importing-controller/controller.js index 5e69d5e6a..6d3b964fe 100644 --- a/main/webapp/modules/core/scripts/index/default-importing-controller/controller.js +++ b/main/webapp/modules/core/scripts/index/default-importing-controller/controller.js @@ -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" diff --git a/main/webapp/modules/core/scripts/index/default-importing-controller/file-selection-panel.js b/main/webapp/modules/core/scripts/index/default-importing-controller/file-selection-panel.js index 0b8fe5a37..e1871da69 100644 --- a/main/webapp/modules/core/scripts/index/default-importing-controller/file-selection-panel.js +++ b/main/webapp/modules/core/scripts/index/default-importing-controller/file-selection-panel.js @@ -316,7 +316,7 @@ Refine.DefaultImportingController.prototype._commitFileSelection = function() { 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": "update-file-selection" diff --git a/main/webapp/modules/core/scripts/index/import-project-ui.html b/main/webapp/modules/core/scripts/index/import-project-ui.html index 2659bb2ed..f563620d7 100644 --- a/main/webapp/modules/core/scripts/index/import-project-ui.html +++ b/main/webapp/modules/core/scripts/index/import-project-ui.html @@ -1,4 +1,4 @@ -
+
diff --git a/main/webapp/modules/core/scripts/index/open-project-ui.js b/main/webapp/modules/core/scripts/index/open-project-ui.js index 598e84db2..5d1be04c9 100644 --- a/main/webapp/modules/core/scripts/index/open-project-ui.js +++ b/main/webapp/modules/core/scripts/index/open-project-ui.js @@ -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("") + .html("") .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 = $('') .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, diff --git a/main/webapp/modules/core/scripts/preferences.js b/main/webapp/modules/core/scripts/preferences.js index c26301e8d..dd5ef742f 100644 --- a/main/webapp/modules/core/scripts/preferences.js +++ b/main/webapp/modules/core/scripts/preferences.js @@ -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) { $('
Locate an existing Google Refine project file (.tar or .tar.gz):
' + '' + - '' + + '' + '' ); menuItem.mouseenter(function() { @@ -289,4 +289,4 @@ MenuSystem.insertAfter = function(rootItems, path, what) { Array.prototype.splice.apply(menuItems, spliceArgs); } -}; \ No newline at end of file +}; diff --git a/main/webapp/modules/core/scripts/util/sign.js b/main/webapp/modules/core/scripts/util/sign.js index 58fd32d1b..eb6c77214 100644 --- a/main/webapp/modules/core/scripts/util/sign.js +++ b/main/webapp/modules/core/scripts/util/sign.js @@ -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(); diff --git a/main/webapp/modules/core/styles/common.less b/main/webapp/modules/core/styles/common.less index 4c3a7922b..a0794af11 100644 --- a/main/webapp/modules/core/styles/common.less +++ b/main/webapp/modules/core/styles/common.less @@ -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; } diff --git a/main/webapp/modules/core/styles/project/sidebar.less b/main/webapp/modules/core/styles/project/sidebar.less index 1019e7cce..5b03ca79a 100644 --- a/main/webapp/modules/core/styles/project/sidebar.less +++ b/main/webapp/modules/core/styles/project/sidebar.less @@ -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 {