Skip to content

Commit

Permalink
Rename import method to importFile
Browse files Browse the repository at this point in the history
  • Loading branch information
jcornet committed May 17, 2015
1 parent c066015 commit 9ad155d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Widget.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ <h4 class="title">${nls.importTitle}</h4>
<div class="draw-import list-draw-actions">
<input class="file" value="" type="file" data-dojo-attach-point="importFile" />
<a data-dojo-attach-point="importButton" data-dojo-attach-event="ondijitclick:import"><span class="import blue-button"></span></a>
<input class="file" value="" type="file" data-dojo-attach-point="importFileInput" />
<a data-dojo-attach-point="importButton" data-dojo-attach-event="ondijitclick:importFile"><span class="import blue-button"></span></a>
</div>
</td></tr>
</table>
Expand Down
5 changes: 3 additions & 2 deletions Widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -617,13 +617,13 @@ define([


///////////////////////// IMPORT/EXPORT METHODS ///////////////////////////////////////////////////////////
import : function () {
importFile : function () {
if (!window.FileReader) {
this.showMessage(this.nls.importErrorMessageNavigator, 'error');
return false;
}

var input = this.importFile.files[0];
var input = this.importFileInput.files[0];

if (!input) {
this.showMessage(this.nls.importErrorWarningSelectFile, 'warning');
Expand Down Expand Up @@ -712,6 +712,7 @@ define([
var content = evt.target.result;
this.importJsonContent(content);
this.importFile.files[0] = "";
this.importFileInput.files[0] = "";
},

export : function () {
Expand Down

0 comments on commit 9ad155d

Please sign in to comment.