mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-18 22:12:14 +00:00
Initial fixes
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
{% extends request.is_ajax|yesno:"base_ajax.html,base_rigs.html" %}
|
||||
|
||||
{% load markdown_tags %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row my-3 py-3">
|
||||
{% if not request.is_ajax %}
|
||||
@@ -43,7 +45,7 @@
|
||||
{% if perms.RIGS.view_event %}
|
||||
<h4>Notes</h4>
|
||||
<hr>
|
||||
<p class="dont-break-out">{{ event.notes|linebreaksbr }}</p>
|
||||
<p class="dont-break-out">{{ event.notes|markdown }}</p>
|
||||
{% endif %}
|
||||
<br>
|
||||
{% include 'partials/item_table.html' %}
|
||||
|
||||
@@ -8,11 +8,13 @@
|
||||
{% block css %}
|
||||
{{ block.super }}
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'css/selects.css' %}"/>
|
||||
<link rel="stylesheet" href="//cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
|
||||
{% endblock %}
|
||||
|
||||
{% block preload_js %}
|
||||
{{ block.super }}
|
||||
<script src="{% static 'js/selects.js' %}"></script>
|
||||
<script src="//cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
@@ -63,6 +65,16 @@
|
||||
{% endif %}
|
||||
});
|
||||
$(document).ready(function () {
|
||||
setupMDE('#id_description');
|
||||
setupMDE('#id_notes');
|
||||
setupMDE('#item_description');
|
||||
|
||||
$('#itemModal').on('shown.bs.modal', function (e) {
|
||||
$('#item_description').data('mde_editor').value(
|
||||
$('#item_description').val()
|
||||
);
|
||||
});
|
||||
|
||||
setupItemTable($("#{{ form.items_json.id_for_label }}").val());
|
||||
});
|
||||
$(function () {
|
||||
@@ -345,7 +357,7 @@
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group" data-toggle="tooltip" title="Notes on the event. This is only visible to keyholders, and is not displayed on the paperwork">
|
||||
<label for="{{ form.notes.id_for_label }}">{{ form.notes.label }}</label>
|
||||
{% render_field form.notes class+="form-control" %}
|
||||
{% render_field form.notes class+="form-control md-enabled" %}
|
||||
</div>
|
||||
</div>
|
||||
{% include 'partials/item_table.html' %}
|
||||
|
||||
@@ -74,6 +74,14 @@
|
||||
<lineStyle kind="linebelow" start="3,0" stop="3,0" colorName="black"/>
|
||||
<lineStyle kind="linebelow" start="5,0" stop="5,0" colorName="black"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<listStyle name="ol"
|
||||
bulletFormat="%s."
|
||||
bulletFontSize="10" />
|
||||
|
||||
<listStyle name="ul"
|
||||
start="bulletchar"
|
||||
bulletFontSize="10"/>
|
||||
</stylesheet>
|
||||
|
||||
<template > {# Note: page is 595x842 points (1 point=1/72in) #}
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
</para>
|
||||
|
||||
<keepInFrame>
|
||||
<para style="style.event_description">
|
||||
{{ object.description|default_if_none:""|markdown:"rml"|linebreaksxml }}
|
||||
</para>
|
||||
{{ object.description|default_if_none:""|markdown:"rml" }}
|
||||
</keepInFrame>
|
||||
</td>
|
||||
<td>
|
||||
@@ -186,7 +184,7 @@
|
||||
{% if item.description %}
|
||||
</para>
|
||||
<para style="item_description">
|
||||
<em>{{ item.description|markdown:"rml"|linebreaksxml }}</em>
|
||||
<em>{{ item.description|markdown:"rml" }}</em>
|
||||
</para>
|
||||
<para>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{% load namewithnotes from filters %}
|
||||
{% load markdown_tags %}
|
||||
<div class="card card-info">
|
||||
<div class="card-header">Event Info</div>
|
||||
<div class="card-body">
|
||||
@@ -46,7 +47,7 @@
|
||||
<dd class="col-sm-12"> </dd>
|
||||
|
||||
<dt class="col-sm-6">Event Description</dt>
|
||||
<dd class="dont-break-out col-sm-12">{{ event.description|linebreaksbr }}</dd>
|
||||
<dd class="dont-break-out col-sm-12">{{ event.description|markdown }}</dd>
|
||||
|
||||
<dd class="col-sm-12"> </dd>
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
{% load markdown_tags %}
|
||||
<tr id="item-{{item.pk}}" data-pk="{{item.pk}}" class="item_row">
|
||||
<th scope="row">
|
||||
<span class="name">{{ item.name }}</span>
|
||||
<div class="item-description">
|
||||
<em class="description">{{item.description|linebreaksbr}}</em>
|
||||
<em class="description">{{item.description|markdown}}</em>
|
||||
</div>
|
||||
</th>
|
||||
{% if perms.RIGS.view_event %}
|
||||
|
||||
@@ -27,7 +27,9 @@ function styles(done) {
|
||||
'node_modules/fullcalendar/main.css',
|
||||
'node_modules/bootstrap-select/dist/css/bootstrap-select.css',
|
||||
'node_modules/ajax-bootstrap-select/dist/css/ajax-bootstrap-select.css',
|
||||
'node_modules/flatpickr/dist/flatpickr.css',])
|
||||
'node_modules/flatpickr/dist/flatpickr.css',
|
||||
'node_modules/simplemde/dist/simplemde.min.css'
|
||||
])
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(sass().on('error', sass.logError))
|
||||
.pipe(gulpif(function(file) { return bs_select.includes(file.relative);}, con('selects.css')))
|
||||
@@ -62,6 +64,7 @@ function scripts() {
|
||||
'node_modules/fullcalendar/main.js',
|
||||
'node_modules/bootstrap-select/dist/js/bootstrap-select.js',
|
||||
'node_modules/ajax-bootstrap-select/dist/js/ajax-bootstrap-select.js',
|
||||
'node_modules/simplemde/dist/simplemde.min.js',
|
||||
'node_modules/konami/konami.js',
|
||||
'pipeline/source_assets/js/**/*.js',])
|
||||
.pipe(gulpif(function(file) { return base_scripts.includes(file.relative);}, con('base.js')))
|
||||
|
||||
33
package-lock.json
generated
33
package-lock.json
generated
@@ -965,6 +965,19 @@
|
||||
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
|
||||
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
|
||||
},
|
||||
"codemirror": {
|
||||
"version": "5.65.0",
|
||||
"resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.0.tgz",
|
||||
"integrity": "sha512-gWEnHKEcz1Hyz7fsQWpK7P0sPI2/kSkRX2tc7DFA6TmZuDN75x/1ejnH/Pn8adYKrLEA1V2ww6L00GudHZbSKw=="
|
||||
},
|
||||
"codemirror-spell-checker": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/codemirror-spell-checker/-/codemirror-spell-checker-1.1.2.tgz",
|
||||
"integrity": "sha1-HGYPkIlIPMtRE7m6nKGcP0mTNx4=",
|
||||
"requires": {
|
||||
"typo-js": "*"
|
||||
}
|
||||
},
|
||||
"collection-map": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz",
|
||||
@@ -3691,6 +3704,11 @@
|
||||
"object-visit": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"marked": {
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/marked/-/marked-4.0.8.tgz",
|
||||
"integrity": "sha512-dkpJMIlJpc833hbjjg8jraw1t51e/eKDoG8TFOgc5O0Z77zaYKigYekTDop5AplRoKFGIaoazhYEhGkMtU3IeA=="
|
||||
},
|
||||
"matchdep": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz",
|
||||
@@ -5641,6 +5659,16 @@
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz",
|
||||
"integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ=="
|
||||
},
|
||||
"simplemde": {
|
||||
"version": "1.11.2",
|
||||
"resolved": "https://registry.npmjs.org/simplemde/-/simplemde-1.11.2.tgz",
|
||||
"integrity": "sha1-ojo12XjSxA7wfewAjJLwcNjggOM=",
|
||||
"requires": {
|
||||
"codemirror": "*",
|
||||
"codemirror-spell-checker": "*",
|
||||
"marked": "*"
|
||||
}
|
||||
},
|
||||
"snapdragon": {
|
||||
"version": "0.8.2",
|
||||
"resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
|
||||
@@ -6445,6 +6473,11 @@
|
||||
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
|
||||
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
|
||||
},
|
||||
"typo-js": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/typo-js/-/typo-js-1.2.1.tgz",
|
||||
"integrity": "sha512-bTGLjbD3WqZDR3CgEFkyi9Q/SS2oM29ipXrWfDb4M74ea69QwKAECVceYpaBu0GfdnASMg9Qfl67ttB23nePHg=="
|
||||
},
|
||||
"ua-parser-js": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.2.tgz",
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
"node-sass": "^7.0.0",
|
||||
"popper.js": "^1.16.1",
|
||||
"postcss": "^8.4.5",
|
||||
"simplemde": "^1.11.2",
|
||||
"uglify-js": "^3.14.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -226,3 +226,33 @@ html.embedded {
|
||||
max-width: 3em;
|
||||
}
|
||||
}
|
||||
|
||||
.markdown {
|
||||
h1 {
|
||||
font-size: $h1-font-size * 0.75;
|
||||
}
|
||||
h2 {
|
||||
font-size: $h2-font-size * 0.8;
|
||||
}
|
||||
h3 {
|
||||
font-size: $h3-font-size * 0.85;
|
||||
}
|
||||
h4 {
|
||||
font-size: $h4-font-size * 0.9;
|
||||
}
|
||||
h5 {
|
||||
font-size: $h5-font-size * 0.95;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
#rigboard {
|
||||
.markdown {
|
||||
img {
|
||||
max-width: 30rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user