@@ -149,6 +149,7 @@ seamsApp.controller('seamsController', ['$scope', '$route', '$routeParams', '$lo
149
149
150
150
$scope . $root . fetchRemoteFile = function ( fileUrl ) {
151
151
if ( fileUrl ) {
152
+ $scope . $root . reUpload = true ;
152
153
$ ( '#remoteFileError' ) . html ( "" ) ;
153
154
$scope . $root . fetchingRemoteFile = true ;
154
155
$http . post ( "/fetch" , { "url" :fileUrl } , { json : true } )
@@ -159,8 +160,9 @@ seamsApp.controller('seamsController', ['$scope', '$route', '$routeParams', '$lo
159
160
for ( var i in data . fields ) {
160
161
data . fields [ i ] . safename = data . fields [ i ] . name . toLowerCase ( ) . replace ( / \W / g, "_" ) ;
161
162
}
162
- $scope . $root . currentStatus = "uploaded" ;
163
+ $scope . $root . currentStatus = "uploaded" ;
163
164
$scope . $root . schema = data ;
165
+ $scope . $root . fetchingRemoteFile = false ;
164
166
$scope . $root . goToNextPage ( "import" ) ;
165
167
}
166
168
else {
@@ -177,6 +179,7 @@ seamsApp.controller('seamsController', ['$scope', '$route', '$routeParams', '$lo
177
179
} ;
178
180
179
181
$scope . $root . fileUploaded = function ( ) {
182
+ $scope . $root . reUpload = true ;
180
183
$ ( '#fileuploadcontrol' ) . hide ( ) ;
181
184
$ ( '#uploadform' ) . ajaxForm ( {
182
185
beforeSend : function ( ) {
@@ -211,6 +214,7 @@ seamsApp.controller('seamsController', ['$scope', '$route', '$routeParams', '$lo
211
214
// the actual import process
212
215
$scope . $root . importClicked = function ( ) {
213
216
console . log ( "IMPORT" ) ;
217
+ $scope . $root . reUpload = false ;
214
218
$ ( '#importbutton' ) . attr ( 'disabled' , true ) ;
215
219
$ ( '#backbutton' ) . attr ( 'disabled' , true ) ;
216
220
$ ( '.import-spinner' ) . css ( 'display' , 'inline-block' ) ;
0 commit comments