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
=== modified file 'addons/web/static/src/css/base.css'
--- addons/web/static/src/css/base.css 2014-04-09 09:34:22 +0000
+++ addons/web/static/src/css/base.css 2014-04-10 13:06:00 +0000
@@ -1,4 +1,4 @@
1@charset "utf-8";1@charset "UTF-8";
2@font-face {2@font-face {
3 font-family: "mnmliconsRegular";3 font-family: "mnmliconsRegular";
4 src: url("/web/static/src/font/mnmliconsv21-webfont.eot") format("eot");4 src: url("/web/static/src/font/mnmliconsv21-webfont.eot") format("eot");
@@ -8,7 +8,6 @@
8 font-weight: normal;8 font-weight: normal;
9 font-style: normal;9 font-style: normal;
10}10}
11
12@font-face {11@font-face {
13 font-family: "EntypoRegular";12 font-family: "EntypoRegular";
14 src: url("/web/static/src/font/entypo-webfont.eot") format("eot");13 src: url("/web/static/src/font/entypo-webfont.eot") format("eot");
@@ -19,7 +18,6 @@
19 font-weight: normal;18 font-weight: normal;
20 font-style: normal;19 font-style: normal;
21}20}
22
23.openerp {21.openerp {
24 padding: 0;22 padding: 0;
25 margin: 0;23 margin: 0;
@@ -1029,7 +1027,7 @@
1029 background-image: -moz-linear-gradient(top, #fc8787, maroon);1027 background-image: -moz-linear-gradient(top, #fc8787, maroon);
1030 background-image: -ms-linear-gradient(top, #fc8787, maroon);1028 background-image: -ms-linear-gradient(top, #fc8787, maroon);
1031 background-image: -o-linear-gradient(top, #fc8787, maroon);1029 background-image: -o-linear-gradient(top, #fc8787, maroon);
1032 background-image: linear-gradient(to bottom, #fc8787, #800000);1030 background-image: linear-gradient(to bottom, #fc8787, maroon);
1033}1031}
1034.openerp .oe_topbar .oe_topbar_anonymous_login a {1032.openerp .oe_topbar .oe_topbar_anonymous_login a {
1035 display: block;1033 display: block;
@@ -1275,7 +1273,7 @@
1275 color: white;1273 color: white;
1276 padding: 2px 4px;1274 padding: 2px 4px;
1277 margin: 1px 6px 0 0;1275 margin: 1px 6px 0 0;
1278 border: 1px solid lightGray;1276 border: 1px solid lightgray;
1279 text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);1277 text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
1280 -moz-border-radius: 4px;1278 -moz-border-radius: 4px;
1281 -webkit-border-radius: 4px;1279 -webkit-border-radius: 4px;
@@ -1307,7 +1305,7 @@
1307 transform: scale(1.1);1305 transform: scale(1.1);
1308}1306}
1309.openerp .oe_secondary_submenu .oe_active {1307.openerp .oe_secondary_submenu .oe_active {
1310 border-top: 1px solid lightGray;1308 border-top: 1px solid lightgray;
1311 border-bottom: 1px solid #dedede;1309 border-bottom: 1px solid #dedede;
1312 text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);1310 text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
1313 -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 -1px 3px rgba(40, 40, 40, 0.2);1311 -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 -1px 3px rgba(40, 40, 40, 0.2);
@@ -2289,7 +2287,7 @@
2289}2287}
2290.openerp .oe_form .oe_form_label_help[for] span, .openerp .oe_form .oe_form_label[for] span {2288.openerp .oe_form .oe_form_label_help[for] span, .openerp .oe_form .oe_form_label[for] span {
2291 font-size: 80%;2289 font-size: 80%;
2292 color: darkGreen;2290 color: darkgreen;
2293 vertical-align: top;2291 vertical-align: top;
2294 position: relative;2292 position: relative;
2295 top: -4px;2293 top: -4px;
@@ -2815,11 +2813,11 @@
2815.openerp .oe_list_editable .oe_list_content td.oe_list_field_cell {2813.openerp .oe_list_editable .oe_list_content td.oe_list_field_cell {
2816 padding: 4px 6px 3px;2814 padding: 4px 6px 3px;
2817}2815}
2818.openerp .oe_list.oe_list_editable.oe_editing .oe_edition .oe_list_field_cell:not(.oe_readonly) {2816.openerp .oe_list.oe_list_editable.oe_editing .oe_edition .oe_list_field_cell {
2819 color: transparent;2817 color: transparent;
2820 text-shadow: none;2818 text-shadow: none;
2821}2819}
2822.openerp .oe_list.oe_list_editable.oe_editing .oe_edition .oe_list_field_cell:not(.oe_readonly) * {2820.openerp .oe_list.oe_list_editable.oe_editing .oe_edition .oe_list_field_cell * {
2823 visibility: hidden;2821 visibility: hidden;
2824}2822}
2825.openerp .oe_list.oe_list_editable.oe_editing .oe_m2o_drop_down_button {2823.openerp .oe_list.oe_list_editable.oe_editing .oe_m2o_drop_down_button {
@@ -2835,6 +2833,24 @@
2835 min-width: 0;2833 min-width: 0;
2836 max-width: none;2834 max-width: none;
2837}2835}
2836.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_list_field_handle {
2837 font-size: 1px;
2838 letter-spacing: -1px;
2839 color: transparent;
2840 text-shadow: none;
2841 font-weight: normal;
2842 letter-spacing: normal !important;
2843 margin-right: 7px;
2844}
2845.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_list_field_handle:before {
2846 font: 18px "entypoRegular";
2847 content: "}";
2848 color: #e0e0e0;
2849}
2850.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_readonly {
2851 padding: 4px 6px 3px 0px;
2852 text-align: left;
2853}
2838.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field input, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field textarea {2854.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field input, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field textarea {
2839 height: 27px;2855 height: 27px;
2840 -moz-border-radius: 0;2856 -moz-border-radius: 0;
@@ -2846,6 +2862,10 @@
2846.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 {2862.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 {
2847 min-width: 0;2863 min-width: 0;
2848}2864}
2865.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 {
2866 padding: 4px 6px 3px 0px;
2867 text-align: right !important;
2868}
2849.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 {2869.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 {
2850 text-align: right;2870 text-align: right;
2851 width: 100% !important;2871 width: 100% !important;
28522872
=== modified file 'addons/web/static/src/css/base.sass'
--- addons/web/static/src/css/base.sass 2014-04-09 09:34:22 +0000
+++ addons/web/static/src/css/base.sass 2014-04-10 13:06:00 +0000
@@ -2218,7 +2218,7 @@
2218 .oe_list_editable .oe_list_content td.oe_list_field_cell2218 .oe_list_editable .oe_list_content td.oe_list_field_cell
2219 padding: 4px 6px 3px2219 padding: 4px 6px 3px
2220 .oe_list.oe_list_editable.oe_editing2220 .oe_list.oe_list_editable.oe_editing
2221 .oe_edition .oe_list_field_cell:not(.oe_readonly)2221 .oe_edition .oe_list_field_cell
2222 *2222 *
2223 visibility: hidden2223 visibility: hidden
2224 color: transparent2224 color: transparent
@@ -2230,6 +2230,13 @@
2230 .oe_input_icon2230 .oe_input_icon
2231 margin-top: 5px2231 margin-top: 5px
2232 .oe_form_field2232 .oe_form_field
2233 &.oe_list_field_handle
2234 @include text-to-entypo-icon("}",#E0E0E0,18px)
2235 letter-spacing: normal !important
2236 margin-right: 7px
2237 &.oe_readonly
2238 padding: 4px 6px 3px 0px
2239 text-align: left
2233 min-width: 02240 min-width: 0
2234 max-width: none2241 max-width: none
2235 input, textarea2242 input, textarea
@@ -2240,6 +2247,9 @@
2240 input, textarea, select2247 input, textarea, select
2241 min-width: 02248 min-width: 0
2242 &.oe_form_field_float,&.oe_form_view_integer2249 &.oe_form_field_float,&.oe_form_view_integer
2250 &.oe_readonly
2251 padding: 4px 6px 3px 0px
2252 text-align: right !important
2243 input2253 input
2244 text-align: right2254 text-align: right
2245 width: 100% !important2255 width: 100% !important
22462256
=== modified file 'addons/web/static/src/js/view_list_editable.js'
--- addons/web/static/src/js/view_list_editable.js 2014-04-08 12:01:41 +0000
+++ addons/web/static/src/js/view_list_editable.js 2014-04-10 13:06:00 +0000
@@ -304,6 +304,8 @@
304 at: 'left top',304 at: 'left top',
305 of: $cell305 of: $cell
306 });306 });
307 if(field.widget == "handle")
308 field.$el.addClass('oe_list_field_handle');
307 },309 },
308 /**310 /**
309 * @return {jQuery.Deferred}311 * @return {jQuery.Deferred}