Issue 10461

Clarification on JS libraries needed

10461
Reporter: ahahn
Assignee: mdoering
Type: Task
Summary: Clarification on JS libraries needed
Priority: Major
Resolution: Fixed
Status: Closed
Created: 2011-11-25 14:15:54.996
Updated: 2013-08-29 14:45:10.898
Resolved: 2012-11-19 18:13:27.105
        
Description: There are several JS libraries whose usage is not clear in the sample pages: raphael, modernizr and jquery uniform.

The "autocomplete.js" library
- Is deprecated according to the original source "http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/".
- The original file name was renamed from "jquery.autocomplete.js" to "autocomplete.js", that did difficult to track the original source.
- The library source code was modified to use a remote url as its data source.

The JS source code developed by Vizzuality lacks comments, some source code contains lines like:
/*
GOD sees everything
*/
var GOD = (function() {...
that need more maintenance-friendly documentation

(transferred from: http://dev.gbif.org/wiki/display/POR/Questions+and+Issues+for+Vizzuality)
]]>
    


Author: ahahn@gbif.org
Comment: General task: try to document those libraries as far as possible (at least the bits we modified).  
Created: 2011-11-28 11:43:47.764
Updated: 2011-11-28 11:43:47.764


Author: ahahn@gbif.org
Comment: meta comment: is it worth creating an entry in the Wiki on something like this, or can we delete this task once everybody took note of it (voted on it?)?
Created: 2011-11-28 11:47:30.17
Updated: 2011-11-28 11:47:30.17


Author: javierarce
Created: 2012-11-19 18:13:14.266
Updated: 2012-11-19 18:13:14.266
        
Hi Andrea,

Raphael is used to generate the pie charts and other graphs in several pages (it seems to be inaccesible at the moment, but they exist in the /UNUSED_SO_FAR/ folder).

modernizr is used so old browsers (like IE8, for instance) render certain CSS properties in a consistent way.

jQuery Uniform was used to manage combo boxes. I'm not sure if they're still in use or hidden, like the graphs.

"The JS source code developed by Vizzuality lacks comments, some source code contains lines like (…)"

GOD is an observer class, hence the joke. It's the only humorous comment in the code and I can delete it if you don't find it appropriate.

Anyway, we should compress and minify the JavaScript code. Are there any plans to do this? I'd suggest to use Google Closure Compiler (https://developers.google.com/closure/compiler)







    


Author: mdoering@gbif.org
Created: 2012-11-20 10:05:26.026
Updated: 2012-11-20 10:05:26.026
        
GOD is ok :)

But there are many more libraries in the js vendors folder, currently it reads like this:
autocomplete.js
bootstrap.min.js
jquery-1.6.1.min.js
jquery-1.7.1.min.js
jquery-backgroundPosition.js
jquery-scrollTo-1.4.2-min.js
jquery-ui-1.8.17.min.js
jquery-ui.min.js
jquery.simplemodal.1.4.2.min.js
jquery.uniform.min.js
jquery.url.js
jscrollpane.min.js
modernizr-1.7.min.js
mousewheel.js
OpenLayers.js
polygonEdit.js
raphael-min.js
resourcebundle.js
underscore-min.js
wax.leaf.min.js
Maybe some of them came from us, but if you have any more insight about these or e.g. know why there are 2 jquery versions please let us know.