mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
fix saving branch prefix, fixes #260
This commit is contained in:
parent
e02eca87b0
commit
3f8e8f8561
@ -2,6 +2,7 @@ import treeService from '../services/tree.js';
|
|||||||
import server from '../services/server.js';
|
import server from '../services/server.js';
|
||||||
import treeCache from "../services/tree_cache.js";
|
import treeCache from "../services/tree_cache.js";
|
||||||
import treeUtils from "../services/tree_utils.js";
|
import treeUtils from "../services/tree_utils.js";
|
||||||
|
import infoService from "../services/info.js";
|
||||||
|
|
||||||
const $dialog = $("#branch-prefix-dialog");
|
const $dialog = $("#branch-prefix-dialog");
|
||||||
const $form = $("#branch-prefix-form");
|
const $form = $("#branch-prefix-form");
|
||||||
@ -35,6 +36,8 @@ async function savePrefix() {
|
|||||||
await treeService.setPrefix(branchId, prefix);
|
await treeService.setPrefix(branchId, prefix);
|
||||||
|
|
||||||
$dialog.modal('hide');
|
$dialog.modal('hide');
|
||||||
|
|
||||||
|
infoService.showMessage("Branch prefix has been saved.");
|
||||||
}
|
}
|
||||||
|
|
||||||
$form.submit(() => {
|
$form.submit(() => {
|
||||||
|
@ -1,31 +1,33 @@
|
|||||||
<div id="branch-prefix-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog">
|
<div id="branch-prefix-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog">
|
||||||
<div class="modal-dialog modal-lg" role="document">
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
<div class="modal-content">
|
<form id="branch-prefix-form">
|
||||||
<div class="modal-header">
|
<div class="modal-content">
|
||||||
<h5 class="modal-title mr-auto">Edit branch prefix</h5>
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title mr-auto">Edit branch prefix</h5>
|
||||||
|
|
||||||
<button class="help-button" type="button" data-help-page="Tree-concepts#prefix" title="Help on Tree prefix">?</button>
|
<button class="help-button" type="button" data-help-page="Tree-concepts#prefix" title="Help on Tree prefix">?</button>
|
||||||
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-left: 0;">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-left: 0;">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="branch-prefix-input">Prefix: </label>
|
<label for="branch-prefix-input">Prefix: </label>
|
||||||
|
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="branch-prefix-input" class="form-control">
|
<input id="branch-prefix-input" class="form-control">
|
||||||
|
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<div id="branch-prefix-note-title" class="input-group-text"></div>
|
<div id="branch-prefix-note-title" class="input-group-text"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="btn btn-primary btn-sm">Save</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
</form>
|
||||||
<button class="btn btn-primary btn-sm">Save</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user