Tuesday, July 10, 2012


Hi

I have been working on proposal sync this week. Initially “Sync with Google Documents” was not appearing as linked on proposal submit page, according to orcun’s design an authorization window pops up clicking on this link. Then a talk with Madhu made me realize that the view being rendered by v2.modules.gsoc.proposal.base.py on proposal submit page has a dependency block which contains melange.gdata.core melange.gdata and melange.autocomplete, which have been imported from soc.content.JS.  Present melange codebase does not have melange.gdata.js file. The Java Script view on proposal submit page is actually provided by files in JS folder (imported in dependency block). I had to copy melange.gdata.js file in current shipmenttracking branch from orcun’s code and its minimized version in js.min file folder.
This folder contains minimized version of javascript files. We run closure compiler, when we publish online and at that time these minimized files are loaded instead of files in js folder to make loading faster. Since I am working on local instance I have made changes in app.yaml to load JS files from js instead of js.min.

I learnt about using ‘firebug’ and ‘chome development console’ to check JS errors in the code while the web page loads. Working with these makes it very easy to find out where the error is being generated from. Initially the melange.gdata could not load and displayed LoginFactoryFunction is not a function which resides in melange.gdata.js file.
I renamed melange.gdata.core to melange.gdata in melange.dependencies and something started working now. There appeared a blank popup which was mainly meant for authorisation to access the Google Docs.

I have proposal syncing working to some extent now, there are no errors on the client side and I have to dissect the problem on the server side. I have updated my online instance[0] and you can check the demo when submitting a proposal.

[0] http://melange-aditi1.appspot.com/

No comments:

Post a Comment