Added "Read More" button for video descriptions

This commit is contained in:
sh4dowb
2019-11-11 19:06:06 +03:00
committed by syeopite
parent 62e9e9a662
commit 533d0a1fd4
5 changed files with 26 additions and 1 deletions

View File

@@ -106,6 +106,12 @@
<input name="annotations" id="annotations" type="checkbox" <% if preferences.annotations %>checked<% end %>>
</div>
<div class="pure-control-group">
<label for="extend_desc"><%= translate(locale, "Automatically extend video descriptions: ") %></label>
<input name="extend_desc" id="extend_desc" type="checkbox" <% if preferences.extend_desc %>checked<% end %>>
</div>
<legend><%= translate(locale, "Visual preferences") %></legend>
<div class="pure-control-group">

View File

@@ -228,7 +228,18 @@
</p>
<div>
<%= video.description_html %>
<% if video.description.size < 200 || params.extend_desc %>
<%= video.description_html %>
<% else %>
<div style="overflow: hidden;height: 8.3em;" id="descriptionWrapper">
<%= video.description_html %>
</div>
<div class="pure-u-23-24">
<p>
<a href="javascript:void(0)" onclick="read_more_description(this)"><%= translate(locale, "Read more") %></a>
</p>
</div>
<% end %>
</div>
<hr>