Commit Graph

24 Commits

Author SHA1 Message Date
Xavier Morel f9fad97b47 [IMP] try to improve naming slightly
bzr revid: xmo@openerp.com-20110620063848-qltrrdm88v1ww3cy
2011-06-20 08:38:48 +02:00
Xavier Morel 872f7e163d [IMP] invert tests and bail out early in order to reduce excessive nesting of functions
bzr revid: xmo@openerp.com-20110617133156-g3fk9f386tdrdcje
2011-06-17 15:31:56 +02:00
Xavier Morel 5e516e5331 [IMP] move COLOR_PALETTE to toplevel constant, so it does not have to be recreated every time we go through the corresponding function
bzr revid: xmo@openerp.com-20110617132550-b5add9fv7xuxjilz
2011-06-17 15:25:50 +02:00
Xavier Morel 57bd9de502 [IMP] reduce variable scopes: move instance variables to function scopes, remove unneeded temps, move variables to inner function scopes.
Variable scopes should be as small as possible (but no smaller) in order to make their data flow easy to understand

bzr revid: xmo@openerp.com-20110617132222-p0jabvioctjcn9o4
2011-06-17 15:22:22 +02:00
Xavier Morel 413054ce53 [IMP] use object literals when possible: clearer lower amount of noise, and clearer relations between the object and its components
bzr revid: xmo@openerp.com-20110617115559-n89evkkufc3f8k9t
2011-06-17 13:55:59 +02:00
Xavier Morel 8ad063965d [FIX] do not use for...in to iterate on arrays, avoid using it to iterate on object as well. Use _.each in either cases. See doc for rationale
bzr revid: xmo@openerp.com-20110617115226-21meg23d0tg43wgv
2011-06-17 13:52:26 +02:00
Xavier Morel 23d76c574f [FIX] Assigning variables to themselves is a NOOP in Javascript, and just noise
bzr revid: xmo@openerp.com-20110617093259-eltod1l1ytsyq82h
2011-06-17 11:32:59 +02:00
Xavier Morel 485adfdef9 [FIX] avoid reusing variables in completely different contexts, especially function parameters. Also avoid declaring the same variables multiple times in the same function, either split the usage into different variables (if it's reuse) or declare only once (if it's alternate initialization)
bzr revid: xmo@openerp.com-20110617093222-8mx8tkshkcave3g1
2011-06-17 11:32:22 +02:00
Xavier Morel c5e061fec9 [FIX] don't make explicit boolean comparisons without identity
In javascript, '0 == false', '1 == true' and even '"1" == true'. Either use variables directly in a boolean context, or use type-strict equality (===) to ensure the variable is an actual boolean, not some other type coerced to a boolean

bzr revid: xmo@openerp.com-20110617092436-s8b5v4v5ytbonvi1
2011-06-17 11:24:36 +02:00
Xavier Morel 933272263b [IMP] simplify summing: use the += operator to avoid redundancies and excessively long lines
bzr revid: xmo@openerp.com-20110617091354-nus2mw3r7g2bvbrr
2011-06-17 11:13:54 +02:00
Xavier Morel 7ed58deec7 [FIX] remove trailing commas in object literals
bzr revid: xmo@openerp.com-20110617091344-mlal79a9poagjwm3
2011-06-17 11:13:44 +02:00
Xavier Morel ceda49fbad [FIX] terminate statements missing semicolons
bzr revid: xmo@openerp.com-20110617091335-r9k07mr5m5lp9f0o
2011-06-17 11:13:35 +02:00
Xavier Morel 3bbb11353a [FIX] non-instance should all be declared with 'var'
See doc for rationale

bzr revid: xmo@openerp.com-20110617090746-z35n4jsdqvicoa9h
2011-06-17 11:07:46 +02:00
Kunal Chavda (OpenERP) 8521bf46a3 [FIX]fixed code for dashboard overriding graph and x-axis label.
bzr revid: kch@tinyerp.com-20110613052846-zxzetxg6dk06qzw1
2011-06-13 10:58:46 +05:30
Kunal Chavda (OpenERP) a4e00cabc0 [IMP]Implement switch view when click on pie or bar column.
bzr revid: kch@tinyerp.com-20110606055754-hfb41vvvxog6q69j
2011-06-06 11:27:54 +05:30
Kunal Chavda (OpenERP) 233f743315 [IMP]Improved code for groupby when domain is there.
bzr revid: kch@tinyerp.com-20110525113949-3spob7ruoskuws33
2011-05-25 17:09:49 +05:30
Kunal Chavda (OpenERP) 47b14bddc5 [IMP]Improved code for two operator fields are in view.
bzr revid: kch@tinyerp.com-20110525060900-n85m7ezzjhww5bw3
2011-05-25 11:39:00 +05:30
Kunal Chavda (OpenERP) a3131539a6 [IMP]Improved code for axis label.
bzr revid: kch@tinyerp.com-20110519130413-5i4uz4fjd4o6tvlm
2011-05-19 18:34:13 +05:30
Kunal Chavda (OpenERP) cc41897bd2 [MERGE] latest trunk-proto61.
bzr revid: kch@tinyerp.com-20110518055511-zg1wuyfv10xalnxm
2011-05-18 11:25:11 +05:30
Kunal Chavda (OpenERP) 963fd40ab2 [IMP]code for piechart with default color and improved code for groupby.
bzr revid: kch@tinyerp.com-20110517063718-bets5l1knkpwqhr5
2011-05-17 12:07:18 +05:30
Kunal Chavda (OpenERP) e5dc3d5d54 [IMP]show stackbarchart when there is group and improved code for legend and color.
bzr revid: kch@tinyerp.com-20110506124108-ov131ru1os1acel6
2011-05-06 18:11:08 +05:30
Kunal Chavda (OpenERP) 6b56e10d11 [IMP]Improved code for search and group record.
bzr revid: kch@tinyerp.com-20110421090552-ynzfrg2nvduseov3
2011-04-21 14:35:52 +05:30
vda (OpenERP) 7b37f59317 [IMP] Improved bar chart.decompressed dhtmlxchar js because we using dhtmlx library for graph,calendar and grant and dhtmlx object conflicts.so changed dhtmlx to dhtmlxchart.
bzr revid: vda@tinyerp.com-20110418055228-kmyskjruyohckpsk
2011-04-18 11:22:28 +05:30
vda (OpenERP) b6564900ad [FIX] Graph According to type.
bzr revid: vda@tinyerp.com-20110415064241-3rq913vloy9mchc1
2011-04-15 12:12:41 +05:30