Always rename attachment title when using Rename File from Parent Metadata
This commit is contained in:
parent
2a3b5593b7
commit
6059bf0e1b
1 changed files with 2 additions and 7 deletions
|
@ -3046,9 +3046,6 @@ var ZoteroPane = new function()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the attachment title was the same as the filename, change it too
|
|
||||||
var renameTitle = item.getField('title') == file.leafName;
|
|
||||||
|
|
||||||
var parentItemID = item.getSource();
|
var parentItemID = item.getSource();
|
||||||
var newName = Zotero.Attachments.getFileBaseNameFromItem(parentItemID);
|
var newName = Zotero.Attachments.getFileBaseNameFromItem(parentItemID);
|
||||||
|
|
||||||
|
@ -3063,11 +3060,9 @@ var ZoteroPane = new function()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (renameTitle) {
|
|
||||||
item.setField('title', newName);
|
item.setField('title', newName);
|
||||||
item.save();
|
item.save();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue