TagSpaces is an offline, open source, document manager with tagging support
adding duplicate file functionality
Ilian3cf46c75f46c
diff --git a/data/js/fileopener.js b/data/js/fileopener.jsindex 21cb4213e..0e9e1ae88 100644--- a/data/js/fileopener.js+++ b/data/js/fileopener.js@@ -104,8 +104,17 @@$( "#renameFile" ).click( function() {TSCORE.showFileRenameDialog(_openedFilePath);- });-+ });++ $( "#duplicateFile" )+ .click( function() {+ var currentDateTime = TSCORE.TagUtils.formatDateTime4Tag(new Date(), true);+ var fileNameWithOutExt = TSCORE.TagUtils.extractFileNameWithoutExt(_openedFilePath);+ var fileExt = TSCORE.TagUtils.extractFileExtension(_openedFilePath);+ var newFilePath = TSCORE.currentPath+TSCORE.dirSeparator+fileNameWithOutExt+"_"+currentDateTime+"."+fileExt;+ TSCORE.IO.copyFile(_openedFilePath,newFilePath);+ });+$( "#toggleFullWidthButton" ).click(function() {TSCORE.toggleFullWidth();