Mentions légales du service

Skip to content
Snippets Groups Projects

Feature/vue diplo

Merged EL HASSANE GARGEM requested to merge feature/vue-diplo into develop

Merge request reports

Merged by Robin TissotRobin Tissot 5 years ago (May 14, 2020 7:35pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
22 22 this.save = !this.save;
23 23 }.bind(this), 1000);
24 24 },
25 editNext() {
25 editNext(ev) {
26 26 ev.preventDefault();
27 // TODO
28 console.log("call editableContent",this.$parent);
27 index = this.part.lines.indexOf(this.editLine);
28 if(index < this.part.lines.length - 1) {
29 this.editLine = this.part.lines[index + 1];
30 let next = this.$children[index +1].$el.firstElementChild.lastChild;
31 let elt = $("#"+this.editLine.pk);
32 console.log("elt",elt);
33 elt.focus();
  • added 2 commits

    Compare with previous version

  • added 4 commits

    Compare with previous version

  • added 2 commits

    • d73a5625 - validate_content for list serailzer
    • 82e19a24 - validate_content for list serailzer

    Compare with previous version

  • EL HASSANE GARGEM
  • added 1 commit

    • 392df950 - bulk create line transcriptions

    Compare with previous version

  • EL HASSANE GARGEM added 12 commits

    added 12 commits

    Compare with previous version

  • Since it's working well as is we are going to merge it without the ordering capabilities. Can you comment out the drag and drop parts? Also the line numbers are 0 based, it should start at 1 to correspond with the numbering in the segmentation panel.

  • added 2 commits

    Compare with previous version

  • EL HASSANE GARGEM added 53 commits

    added 53 commits

    Compare with previous version

  • Robin Tissot unmarked as a Work In Progress

    unmarked as a Work In Progress

  • 262
    263 @action(detail=False, methods=['PUT'])
    264 def bulk_update(self, request, document_pk=None, part_pk=None, pk=None):
    265 lines = request.data.get("lines")
    266 for line in lines:
    267 lt = get_object_or_404(LineTranscription, pk=line["pk"])
    268 serializer = LineTranscriptionSerializer(lt, data=line, partial=True)
    269 serializer.is_valid(raise_exception=True)
    270 serializer.save()
    271 return Response({'response': 'ok'}, status=200)
    272
    273 @action(detail=False, methods=['POST'])
    274 def bulk_delete(self, request, document_pk=None, part_pk=None, pk=None):
    275 lines = request.data.get("lines")
    276 qs = LineTranscription.objects.filter(pk__in=lines)
    277 qs.delete()
  • 5 this.timeZone = moment.tz.guess();
    6 },
    7 methods: {
    8 setEdit(ev) {
    9 this.editing = ev.target;
    10
    11 },
    12 editableContent(ev) {
    13 if (this.editing && ev.target == this.editing)
    14 this.editing.setAttribute('contenteditable', true);
    15 ev.target.focus();
    16 this.$parent.setEditLine(this.line);
    17 },
    18 pushUpdate(){
    19
    20 clearTimeout(timer);
  • 24 this.line.transcription.content = this.$refs.content[0].textContent;
    25 this.addToList();
    26 // call save of parent method
    27 this.$parent.toggleSave();
    28 }.bind(this), 1000);
    29
    30 },
    31 pushNewVersion(){
    32
    33 },
    34 setContent(content){
    35 let id = this.line.pk;
    36 $("#" + id).text(content);
    37 this.line.transcription.content = content;
    38 },
    39 onPast(e) {
  • 16 this.$parent.setEditLine(this.line);
    17 },
    18 pushUpdate(){
    19
    20 clearTimeout(timer);
    21 timer = setTimeout(function (){
    22
    23 //set content of input to line content
    24 this.line.transcription.content = this.$refs.content[0].textContent;
    25 this.addToList();
    26 // call save of parent method
    27 this.$parent.toggleSave();
    28 }.bind(this), 1000);
    29
    30 },
    31 pushNewVersion(){
  • 72 elt.version_updated_at = lt.version_updated_at;
    73 }
    74 },
    75 dragStart(line,ev){
    76 ev.dataTransfer.setData('Text', "#diplomatic-lines");
    77 ev.target.style.border = 'solid #33A2FF';
    78 ev.dataTransfer.dropEffect = 'move';
    79 let index = this.part.lines.indexOf(line);
    80 this.dragging = index;
    81 // console.log("draaag start",index);
    82 },
    83 dragEnd(){
    84 this.dragging = -1;
    85
    86 },
    87 dragLeave(){
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading