mozilla / wptview

Webapp for displaying the results of web-platform-tests
BSD 3-Clause "New" or "Revised" License
14 stars 18 forks source link

Clears upload file target after import #126

Closed nihal111 closed 8 years ago

nihal111 commented 8 years ago

Importing a file and then clearing it does not allow importing the already selected file again. This fixes that issue by clearing target for "Upload File" after import is made from a file. @martiansideofthemoon


This change is Reviewable

martiansideofthemoon commented 8 years ago

@nihal111 please make Travis pass. There is a trailing spaces error

martiansideofthemoon commented 8 years ago

Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion, some commit checks failed.


_angular_scripts.js, line 329 [r1] (raw file):_

      $scope.uploadFile();
      // Clears target for "Upload File" after import is complete. 
      $scope.fileEvent.target.value = null;

This is wrong. If you look at $scope.uploadFile(), it has a promise at the end. As promises are asynchronous, this line will be executed while the file is being ingested. Please add this inside the final then block in $scope.uploadFile().

Also fix the lint error


Comments from Reviewable

martiansideofthemoon commented 8 years ago

Reviewed 1 of 1 files at r1. Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks failed.


Comments from Reviewable

martiansideofthemoon commented 8 years ago

Reviewed 1 of 1 files at r2. Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable