Skip to content

Commit

Permalink
Merge pull request #35507 from dimagi/jls/webpack-scheduling-old-drop…
Browse files Browse the repository at this point in the history
…-ckeditor

Removed ckeditor5
  • Loading branch information
orangejenny authored Dec 11, 2024
2 parents 0fdaaa5 + b85193a commit 4df3805
Show file tree
Hide file tree
Showing 15 changed files with 10 additions and 1,525 deletions.
192 changes: 0 additions & 192 deletions corehq/apps/hqwebapp/static/hqwebapp/js/ckeditor_knockout_bindings.js

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,7 +5,6 @@ hqDefine("scheduling/js/create_schedule", [
'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 = {
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

0 comments on commit 4df3805

Please sign in to comment.