Graph controls now handled by jquery.t.js itself, Refactor

* The button click event listeners and the corresponding behavior are now
implemented in t.js itself, requring ss.js to call only one draw
function on the appropriate element.

* Graphic overview buttons are now shown/hidden instead of disabling.

* Refactor, and document the code slightly.

Signed-off-by: Vivek Rai <vivekraiiitkgp@gmail.com>