Semantics: Container type group
Submitted by chpappis on Tue, 05/12/2015 - 11:49
Forums:
Hi,
I would like to make the container type group to be opened when the h5p editor loads.
For example when a user adds a timeline content type the group timeline is closed and he has to press the arrow for it to open and show its contents.
Is there an option I can add to semantics.json ?
Or do I have to change the corresponding .js file ?
Thank you
falcon
Tue, 05/12/2015 - 12:59
Permalink
Yeah, it's a missing feature
Yeah, it's a missing feature in semantics. You should be able to say that a group should be expanded by default, but you can't at the moment. We would be happy to receive a pull request for this. This is the file you'd want to change:
https://github.com/h5p/h5p-editor-php-library/blob/master/scripts/h5pedi...
chpappis
Wed, 05/20/2015 - 13:27
Permalink
I have added a pull request
I have added a pull request.
Added check if group should be expanded. Default is to be expanded unless explicitly defined in semantics by optional attribute "expanded".
If the user does not want the group to be expanded he should add
"expanded": false
in the corresponding semantics file.
I have not tested it thoroughly but it seems to be working
falcon
Wed, 05/20/2015 - 13:41
Permalink
Great. I've added a high