mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Fix some bugs introduced in aa974aa
Yes Wekan need some tests. Yes I need to stop refactoring my code when I’m halp-sleeping in my bed at 4am.
This commit is contained in:
parent
e92f67f191
commit
dd3cdf3945
4 changed files with 8 additions and 6 deletions
|
|
@ -186,7 +186,8 @@ BlazeComponent.extendComponent({
|
||||||
return [{
|
return [{
|
||||||
submit(evt) {
|
submit(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
const title = this.find('.list-name-input').value.trim();
|
const titleInput = this.find('.list-name-input');
|
||||||
|
const title = titleInput.value.trim();
|
||||||
if (title) {
|
if (title) {
|
||||||
Lists.insert({
|
Lists.insert({
|
||||||
title,
|
title,
|
||||||
|
|
@ -194,7 +195,8 @@ BlazeComponent.extendComponent({
|
||||||
sort: $('.list').length,
|
sort: $('.list').length,
|
||||||
});
|
});
|
||||||
|
|
||||||
title.value = '';
|
titleInput.value = '';
|
||||||
|
titleInput.focus();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}];
|
}];
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ BlazeComponent.extendComponent({
|
||||||
|
|
||||||
editTitle(evt) {
|
editTitle(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
const newTitle = this.childrenComponents('inlinedForm')[0].getValue();
|
const newTitle = this.childrenComponents('inlinedForm')[0].getValue().trim();
|
||||||
const list = this.currentData().trim();
|
const list = this.currentData();
|
||||||
if (newTitle) {
|
if (newTitle) {
|
||||||
list.rename(newTitle.trim());
|
list.rename(newTitle.trim());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ Template.changePasswordPopup.onRendered(function() {
|
||||||
|
|
||||||
Template.changeLanguagePopup.helpers({
|
Template.changeLanguagePopup.helpers({
|
||||||
languages() {
|
languages() {
|
||||||
return TAPi18n.getLanguages().map((lang, tag) => {
|
return _.map(TAPi18n.getLanguages(), (lang, tag) => {
|
||||||
const name = lang.name;
|
const name = lang.name;
|
||||||
return { tag, name };
|
return { tag, name };
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ window.Modal = new class {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
open(modalName, { onCloseGoTo = ''}) {
|
open(modalName, { onCloseGoTo = ''} = {}) {
|
||||||
this._currentModal.set(modalName);
|
this._currentModal.set(modalName);
|
||||||
this._onCloseGoTo = onCloseGoTo;
|
this._onCloseGoTo = onCloseGoTo;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue