Browse Source

move updateIndicator text into StatusBar module

experimental
Paweł Jedwabny 4 years ago
parent
commit
81cd2ef486
2 changed files with 5 additions and 7 deletions
  1. +1
    -5
      src/epesi.js
  2. +4
    -2
      src/statusBar.js

+ 1
- 5
src/epesi.js View File

@@ -18,8 +18,6 @@ class Epesi {
procOn = 0;
client_id = 0;
process_file = 'process.php';
indicator = 'Base_StatusBar';
indicator_text = 'statusbar_text';
statusBar = new StatusBar();
message = null;

@@ -65,9 +63,7 @@ class Epesi {
};
};

updateIndicatorText = (text) => {
if(this.indicator_text) document.getElementById(this.indicator_text).innerHTML = text;
};
updateIndicatorText = text => this.statusBar.setIndicatorText(text);

history_add = (id) => {
window.history.pushState({history_id: id}, '');


+ 4
- 2
src/statusBar.js View File

@@ -19,8 +19,10 @@ class StatusBar {

showMessage = (message) => {
document.getElementById('dismiss').style.display = '';
document.getElementById(this.indicator_text).innerHTML = message;
}
this.setIndicatorText(message);
};

setIndicatorText = text => document.getElementById(this.indicator_text).innerHTML = text;
}

export default StatusBar

Loading…
Cancel
Save