Skip to content

Commit

Permalink
some UI stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Geraldine GEOFFROY authored and Geraldine GEOFFROY committed Oct 7, 2019
1 parent aee2dcb commit e03340b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
Binary file modified assets/img/example.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 8 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,28 @@
<span class="uk-margin-small-right" uk-icon="push"></span>
Importer un fichier</button>
</p>
<!--<div class="uk-card-footer"></div>-->
<p class="uk-text-success uk-text-meta uk-text-center uk-text-break" id="selectedFile"></p>
</div>
<div class="uk-card uk-card-hover uk-card-default uk-card-body">
<div class="uk-column-1-2">
<div class="uk-margin">
<div class="uk-form-label">Dans quelle colonne se trouve l'identifiant pivot (isbn, issn, ppn) ?</div>
<div class="uk-form-label uk-text-bold">Dans quelle colonne se trouve l'identifiant pivot (isbn, issn, ppn) ?</div>
<hr class="uk-divider-small">
<div class="uk-form-controls" id="checkboxIdResult">

</div>
</div>

<div class="uk-margin">
<div class="uk-form-label">Quelles colonnes voulez-vous garder en sortie ?</div>
<div class="uk-form-label uk-text-bold">Quelles colonnes voulez-vous garder en sortie ?</div>
<hr class="uk-divider-small">
<div class="uk-form-controls"id="checkboxColumnsResult">

</div>
</div>
</div>
<div class="uk-margin">
<label class="uk-form-label" for="form-stacked-text">Donnez un en-tête à la colonne supplémentaire de résultats</label>
<label class="uk-form-label uk-text-bold" for="form-stacked-text">Donnez un en-tête à la colonne supplémentaire de résultats</label>
<div class="uk-form-controls">
<input class="uk-input uk-form-success" id="columnResultName" type="text">
</div>
Expand All @@ -69,6 +72,7 @@
<div class="uk-form-controls">
<button class="uk-button uk-button-text" id="chooseResultFolderPath">Choisir un dossier de destination pour le fichier de résultat (output.csv)</button>
<input type="hidden" id="resultFolderPath">
<p class="uk-text-success uk-text-meta uk-text-center uk-text-break" id="selectedFolderPath"></p>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "electron-packager . --overwrite --platform=win32 --arch=ia32 --icon=assets/icons/win/icon.ico --prune=true --out=dist --version-string.ProductName=\"SudocToolkit\""
},
"license": "MIT",
"repository": "github:gegedenice/SudocToolkit",
"repository": "github:abes-esr/SudocToolkit",
"devDependencies": {
"asar": "^2.0.1",
"electron": "^5.0.6",
Expand Down
6 changes: 4 additions & 2 deletions renderer-process/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var columnResultName;

$('#options').change(function(){
//first init variables
$("#checkboxIdResult").empty();$("#checkboxColumnsResult").empty();$('#columnResultName').val('');$('#chartContainer').empty();$('#fileResult').empty();$('#resultFolderPath').empty();
$("#selectedFile").empty();$("#selectedFolderPath").empty();$("#checkboxIdResult").empty();$("#checkboxColumnsResult").empty();$('#columnResultName').val('');$('#chartContainer').empty();$('#fileResult').empty();$('#resultFolderPath').empty();
selectedOption = $(this).val();
})

Expand All @@ -35,13 +35,14 @@ $( "#openSourceFile" ).click(function() {
]},function (fileNames) {
if (fileNames === undefined) return;
fileName = fileNames[0];
$("#selectedFile").append(fileName)
fs.createReadStream(fileName)
.pipe(parse({delimiter: ';',trim: true,from_line:1,to_line:1}))
.on('error', function (error) {
dialog.showMessageBox(null,{message: error});
})
.on('data', function(csvrow) {
return csvrow.map(function(key){
return csvrow.map(function(key){
$("#checkboxIdResult").append("<label><input class='idChoice uk-checkbox' value='" + key + "' type='checkbox' /> "+key+"</label><br>")
$("#checkboxColumnsResult").append("<label><input class='columnsChoice uk-checkbox' value='" + key + "' type='checkbox' /> "+key+"</label><br>")
})
Expand All @@ -66,6 +67,7 @@ $("#chooseResultFolderPath").click(function(){
return;
}else{
$("#resultFolderPath").val(path.join(folderPaths[0],fileResult));
$("#selectedFolderPath").append(path.join(folderPaths[0],fileResult))
console.log(path.join(folderPaths[0],fileResult))
}
})
Expand Down

0 comments on commit e03340b

Please sign in to comment.