Merge lp:~openerp-dev/openerp-web/7.0-onchange-listview-mat into lp:openerp-web/7.0

Proposed by Martin Trigaux (OpenERP)
Status: Rejected
Rejected by: Martin Trigaux (OpenERP)
Proposed branch: lp:~openerp-dev/openerp-web/7.0-onchange-listview-mat
Merge into: lp:openerp-web/7.0
Diff against target: 161 lines (+42/-10)
3 files modified
addons/web/static/src/css/base.css (+29/-9)
addons/web/static/src/css/base.sass (+11/-1)
addons/web/static/src/js/view_list_editable.js (+2/-0)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/7.0-onchange-listview-mat
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+215169@code.launchpad.net

Description of the change

On editable list, make readonly fields react to onchange result.
Works only for lines with no focus.

To post a comment you must log in.

Unmerged revisions

4172. By Martin Trigaux (OpenERP)

[IMP] list view: allow getting result for onchange on readonly fields in list view

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web/static/src/css/base.css'
2--- addons/web/static/src/css/base.css 2014-04-09 09:34:22 +0000
3+++ addons/web/static/src/css/base.css 2014-04-10 13:06:00 +0000
4@@ -1,4 +1,4 @@
5-@charset "utf-8";
6+@charset "UTF-8";
7 @font-face {
8 font-family: "mnmliconsRegular";
9 src: url("/web/static/src/font/mnmliconsv21-webfont.eot") format("eot");
10@@ -8,7 +8,6 @@
11 font-weight: normal;
12 font-style: normal;
13 }
14-
15 @font-face {
16 font-family: "EntypoRegular";
17 src: url("/web/static/src/font/entypo-webfont.eot") format("eot");
18@@ -19,7 +18,6 @@
19 font-weight: normal;
20 font-style: normal;
21 }
22-
23 .openerp {
24 padding: 0;
25 margin: 0;
26@@ -1029,7 +1027,7 @@
27 background-image: -moz-linear-gradient(top, #fc8787, maroon);
28 background-image: -ms-linear-gradient(top, #fc8787, maroon);
29 background-image: -o-linear-gradient(top, #fc8787, maroon);
30- background-image: linear-gradient(to bottom, #fc8787, #800000);
31+ background-image: linear-gradient(to bottom, #fc8787, maroon);
32 }
33 .openerp .oe_topbar .oe_topbar_anonymous_login a {
34 display: block;
35@@ -1275,7 +1273,7 @@
36 color: white;
37 padding: 2px 4px;
38 margin: 1px 6px 0 0;
39- border: 1px solid lightGray;
40+ border: 1px solid lightgray;
41 text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
42 -moz-border-radius: 4px;
43 -webkit-border-radius: 4px;
44@@ -1307,7 +1305,7 @@
45 transform: scale(1.1);
46 }
47 .openerp .oe_secondary_submenu .oe_active {
48- border-top: 1px solid lightGray;
49+ border-top: 1px solid lightgray;
50 border-bottom: 1px solid #dedede;
51 text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
52 -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 -1px 3px rgba(40, 40, 40, 0.2);
53@@ -2289,7 +2287,7 @@
54 }
55 .openerp .oe_form .oe_form_label_help[for] span, .openerp .oe_form .oe_form_label[for] span {
56 font-size: 80%;
57- color: darkGreen;
58+ color: darkgreen;
59 vertical-align: top;
60 position: relative;
61 top: -4px;
62@@ -2815,11 +2813,11 @@
63 .openerp .oe_list_editable .oe_list_content td.oe_list_field_cell {
64 padding: 4px 6px 3px;
65 }
66-.openerp .oe_list.oe_list_editable.oe_editing .oe_edition .oe_list_field_cell:not(.oe_readonly) {
67+.openerp .oe_list.oe_list_editable.oe_editing .oe_edition .oe_list_field_cell {
68 color: transparent;
69 text-shadow: none;
70 }
71-.openerp .oe_list.oe_list_editable.oe_editing .oe_edition .oe_list_field_cell:not(.oe_readonly) * {
72+.openerp .oe_list.oe_list_editable.oe_editing .oe_edition .oe_list_field_cell * {
73 visibility: hidden;
74 }
75 .openerp .oe_list.oe_list_editable.oe_editing .oe_m2o_drop_down_button {
76@@ -2835,6 +2833,24 @@
77 min-width: 0;
78 max-width: none;
79 }
80+.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_list_field_handle {
81+ font-size: 1px;
82+ letter-spacing: -1px;
83+ color: transparent;
84+ text-shadow: none;
85+ font-weight: normal;
86+ letter-spacing: normal !important;
87+ margin-right: 7px;
88+}
89+.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_list_field_handle:before {
90+ font: 18px "entypoRegular";
91+ content: "}";
92+ color: #e0e0e0;
93+}
94+.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_readonly {
95+ padding: 4px 6px 3px 0px;
96+ text-align: left;
97+}
98 .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field input, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field textarea {
99 height: 27px;
100 -moz-border-radius: 0;
101@@ -2846,6 +2862,10 @@
102 .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field input, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field textarea, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field select {
103 min-width: 0;
104 }
105+.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_float.oe_readonly, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_view_integer.oe_readonly {
106+ padding: 4px 6px 3px 0px;
107+ text-align: right !important;
108+}
109 .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_float input, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_view_integer input {
110 text-align: right;
111 width: 100% !important;
112
113=== modified file 'addons/web/static/src/css/base.sass'
114--- addons/web/static/src/css/base.sass 2014-04-09 09:34:22 +0000
115+++ addons/web/static/src/css/base.sass 2014-04-10 13:06:00 +0000
116@@ -2218,7 +2218,7 @@
117 .oe_list_editable .oe_list_content td.oe_list_field_cell
118 padding: 4px 6px 3px
119 .oe_list.oe_list_editable.oe_editing
120- .oe_edition .oe_list_field_cell:not(.oe_readonly)
121+ .oe_edition .oe_list_field_cell
122 *
123 visibility: hidden
124 color: transparent
125@@ -2230,6 +2230,13 @@
126 .oe_input_icon
127 margin-top: 5px
128 .oe_form_field
129+ &.oe_list_field_handle
130+ @include text-to-entypo-icon("}",#E0E0E0,18px)
131+ letter-spacing: normal !important
132+ margin-right: 7px
133+ &.oe_readonly
134+ padding: 4px 6px 3px 0px
135+ text-align: left
136 min-width: 0
137 max-width: none
138 input, textarea
139@@ -2240,6 +2247,9 @@
140 input, textarea, select
141 min-width: 0
142 &.oe_form_field_float,&.oe_form_view_integer
143+ &.oe_readonly
144+ padding: 4px 6px 3px 0px
145+ text-align: right !important
146 input
147 text-align: right
148 width: 100% !important
149
150=== modified file 'addons/web/static/src/js/view_list_editable.js'
151--- addons/web/static/src/js/view_list_editable.js 2014-04-08 12:01:41 +0000
152+++ addons/web/static/src/js/view_list_editable.js 2014-04-10 13:06:00 +0000
153@@ -304,6 +304,8 @@
154 at: 'left top',
155 of: $cell
156 });
157+ if(field.widget == "handle")
158+ field.$el.addClass('oe_list_field_handle');
159 },
160 /**
161 * @return {jQuery.Deferred}