Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed ckeditor5 #35507

Merged
merged 7 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

8 changes: 0 additions & 8 deletions corehq/messaging/scheduling/models/content.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
from contextlib import contextmanager
from copy import deepcopy
from datetime import datetime, timezone
Expand All @@ -10,7 +9,6 @@
from django.http import Http404
from django.utils.translation import gettext as _

import css_inline
import jsonfield as old_jsonfield
from memoized import memoized

Expand Down Expand Up @@ -164,12 +162,6 @@ def send(self, recipient, logged_event, phone_entry=None):
self.html_message,
recipient.get_language_code()
)
# Add extra css added by CKEditor, and inline css styles from template
email_css_filepath = os.path.join(
"corehq", "messaging", "scheduling", "templates", "scheduling", "rich_text_email_styles.css")
with open(email_css_filepath, 'r') as css_file:
css_inliner = css_inline.CSSInliner(extra_css=css_file.read())
html_message = css_inliner.inline(html_message)

try:
subject, message, html_message = self.render_subject_and_message(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,20 @@
'hqwebapp/js/select2_handler',
'jquery-ui/ui/widgets/datepicker',
'bootstrap-timepicker/js/bootstrap-timepicker',
'hqwebapp/js/ckeditor_knockout_bindings',
'hqwebapp/js/components/select_toggle',
], function ($, ko, initialPageData, select2Handler) {
ko.bindingHandlers.useTimePicker = {
init: function (element, valueAccessor, allBindings, viewModel, bindingContext) {

Check failure on line 11 in corehq/messaging/scheduling/static/scheduling/js/create_schedule.js

View workflow job for this annotation

GitHub Actions / Lint Javascript

'valueAccessor' is defined but never used

Check failure on line 11 in corehq/messaging/scheduling/static/scheduling/js/create_schedule.js

View workflow job for this annotation

GitHub Actions / Lint Javascript

'allBindings' is defined but never used

Check failure on line 11 in corehq/messaging/scheduling/static/scheduling/js/create_schedule.js

View workflow job for this annotation

GitHub Actions / Lint Javascript

'viewModel' is defined but never used

Check failure on line 11 in corehq/messaging/scheduling/static/scheduling/js/create_schedule.js

View workflow job for this annotation

GitHub Actions / Lint Javascript

'bindingContext' is defined but never used
$(element).timepicker({
showMeridian: false,
showSeconds: false,
defaultTime: $(element).val() || '',
});
},
update: function (element, valueAccessor, allBindings, viewModel, bindingContext) {},

Check failure on line 18 in corehq/messaging/scheduling/static/scheduling/js/create_schedule.js

View workflow job for this annotation

GitHub Actions / Lint Javascript

'element' is defined but never used

Check failure on line 18 in corehq/messaging/scheduling/static/scheduling/js/create_schedule.js

View workflow job for this annotation

GitHub Actions / Lint Javascript

'valueAccessor' is defined but never used

Check failure on line 18 in corehq/messaging/scheduling/static/scheduling/js/create_schedule.js

View workflow job for this annotation

GitHub Actions / Lint Javascript

'allBindings' is defined but never used

Check failure on line 18 in corehq/messaging/scheduling/static/scheduling/js/create_schedule.js

View workflow job for this annotation

GitHub Actions / Lint Javascript

'viewModel' is defined but never used

Check failure on line 18 in corehq/messaging/scheduling/static/scheduling/js/create_schedule.js

View workflow job for this annotation

GitHub Actions / Lint Javascript

'bindingContext' is defined but never used
};

var MessageViewModel = function (language_code, message) {

Check failure on line 21 in corehq/messaging/scheduling/static/scheduling/js/create_schedule.js

View workflow job for this annotation

GitHub Actions / Lint Javascript

Identifier 'language_code' is not in camel case
var self = this;

self.language_code = ko.observable(language_code);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
{% js_entry_b3 'scheduling/js/conditional_alert_main' %}

{% block stylesheets %}{{ block.super }}
{% if request|toggle_enabled:"RICH_TEXT_EMAILS" %}
<link rel="stylesheet" href="https://cdn.ckeditor.com/ckeditor5/44.0.0/ckeditor5.css" />
{% endif %}
<style>
.nav-tabs li.has-error a, .nav-tabs li.has-error a:focus, .nav-tabs li.has-error a:hover {
background-color: #f2dede;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
{% load hq_shared_tags %}
{% load i18n %}

{% block stylesheets %}{{ block.super }}
{% if request|toggle_enabled:"RICH_TEXT_EMAILS" %}
<link rel="stylesheet" href="https://cdn.ckeditor.com/ckeditor5/44.0.0/ckeditor5.css" />
{% endif %}
{% endblock %}

{% js_entry_b3 'scheduling/js/create_schedule_main' %}

{% block page_content %}{{ block.super }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
</div>

<div class="controls translation-controls" data-bind="visible: !translate()">
<textarea data-bind="ckeditor: nonTranslatedMessage" data-image-upload-url="upload_messaging_image"></textarea>
<textarea rows=10 class="form-control" data-bind="text: nonTranslatedMessage" data-image-upload-url="upload_messaging_image"></textarea>
</div>

<div data-bind="visible: translate(), foreach: translatedMessages">
<div class="controls translation-controls">
<label>{% trans "Translation" %} (<span data-bind="text: language_code"></span>):</label>
<textarea data-bind="ckeditor: html_message" data-image-upload-url="upload_messaging_image"></textarea>
<textarea rows=10 class="form-control" data-bind="text: html_message" data-image-upload-url="upload_messaging_image"></textarea>
</div>
</div>
Loading
Loading