Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented Aug 31, 2016

This allows to configure icons for specific node classes, so each type of node can have its own icon.

Depends on

/fixes #75

@wouterj wouterj added the ready label Aug 31, 2016
@wouterj wouterj added this to the 2.0 FancyTree & Resource milestone Aug 31, 2016
@wouterj
Copy link
Member Author

wouterj commented Aug 31, 2016

Example: symfony-cmf/cmf-sandbox#347

$class = $this->classMap[$class];
}

$description->set('icon', $this->iconMap[$class]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is an icon in this context? A CSS class or an image?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both are allowed in fancytree

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for context, I am currently doing this:

sycms

Whereby the "image" is added to the description from any image mappings for the (resource) in the content-type component and subsequently used as the thumbnail via. an imagine resize.

Copy link
Member

@dantleech dantleech Aug 31, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what I am trying to ask is if we can use a standard descriptor here rather than one specific to this bundle? i.e. if I were to swap the above browser for the fancy-tree browser it would be good if they would use the same icons / images.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we somehow define this? or have a icon css class enhancer and a icon image enhancer? i guess the css class is good for e.g. image maps?

how does fancytree see whether its a class or an image url?

@dantleech
Copy link
Member

@wouterj Also not sure if you have seen my post to the CMF mailinglist, but I want to split the Resource Descriptor thing out of Resource and into its own repository that is not dependant on resource: https://github.com/dantleech/description

@dbu
Copy link
Member

dbu commented Oct 18, 2016

i restarted the PR build after merging the PR on resource-rest

@wouterj wouterj force-pushed the issue-75/custom-icons branch from c0513a8 to b37894f Compare January 29, 2017 10:47
@wouterj
Copy link
Member Author

wouterj commented Jan 29, 2017

Ready to be merged

@dbu
Copy link
Member

dbu commented Jan 29, 2017

can you fix the year in the configuration class please? (styleci). apart from that i think we can merge this. if you can add some comments in the code aboit image url vs css class, i would appreciate it.

@wouterj wouterj force-pushed the issue-75/custom-icons branch from b37894f to 2c2a77b Compare January 29, 2017 12:16
@wouterj wouterj merged commit cf400aa into master Jan 29, 2017
@wouterj wouterj deleted the issue-75/custom-icons branch January 29, 2017 12:16
@wouterj wouterj removed the wip/poc label Jan 29, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

have css classes on document tree to be able to do document type specific icons

4 participants