[Geoserver-devel] customizing css globally

I have put together a patch that allows for css to be contributed globally via an extension point. The use case being to customize the geoserver default css easily.

The patch is attached to this jira:

http://jira.codehaus.org/browse/GEOS-3518

There may be a better or easier way to do this with wicket, so if so please speak up. However from what i can see it seems only easy to do it on a page by page basis, but since GeoServerBasePage is used for the base page of all pages, it seems hard to do an override globally.

Feedback welcome.

-Justin

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Justin Deoliveira ha scritto:

I have put together a patch that allows for css to be contributed globally via an extension point. The use case being to customize the geoserver default css easily.

The patch is attached to this jira:

http://jira.codehaus.org/browse/GEOS-3518

There may be a better or easier way to do this with wicket, so if so please speak up. However from what i can see it seems only easy to do it on a page by page basis, but since GeoServerBasePage is used for the base page of all pages, it seems hard to do an override globally.

Feedback welcome.

The patch looks good to me.
From what I can see the approach is addictive, in that the standard
CSS set remains in the header of the GeoServerBasePage and the ones
added are listed later and have a possibility to override, right?

I guess it makes sense, one would probably not want to rewrite everything from scratch.

If I may, the only thing that does not seem to read easily is

if (csscontrib.apply(this))

"apply" does not look like a question, more like an order.
What about "contributes" or "applies" or "appliesTo"?

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Thanks for the review Andrea. And I agree, apply() is no the best name. Will change it to appliesTo().

-Justin

Andrea Aime wrote:

Justin Deoliveira ha scritto:

I have put together a patch that allows for css to be contributed globally via an extension point. The use case being to customize the geoserver default css easily.

The patch is attached to this jira:

http://jira.codehaus.org/browse/GEOS-3518

There may be a better or easier way to do this with wicket, so if so please speak up. However from what i can see it seems only easy to do it on a page by page basis, but since GeoServerBasePage is used for the base page of all pages, it seems hard to do an override globally.

Feedback welcome.

The patch looks good to me.
From what I can see the approach is addictive, in that the standard
CSS set remains in the header of the GeoServerBasePage and the ones
added are listed later and have a possibility to override, right?

I guess it makes sense, one would probably not want to rewrite everything from scratch.

If I may, the only thing that does not seem to read easily is

if (csscontrib.apply(this))

"apply" does not look like a question, more like an order.
What about "contributes" or "applies" or "appliesTo"?

Cheers
Andrea

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.