[TYPO3-core] RFC: #17413: ExtJs Theme - use grey folder items for tree by default

Ernesto Baschny [cron IT] ernst at cron-it.de
Mon Jan 31 15:33:56 CET 2011


Steffen Kamper schrieb am 30.01.2011 23:14:
> Hi,
> 
> this is a SVN patch request.
> 
> Type: Bugfix
> 
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=17413
> 
> Branches: 4_5, trunk
> 
> If you define a simple ExtJS Tree in ExtJS you get yellow folder gifs as
> default.
> 
> Change them to be grey by using items from sprite.

Looks cool, but hardcoding the sprite coordinates like this will turn
that unmaintainable. We cannot rely that the icon will be at that
position on future sprite generations.

Some background info:

To get this icon, the class should have been:

* For a Folder:
	t3-icon t3-icon-apps t3-icon-apps-pagetree t3-icon-pagetree-folder-default

* For a page Page:
	t3-icon t3-icon-apps t3-icon-apps-pagetree t3-icon-pagetree-page-default

In the generated CSS we have:

.t3-icon-apps {
	background-image: url(sprites/t3skin.png);
	height: 16px;
	width: 16px;
}
.t3-icon-pagetree-folder-default { background-position: -126px -126px }
.t3-icon-pagetree-page-default { background-position: -252px -126px }
.t3-icon-folder-opened { background-position: -18px -216px }


Maybe there is way to "overwrite" the ExtJS methods which create a tree
to just add those classes by default?

If this is not possible, I would rather try to "mark" those manually
created rules which point to sprites at least with the information which
sprite is being used here (i.e. t3-icon-pagetree-page-default or
t3-icon-folder-opened), so that this part can be at least found when
later on the sprite is generated with different coordinates.

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list