1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 08:53:14 +00:00

[file view] modification: make css file in <head> instead of bottom (#3030)

* for 'text file view': fixed 'bottom blank' problem; added 'line number' back
This commit is contained in:
llj
2019-03-01 19:53:51 +08:00
committed by Daniel Pan
parent 44b3885b09
commit d2cc85d05d
5 changed files with 21 additions and 6 deletions

View File

@@ -32,11 +32,10 @@ const { isStarred, isLocked, lockedByMe,
} = window.app.pageOptions; } = window.app.pageOptions;
const options = { const options = {
lineNumbers: false, lineNumbers: true,
mode: Utils.chooseLanguage(fileExt), mode: Utils.chooseLanguage(fileExt),
extraKeys: {'Ctrl': 'autocomplete'}, extraKeys: {'Ctrl': 'autocomplete'},
theme: 'default', theme: 'default',
autoMatchParens: true,
textWrapping: true, textWrapping: true,
lineWrapping: true, lineWrapping: true,
readOnly: 'nocursor' readOnly: 'nocursor'

View File

@@ -2,6 +2,10 @@
{% load render_bundle from webpack_loader %} {% load render_bundle from webpack_loader %}
{% load seahub_tags %} {% load seahub_tags %}
{% block extra_style %}
{% render_bundle 'viewFileImage' 'css' %}
{% endblock %}
{% block extra_data %} {% block extra_data %}
// img_prev && img_next can be path or None // img_prev && img_next can be path or None
previousImage: {% if img_prev %}'{{ img_prev|escapejs }}'{% else %}false{% endif %}, previousImage: {% if img_prev %}'{{ img_prev|escapejs }}'{% else %}false{% endif %},
@@ -10,5 +14,5 @@
{% endblock %} {% endblock %}
{% block render_bundle %} {% block render_bundle %}
{% render_bundle 'viewFileImage' %} {% render_bundle 'viewFileImage' 'js' %}
{% endblock %} {% endblock %}

View File

@@ -2,6 +2,10 @@
{% load render_bundle from webpack_loader %} {% load render_bundle from webpack_loader %}
{% load seahub_tags %} {% load seahub_tags %}
{% block extra_style %}
{% render_bundle 'viewFileText' 'css' %}
{% endblock %}
{% block extra_data %} {% block extra_data %}
fileExt: '{{ fileext|escapejs }}', fileExt: '{{ fileext|escapejs }}',
fileEnc: '{{ file_enc|escapejs }}', fileEnc: '{{ file_enc|escapejs }}',
@@ -9,5 +13,5 @@
{% endblock %} {% endblock %}
{% block render_bundle %} {% block render_bundle %}
{% render_bundle 'viewFileText' %} {% render_bundle 'viewFileText' 'js' %}
{% endblock %} {% endblock %}

View File

@@ -2,10 +2,14 @@
{% load render_bundle from webpack_loader %} {% load render_bundle from webpack_loader %}
{% load seahub_tags %} {% load seahub_tags %}
{% block extra_style %}
{% render_bundle 'viewFileVideo' 'css' %}
{% endblock %}
{% block extra_data %} {% block extra_data %}
rawPath: '{{ raw_path|escapejs }}' rawPath: '{{ raw_path|escapejs }}'
{% endblock %} {% endblock %}
{% block render_bundle %} {% block render_bundle %}
{% render_bundle 'viewFileVideo' %} {% render_bundle 'viewFileVideo' 'js' %}
{% endblock %} {% endblock %}

View File

@@ -2,10 +2,14 @@
{% load render_bundle from webpack_loader %} {% load render_bundle from webpack_loader %}
{% load seahub_tags %} {% load seahub_tags %}
{% block extra_style %}
{% render_bundle 'viewFileXmind' 'css' %}
{% endblock %}
{% block extra_data %} {% block extra_data %}
xmindImageSrc: '{{ xmind_image_src|escapejs }}' xmindImageSrc: '{{ xmind_image_src|escapejs }}'
{% endblock %} {% endblock %}
{% block render_bundle %} {% block render_bundle %}
{% render_bundle 'viewFileXmind' %} {% render_bundle 'viewFileXmind' 'js' %}
{% endblock %} {% endblock %}