You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Giovanni Azua <gi...@imc.nl> on 2008/07/17 10:14:31 UTC
easy way to keep widget css style at default?
hi,
Is there any easy way to have a widget like e.g. dojo's datetimepicker
to keep its original style despite applying any global css?
TIA,
regards,
Giovanni
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: easy way to keep widget css style at default?
Posted by Giovanni Azua <gi...@imc.nl>.
Resolved!
Looking around a bit found couple of JIRA tickets about introducing the
datetimepicker parameter "templateCssPath". Also found the offending
entries in the global css theme. So what I did was to experiment and
create a new css file called datetimepickerfix.css that would resolve
the two offending margin and border settings. I then configured my
datetimepicker definition to:
<sx:datetimepicker templateCssPath="/styles/datetimepickerfix.css"
label="Next Run Date" displayFormat="yyyy.MM.dd"
tooltip="Provide the next date to run the Job" name="nextRunDate"
type="date" onchange="false" toggleType="fade"
toggleDuration="500" />
The style fix is cumulatively and nicely applied to the widget, so
instead of overwriting everything, it only applies the specified
settings on top of the existing default and global settings. Maybe not
the most beautiful solution but works for me ... perhaps a better way
would be extracting the dojo template and fixing the templateCssPath
setting there but then whenever you pull and redefine a template it also
means a maintenance trade-off i.e. you have to keep up sync-ing in every
new release of Struts to keep your redefined templates up to date with
the new version. I personally don't like this.
regards,
Giovanni
PS:
*********************************************
datetimepickerfix.css
*********************************************
table {
font-size: 1em;
margin: 0 0 0 0; /* <=== FIXED here */
padding: 0;
}
.table tfoot th, tfoot td {
border: 0px; /* <=== FIXED here */
text-align: left;
font-size: 1em;
background: #e8e8cf;
}
*********************************************
Giovanni Azua wrote:
> hi,
>
> Is there any easy way to have a widget like e.g. dojo's datetimepicker
> to keep its original style despite applying any global css?
>
> TIA,
> regards,
> Giovanni
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org