Adapting an existing Dojo demo for own use

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Adapting an existing Dojo demo for own use

jaslee
Hi,
I'm a complete beginner with Dojo, although pretty experienced with Javascript. I am blown away with the Dojo examples I have seen and wanted to quickly turn-around the Theme Previewer demo as featured here : http://demos.dojotoolkit.org/demos/themePreviewer/demo.html.

Jumping in at the deep end, I was able copy and adapt the demo quite quickly BUT 1 thing, the link to the main Dojo library which, in my case is still pointing to the one hosted in the demo :-

<script type="text/javascript" src="http://demos.dojotoolkit.org/dojo/dojo.js" data-dojo-config="parseOnLoad: false, async:true"></script>

Changing the link to my own downloaded Dojo library didn't make the demo work. I am aware that the library can be customized to user's needs and perhaps this live demo has specific component and settings that you need to know about to replicate?

Any help or advice would be much appreciated.

Jason

Reply | Threaded
Open this post in threaded view
|

Re: Adapting an existing Dojo demo for own use

wagner


about "specific component": I don't think so.

when you load the page, what your firebug console says?



2012/10/29 jaslee <[hidden email]>
Hi,
I'm a complete beginner with Dojo, although pretty experienced with
Javascript. I am blown away with the Dojo examples I have seen and wanted to
quickly turn-around the Theme Previewer demo as featured here :
http://demos.dojotoolkit.org/demos/themePreviewer/demo.html.

Jumping in at the deep end, I was able copy and adapt the demo quite quickly
BUT 1 thing, the link to the main Dojo library which, in my case is still
pointing to the one hosted in the demo :-



Changing the link to my own downloaded Dojo library didn't make the demo
work. I am aware that the library can be customized to user's needs and
perhaps this live demo has specific component and settings that you need to
know about to replicate?

Any help or advice would be much appreciated.

Jason





--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Adapting-an-existing-Dojo-demo-for-own-use-tp3990900.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
________________________________________________________
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



--
Wagner França Marques
54731643 (vivo)
70768470 (claro)


________________________________________________________
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Adapting an existing Dojo demo for own use

jaslee
Thanks for the speedy reply wagner,
It seems to assume my local "dijit" library location is "localhost/dijit" when I put it somewhere else ("localhost/dojo/dijit").

Also it is looking for "localhost/demos/themePreviewer/nls/src_en-gb.js" which doesn't exist - on the Live demo it is : http://demos.dojotoolkit.org/demos/themePreviewer/nls/src_en-gb.js 
Reply | Threaded
Open this post in threaded view
|

Re: Adapting an existing Dojo demo for own use

wagner

jaslee, I got make themePreviewer works here

to achieve this do the folowing:


1) in this url
http://download.dojotoolkit.org/release-1.8.0/  download
dojo-release-1.8.0-demos.zip      or dojo-release-1.8.0-demos.tar.gz file

(in "demos" dir, there are "themePreviewer" where this demo lives.)



2) put dojo-release-1.8.1 in the same level of demo folder (as a sibling folder)


3) in the demo.html, configure header page like this:

<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">

<title>Theme Previewer</title>


<link rel="stylesheet" href="../../dojo-release-1.8.1/dijit/themes/claro/document.css"/>
<link rel="stylesheet" href="../../dojo-release-1.8.1/dijit/themes/claro/claro.css"/>
<link rel="stylesheet" href="demo.css"/>

<script type="text/javascript" src="../../dojo-release-1.8.1/dojo/dojo.js"
data-dojo-config="parseOnLoad: false, async:true"></script>

<script type="text/javascript" src="src.js"></script>
</head>

its works for me.


I think that work with demos downloaded is a better practice because you can get access to "unbuilded" sources to study it. 


best regards



2012/10/29 jaslee <[hidden email]>
Thanks for the speedy reply wagner,
It seems to assume my local "dijit" library location is "localhost/dijit"
when I put it somewhere else ("localhost/dojo/dijit").

Also it is looking for "localhost/demos/themePreviewer/nls/src_en-gb.js"
which doesn't exist - on the Live demo it is :
http://demos.dojotoolkit.org/demos/themePreviewer/nls/src_en-gb.js



--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Adapting-an-existing-Dojo-demo-for-own-use-tp3990900p3990910.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
________________________________________________________
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



--
Wagner França Marques
54731643 (vivo)
70768470 (claro)


________________________________________________________
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Adapting an existing Dojo demo for own use

jaslee
Thanks Wagner, that's awesome help and enables me to start exploring Dojo properly rather than "hacking around". There are 50+ other demos in the zip file so plenty to get stuck into :)
Reply | Threaded
Open this post in threaded view
|

Re: Adapting an existing Dojo demo for own use

wagner

you are welcome



2012/10/29 jaslee <[hidden email]>
Thanks Wagner, that's awesome help and enables me to start exploring Dojo
properly rather than "hacking around". There are 50+ other demos in the zip
file so plenty to get stuck into :)



--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Adapting-an-existing-Dojo-demo-for-own-use-tp3990900p3990921.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
________________________________________________________
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



--
Wagner França Marques
54731643 (vivo)
70768470 (claro)


________________________________________________________
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest