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

