Great!<div>I've added the missing JS to the github project (as you did), so checking out that project should be enough for it to run.</div><div><br></div><div>I'll make the jquery changes as soon as possible</div><div>
<br></div><div>Take care,</div><div><br></div><div>Ze Maria<br><br><div class="gmail_quote">On Fri, Oct 9, 2009 at 7:51 AM, Bryan Berry <span dir="ltr"><<a href="mailto:bryan@olenepal.org">bryan@olenepal.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hey Ze, I have realized that cloning the whole Karma repo is quite<br>
confusing to new people.<br>
<br>
I have created the karma-starter package that should make it easier to<br>
create a stand-alone lesson:<br>
<a href="http://git.sugarlabs.org/projects/karma-starter/repos/mainline" target="_blank">http://git.sugarlabs.org/projects/karma-starter/repos/mainline</a><br>
<br>
On Fri, 2009-10-09 at 10:35 +0545, Bryan Berry wrote:<br>
> Hey Ze,<br>
><br>
> Great start!<br>
><br>
> I cloned your git repo and made a few changes<br>
> <a href="http://github.com/bryanwb/Conozco-Uruguay" target="_blank">http://github.com/bryanwb/Conozco-Uruguay</a><br>
><br>
><br>
> Just a few notes:<br>
><br>
> U don't need the xml declaration anymore w/ html5<br>
> so <?xml version="1.0" encoding="iso-8859-1"?> and<br>
> xmlns="<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>" are no longer needed<br>
><br>
> all u need is <!DOCTYPE html><br>
><br>
> I have copied the needed js files into js/ so u can run it as a<br>
> standalone. Perhaps I should create a karma-base package that just has<br>
> all requirements for creating a standalone lesson and nothing more.<br>
><br>
> You can use jquery methods to make your code more succinct<br>
><br>
> for instance:<br>
><br>
> document.getElementById('mycanvas').addEventListener( . . .<br>
><br>
> can become<br>
><br>
> $('#mycanvas').bind('click', clicked, false);<br>
><br>
> and<br>
><br>
> document.getElementById('question').innerHTML = q.getPhrase;<br>
><br>
> can become<br>
><br>
> $('#question').html(q.getPhrase);<br>
><br>
><br>
> I also see that you used static coordinates to represent the cities.<br>
> This means the image can't be resized for different screen resolutions.<br>
> It would be neat if we could do the same image as an SVG w/ the names of<br>
> the capitals embedded as nodes. Then you could attach an event listener<br>
> to each node.<br>
><br>
> Each node would have an ID matching the City name and class="cities".<br>
> You could then match the ID of the element clicked on against the city<br>
> named in the question.<br>
><br>
> Unfortunately, I have no idea how to do this ;)<br>
><br>
><br>
> On Thu, 2009-10-08 at 18:04 +0100, Ze maria wrote:<br>
> > Hello guys,<br>
> > I started a port of the activity "Conozco Uruguay" (available at<br>
> > <a href="http://activities.sugarlabs.org/en-US/sugar/addon/4199" target="_blank">http://activities.sugarlabs.org/en-US/sugar/addon/4199</a>) from Python to<br>
> > the new Karma framework (downloaded from:<br>
> > <a href="http://git.sugarlabs.org/projects/karma" target="_blank">http://git.sugarlabs.org/projects/karma</a>).<br>
> > I'm new to html5 and to the canvas element so don't be scared by the<br>
> > lookn'feel :)<br>
> ><br>
> ><br>
> > Currently to only thing implemented is the capital game, where a<br>
> > person guesses where which capital of the state is located.<br>
> ><br>
> ><br>
> > By the way, I coulnd't get to work the Raphael function 'print', every<br>
> > time I try to use I get a :<br>
> ><br>
> ><br>
> > Error: f.fonts is undefined<br>
> > Source File:<br>
> > file:///Users/zemariamm/workspace/olenepal/mainline/js/raphael-min.js<br>
> > Line: 7<br>
> ><br>
> ><br>
> ><br>
> ><br>
> > The code is available at <a href="http://github.com/zemariamm/Conozco-Uruguay" target="_blank">http://github.com/zemariamm/Conozco-Uruguay</a><br>
> > Comments, critics and sugestions are all welcome :)<br>
> ><br>
> ><br>
> > (To run the code just download the new karma framework and drop the<br>
> > urugay activity code in the lessons directory)<br>
> ><br>
> ><br>
> > Take care,<br>
> > Jose<br>
> > _______________________________________________<br>
> > Sugar-devel mailing list<br>
> > <a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
> > <a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<font color="#888888">--<br>
Bryan W. Berry<br>
Senior Engineer<br>
OLE Nepal, <a href="http://www.olenepal.org" target="_blank">http://www.olenepal.org</a><br>
<br>
</font></blockquote></div><br></div>