Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 335d5796 authored by Robin Tissot's avatar Robin Tissot

wip add goto page number in editor.

parent 05aa042b
......@@ -102,11 +102,15 @@ class DocumentSerializer(serializers.ModelSerializer):
transcriptions = TranscriptionSerializer(many=True, read_only=True)
valid_block_types = BlockTypeSerializer(many=True, read_only=True)
valid_line_types = LineTypeSerializer(many=True, read_only=True)
parts_count = serializers.SerializerMethodField()
class Meta:
model = Document
fields = ('pk', 'name', 'transcriptions',
'valid_block_types', 'valid_line_types')
'valid_block_types', 'valid_line_types', 'parts_count')
def get_parts_count(self, document):
return document.parts.count()
class PartSerializer(serializers.ModelSerializer):
......@@ -127,6 +131,7 @@ class PartSerializer(serializers.ModelSerializer):
'image',
'bw_image',
'workflow',
'order',
'recoverable',
'transcription_progress'
)
......
......@@ -15,6 +15,10 @@
class="nav-btn nav-prev"
title="Previous (Page Up or Ctrl+Right Arrow)">
<i class="fas fa-angle-left"></i></a>
<input type="number"
v-if="$store.state.parts.loaded"
v-bind:value="$store.state.parts.order+1"
@change.lazy="goTo"/>
<div>
<button id="zoom-reset"
@click="resetZoom"
......@@ -156,6 +160,9 @@ export default {
resetZoom() {
this.zoom.reset();
},
async goTo(ev) {
await this.$store.dispatch('parts/loadPart', 'previous');
},
async getPrevious(ev) {
await this.$store.dispatch('parts/loadPart', 'previous');
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment