mirror of
https://github.com/wekan/wekan.git
synced 2026-01-06 09:38:49 +01:00
Attachment rename now without filename extension
This commit is contained in:
parent
26e1c1dc4a
commit
11f8b17a05
2 changed files with 7 additions and 3 deletions
|
|
@ -161,6 +161,10 @@ BlazeComponent.extendComponent({
|
|||
}).register('attachmentActionsPopup');
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
getNameWithoutExtension() {
|
||||
const ret = this.data().name.replace(new RegExp("\." + this.data().extension + "$"), "");
|
||||
return ret;
|
||||
},
|
||||
events() {
|
||||
return [
|
||||
{
|
||||
|
|
@ -175,9 +179,9 @@ BlazeComponent.extendComponent({
|
|||
event.preventDefault();
|
||||
const name = this.$('.js-edit-attachment-name')[0]
|
||||
.value
|
||||
.trim();
|
||||
.trim() + this.data().extensionWithDot;
|
||||
Meteor.call('renameAttachment', this.data()._id, name);
|
||||
Popup.back();
|
||||
Popup.back(2);
|
||||
},
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue