1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 00:43:53 +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;
const options = {
lineNumbers: false,
lineNumbers: true,
mode: Utils.chooseLanguage(fileExt),
extraKeys: {'Ctrl': 'autocomplete'},
theme: 'default',
autoMatchParens: true,
textWrapping: true,
lineWrapping: true,
readOnly: 'nocursor'

View File

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

View File

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

View File

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

View File

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