-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all,
for some Dialogs that are written in pure JAVA i need style declaration like the zul-code above.
Some styles work directly on the window other like '.GridLayoutNoBorder' i'm declaring in zul with the attribut sclass=".GridLayoutNoBorder".
1. HOW can i do this in pure java ?
2. What is a propper way if i need such style declarations often more.
3. Does someone works in that way to load at application startup such an additional css ?
<window border="none" width="100%"> <style dynamic="true"> body { padding: 0 0; /* 0 padding on top and bottom and 0 padding on right and left */ } <!-- remove white strips between the toolbars --> .hboxRemoveWhiteStrips td.z-hbox-sep {width: 0; padding:0;} <!-- cut the vertical borders in the rows of the GRID --> tr.z-row td.z-row-inner { border-right: 0px #CCC; } <!-- Make Plain Grid + smaller comps Padding --> <!-- !!!"overflow:hidden;" not working in Chrome/Safari --> .GridLayoutNoBorder tr.z-row td.z-row-inner, tr.z-row, div.z-grid-body .z-cell,div.z-grid { border: none; zoom: 1; background: white; border-top: none; border-left: none; border-right: none; border-bottom: none; padding: 1px;} <!-- Title in bold letters --> .z-groupbox-hl .z-groupbox-header { color: #000000; font-weight: bold; } <!-- Disabled datebox should have black font --> .z-datebox { font: #000000;} </style> . . . // comps are here
thanks
Stephan
Hi samchuang,
thanks, please complete your statement with a sample for the corresponding lang-addon.xml entry.
thx
Stephan
Hi, Stephan
in lang-addon, we can define CSS file, java script to load for each page
<language-addon> <addon-name>addon</addon-name> <depends>zul</depends> <language-name>xul/html</language-name> <!-- Note: JavaScript/CSS that are listed here will be loaded no matter what language is used. --!> <javascript src="~./js/zul.wpd" charset="UTF-8"/> <stylesheet href="~./zul/css/zk.wcs" type="text/css"/> </language-addon>
OK, thanks,
i have played with the path, now it works ok.
<language-addon> . . . <stylesheet href="/zul/css/myCSS.css" type="text/css" /> </language-addon>
where the path is:
maven-project:
.../webapp/zul/css/myCSS.css
ant-project:
.../WebContent/zul/css/myCSS.css
best
Stephan
styles defined in wcs file can't be applied.
All .ZUL files are placed in WebContent(root) folder
lang-addon.xml(placed in WebContent folder)
<?xml version="1.0" encoding="UTF-8"?> <language-addon> <addon-name>addon</addon-name> <depends>zul,zkex,zkmax</depends> <language-name>xul/html</language-name> <stylesheet href="~./prod.wcs" type="text/css"/> </language-addon>
prod.wcs(placed in WebContent folder)
.headtoolbar { background: green; } .alignright { position:absolute; left:665px } .whitebutton { border:1px solid #666666; background-color:#ffffff; background-repeat:repeat-x; background-position:top left; font-family:arial; font-weight:bold; text-decoration:none; font-size:13px; color:#000; padding-top:2px; padding-bottom:2px; padding-left:2px; padding-right:2px; } .blackadd { border:1px solid #666666; background-color:#000000; background-repeat:repeat-x; background-position:top left; font-family:arial; font-weight:bold; text-decoration:none; font-size:13px; color:#f; padding-top:2px; padding-bottom:2px; padding-left:2px; padding-right:2px; }
Hi Samchuang thanks for responding,
My Understanding-
The styles in .wcs file will be applied to all .zul files in WebContent(root) folder.
Tested all combination of ~./ ,tested also with .css extension, restarted server for each XML change. But the styles are not applied.
or Do i need to declare any in .zul file.
index.zul (see above for other files)
<toolbar mold="panel" align="end"> <hbox > <div class="whitebutton"> <button label="Save" width="60px" /> <button label="Continue" /> </div> </hbox> </toolbar> </window> </zk>
Asked: 2010-07-15 14:06:41 +0800
Seen: 348 times
Last updated: Dec 13 '10