src_js/iconolab-bundle/src/components/editor/AnnotationForm.vue
author Alexandre Segura <mex.zktk@gmail.com>
Mon, 13 Mar 2017 18:48:35 +0100
changeset 418 a04c55054afe
parent 403 0ed5207089ee
child 427 2a9ce7ec3a29
permissions -rw-r--r--
Introduce display of all annotations at the same time. - Add stats to serialized annotation. - Introduce AnnotationList component. - Pass array of annotations to component. - Handle click on annotation & drawing.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
323
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
     1
<template>
339
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
     2
    <div>
385
d0465086d8d2 Allow editing/commenting only for authenticated users.
Alexandre Segura <mex.zktk@gmail.com>
parents: 356
diff changeset
     3
        <button v-if="annotation && isAuthenticated" @click="readonly = !readonly"
339
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
     4
            class="btn btn-xs pull-right"
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
     5
            v-bind:class="{ 'btn-primary': readonly, 'btn-warning': !readonly }">
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
     6
            <i class="fa fa-edit" v-if="readonly"></i>
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
     7
            <span v-if="readonly">Modifier</span>
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
     8
            <i class="fa fa-ban" v-if="!readonly"></i>
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
     9
            <span v-if="!readonly">Annuler</span>
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    10
        </button>
356
a45f7dac4789 Change wordings, align text.
Alexandre Segura <mex.zktk@gmail.com>
parents: 351
diff changeset
    11
        <div v-if="!annotation" class="alert alert-warning text-center">
323
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    12
            Aucune annotation sélectionnée.
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    13
        </div>
339
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    14
        <form v-bind:action="formAction" method="post">
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    15
            <slot>
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    16
                <!-- CSRF token -->
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    17
            </slot>
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    18
            <input type="hidden" name="fragment" v-model="fragment">
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    19
            <div v-if="annotation" class="form-group form-group-sm">
402
376158f6d760 hides title and description if there is none
duong tam kien <tk@deveha.com>
parents: 400
diff changeset
    20
                <label v-if="!readonly || title" class="small text-muted">Titre</label>
339
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    21
                <input type="text" class="form-control" name="title" v-model="title" v-if="!readonly">
402
376158f6d760 hides title and description if there is none
duong tam kien <tk@deveha.com>
parents: 400
diff changeset
    22
                <p v-if="readonly && title" v-bind:class="{ 'text-muted': !title }">{{ title || 'Pas de titre' }}</p>
339
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    23
            </div>
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    24
            <div v-if="annotation" class="form-group form-group-sm">
402
376158f6d760 hides title and description if there is none
duong tam kien <tk@deveha.com>
parents: 400
diff changeset
    25
                <label v-if="!readonly || description" class="small text-muted">Description</label>
339
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    26
                <textarea class="form-control" name="description" v-model="description" v-if="!readonly" placeholder="Décrivez ce que vous voyez"></textarea>
403
0ed5207089ee adds formatting (markdown) to annotation description
duong tam kien <tk@deveha.com>
parents: 402
diff changeset
    27
                <p v-if="readonly && description" v-bind:class="{ 'text-muted': !description }" v-html="descriptionComputed">{{ descriptionComputed || 'Pas de description' }}</p>
339
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    28
            </div>
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    29
            <div v-if="annotation" class="form-group form-group-sm">
400
c85505149eea orthographe mots-cléS + css
duong tam kien <tk@deveha.com>
parents: 385
diff changeset
    30
                <label class="small text-muted">Mots-clés</label>
339
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    31
                <tag-list ref="taglist"
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    32
                    v-bind:original-tags="annotation.tags"
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    33
                    v-bind:readonly="readonly"
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    34
                    @change="onTagsChange($event.tags)"></tag-list>
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    35
                <input type="hidden" name="tags" v-model="serializedTags">
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    36
            </div>
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    37
            <button type="submit" v-if="annotation &amp;&amp; !readonly" v-bind:class="{ disabled: !hasChanged }"
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    38
                class="btn btn-block btn-sm btn-primary">Enregistrer une nouvelle version</button>
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    39
        </form>
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    40
    </div>
323
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    41
</template>
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    42
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    43
<script>
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    44
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    45
    import TagList from '../tagform/TagList.vue'
333
625ac8b8bb87 Improve change detection in TagList.
Alexandre Segura <mex.zktk@gmail.com>
parents: 327
diff changeset
    46
    import _ from 'lodash'
403
0ed5207089ee adds formatting (markdown) to annotation description
duong tam kien <tk@deveha.com>
parents: 402
diff changeset
    47
    import showdown from 'showdown'
0ed5207089ee adds formatting (markdown) to annotation description
duong tam kien <tk@deveha.com>
parents: 402
diff changeset
    48
