Skip to content

Commit 8199b06

Browse files
committed
#42 - allow re-upload before importing
1 parent 39ceee4 commit 8199b06

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

public/js/seams.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ seamsApp.controller('seamsController', ['$scope', '$route', '$routeParams', '$lo
212212
$scope.$root.importClicked = function() {
213213
console.log("IMPORT");
214214
$('#importbutton').attr('disabled',true);
215+
$('#backbutton').attr('disabled',true);
215216
$('.import-spinner').css('display','inline-block');
216217
var fields = [ ];
217218
for(var i in $scope.$root.currentUpload.fields) {

views/templates/import.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ <h1 class="type_heading"><mark class="type_mark">Create the Search Index</mark><
3838
<div class="button_group">
3939
<div class="type_copy" id="facetstatus">Select a field to facet before importing</div>
4040
<button id="importbutton" type="submit" class="button_primary" ng-click="importClicked()"> Import </button>
41+
<button id="backbutton" type="button" class="button_secondary" ng-click="goToNextPage('upload')">Back</button>
4142
<!-- <span class="glyphicon glyphicon-refresh glyphicon-spinner import-spinner"></span> -->
4243
<div class="type_copy" id="importstatus"></div>
4344
</div>

views/templates/upload.html

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,7 @@ <h1 class="type_heading"><mark class="type_mark">Upload Data</mark></h1>
55

66
<section class="layout_section theme_dark">
77

8-
<div ng-show="currentStatus == 'imported'" class="alert alert-success">
9-
<p class="type_copy">Your data was uploaded and imported successfully.</p>
10-
</div>
11-
12-
<div ng-show="currentStatus == 'uploaded'" class="alert alert-success">
13-
<p class="type_copy">Your data was uploaded successfully.</p>
14-
</div>
15-
16-
<div ng-show="!currentStatus || currentStatus == 'new'">
8+
<div ng-show="!currentStatus || currentStatus == 'new' || reUpload">
179
<!--
1810
<form id="uploadform" action="/upload" method="post" enctype="multipart/form-data">
1911
<fieldset class="form_field">
@@ -58,8 +50,19 @@ <h1 class="type_heading"><mark class="type_mark">Upload Data</mark></h1>
5850
</div>
5951
</div>
6052

53+
<div ng-show="currentStatus == 'imported'" class="alert alert-success">
54+
<p class="type_copy">Your data was uploaded and imported successfully.</p>
55+
</div>
56+
57+
<div ng-show="currentStatus == 'uploaded'" class="alert alert-success">
58+
<p class="type_copy">Your{{ reUpload ? ' previous ' : ' ' }}data was uploaded successfully.</p>
59+
</div>
60+
6161
<div class="button_group" ng-show="currentStatus && currentStatus != 'new'">
6262
<button type="button" class="button_primary" ng-click="goToNextPage('import')"> Continue </button>
63+
<button ng-show="currentStatus == 'uploaded' && !reUpload" class="button_secondary"
64+
type="button" ng-click="reUpload = true;">
65+
Re-upload </button>
6366
</div>
6467

6568
</section>

0 commit comments

Comments
 (0)