Skip to content

Commit

Permalink
Multiple Changes:
Browse files Browse the repository at this point in the history
*Bug fixes on resize if on data import view. (refs #130)
*General styling fixes. (refs #19)
  • Loading branch information
doomsayer2 committed Jan 25, 2018
1 parent 56c082d commit a89ff49
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 9 deletions.
4 changes: 3 additions & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ export class App implements MAppViews {
$(window).resize(function () {
clearTimeout(id);
id = setTimeout(function () {
events.fire(AppConstants.EVENT_RESIZE_WINDOW);
if(!$('.dataVizView').hasClass('invisibleClass')) {
events.fire(AppConstants.EVENT_RESIZE_WINDOW);
}
}, 300);
});
}
Expand Down
14 changes: 7 additions & 7 deletions src/data_import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class DataImport implements MAppViews {
<div class='input-group'>
<span class='input-group-btn' style='padding-right: 2px;'>
<span class='btn btn-default btn-file'>
Load CSV file...
Select CSV file...
<input type='file' id='files' accept='.csv' required />
</span>
</span>
Expand All @@ -97,10 +97,10 @@ class DataImport implements MAppViews {
// Add the display conatiner and the logs
d3.select('.fileContainer').append('div').classed('additionalInfo', true);
this.$displayContainer = d3.select('.additionalInfo').html(`
<div class='logContainer'>
<div id='errorLog'></div>
<div id='messageLog'></div>
</div>
<!--<div class='logContainer'>-->
<!--<div id='errorLog'></div>-->
<!--<div id='messageLog'></div>-->
<!--</div>-->
<div class='row'>
<div class='ctrlContainer'>
<h3 id='valueListName'></h3>
Expand Down Expand Up @@ -159,11 +159,11 @@ class DataImport implements MAppViews {
* Attach the event listeners
*/
private attachListener() {
//Listener for the upload button
// Listener for the upload button
this.$node.select('#submitFile')
.on('click', (e) => {
SimpleLogging.log('import submit button','');
//Clear the log first
// Clear the log first
d3.select('#errorLog').selectAll('*').remove();
d3.select('#messageLog').html('');

Expand Down
1 change: 0 additions & 1 deletion src/sankey_diagram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ class SankeyDiagram implements MAppViews {

// Listen for resize of the window
events.on(AppConstants.EVENT_RESIZE_WINDOW, () => {
console.log('!!!!: ', AppConstants.EVENT_RESIZE_WINDOW);
SimpleLogging.log('resize window', '');
this.resize();
});
Expand Down
15 changes: 15 additions & 0 deletions src/styles/_data_imports.scss
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,21 @@
.btn-file {
position: relative;
overflow: hidden;
background:
/* On "top" */
repeating-linear-gradient(
45deg,
transparent,
transparent 10px,
#fbfbfb 10px,
#fbfbfb 20px
),
/* on "bottom" */
linear-gradient(
to bottom,
#fbfbfb,
#dfdfdf
);
}

.btn-file input[type=file] {
Expand Down

0 comments on commit a89ff49

Please sign in to comment.