aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/js/CGP.js (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-12-14Revert "make detail page accessible when using "canvas" graph_type"Peter Wu1-6/+0
This reverts commit 82d88098f4203cf7402d4faf5ad100cada70efaf. Breaks async rendering, see https://github.com/pommi/CGP/issues/106#issuecomment-66896905
2014-12-13js/CGP: scroll wheel zoom center positionPeter Chiocchetti1-2/+4
Closes #111
2014-11-11make detail page accessible when using "canvas" graph_typePim van den Berg1-0/+6
Closes #106
2014-08-02Merge (a)sync code, reformat CGP.jsPeter Wu1-98/+129
Best viewed with `git diff -w`. Since CGP-sync.js and CGP-async.js are almost equal except for one function call, merge them into a single function. While at it, reformat CGP.js to expose a single namespace (`CGP`) which exports the symbol `drawAll`. Remove `alert()` and add a `console.error()` call instead. This is less intrustive to users (who will notice a broken graph anyway) and be more helpful for developers (who can examine the call trace in the Developer Console. Add `"use strict"` and use the standard four spaces as indent. Process the script through `js-beautify` which re-indented the code and added some spaces between operators. Replace double by single quotes for consistency. Rename `catch(e)` to `catch(ex)` to supress a jshint warning about IE8.
2014-07-20Defensive programming: more urlencode/htmlentitiesPeter Wu1-1/+1
Make build_url return an URL, not HTML. This separates presentation from data. plugin_header's return value is unused, remove the unnecessary return. At places where `printf("<tag att='%s'>", $x);` is used, it is now converted to `printf("<tag att=\"%s\">", htmlentities($x));` since the single quote is not escaped by default by htmlentities. In case the canvas style is used, JS should use `textContent` instead of `innerHTML` to avoid reading `&quot;` instead of `"`. Nobody (should) use(s) IE6 anymore, so it is a safe change. While at it, use the standard charset attribute of meta to specify the character set (UTF-8).
2014-01-12Add a configuration option for sync/async choice for the canvas graphsVincent Brillault1-22/+0
2014-01-12jsrrdgraph: CGP.js: split draw(id) into prepare_draw(id) and draw(id)Vincent Brillault1-1/+7
2013-05-18integrate jsrrdgraph in CGPPim van den Berg1-0/+124