Re: CSS load order in 6.x

2013-01-11 Thread vp143
Just to let everyone know, I ended up resolving this issue but changing to
http://www.7thweb.net/wicket-jquery-ui/ DatePicker. I prefer this DatePicker
(so far) for other reasons too.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CSS-load-order-in-6-x-tp4654942p4655298.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: CSS load order in 6.x

2012-12-28 Thread vp143
Many thanks for your help.

This is what I have done:

public class YUICalendarCssResourceReference extends CssResourceReference {
private static final long serialVersionUID = 1L;

public YUICalendarCssResourceReference() {
super(YUICalendarCssResourceReference.class, yui.css);
}

public Iterable? extends HeaderItem getDependencies() {
ListHeaderItem dependencies = new ArrayListHeaderItem(); 
dependencies.add(CssHeaderItem.forReference(new
CssResourceReference(YuiLib.class,
calendar/assets/skins/sam/calendar.css)));
 
return dependencies;
}
}

And then in my page:
@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response); 
response.render(CssHeaderItem.forReference(APP_CSS)); //my css 
file 
response.render(CssHeaderItem.forReference(new
YUICalendarCssResourceReference()));
}

Where yui.css is my custom css
Firstly is the above correct?

The result is that in the source the .css files appear correctly.
However, visually it does not work. Looking at Firebug I have the following
css files loaded:
1) app-ver-.css
2)
wicket/resource/org.apache.wicket.extensions.yui.YuiLib/calendar/assets/skins/sam/calendar-ver-1356690284000.css
3) yui-ver-.css
4)
wicket/resource/org.apache.wicket.extensions.yui.YuiLib/calendar/assets/skins/sam/calendar.css

My understanding is that the 4th css file should not be loaded there.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CSS-load-order-in-6-x-tp4654942p4655095.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: CSS load order in 6.x

2012-12-28 Thread Martin Grigorov
Hi,

I also  think that 4) should not be loaded at all.
I guess that YUI itself loads it. YUI supports its own dependency
management.
Check what is rendered by Wicket in the HTML.


On Fri, Dec 28, 2012 at 1:20 PM, vp143 vishal.po...@cipriati.co.uk wrote:

 Many thanks for your help.

 This is what I have done:

 public class YUICalendarCssResourceReference extends CssResourceReference {
 private static final long serialVersionUID = 1L;

 public YUICalendarCssResourceReference() {
 super(YUICalendarCssResourceReference.class, yui.css);
 }

 public Iterable? extends HeaderItem getDependencies() {
 ListHeaderItem dependencies = new
 ArrayListHeaderItem();
 dependencies.add(CssHeaderItem.forReference(new
 CssResourceReference(YuiLib.class,
 calendar/assets/skins/sam/calendar.css)));

 return dependencies;
 }
 }

 And then in my page:
 @Override
 public void renderHead(IHeaderResponse response) {
 super.renderHead(response);
 response.render(CssHeaderItem.forReference(APP_CSS)); //my
 css file
 response.render(CssHeaderItem.forReference(new
 YUICalendarCssResourceReference()));
 }

 Where yui.css is my custom css
 Firstly is the above correct?

 The result is that in the source the .css files appear correctly.
 However, visually it does not work. Looking at Firebug I have the following
 css files loaded:
 1) app-ver-.css
 2)

 wicket/resource/org.apache.wicket.extensions.yui.YuiLib/calendar/assets/skins/sam/calendar-ver-1356690284000.css
 3) yui-ver-.css
 4)

 wicket/resource/org.apache.wicket.extensions.yui.YuiLib/calendar/assets/skins/sam/calendar.css

 My understanding is that the 4th css file should not be loaded there.



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/CSS-load-order-in-6-x-tp4654942p4655095.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Re: CSS load order in 6.x

2012-12-28 Thread vp143
The HTML source appears correctly to me:

link rel=stylesheet type=text/css
href=../../../../wicket/resource/web.pages.BasePage/::/::/::/css/app-ver-1356687988000.css
/
link rel=stylesheet type=text/css
href=../../../../wicket/resource/org.apache.wicket.extensions.yui.YuiLib/calendar/assets/skins/sam/calendar-ver-1356690284000.css
/
link rel=stylesheet type=text/css
href=../../../../wicket/resource/web.wicket.extensions.YUICalendarCssResourceReference/yui-ver-1356640705000.css
/

It is a bit strange that there is no reference to 4) at all in the source
but Firebug loads it.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CSS-load-order-in-6-x-tp4654942p4655097.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: CSS load order in 6.x

2012-12-28 Thread Martin Grigorov
Read about YUILoader : http://developer.yahoo.com/yui/yuiloader/
Some .js file uses it to load 4) dynamically.


On Fri, Dec 28, 2012 at 4:12 PM, vp143 vishal.po...@cipriati.co.uk wrote:

 The HTML source appears correctly to me:

 link rel=stylesheet type=text/css

 href=../../../../wicket/resource/web.pages.BasePage/::/::/::/css/app-ver-1356687988000.css
 /
 link rel=stylesheet type=text/css

 href=../../../../wicket/resource/org.apache.wicket.extensions.yui.YuiLib/calendar/assets/skins/sam/calendar-ver-1356690284000.css
 /
 link rel=stylesheet type=text/css

 href=../../../../wicket/resource/web.wicket.extensions.YUICalendarCssResourceReference/yui-ver-1356640705000.css
 /

 It is a bit strange that there is no reference to 4) at all in the source
 but Firebug loads it.



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/CSS-load-order-in-6-x-tp4654942p4655097.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


CSS load order in 6.x

2012-12-19 Thread Vishal Popat
Hi,

I have been migrating my website from 1.4.x to 6.x (6.3 at the moment).
Previously, I had my own css for YUI calendar which was loading correctly i.e. 
overwriting the YUI calendar version.
However, in 6.x it is no longer working. Checking the css, its seems to be 
loading calendar.css after my app.css.

Does anyone know of any way to change the order of the CSS.

One way I found was here 
http://javathoughts.capesugarbird.com/2009/06/css-load-order-with-wicket-and-external.html
However, 6.x adds the -ver-timestamp to the end which means that it loads two 
versions of the same css.

Many thanks
Vishal
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: CSS load order in 6.x

2012-12-19 Thread Martin Grigorov
Hi,

Check the new dependency management in Wicket 6:
http://wicketinaction.com/2012/07/wicket-6-resource-management/


On Wed, Dec 19, 2012 at 6:18 PM, Vishal Popat
vishal.po...@cipriati.co.ukwrote:

 Hi,

 I have been migrating my website from 1.4.x to 6.x (6.3 at the moment).
 Previously, I had my own css for YUI calendar which was loading correctly
 i.e. overwriting the YUI calendar version.
 However, in 6.x it is no longer working. Checking the css, its seems to be
 loading calendar.css after my app.css.

 Does anyone know of any way to change the order of the CSS.

 One way I found was here
 http://javathoughts.capesugarbird.com/2009/06/css-load-order-with-wicket-and-external.html
 However, 6.x adds the -ver-timestamp to the end which means that it loads
 two versions of the same css.

 Many thanks
 Vishal
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/