0ed5207089ee adds formatting (markdown) to annotation description
duong tam kien <tk@deveha.com>
parents: 402
diff changeset
    49
    const converter = new showdown.Converter()
333
625ac8b8bb87 Improve change detection in TagList.
Alexandre Segura <mex.zktk@gmail.com>
parents: 327
diff changeset
    50
625ac8b8bb87 Improve change detection in TagList.
Alexandre Segura <mex.zktk@gmail.com>
parents: 327
diff changeset
    51
    var defaults = {
339
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    52
        title: '',
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    53
        description: '',
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    54
        fragment: '',
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    55
        tags: [],
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    56
        readonly: true,
333
625ac8b8bb87 Improve change detection in TagList.
Alexandre Segura <mex.zktk@gmail.com>
parents: 327
diff changeset
    57
    }
323
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    58
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    59
    export default {
339
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    60
        props: {
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    61
            action: String,
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    62
            annotation: {
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    63
                type: Object,
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    64
                default: function () {
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    65
                    return null;
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    66
                }
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    67
            },
385
d0465086d8d2 Allow editing/commenting only for authenticated users.
Alexandre Segura <mex.zktk@gmail.com>
parents: 356
diff changeset
    68
            isAuthenticated: {
d0465086d8d2 Allow editing/commenting only for authenticated users.
Alexandre Segura <mex.zktk@gmail.com>
parents: 356
diff changeset
    69
                type: Boolean,
d0465086d8d2 Allow editing/commenting only for authenticated users.
Alexandre Segura <mex.zktk@gmail.com>
parents: 356
diff changeset
    70
                default: false
d0465086d8d2 Allow editing/commenting only for authenticated users.
Alexandre Segura <mex.zktk@gmail.com>
parents: 356
diff changeset
    71
            }
339
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
    72
        },
323
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    73
        components: {
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    74
            'tag-list': TagList
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    75
        },
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    76
        data() {
333
625ac8b8bb87 Improve change detection in TagList.
Alexandre Segura <mex.zktk@gmail.com>
parents: 327
diff changeset
    77
            return defaults;
325
8f158a4c7759 Use props to update annotation in components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 323
diff changeset
    78
        },
418
a04c55054afe Introduce display of all annotations at the same time.
Alexandre Segura <mex.zktk@gmail.com>
parents: 403
diff changeset
    79
        mounted() {
a04c55054afe Introduce display of all annotations at the same time.
Alexandre Segura <mex.zktk@gmail.com>
parents: 403
diff changeset
    80
            if (this.annotation) {
a04c55054afe Introduce display of all annotations at the same time.
Alexandre Segura <mex.zktk@gmail.com>
parents: 403
diff changeset
    81
                this.loadAnnotation(this.annotation);
a04c55054afe Introduce display of all annotations at the same time.
Alexandre Segura <mex.zktk@gmail.com>
parents: 403
diff changeset
    82
            }
a04c55054afe Introduce display of all annotations at the same time.
Alexandre Segura <mex.zktk@gmail.com>
parents: 403
diff changeset
    83
        },
325
8f158a4c7759 Use props to update annotation in components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 323
diff changeset
    84
        watch: {
8f158a4c7759 Use props to update annotation in components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 323
diff changeset
    85
            annotation: function(annotation) {
8f158a4c7759 Use props to update annotation in components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 323
diff changeset
    86
                if (annotation) {
418
a04c55054afe Introduce display of all annotations at the same time.
Alexandre Segura <mex.zktk@gmail.com>
parents: 403
diff changeset
    87
                    this.loadAnnotation(annotation);
325
8f158a4c7759 Use props to update annotation in components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 323
diff changeset
    88
                } else {
8f158a4c7759 Use props to update annotation in components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 323
diff changeset
    89
                    this.reset();
8f158a4c7759 Use props to update annotation in components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 323
diff changeset
    90
                }
323
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    91
            }
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    92
        },
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    93
        computed: {
403
0ed5207089ee adds formatting (markdown) to annotation description
duong tam kien <tk@deveha.com>
parents: 402
diff changeset
    94
            descriptionComputed: function(){
0ed5207089ee adds formatting (markdown) to annotation description
duong tam kien <tk@deveha.com>
parents: 402
diff changeset
    95
              return converter.makeHtml(this.description);
0ed5207089ee adds formatting (markdown) to annotation description
duong tam kien <tk@deveha.com>
parents: 402
diff changeset
    96
            },
323
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    97
            formAction: function() {
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    98
                if (this.annotation) {
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    99
                    return this.action.replace(':annotation_guid', this.annotation.annotation_guid);
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   100
                }
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   101
            },
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   102
            serializedTags: function() {
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   103
                var tags = this.tags.map(function(tag) {
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   104
                    return {
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   105
                        tag_input: (typeof tag.tag_link === "string" && tag.tag_link.length) ? tag.tag_link : tag.tag_label,
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   106
                        tag_label: tag.tag_label,
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   107
                        accuracy: tag.accuracy,
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   108
                        relevancy: tag.relevancy
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   109
                    }
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   110
                });
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   111
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   112
                return JSON.stringify(tags);
333
625ac8b8bb87 Improve change detection in TagList.
Alexandre Segura <mex.zktk@gmail.com>
parents: 327
diff changeset
   113
            },
625ac8b8bb87 Improve change detection in TagList.
Alexandre Segura <mex.zktk@gmail.com>
parents: 327
diff changeset
   114
            hasChanged: function() {
625ac8b8bb87 Improve change detection in TagList.
Alexandre Segura <mex.zktk@gmail.com>
parents: 327
diff changeset
   115
                if (!this.annotation) { return false; }
625ac8b8bb87 Improve change detection in TagList.
Alexandre Segura <mex.zktk@gmail.com>
parents: 327
diff changeset
   116
625ac8b8bb87 Improve change detection in TagList.
Alexandre Segura <mex.zktk@gmail.com>
parents: 327
diff changeset
   117
                return this.title !== this.annotation.title
625ac8b8bb87 Improve change detection in TagList.
Alexandre Segura <mex.zktk@gmail.com>
parents: 327
diff changeset
   118
                    || this.description !== this.annotation.description
625ac8b8bb87 Improve change detection in TagList.
Alexandre Segura <mex.zktk@gmail.com>
parents: 327
diff changeset
   119
                    || !_.isEqual(this.annotation.tags, this.tags);
323
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   120
            }
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   121
        },
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   122
        methods: {
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   123
            onTagsChange: function(tags) {
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   124
                this.tags = tags;
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   125
            },
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   126
            reset: function() {
333
625ac8b8bb87 Improve change detection in TagList.
Alexandre Segura <mex.zktk@gmail.com>
parents: 327
diff changeset
   127
                Object.assign(this, defaults);
323
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   128
            },
418
a04c55054afe Introduce display of all annotations at the same time.
Alexandre Segura <mex.zktk@gmail.com>
parents: 403
diff changeset
   129
            loadAnnotation(annotation) {
a04c55054afe Introduce display of all annotations at the same time.
Alexandre Segura <mex.zktk@gmail.com>
parents: 403
diff changeset
   130
                // Make sure we have an actual copy
a04c55054afe Introduce display of all annotations at the same time.
Alexandre Segura <mex.zktk@gmail.com>
parents: 403
diff changeset
   131
                Object.assign(this, {
a04c55054afe Introduce display of all annotations at the same time.
Alexandre Segura <mex.zktk@gmail.com>
parents: 403
diff changeset
   132
                    title: annotation.title,
a04c55054afe Introduce display of all annotations at the same time.
Alexandre Segura <mex.zktk@gmail.com>
parents: 403
diff changeset
   133
                    description: annotation.description,
a04c55054afe Introduce display of all annotations at the same time.
Alexandre Segura <mex.zktk@gmail.com>
parents: 403
diff changeset
   134
                    fragment: annotation.fragment,
a04c55054afe Introduce display of all annotations at the same time.
Alexandre Segura <mex.zktk@gmail.com>
parents: 403
diff changeset
   135
                    tags: annotation.tags.slice(),
a04c55054afe Introduce display of all annotations at the same time.
Alexandre Segura <mex.zktk@gmail.com>
parents: 403
diff changeset
   136
                    readonly: true,
a04c55054afe Introduce display of all annotations at the same time.
Alexandre Segura <mex.zktk@gmail.com>
parents: 403
diff changeset
   137
                });
a04c55054afe Introduce display of all annotations at the same time.
Alexandre Segura <mex.zktk@gmail.com>
parents: 403
diff changeset
   138
            }
323
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   139
        }
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   140
    }
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   141
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   142
</script>
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   143
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   144
<style scoped>
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   145
form {
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   146
    margin-bottom: 20px;
339
ba89f767b091 Introduce readonly prop in AnnotationForm & child components.
Alexandre Segura <mex.zktk@gmail.com>
parents: 333
diff changeset
   147
    clear: both;
323
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   148
}
400
c85505149eea orthographe mots-cléS + css
duong tam kien <tk@deveha.com>
parents: 385
diff changeset
   149
c85505149eea orthographe mots-cléS + css
duong tam kien <tk@deveha.com>
parents: 385
diff changeset
   150
label {
c85505149eea orthographe mots-cléS + css
duong tam kien <tk@deveha.com>
parents: 385
diff changeset
   151
  font-weight: normal;
c85505149eea orthographe mots-cléS + css
duong tam kien <tk@deveha.com>
parents: 385
diff changeset
   152
}
323
55c024fc7c60 Roughly implement annotation navigator.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
   153
</style>