WIP on the dialog for history

This commit is contained in:
azivner
2017-09-21 22:20:10 -04:00
parent 8ec2c6c338
commit 647bbcaee1
5 changed files with 61 additions and 12 deletions

View File

@@ -17,6 +17,6 @@ notes_history_api = Blueprint('notes_history_api', __name__)
@notes_history_api.route('/notes-history/<string:note_id>', methods = ['GET'])
@login_required
def getNoteHistory(note_id):
history = getResults("select * from notes_history where note_id = ?", [note_id])
history = getResults("select * from notes_history where note_id = ? order by date_modified desc", [note_id])
return jsonify(history)

View File

@@ -171,6 +171,16 @@
</div>
</div>
<div id="noteHistoryDialog" title="Note history" style="display: none;">
<div style="display: flex;">
<select id="noteHistoryList" size="25" style="flex-grow: 1;">
</select>
<div id="noteHistoryContent" style="flex-grow: 3;">
</div>
</div>
</div>
<script type="text/javascript">
const baseUrl = '';
</script>
@@ -230,6 +240,7 @@
<script src="stat/js/add_link.js"></script>
<script src="stat/js/jump_to_note.js"></script>
<script src="stat/js/settings.js"></script>
<script src="stat/js/note_history.js"></script>
<script src="stat/js/utils.js"></script>
<script src="stat/js/convert2html.js"></script>