Uploaded image for project: '[Read Only] - Hippo Plugins'
  1. [Read Only] - Hippo Plugins
  2. HIPPLUG-1569

Improvement Content Blocks Plugin - Collapsible (community supplied)

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Top
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 14.1.0
    • Component/s: plugins-content-blocks
    • Labels:
      None
    • Similar issues:
    • Story Points:
      8
    • Flagged:
      Flagged
    • Processed by team:
      Turing

      Description

      "Onderstaand de code voor deze (voor ons project heel nuttige) uitbreiding. Wellicht kun je er bij Bloomreach ook wat mee in een volgende versie van de Contentblocks. Dit is een vrij minimalistische versie, maar met een beetje extra styling kan het nog wat mooier worden."

      public class CollapsibleContentBlocksFieldPlugin extends ContentBlocksFieldPlugin {

      public CollapsibleContentBlocksFieldPlugin(IPluginContext context, IPluginConfig config)

      { super(context, config); }

      @Override
      protected void populateEditItem(Item<IRenderService> item, JcrNodeModel model) {
      super.populateEditItem(item, model);
      Component itemTitle = item.get("itemTitle");
      if (itemTitle != null)

      { itemTitle.add(new AttributeAppender("onclick", "$(this).parent().parent().children('.hippo-editor-field-subfield').toggle()")); itemTitle.add(new AttributeAppender("style", "cursor: pointer;color:blue;")); }

      }
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ksalic Kenan Salic
                Owner:
                UX Chapter
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: