diff --git a/arches/app/media/js/views/components/etl_modules/base-bulk-string-editor.js b/arches/app/media/js/views/components/etl_modules/base-bulk-string-editor.js index 2bd6764e97c..1e4e00f0742 100644 --- a/arches/app/media/js/views/components/etl_modules/base-bulk-string-editor.js +++ b/arches/app/media/js/views/components/etl_modules/base-bulk-string-editor.js @@ -33,6 +33,7 @@ define([ this.alert = params.alert; this.moduleId = params.etlmoduleid; this.loading(true); + this.previewing = ko.observable(); this.languages = ko.observable(arches.languages); this.selectedLanguage = ko.observable(); this.graphs = ko.observable(); @@ -83,6 +84,7 @@ define([ this.ready = ko.computed(() => { const ready = !!self.selectedGraph() && !!self.selectedNode() && + !self.previewing() && ((self.operation() == 'replace' && !!self.oldText() && !!self.newText() || self.operation() != 'replace')); return ready; }); @@ -147,6 +149,11 @@ define([ if (!self.ready()) { return; } + + self.previewing(true); + self.showPreview(false); + self.previewValue([]); + if (self.operation() === 'replace' && (!self.oldText() || !self.newText())){ self.alert( new AlertViewModel( @@ -169,6 +176,7 @@ define([ }).fail(function(err) { console.log(err); }).always(function() { + self.previewing(false); self.deleteAllFormData(); }); }; @@ -194,7 +202,6 @@ define([ self.loading(true); self.submit('write').then(data => { params.activeTab("import"); - console.log(data.result); }).fail( function(err) { self.alert( new JsonErrorAlertViewModel( diff --git a/arches/app/templates/views/components/etl_modules/base-bulk-string-editor.htm b/arches/app/templates/views/components/etl_modules/base-bulk-string-editor.htm index 8265a1c0c93..07ecd3ea67b 100644 --- a/arches/app/templates/views/components/etl_modules/base-bulk-string-editor.htm +++ b/arches/app/templates/views/components/etl_modules/base-bulk-string-editor.htm @@ -128,6 +128,7 @@