Merge lp:~openerp-dev/openerp-web/trunk-salesteam-kanban-tpa into lp:openerp-web

Proposed by Harry (OpenERP)
Status: Merged
Merged at revision: 3899
Proposed branch: lp:~openerp-dev/openerp-web/trunk-salesteam-kanban-tpa
Merge into: lp:openerp-web
Diff against target: 81 lines (+18/-11)
3 files modified
addons/web_kanban/static/src/js/kanban.js (+1/-1)
addons/web_kanban_gauge/static/src/js/kanban_gauge.js (+14/-8)
addons/web_kanban_sparkline/static/src/js/kanban_sparkline.js (+3/-2)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/trunk-salesteam-kanban-tpa
Reviewer Review Type Date Requested Status
OpenERP R&D Web Team Pending
Review via email: mp+181210@code.launchpad.net

Commit message

[FIX] web_kanban_gauge: check the value entered in the forecast

[IMP] web_kanban_sparkline: added an option to add a suffix in the sparkline tooltips

To post a comment you must log in.
3815. By Turkesh Patel (openERP)

[MRG] merge with lp:openerp-web

3816. By Turkesh Patel (openERP)

[MRG] merge with lp:openerp-wb

3817. By Turkesh Patel (openERP)

[IMP] improved code to pass tooltip delay in option and added function so we can set requred help in inherited modules.

3818. By Turkesh Patel (openERP)

[MRG] merge with lp:openerp-web

3819. By Turkesh Patel (openERP)

[IMP] improved code to set suffix in tooltip.

3820. By Turkesh Patel (openERP)

[MRG] merge with lp:openerp-web

3821. By Turkesh Patel (openERP)

[MRG] merge with lp:openerp-web

3822. By Turkesh Patel (openERP)

[MRG] merge with lp:openerp-web

3823. By Turkesh Patel (openERP)

[FIX] replace integer with float in validation

3824. By Turkesh Patel (openERP)

[MRG] merge with lp:openerp-web

3825. By Turkesh Patel (openERP)

[MRG] merge with lp:openerp-web

3826. By Turkesh Patel (openERP)

[MRG] merge with lp:openerp-web

3827. By Turkesh Patel (openERP)

[MRG] merge with lp:openerp-web

3828. By Thibault Delavallée (OpenERP)

[MERGE] Sync with trunk, notably for bootstrap that landed in trunk

3829. By Thibault Delavallée (OpenERP)

[CLEAN] web_kanban_gauge: removed unnecessary code before merging

3830. By Thibault Delavallée (OpenERP)

[CLEAN] web_kanban_sparkline: removed tootip_suffix_field, not used and not necessary

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web_kanban/static/src/js/kanban.js'
2--- addons/web_kanban/static/src/js/kanban.js 2013-12-02 13:54:14 +0000
3+++ addons/web_kanban/static/src/js/kanban.js 2013-12-05 15:14:10 +0000
4@@ -440,7 +440,7 @@
5 new_group.do_save_sequences();
6 }).fail(function(error, evt) {
7 evt.preventDefault();
8- alert(_t("An error has occured while moving the record to this group: ") + data.message);
9+ alert(_t("An error has occured while moving the record to this group: ") + error.data.message);
10 self.do_reload(); // TODO: use draggable + sortable in order to cancel the dragging when the rcp fails
11 });
12 }
13
14=== modified file 'addons/web_kanban_gauge/static/src/js/kanban_gauge.js'
15--- addons/web_kanban_gauge/static/src/js/kanban_gauge.js 2013-09-06 10:05:28 +0000
16+++ addons/web_kanban_gauge/static/src/js/kanban_gauge.js 2013-12-05 15:14:10 +0000
17@@ -4,7 +4,8 @@
18 * Kanban widgets: GaugeWidget
19 *
20 */
21-
22+var _t = instance.web._t,
23+ _lt = instance.web._lt;
24 instance.web_kanban.GaugeWidget = instance.web_kanban.AbstractField.extend({
25 className: "oe_gauge",
26 start: function() {
27@@ -77,13 +78,18 @@
28 $input.focus()
29 .keydown(function (event) {
30 event.stopPropagation();
31- if (event.keyCode == 13 || event.keyCode == 9) {
32- if ($input.val() != value) {
33- parent.view.dataset.call(self.options.action_change, [parent.id, $input.val()]).then(function () {
34- parent.do_reload();
35- });
36- } else {
37- $div.remove();
38+ if(isNaN($input.val())){
39+ self.do_warn(_t("Wrong value entered!"), _t("Only Integer Value should be valid."));
40+ $div.remove();
41+ } else {
42+ if (event.keyCode == 13 || event.keyCode == 9) {
43+ if ($input.val() != value) {
44+ parent.view.dataset.call(self.options.action_change, [parent.id, $input.val()]).then(function () {
45+ parent.do_reload();
46+ });
47+ } else {
48+ $div.remove();
49+ }
50 }
51 }
52 })
53
54=== modified file 'addons/web_kanban_sparkline/static/src/js/kanban_sparkline.js'
55--- addons/web_kanban_sparkline/static/src/js/kanban_sparkline.js 2013-10-03 07:58:36 +0000
56+++ addons/web_kanban_sparkline/static/src/js/kanban_sparkline.js 2013-12-05 15:14:10 +0000
57@@ -13,6 +13,7 @@
58 setTimeout(function () {
59 var value = _.pluck(self.field.value, 'value');
60 var tooltips = _.pluck(self.field.value, 'tooltip');
61+ var suffix = self.options.tooltip_suffix || "";
62 var sparkline_options = _.extend({
63 type: 'bar',
64 barWidth: 5,
65@@ -20,14 +21,14 @@
66 barWidth: 4,
67 barSpacing: 1,
68 barColor: '#96d854',
69+ tooltipFormat: '{{offset:offset}} {{value}} ' + suffix,
70 chartRangeMin: 0,
71- tooltipFormat: '{{offset:offset}} {{value}}',
72 tooltipValueLookups: {
73 'offset': tooltips
74 }
75 }, self.options);
76 self.$el.sparkline(value, sparkline_options);
77- self.$el.tipsy({'delayIn': 0, 'html': true, 'title': function(){return title}, 'gravity': 'n'});
78+ self.$el.tipsy({'delayIn': self.options.delayIn || 0, 'html': true, 'title': function(){return title}, 'gravity': 'n'});
79 }, 0);
80 },
81 });