Browse Source

Update annotation_template

pull/10/head
Hironsan 6 years ago
parent
commit
80c14ba2f1
4 changed files with 11 additions and 6 deletions
  1. BIN
      doccano/app/db.sqlite3
  2. 13
      doccano/app/server/static/annotation.1.js
  3. 2
      doccano/app/server/static/inbox.css
  4. 2
      doccano/app/server/templates/annotation.1.html

BIN
doccano/app/db.sqlite3

13
doccano/app/server/static/annotation.1.js

@ -73,10 +73,13 @@ var vm = new Vue({
nextPage: function () { nextPage: function () {
this.cur = Math.min(this.cur + 1, this.items.length - 1); this.cur = Math.min(this.cur + 1, this.items.length - 1);
this.remaining -= 1; this.remaining -= 1;
console.log('nextPage');
this.showMessage(this.cur);
}, },
prevPage: function () { prevPage: function () {
this.cur = Math.max(this.cur - 1, 0); this.cur = Math.max(this.cur - 1, 0);
this.remaining += 1; this.remaining += 1;
this.showMessage(this.cur);
}, },
activeLearn: function () { activeLearn: function () {
alert('Active Learning!'); alert('Active Learning!');
@ -93,15 +96,17 @@ var vm = new Vue({
console.log('ERROR!! happend by Backend.') console.log('ERROR!! happend by Backend.')
}); });
}, },
showMessage: function (msg, index) {
showMessage: function (index) {
this.cur = index; this.cur = index;
console.log(this.cur); console.log(this.cur);
console.log(this.items[index]);
$('#message-pane').removeClass('is-hidden'); $('#message-pane').removeClass('is-hidden');
$('.card').removeClass('active'); $('.card').removeClass('active');
$('#msg-card-' + index).addClass('active'); $('#msg-card-' + index).addClass('active');
$('.message .address .name').text(msg.from);
$('.message .address .email').text(msg.email);
var msg_body = '<p>' + msg.text + '</p>';
//$('.message .address .name').text(msg.from);
//$('.message .address .email').text(msg.email);
var text = this.items[index].text;
var msg_body = '<p>' + text + '</p>';
$('.message .content').html(msg_body); $('.message .content').html(msg_body);
} }
}, },

2
doccano/app/server/static/inbox.css

@ -176,7 +176,7 @@ html,body {
float:right; float:right;
} }
.inbox-messages .msg-snippet { .inbox-messages .msg-snippet {
padding: 5px 20px 0px 5px;
padding: 5px 20px 0px 0px;
} }
.inbox-messages .msg-subject .fa { .inbox-messages .msg-subject .fa {
font-size: 14px; font-size: 14px;

2
doccano/app/server/templates/annotation.1.html

@ -59,7 +59,7 @@
</div> </div>
<div class="inbox-messages" id="inbox-messages"> <div class="inbox-messages" id="inbox-messages">
<div v-for="(msg, index) in items" class="card" v-bind:id="'msg-card-'+index" v-on:click="showMessage(msg,index)" v-bind:data-preview-id="index">
<div v-for="(msg, index) in items" class="card" v-bind:id="'msg-card-'+index" v-on:click="showMessage(index)" v-bind:data-preview-id="index">
<div class="card-content"> <div class="card-content">
<div class="msg-header"> <div class="msg-header">
<span class="msg-from"> <span class="msg-from">

Loading…
Cancel
Save