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 @@
<content url="file://$MODULE_DIR$" /> <content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="izitoast" level="application" />
</component> </component>
</module> </module>

1
css/app.css

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