added note scoped actions button, fix #8

This commit is contained in:
azivner 2018-01-19 19:36:41 -05:00
parent f42835e083
commit 32db96f388
3 changed files with 37 additions and 3 deletions

View file

@ -87,7 +87,7 @@ const contextMenu = (function() {
{title: "----"},
{title: "Collapse sub-tree <kbd>Alt+-</kbd>", cmd: "collapse-sub-tree", uiIcon: "ui-icon-minus"},
{title: "Force note sync", cmd: "force-note-sync", uiIcon: "ui-icon-refresh"},
{title: "Sort alphabetically <kbd>Alt+s</kbd>", cmd: "sort-alphabetically", uiIcon: " ui-icon-arrowthick-2-n-s"}
{title: "Sort alphabetically <kbd>Alt+S</kbd>", cmd: "sort-alphabetically", uiIcon: " ui-icon-arrowthick-2-n-s"}
],
beforeOpen: (event, ui) => {

View file

@ -199,4 +199,26 @@ div.ui-tooltip {
.suppressed {
filter: opacity(7%);
}
}
.dropdown-menu li {
padding: 5px;
width: 200px;
}
.dropdown-menu li:hover, .dropdown-menu a:hover {
background-color: #eee !important;
cursor: pointer;
}
.dropdown-menu kbd
{
color: black;
border: none;
background-color: transparent;
box-shadow: none;
}
.dropdown-menu kbd {
float: right;
}

View file

@ -95,7 +95,19 @@
<span id="note-id-display" title="Note ID"></span>
<button class="btn btn-xs" title="ALT+H" style="margin: 10px;" onclick="noteHistory.showCurrentNoteHistory();">Note history</button>
<div class="dropdown" style="margin-left: 10px; margin-right: 10px;">
<button id="dLabel" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn btn-xs">
Note actions
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dLabel">
<li><a onclick="noteHistory.showCurrentNoteHistory();"><kbd>Alt+H</kbd> History</a></li>
<li><a onclick="attributesDialog.showDialog();"><kbd>Alt+A</kbd> Attributes</a></li>
<li><a onclick="noteSource.showDialog();"><kbd>Ctrl+U</kbd> HTML source</a></li>
</ul>
</div>
<!--<button class="btn btn-xs" title="ALT+H" onclick="noteHistory.showCurrentNoteHistory();">Note history</button>-->
</div>
</div>