Working with yui-min.js offline

180 views
Skip to first unread message

Wotan

unread,
Sep 13, 2014, 11:32:00 AM9/13/14
to yui-s...@googlegroups.com
Hi, I am working with the yui-uploader on my page. I downloaded to my server yui-min.js and included to my web.

But still everytime I use the uploader on my web, it is connecting to yui.yahooapis.com.

How can I make it to work without connecting to this page? Even if I work with that on my localhost, it is still connecting to that page. Seems that yui-min,js includes something inside that is connecting the yahooapis.com server.

I better want my web not dependent on any other servers, it slows down the upload script.

John Lindal

unread,
Sep 17, 2014, 1:03:17 PM9/17/14
to Wotan, yui-s...@googlegroups.com
yui-min.js only contains the “seed”, not all of YUI.  You need to download the full YUI source and host it on your web server.  Then you need to set the following configurations before you load yui-min.js:

YUI.GlobalConfig =
{
combine: false,
base:    'assets/yui/',
groups:
{
gallery:
{
combine:   false,
base:      'assets/yui-gallery/',
patterns:
{
'gallery-':      { },
'lang/gallery-': { },
'gallerycss-':   { type: 'css' }
},
update: function() { }
}
}
};

This assumes that you unpacked the YUI build directory into assets/yui.  It also allows you to put gallery modules in assets/yui-gallery.

John

--
You received this message because you are subscribed to the Google Groups "yui-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yui-support...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wotan

unread,
Sep 17, 2014, 2:52:57 PM9/17/14
to yui-s...@googlegroups.com, jozef.s...@gmail.com
thank you, but can you please help me with this? I am only using yui uploader, for what I need the whole 30MB package?

I downloaded the package and hosted on my server in assets/yui/.

Now to my file I entered:

YUI.GlobalConfig =
{
combine: false,
base:    'assets/yui/',
groups:
{
gallery:
{
combine:   false,
base:      'assets/yui-gallery/',
patterns:
{
'gallery-':      { },
'lang/gallery-': { },
'gallerycss-':   { type: 'css' }
},
update: function() { }
}
}
};

and immediately after this I included <script src="js/yui-min.js"></script>

I don't know if I shoul replace the gallery group there or what to put instead, but it is still connecting to yahooapis server, so this helps not....

Can you please help?


Dňa streda, 17. septembra 2014 19:03:17 UTC+2 John Lindal napísal(-a):

John Lindal

unread,
Sep 17, 2014, 3:49:39 PM9/17/14
to Wotan, yui-s...@googlegroups.com
YUI uploader still requires a bunch of the core components.  You could trim out the other widgets, if you want.

I think you need to load yui-min.js from the same location:  assets/yui/yui/yui-min.js

John
Reply all
Reply to author
Forward
0 new messages