Browse Source

make portalswitcher a feature

modals-to-spa
stingl 4 years ago
parent
commit
19be274ab3
  1. 8
      index.html
  2. 10
      js/app.js

8
index.html

@ -421,7 +421,7 @@ @@ -421,7 +421,7 @@
</label>
</div>
<br/>
<div class="form-group">
<div class="form-group" v-if="experimental.portalSwitcher">
<label>
<input type="checkbox" class="form-control-checkbox" v-model="publicDB">
Bei Portalumstellungen auf Standard-DB wechseln?
@ -442,7 +442,7 @@ @@ -442,7 +442,7 @@
</select>
</div>
<br/>
<div class="form-group">
<div class="form-group" v-if="experimental.portalSwitcher">
<label>Portalnamen <a class="text-muted" href="https://settings.vemap.docker/?fetchPortals" target="_blank">(Import-String hier)</a></label>
<input v-model="importStringForPortals" class="form-control"/>
<a href="javascript:" @click="importPortalsJson" class="btn" v-if="this.importStringForPortals !== ''">Import</a>
@ -553,7 +553,7 @@ @@ -553,7 +553,7 @@
<!-- Switcher Modal -->
<div class="modal fade" id="switcherModal" tabindex="-1" role="dialog" aria-labelledby="switcherModalLabel"
aria-hidden="true">
aria-hidden="true" v-if="experimental.portalSwitcher">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
@ -628,7 +628,7 @@ @@ -628,7 +628,7 @@
<i class="fas fa-archive"></i>
</a>
</div>
<div class="col">
<div class="col" v-if="experimental.portalSwitcher">
<a type="button"
class="btn btn-warning text-light bottom-menu-item"
data-toggle="modal"

10
js/app.js

@ -4,7 +4,8 @@ const TimeTrack = { @@ -4,7 +4,8 @@ const TimeTrack = {
experimental: {
trackWorktime: false,
boardView: false,
snippetSpace: false
snippetSpace: false,
portalSwitcher: true
},
view: 'board',
theme: 'materia',
@ -272,11 +273,18 @@ const TimeTrack = { @@ -272,11 +273,18 @@ const TimeTrack = {
},
deleteTicket(index, archive = false) {
if (archive) {
let name = this.archive[index].number;
this.archive.splice(index, 1);
} else {
let name = this.tickets[index].number;
this.tickets.splice(index, 1);
}
iziToast.show({
message: 'Ticket "' + name + '" wurde gelöscht',
color: 'blue'
});
this.updateStorage();
},
archiveTicket(index) {