[Sugar-devel] [Karma] Re: What was the tool you used for command-line execution of jQuery stuff?

Bryan Berry bryan at olenepal.org
Fri Aug 7 10:30:28 EDT 2009


On Fri, 2009-08-07 at 19:22 +0545, Christoph Derndorfer wrote:
> 2009/8/7 Bryan Berry <bryan at olenepal.org>
>         > Also, I'm not really interested in the localization but was
>         rather
>         > wondering what the best way was to use jQuery in the
>         building of
>         > Chakra. Because I was thinking about using some sort of
>         empty template
>         > for Chakra which would then be populated with links and
>         menus
>         > according to the lessons available in the directory.
>         
>         
>         I haven't figured that out yet.
>         
>         It may not feasible to use jquery to create chakra. jquery
>         operates on
>         the DOM, which is what the browser renders from the source
>         html and css.
>         I don't know if you can use jQuery to manipulate the DOM and
>         separate it
>         back into css and html.
>         
>         generating the css may be trickier than generating the html on
>         the fly.
>         I will have to look this up.
> 
> 
> Yeah, my thoughts exactly... :-/
> 
> 
> We'll definitely have to do some research into this next week but
> possibly I'll have to start looking into a more full-blown (e.g. Java
> based) solution to get the job done.

Actually, i have been playing w/ this just now and it isn't so hard.

You can manipulate the DOM and then get the resultant html w/ this
command:

$('html').html();

You can then write it to a file. The Only problem is that it takes off
the Doctype declaration and the <html> </html> tags, which may have some
information such as language and RTL or LTR orientation


My karma.js script could do this.

This plugin may help us generate the css from a template but I need to
play w/ it
http://blog.acodingfool.com/2009/07/19/jquery-xcss-plugin/


> 
> Christoph
>  
> -- 
> Christoph Derndorfer
> co-editor, olpcnews
> url: www.olpcnews.com
> e-mail: christoph at olpcnews.com
-- 
Bryan W. Berry
Technology Director
OLE Nepal, http://www.olenepal.org



More information about the Sugar-devel mailing list