Skip to content

TagSpaces is an offline, open source, document manager with tagging support

making editing file title inplace

uggrock7bb4608f5dba
diff --git a/data/index.html b/data/index.html
index 90b29e9cd..b00c3846e 100644
--- a/data/index.html
+++ b/data/index.html
@@ -308,7 +308,7 @@
<div class="flexMaxWidth">
<a id="fileTitle"></a>
</div>
- <button class="btn btn-link" data-i18n="[title]ns.common:closeFileTooltip;" id="closeOpenedFile" style="margin-top: -8px;">
+ <button class="btn btn-link" data-i18n="[title]ns.common:closeFileTooltip;" id="closeOpenedFile">
&nbsp;<i class="fa fa-times fa-lg"></i>&nbsp;
</button>
</div>
diff --git a/data/js/fileopener.js b/data/js/fileopener.js
index 30ce97ed2..4b257ea49 100644
--- a/data/js/fileopener.js
+++ b/data/js/fileopener.js
@@ -13,7 +13,8 @@ define(function(require, exports, module) {
var _isFileChanged = false;
var _tsEditor;
var generatedTagButtons;
- $.fn.editableform.buttons = '<button type="submit" class="btn btn-primary editable-submit" style="margin-left: 8px;"><i class="fa fa-check fa-lg"></i></button>' + '<br /><br /><button type="button" class="btn editable-cancel"><i class="fa fa-times fa-lg"></i></button>';
+ // Backup cancel button <!--button type="button" class="btn editable-cancel"><i class="fa fa-times fa-lg"></i></button-->
+ $.fn.editableform.buttons = '<button type="submit" class="btn btn-primary editable-submit"><i class="fa fa-check fa-lg"></i></button>';
// If a file is currently opened for editing, this var should be true
var _isEditMode = false;
@@ -369,10 +370,10 @@ define(function(require, exports, module) {
$fileTitle.editable('destroy');
$fileTitle.text(title);
$fileTitle.editable({
- type: 'textarea',
- placement: 'bottom',
+ type: 'text',
+ //placement: 'bottom',
title: 'Change Title',
- //mode: 'inline',
+ mode: 'inline',
success: function(response, newValue) {
TSCORE.TagUtils.changeTitle(_openedFilePath, newValue);
}