You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2021/07/13 22:23:29 UTC

[airavata-django-portal] branch develop updated (5c8005f -> 0f3d067)

This is an automated email from the ASF dual-hosted git repository.

machristie pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git.


    from 5c8005f  AIRAVATA-3383 Removing unnecessary SHARING API settings
     add 4004146  AIRAVATA-3420 Add back 'hidden' field for backwards compat in remote API
     add 99e552e  AIRAVATA-3487 Default write access to passed in GRP object
     new 436e05a  Merge branch 'staging' into develop
     new 0f3d067  AIRAVATA-3488 Enable some additional feature in RichTextBlock

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../GroupComputeResourcePreference.vue             | 10 +++---
 django_airavata/apps/api/serializers.py            |  1 +
 django_airavata/wagtailapps/base/wagtail_hooks.py  | 41 +++++-----------------
 3 files changed, 14 insertions(+), 38 deletions(-)

[airavata-django-portal] 01/02: Merge branch 'staging' into develop

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit 436e05ada41cda2f3af8b75512d59c05a5f971dc
Merge: 5c8005f 99e552e
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Tue Jul 13 18:02:04 2021 -0400

    Merge branch 'staging' into develop

 .../GroupComputeResourcePreference.vue                         | 10 +++++-----
 django_airavata/apps/api/serializers.py                        |  1 +
 2 files changed, 6 insertions(+), 5 deletions(-)

[airavata-django-portal] 02/02: AIRAVATA-3488 Enable some additional feature in RichTextBlock

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit 0f3d06777befa8f65a5360bea687cd324e497a7f
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Tue Jul 13 18:23:12 2021 -0400

    AIRAVATA-3488 Enable some additional feature in RichTextBlock
---
 django_airavata/wagtailapps/base/wagtail_hooks.py | 41 +++++------------------
 1 file changed, 8 insertions(+), 33 deletions(-)

diff --git a/django_airavata/wagtailapps/base/wagtail_hooks.py b/django_airavata/wagtailapps/base/wagtail_hooks.py
index 0f93542..11e211a 100644
--- a/django_airavata/wagtailapps/base/wagtail_hooks.py
+++ b/django_airavata/wagtailapps/base/wagtail_hooks.py
@@ -1,10 +1,6 @@
 import logging
 
-import wagtail.admin.rich_text.editors.draftail.features as draftail_features
 from django.shortcuts import redirect
-from wagtail.admin.rich_text.converters.html_to_contentstate import (
-    InlineStyleElementHandler
-)
 from wagtail.core import hooks
 
 logger = logging.getLogger(__name__)
@@ -13,35 +9,14 @@ logger = logging.getLogger(__name__)
 @hooks.register('register_rich_text_features')
 def register_custom_style_feature(features):
 
-    feature_name = 'purple'
-    type_ = feature_name.upper()
-    tag = 'span'
-    detection = '{tag}[class="{feature_name}"]'.format(
-        tag=tag, feature_name=feature_name)
-
-    control = {
-        'type': type_,
-        'description': 'Purple Color',
-        # This should be an svg which will occupy a 1024x1024 viewbox
-        'icon': ['M100 100 H 900 V 900 H 100 Z'],
-        'label': 'purple',
-        # .purple is the class which is defined in draft-colors.css . It is necessary to get this style working.
-        'style': {'color': 'purple'},
-    }
-
-    features.register_editor_plugin(
-        'draftail', feature_name, draftail_features.InlineStyleFeature(control)
-    )
-
-    db_conversion = {
-        'from_database_format': {detection: InlineStyleElementHandler(type_)},
-        'to_database_format': {'style_map': {type_: {'element': tag, 'props': {'class': feature_name}}}},
-    }
-
-    features.register_converter_rule(
-        'contentstate', feature_name, db_conversion)
-
-    features.default_features.append(feature_name)
+    features.default_features.insert(5, 'h1')
+    features.default_features.insert(9, 'h5')
+    features.default_features.insert(10, 'h6')
+    features.default_features.append('superscript')
+    features.default_features.append('subscript')
+    features.default_features.append('code')
+    features.default_features.append('blockquote')
+    # logger.debug(f"default_features={features.default_features}")
 
 
 DIRECT_SERVE_FILE_EXTENSIONS = ["pdf"]