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

10
js/app.js

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