Skip to content

Commit

Permalink
Merge pull request #202 from JohnMulligan/fontawesome_fix
Browse files Browse the repository at this point in the history
fontawesome fix
  • Loading branch information
derekjkeller authored Aug 21, 2024
2 parents 69e05c4 + 1f4914e commit ad92e4a
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 10 deletions.
2 changes: 1 addition & 1 deletion requirements/common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ haversine
libsass==0.13.3
django-appconf==1.0.3
django-compressor==2.2
django-sass-processor
django-sass-processor==1.2.2
django-storages==1.7.1
six==1.10.0
Levenshtein_search
Expand Down
3 changes: 1 addition & 2 deletions voyages/apps/blog/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ class AdvancedEditorManager(forms.Textarea):

class Media:
js = (
'//cdn.tiny.cloud/1/evau54786a4pxb62mp84sjc26h72hrpdu9b5'
'ht3zzn8oisd5/tinymce/5/tinymce.min.js',
'//cdn.tiny.cloud/1/s12zokrfdqicajy5cxdauxuczwq653y00bx98ae9qhwklhh3/tinymce/7/tinymce.min.js',
'scripts/filebrowser/TinyMCEv5Admin.js')

def __init__(self, language=None, attrs=None):
Expand Down
2 changes: 1 addition & 1 deletion voyages/apps/contribute/templates/contribute/interim.html
Original file line number Diff line number Diff line change
Expand Up @@ -1515,7 +1515,7 @@ <h4 class="modal-title" id="create_cargo_dialog_label">{% trans "Add cargo to vo
<script type="text/javascript" src="{{ STATIC_URL }}scripts/library/[email protected]"></script>
<script type="text/javascript" src="{{ STATIC_URL }}scripts/contribute/common.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}scripts/legacy/utils.js"></script>
<script type="text/javascript" src="//cdn.tiny.cloud/1/evau54786a4pxb62mp84sjc26h72hrpdu9b5ht3zzn8oisd5/tinymce/5/tinymce.min.js"></script>
<script type="text/javascript" src="//cdn.tiny.cloud/1/s12zokrfdqicajy5cxdauxuczwq653y00bx98ae9qhwklhh3/tinymce/7/tinymce.min.js"></script>
<!-- I18n of javascript text -->
<script type="text/javascript" src="{% url 'javascript-catalog' %}"></script>
<!-- Use a global JS constant to specify the root of static urls -->
Expand Down
3 changes: 1 addition & 2 deletions voyages/apps/voyage/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ class FlatPageAdmin(FlatPageAdmin):

class Media:
js = (
'//cdn.tiny.cloud/1/evau54786a4pxb62mp84sjc26h72hrpdu9b5'
'ht3zzn8oisd5/tinymce/5/tinymce.min.js',
'//cdn.tiny.cloud/1/s12zokrfdqicajy5cxdauxuczwq653y00bx98ae9qhwklhh3/tinymce/7/tinymce.min.js',
'scripts/tiny_mce/textareas.js',
)

Expand Down
3 changes: 1 addition & 2 deletions voyages/extratools.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ class AdvancedEditor(forms.Textarea):

class Media:
js = (
'//cdn.tiny.cloud/1/evau54786a4pxb62mp84sjc26h72hrpdu9b5'
'ht3zzn8oisd5/tinymce/5/tinymce.min.js',
'//cdn.tiny.cloud/1/s12zokrfdqicajy5cxdauxuczwq653y00bx98ae9qhwklhh3/tinymce/7/tinymce.min.js',
'scripts/tiny_mce/textareas_small.js')

def __init__(self, language=None, attrs=None):
Expand Down
6 changes: 6 additions & 0 deletions voyages/sitemedia/scripts/library/fontawesome-all.min.js

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions voyages/sitemedia/scripts/tiny_mce/textareas_small.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,26 @@ tinymce.init({
{title: 'Test template 2', content: 'Test 2'}
],
});


<!-- Place the first <script> tag in your HTML's <head> -->
<script src="https://cdn.tiny.cloud/1/s12zokrfdqicajy5cxdauxuczwq653y00bx98ae9qhwklhh3/tinymce/7/tinymce.min.js" referrerpolicy="origin"></script>

<!-- Place the following <script> and <textarea> tags your HTML's <body> -->
<script>
tinymce.init({
selector: 'textarea',
plugins: 'anchor autolink charmap codesample emoticons image link lists media searchreplace table visualblocks wordcount checklist mediaembed casechange export formatpainter pageembed linkchecker a11ychecker tinymcespellchecker permanentpen powerpaste advtable advcode editimage advtemplate ai mentions tinycomments tableofcontents footnotes mergetags autocorrect typography inlinecss markdown',
toolbar: 'undo redo | blocks fontfamily fontsize | bold italic underline strikethrough | link image media table mergetags | addcomment showcomments | spellcheckdialog a11ycheck typography | align lineheight | checklist numlist bullist indent outdent | emoticons charmap | removeformat',
tinycomments_mode: 'embedded',
tinycomments_author: 'Author name',
mergetags_list: [
{ value: 'First.Name', title: 'First Name' },
{ value: 'Email', title: 'Email' },
],
ai_request: (request, respondWith) => respondWith.string(() => Promise.reject("See docs to implement AI Assistant")),
});
</script>
<textarea>
Welcome to TinyMCE!
</textarea>
8 changes: 6 additions & 2 deletions voyages/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@
<link href="{% sass_src 'scss/library/[email protected]' %}" rel="stylesheet" type="text/css" />
<link href="{% sass_src 'scss/library/[email protected]' %}" rel="stylesheet" type="text/css" />
{% endcompress %}
<script src="https://kit.fontawesome.com/2ebfe61a88.js"></script>

<!--
<script src="https://kit.fontawesome.com/2ebfe61a88.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/js/all.min.js"></script>
-->

{% block csslist %} {% endblock %}

{% compress js %}
<script src="{{ STATIC_URL }}scripts/library/fontawesome-all.min.js" type="text/javascript"></script>
<script src="{{ STATIC_URL }}scripts/library/[email protected]" type="text/javascript"></script>
<script src="{{ STATIC_URL }}scripts/library/[email protected]" type="text/javascript"></script>
{% endcompress %}
Expand Down

0 comments on commit ad92e4a

Please sign in to comment.