- This topic has 2 replies, 3 voices, and was last updated 5 years ago by
alexd.
Viewing 2 reply threads
-
AuthorPosts
-
-
July 17, 2015 at 5:03 pm #4017
conveyMemberHi
I’m using Piklist for making af settings page where I’ve got some repeatable field groups.
How do I make the field groups collapsible so they don’t take up as much space?
Do I have to make a custom template for the group?Regards
Nicolai -
July 17, 2015 at 10:24 pm #4019
SteveKeymaster@convey– Welcome to the Piklist community!
Piklist doesn’t have collapsable field groups. It does have conditionals which may help.
Let us know if that works for you.
-
January 21, 2017 at 7:57 pm #7740
alexdParticipantI ended up adding something which is working here.
Jquery ui widget which toggles height of the parent addmoreIt’s a bit crude right now, as I’m just manually adjusting the addmore group height on widget button toggle, probably the field template would need customizing to make this more robust, but it’s a starting point at least.
/** * * @custom.groupwrapper * */ $(function () { $.widget("custom.groupWrapper", { _create: function () { this.wrapper = $("<span>") .addClass("custom-groupwrapper") .prependTo(this.element); this._createDrawerButton(); }, _createDrawerButton: function () { console.log(this.wrapper); var _this = this; $("<a>") .attr("tabIndex", -1) .attr("title", "Collapse") .prependTo(this.wrapper) .button({ icons: { primary: "ui-icon-triangle-1-s" }, text: false }) .removeClass("ui-corner-all") .addClass("ui-corner-right") .on("click", function () { $(_this.wrapper) .closest('.piklist-field-addmore-wrapper-full') .toggleClass('hide'); }); }, _destroy: function () { this.wrapper.remove(); this.element.show(); } }); //@todo unify combobox autocomplete selector $(".piklist-field-addmore-wrapper-full").groupWrapper(); });draft CSS:
.piklist-field-addmore-wrapper-full { &.hide { height: 100px; overflow: hidden; } } .custom-groupwrapper { position: absolute; right: 0; a { background: none !important; border: none !important; box-shadow: none; } }
-
-
AuthorPosts
Viewing 2 reply threads
- You must be logged in to reply to this topic.