mirror of
https://github.com/wekan/wekan.git
synced 2026-03-10 15:42:34 +01:00
add option to get asked whether unsaved card descriptions should be saved to db on e.g. unintentional click out of card details pane
This commit is contained in:
parent
b00169d24f
commit
b3056626f3
7 changed files with 65 additions and 19 deletions
|
|
@ -180,6 +180,13 @@ template(name="changeSettingsPopup")
|
|||
option(selected="true", value="#{day.value}") #{day.name}
|
||||
else
|
||||
option(value="#{day.value}") #{day.name}
|
||||
label.bold.clear
|
||||
{{_ 'card-settings'}}
|
||||
ul#cards.card-description-rescued
|
||||
a.flex.js-rescue-card-description(title="{{_ 'rescue-card-description'}}")
|
||||
b
|
||||
#rescue-card-description.materialCheckBox.left(class="{{#if rescueCardDescription}}is-checked{{/if}}", value=rescueCardDescription)
|
||||
span {{_ 'rescue-card-description'}}
|
||||
input.js-apply-user-settings.left(type="submit" value="{{_ 'apply'}}")
|
||||
|
||||
template(name="userDeletePopup")
|
||||
|
|
|
|||
|
|
@ -297,6 +297,16 @@ Template.changeSettingsPopup.helpers({
|
|||
return false;
|
||||
}
|
||||
},
|
||||
rescueCardDescription() {
|
||||
currentUser = Meteor.user();
|
||||
if (currentUser) {
|
||||
return (currentUser.profile || {}).rescueCardDescription;
|
||||
} else if (window.localStorage.getItem('rescueCardDescription')) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
showCardsCountAt() {
|
||||
currentUser = Meteor.user();
|
||||
if (currentUser) {
|
||||
|
|
@ -356,6 +366,9 @@ Template.changeSettingsPopup.events({
|
|||
window.localStorage.setItem('hasHiddenSystemMessages', 'true');
|
||||
}
|
||||
},
|
||||
'click .js-rescue-card-description'() {
|
||||
Meteor.call('toggleRescueCardDescription')
|
||||
},
|
||||
'click .js-apply-user-settings'(event, templateInstance) {
|
||||
event.preventDefault();
|
||||
let minLimit = parseInt(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue