PHRAS-3116

This commit is contained in:
Harrys Ravalomanana
2020-06-15 15:52:57 +04:00
parent 5ad9a1a183
commit 4c19ee4e8f
3 changed files with 61 additions and 11 deletions

View File

@@ -65,7 +65,7 @@
"normalize-css": "^2.1.0", "normalize-css": "^2.1.0",
"npm": "^6.0.0", "npm": "^6.0.0",
"npm-modernizr": "^2.8.3", "npm-modernizr": "^2.8.3",
"phraseanet-production-client": "0.34.224-d", "phraseanet-production-client": "0.34.225-d",
"requirejs": "^2.3.5", "requirejs": "^2.3.5",
"tinymce": "^4.0.28", "tinymce": "^4.0.28",
"underscore": "^1.8.3", "underscore": "^1.8.3",

View File

@@ -169,10 +169,12 @@
<div class="video-range-editor-container"></div> <div class="video-range-editor-container"></div>
</div> </div>
<div id="subtitleEditor" class="subtitleEditor video-subtitle-editor-container"> <div id="subtitleEditor" class="subtitleEditor video-subtitle-editor-container">
<input type="hidden" id="defaultStartValue" value="00:00:00.000">
<input type="hidden" id="defaultEndValue" value="00:00:02.000">
<div id="default-item" class="default-item hide"> <div id="default-item" class="default-item hide">
<fieldset class='video-subtitle-item'><h4 class='number'>0</h4> <fieldset class='video-subtitle-item'><h4 class='number'>0</h4>
<div class='item-field start-time' ><label>Start time</label><input class='time startTime' type='text' name='startTime' size='12' value="00:00:00.000"/></div> <div class='item-field start-time' ><label>Start time</label><input class='time startTime' type='text' name='startTime' size='12' value="00:00:00.000"/></div>
<div class='item-field end-time'><label>End time</label><input class='time endTime' type='text' name='endTime' size='12'/></div> <div class='item-field end-time'><label>End time</label><input class='time endTime' type='text' name='endTime' size='12'value="00:00:02.000" /></div>
<div class='item-field show-for-time'><label>Show for</label><input class='showForTime' readonly type='text' size='12'/></div> <div class='item-field show-for-time'><label>Show for</label><input class='showForTime' readonly type='text' size='12'/></div>
<div class='item-field caption-text'><textarea name='captionText' placeholder='Caption' rows='2'></textarea></div> <div class='item-field caption-text'><textarea name='captionText' placeholder='Caption' rows='2'></textarea></div>
<div class='remove-item'><i class='fa fa-times-circle'></i></div> <div class='remove-item'><i class='fa fa-times-circle'></i></div>
@@ -190,7 +192,7 @@
</div> </div>
<input type="hidden" value='{{ record.get_sbas_id() }}' name='record_sbas_id'> <input type="hidden" value='{{ record.get_sbas_id() }}' name='record_sbas_id'>
<input type="hidden" value='{{ record.get_record_id() }}' name='record_record_id'> <input type="hidden" value='{{ record.get_record_id() }}' name='record_record_id'>
<input type="hidden" id="record-vtt" name='record_vtt'> <input type="text" id="record-vtt" name='record_vtt'>
</form> </form>
<form name="video_subtitle_list" id="video-subtitle-list"> <form name="video_subtitle_list" id="video-subtitle-list">
<div class="video-subtitle-bottom"> <div class="video-subtitle-bottom">
@@ -200,8 +202,9 @@
</div> </div>
</div> </div>
<div class="video-subtitle-left-button"> <div class="video-subtitle-left-button">
<button type="button" id="submit-subtitle" class="btn submit-subtitle btn-blue">Save</button> <button type="button" id="submit-subtitle" class="btn submit-subtitle btn-blue">{{ "prod:videoeditor:subtitletab:: save" | trans }}</button>
<button class="add-subtitle-vtt" tabindex="0" type="button" aria-label="Add VTT"> <button type="button" id="copy-subtitle" class="btn copy-subtitle btn-blue">{{ "prod:videoeditor:subtitletab:: copy to clipboard" | trans }}</button>
<button class="add-subtitle-vtt" tabindex="0" type="button" aria-label="Add VTT" title = {{ "prod:videoeditor:subtitletab:: add caption" | trans }}>
<i class="fa fa-plus"></i> <i class="fa fa-plus"></i>
</button> </button>
</div> </div>
@@ -212,6 +215,7 @@
{% for subdef in previewHtml5 %} {% for subdef in previewHtml5 %}
<source type="{{ subdef.get_mime() }}" src="{{ subdef.get_url() }}"/> <source type="{{ subdef.get_mime() }}" src="{{ subdef.get_url() }}"/>
{% endfor %} {% endfor %}
<track label="English" kind="subtitles" srclang="en" src="/assets/my_captions.vtt" default>
{{ 'No preview available' | trans }} {{ 'No preview available' | trans }}
</video> </video>
</div> </div>
@@ -222,8 +226,54 @@
<div id ="subtitleRequest" class="subtitleRequest"> <div id ="subtitleRequest" class="subtitleRequest">
<div class="video-subtitle-bottom"> <div class="video-subtitle-bottom">
<div class="video-subtitle-left"> <div class="video-subtitle-left">
<div class="video-subtitle-left-inner"> <div class="video-request-left-inner">
provider .... <form id="video-subtitle-request" class="video-subtitle-request">
<p class="item">
<label>{{ "prod:videoeditor:subtitleRequestTab:label:: Provider" | trans }}</label>
<select name="subtitle_provider" id="subtitle_provider">
<option value="fr">Fr</option>
<option value="en">En</option>
<option value="de">De</option>
</select>
</p>
<p class="item">
<label>{{ "prod:videoeditor:subtitleRequestTab:label:: Provider" | trans }}</label>
<select name="subtitle_provider" id="subtitle_provider">
<option value="fr">Fr</option>
<option value="en">En</option>
<option value="de">De</option>
</select>
</p>
<p class="item">
<label>{{ "prod:videoeditor:subtitleRequestTab:label:: Kind" | trans }}</label>
<select name="subtitle_kindr" id="subtitle_kindr">
<option value="fr">Fr</option>
<option value="en">En</option>
<option value="de">De</option>
</select>
</p>
<p class="item">
<label>{{ "prod:videoeditor:subtitleRequestTab:label:: Source Audio language" | trans }}</label>
<select name="subtitle_language_source" id="subtitle_language_source">
<option value="fr">Fr</option>
<option value="en">En</option>
<option value="de">De</option>
</select>
</p>
<p class="item">
<label>{{ "prod:videoeditor:subtitleRequestTab:label:: Language destination" | trans }}</label>
<select name="subtitle_language_destination" id="subtitle_language_destination">
<option value="fr">Fr</option>
<option value="en">En</option>
<option value="de">De</option>
</select>
</p>
<div class="video-subtitle-center-button">
<button type="button" id="submit-subtitle-request" class="btn submit-subtitle btn-blue">{{ "prod:videoeditor:subtitleRequestTab:: submit" | trans }}</button>
</div>
<input type="hidden" value='{{ record.get_sbas_id() }}' name='record_sbas_id'>
<input type="hidden" value='{{ record.get_record_id() }}' name='record_record_id'>
</form>
</div> </div>
</div> </div>
<div class="video-subtitle-right"> <div class="video-subtitle-right">

View File

@@ -7578,10 +7578,10 @@ phraseanet-common@^0.4.5-d:
js-cookie "^2.1.0" js-cookie "^2.1.0"
pym.js "^1.3.1" pym.js "^1.3.1"
phraseanet-production-client@0.34.224-d: phraseanet-production-client@0.34.225-d:
version "0.34.224-d" version "0.34.225-d"
resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.224-d.tgz#9034d6b9a1a9a836332ebab84d6c03a1c4e49aa1" resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.225-d.tgz#5695ed66e43a7e6f7d472d29bd2dbeac84153b4e"
integrity sha512-sxZmj4X3OqbDPRkaxcGGSMmajv8HMr/gePVUoA8SLYnQUBfwN2z8dRIIZ7lsZmESIweMdH8S0z59x4aBw2Di+g== integrity sha512-rQng1Fl2TlAHHHr+KXbCMpo0cFuIMTeGuPoUgoNG1279boxkLy6Zp2WnJNrn4W9xfuWsUh83dld91d0ANqlShQ==
dependencies: dependencies:
"@mapbox/mapbox-gl-language" "^0.9.2" "@mapbox/mapbox-gl-language" "^0.9.2"
"@turf/turf" "^5.1.6" "@turf/turf" "^5.1.6"