Commit 7cf307b6 authored by Robin Tissot's avatar Robin Tissot
Browse files

Code cleanup.

parent 25be2490
......@@ -26,10 +26,6 @@ const TranscriptionModal = Vue.component('transcriptionmodal', {
$(this.$el).draggable({handle: '.modal-header'});
$(this.$el).resizable();
this.computeStyles();
let timer = setTimeout(function (){
this.show_onboarding();
}.bind(this),
1000);
},
watch: {
line(new_, old_) {
......@@ -167,25 +163,6 @@ const TranscriptionModal = Vue.component('transcriptionmodal', {
} else {
overlay.style.display = 'none';
}
},
show_onboarding(){
if(onboarding == "True" && !onboarding_trans) {
this.intro = introJs();
this.intro.setOptions({steps: steps_trans});
this.intro.start();
this.intro.onexit(function () {
userProfile.set('onboarding_trans',true);
exitonboarding();
});
this.intro.oncomplete(function () {
userProfile.set('onboarding_trans',true);
exitonboarding();
});
}
}
},
});
......@@ -13,8 +13,7 @@ var partVM = new Vue({
blockShortcuts: false,
fullsizeimage: false,
selectedTranscription: null,
comparedTranscriptions: [],
intro : introJs()
comparedTranscriptions: []
},
computed: {
imageSize() {
......@@ -178,9 +177,6 @@ var partVM = new Vue({
}.bind(this));
},
methods: {
show_onboarding(){
},
resetZoom() {
this.zoom.reset();
},
......
......@@ -102,7 +102,6 @@ class Profile(SuccessMessageMixin, UpdateView):
page_number = self.request.GET.get('page')
context['is_paginated'] = paginator.count != 0
context['page_obj'] = paginator.get_page(page_number)
context['onboarding'] = self.request.user.onboarding
return context
......
......@@ -113,8 +113,8 @@
<script src="{% static 'js/messages.js' %}"></script>
{% include 'includes/messages.html' %}
<script src="{% static 'js/profile.js' %}"></script>
<script src="{% static 'vendor/introjs/intro.js' %}"></script>
{% if user.onboarding %}
<script src="{% static 'vendor/introjs/intro.js' %}"></script>
<script src="{% static 'js/onboarding.js' %}"></script>
{% endif %}
{% endif %}
......
......@@ -113,9 +113,11 @@
{% block scripts %}
<script type="text/javascript">
'use strict';
const DOCUMENT_ID = {{ document.pk }};
const ONBOARDING_PAGE = 'onboarding_images';
'use strict';
const DOCUMENT_ID = {{ document.pk }};
{% if user.onboarding %}
const ONBOARDING_PAGE = 'onboarding_images';
{% endif %}
</script>
{{ block.super }}
......
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