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

    • Improvement
    • Status: Closed
    • Top
    • Resolution: Fixed
    • None
    • 14.1.0
    • plugins-content-blocks
    • None
    • 8
    • Flagged

    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

              Unassigned Unassigned
              ksalic Kenan Salic
              UX Issues UX Issues
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: