[ 2 posts ]

T. Bimske

  • Username: spamspam
  • Joined: Wed Apr 25, 2012 12:22 am
  • Posts: 2
  • Offline
  • Profile

Using components missing night skin assets

Post Posted: Sat Apr 28, 2012 11:25 pm
+0-
Hi there,

I currently use YUI 3.5.0 with "night" as default skin. Using e.g. "console", which is obviously missing a "night" asset, causes a HTTP-status 400 (bad request):

I already saw the previous "Using night skin"-post and would like to know (in general):

how can I tell the loader to use a different location for loading some self-made asset for a component, preventing the missing asset causes a bad request in general?

Demo causing the described bad request:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>Problem-Demonstration</title>
   
   <script src="http://yui.yahooapis.com/3.5.0/build/yui/yui-min.js"></script>
</head>
<body class="yui3-skin-night">
<script>
YUI({
   skin: 'night'
}).use(
   "panel"
   // using "console" in next line will cause
   // a HTTP-status 400 (Bad Request) made by loader
   , "console"
   , function (Y) {
   }
);
</script>
</body>
</html>

T. Bimske

  • Username: spamspam
  • Joined: Wed Apr 25, 2012 12:22 am
  • Posts: 2
  • Offline
  • Profile
Tags:

Re: Using components missing night skin assets

Post Posted: Wed May 02, 2012 10:10 pm
+0-
One of the working solutions I found, but not very elegant, as one has to specify any CSS for any used component manually:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>Solution-Demonstration 1</title>
   
   <script src="http://yui.yahooapis.com/3.5.0/build/yui/yui-min.js"></script>
   <style type="text/javascript" href="http://yui.yahooapis.com/combo?3.5.0/build/panel/assets/skins/night/panel.css" />
   <!-- load some self-defined css for console here... -->
</head>
<body class="yui3-skin-night">
<script>
YUI({
   skin: 'night',
   // loader won't load any CSS
   "fetchCSS": false
}).use(
   "panel"
   // no more problem now
   , "console"
   , function (Y) {
   }
);
</script>
</body>
</html>
  [ 2 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum