Browse Source

Refactor WIP

modals-to-spa
stingl 4 years ago
parent
commit
b66b98edb0
  1. 1
      .idea/timetrack.iml
  2. 1
      css/app.css
  3. 924
      index.html
  4. 14
      js/app.js

1
.idea/timetrack.iml

@ -4,5 +4,6 @@ @@ -4,5 +4,6 @@
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="izitoast" level="application" />
</component>
</module>

1
css/app.css

@ -1,5 +1,4 @@ @@ -1,5 +1,4 @@
body {
background-color: #e7e7e7;
overflow-y: auto;
}

924
index.html

File diff suppressed because it is too large Load Diff

14
js/app.js

@ -7,7 +7,8 @@ const TimeTrack = { @@ -7,7 +7,8 @@ const TimeTrack = {
snippetSpace: false,
portalSwitcher: true
},
view: 'board',
view: 'trackers',
showHistory: false,
theme: 'materia',
themes: null,
dashboardLogo: 'assets/img/logo.png',
@ -348,7 +349,8 @@ const TimeTrack = { @@ -348,7 +349,8 @@ const TimeTrack = {
iziToast.show({
message: message,
color: 'blue'
color: 'blue',
position: 'topCenter'
});
this.updateStorage();
@ -358,11 +360,18 @@ const TimeTrack = { @@ -358,11 +360,18 @@ const TimeTrack = {
this.stopActiveTracker();
}
iziToast.show({
title: 'Tracker archiviert',
color: 'green',
position: 'topCenter'
});
this.archive.push(this.tickets[index]);
this.tickets.splice(index, 1);
this.updateStorage();
},
reactivateTicket(index) {
this.view = 'trackers';
this.tickets.push(this.archive[index]);
this.archive.splice(index, 1);
this.updateStorage();
@ -443,6 +452,7 @@ const TimeTrack = { @@ -443,6 +452,7 @@ const TimeTrack = {
},
showHistoryForTracker(ticket) {
this.selectedTracker = ticket;
this.showHistory = true;
this.$forceUpdate();
setTimeout(() => {
let historyModal = new bootstrap.Modal(document.getElementById('historyModal'));