On Thu, Nov 26, 2009 at 6:30 PM, hsfrey <[email protected]> wrote:

> Richard:
>
> My diagnosis of missing files in the copy seems correct.
>
> In snooping around, I found a file:
>
> C:\Computers\JavaScript\JQuery\jquery-ui-1.7.2.custom\css\smoothness
> \jquery-ui-1.7.2.custom.css
>

Inside the demo file that comes out of the zip

/jquery-ui-1.7.2.custom/development-bundle/demos/slider

Line 5 is

<link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet"
/>

That file, ui.all.css @imports all necessary css files for a jQuery UI
theme. To make this demo work, the three you need are

ui.core.css
ui.theme.css
ui.slider.css

plus images referenced in ui.theme.css. You can also swap out that url for
any complete jQuery UI theme files css, such as a file named jquery.ui.css
or jquery-ui-1.7.2.custom.css


>
> Adding it to my colorpicker_files folder restored the slider icon and
> the color bars!
>
> Why wasn't that named explicitly somehow in the code so that it would
> be copied with the demo?
>

The reference to the single jquery-ui-1.7.2.custom.css that itself contains
all the css, with no @imports, is not in each demo file, but is in the
index.html in the root of the zip.

The files are referenced individually in the demos because we don't replace
generic relative urls inside the development-bundle folder, to keep the
files consistent with the way they're developed.


>
> However, it doesn't fix everything.
>
> The original has a pencil icon in the header, the copy doesn't.
>
> I found the icon in
> C:\Computers\JavaScript\JQuery\jquery-ui-1.7.2.custom\css\smoothness
> \images
> but I have no idea how to get it into the copy.
>

You need a complete theme. This works if you link to ui.all.css, but only if
the files it @imports and the files they subsequently reference, including
css and images are in the same folder as ui.all.css. It looks like you're
having a problem with Firefox's 'save page as' copying some but not all of a
jQuery UI theme.


>
> Also, the color bars no longer track the handle, but have as a minimum
> length the length which they were initialized to.
>
> The slider demo apparently will work only in situ. Shouldn't demos be
> written in such a way that they can be copied or duplicated by the
> beginning user?
>

The easiest way to get going is to have something in the head that looks
like this:

<link type="text/css" href="css/themename/jquery-ui-1.7.2.custom.css"
rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript"
src="js/jquery-ui-1.7.2.custom.min.js"></script>

Any of the three above urls could be replaced with links to hosted version
on google's CDN, like so:

<link type="text/css" href="
http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/base/jquery-ui.css";
rel="stylesheet" />
<script type="text/javascript" src="
http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js";></script>
<script type="text/javascript" src="
http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js
"></script>

But the first version works great for custom downloads of jQuery UI and
pre-built or custom themes, by just changing the folder name in the css link
href.


>
> Or, is there some other way of copying them, other than using the
> 'save page as' option of the browser? Or, is this a problem with
> Firefox's save algorithm?
>

It looks like it. It seems Firefox doesn't follow @imports in css files when
doing 'save page as', as its ui.css contains

@import "ui.base.css";
@import "ui.theme.css";

but doesn't have these corresponding files, nor any css or image files they
reference.

- Richard

--

You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en.


Reply via email to