diff --git a/main/webapp/modules/core/langs/translation-en.json b/main/webapp/modules/core/langs/translation-en.json index d73c10215..666663771 100644 --- a/main/webapp/modules/core/langs/translation-en.json +++ b/main/webapp/modules/core/langs/translation-en.json @@ -82,6 +82,7 @@ "core-index-import/parse-as": "Parse data as", "core-index-import/this-computer": "This Computer", "core-index-import/warning-data-file": "You must specify a data file to import.", + "core-index-import/warning-import-file": "You must specify a project file.", "core-index-import/uploading-data": "Uploading data…", "core-index-import/web-address": "Web Addresses (URLs)", "core-index-import/warning-web-address": "You must specify a valid web address (URL) to import.", 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 0e67dbfa6..bbe0e3655 100644 --- a/main/webapp/modules/core/scripts/index/import-project-ui.html +++ b/main/webapp/modules/core/scripts/index/import-project-ui.html @@ -3,15 +3,15 @@ - - + + - + - + diff --git a/main/webapp/modules/core/scripts/index/import-project-ui.js b/main/webapp/modules/core/scripts/index/import-project-ui.js index 30819980b..44bad91c9 100644 --- a/main/webapp/modules/core/scripts/index/import-project-ui.js +++ b/main/webapp/modules/core/scripts/index/import-project-ui.js @@ -40,7 +40,15 @@ Refine.ImportProjectUI = function(elmt) { this._elmt = elmt; this._elmts = DOM.bind(elmt); - + this._elmts.projectButton.bind('click', function(e) { + if(document.getElementById("project-tar-file-input").value === "" ){ + alert($.i18n('core-index-import/warning-import-file')); + } + else{ + document.getElementById("import-project-button").type = "submit"; + } + }); + $('#or-import-locate').text($.i18n('core-index-import/locate')); $('#or-import-file').text($.i18n('core-index-import/file')); $('#or-import-rename').text($.i18n('core-index-import/rename')); @@ -54,5 +62,5 @@ Refine.actionAreas.push({ }); Refine.ImportProjectUI.prototype.resize = function() { - + };