diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 7c62df158b3..d6fce64ca10 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -217,7 +217,7 @@ background-clip: padding-box; } .openerp.ui-dialog .ui-dialog-content { - padding: 0px; + padding: 0; } .openerp.ui-dialog .ui-dialog-titlebar, .openerp.ui-dialog .ui-dialog-content, .openerp.ui-dialog .ui-dialog-buttonpane { padding: 16px; @@ -1186,7 +1186,7 @@ color: white; padding: 2px 4px; margin: 1px 6px 0 0; - border: 1px solid lightgrey; + border: 1px solid lightGray; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); -moz-border-radius: 4px; -webkit-border-radius: 4px; @@ -1211,7 +1211,7 @@ transform: scale(1.1); } .openerp .oe_secondary_submenu .oe_active { - border-top: 1px solid lightgrey; + border-top: 1px solid lightGray; border-bottom: 1px solid #dedede; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 -1px 3px rgba(40, 40, 40, 0.2); @@ -2136,7 +2136,7 @@ } .openerp .oe_form .oe_form_label_help[for] span, .openerp .oe_form .oe_form_label[for] span { font-size: 80%; - color: darkgreen; + color: darkGreen; vertical-align: top; position: relative; top: -4px; @@ -2567,9 +2567,6 @@ .openerp .oe_list_editable .oe_list_content td.oe_list_field_cell { padding: 4px 6px 3px 6px; } -.openerp .oe_list.oe_list_editable td.oe_list_record_delete { - position: absolute; -} .openerp .oe_list.oe_list_editable.oe_editing .oe_edition .oe_list_field_cell:not(.oe_readonly) { color: transparent; } @@ -2878,6 +2875,78 @@ color: #333333; } +.openerp .oe_fileupload { + display: inline-block; + clear: both; + width: 100%; +} +.openerp .oe_fileupload .oe_add { + float: left; + position: relative; + width: 100%; + left: 2px; + top: 7px; +} +.openerp .oe_fileupload .oe_add button { + display: inline; + height: 24px; + font-size: 12px; + line-height: 12px; + vertical-align: middle; +} +.openerp .oe_fileupload .oe_add button.oe_attach { + width: 24px; + overflow: hidden; + width: 24px; + overflow: hidden; + background: transparent; + color: #7c7bad; + box-shadow: none; + border: none; + text-shadow: none; +} +.openerp .oe_fileupload .oe_add button.oe_attach .oe_e { + position: relative; + top: -1px; + left: -9px; +} +.openerp .oe_fileupload .oe_add input.oe_form_binary_file { + display: inline-block; + margin-left: -5px; + height: 28px; + width: 52px; + margin-top: -26px; +} +.openerp .oe_fileupload .oe_add .oe_attach_label { + color: #7c7bad; + margin-left: -3px; +} +.openerp .oe_fileupload .oe_attachments { + margin-bottom: 4px; + margin-right: 0px; + font-size: 12px; + border-radius: 2px; + border: solid 1px rgba(124, 123, 173, 0.14); +} +.openerp .oe_fileupload .oe_attachments .oe_attachment { + padding: 2px; + padding-left: 4px; + padding-right: 4px; +} +.openerp .oe_fileupload .oe_attachments .oe_attachment .oe_e { + font-size: 23px; + margin-top: -5px; +} +.openerp .oe_fileupload .oe_attachments .oe_attachment .oe_e:hover { + text-decoration: none; +} +.openerp .oe_fileupload .oe_attachments .oe_attachment:nth-child(odd) { + background: white; +} +.openerp .oe_fileupload .oe_attachments .oe_attachment:nth-child(even) { + background: #f4f5fa; +} + .kitten-mode-activated { background-image: url(http://placekitten.com/g/1365/769); background-size: cover; @@ -2932,76 +3001,6 @@ div.ui-widget-overlay { border-radius: 3px; } -.openerp .oe_fileupload { - display: inline-block; - clear: both; - width: 100%; -} -.openerp .oe_fileupload .oe_add { - float: left; - position: relative; - width: 100%; - left: +2px; - top: +7px; -} -.openerp .oe_fileupload .oe_add button{ - display: inline; - height: 24px; - font-size: 12px; - line-height: 12px; - vertical-align: middle; -} -.openerp .oe_fileupload .oe_add button.oe_attach { - width: 24px; - overflow: hidden; - background: transparent; - color: #7C7BAD; - box-shadow: none; - border: none; - text-shadow: none; -} -.openerp .oe_fileupload .oe_add .oe_attach_label{ - color: #7C7BAD; - margin-left: -3px; -} -.openerp .oe_fileupload .oe_add button.oe_attach .oe_e{ - position: relative; - top: -1px; - left: -9px; -} -.openerp .oe_fileupload .oe_add input.oe_form_binary_file{ - display: inline-block; - margin-left: -5px; - height: 28px; - width: 52px; - margin-top: -26px; -} -.openerp .oe_fileupload .oe_attachments { - margin-bottom: 4px; - margin-right: 0px; - font-size: 12px; - border-radius: 2px; - border: solid 1px rgba(124,123,173,0.14); -} -.openerp .oe_fileupload .oe_attachments .oe_attachment{ - padding: 2px; - padding-left: 4px; - padding-right: 4px; -} -.openerp .oe_fileupload .oe_attachments .oe_attachment .oe_e{ - font-size: 23px; - margin-top: -5px; -} -.openerp .oe_fileupload .oe_attachments .oe_attachment .oe_e:hover{ - text-decoration: none; -} -.openerp .oe_fileupload .oe_attachments .oe_attachment:nth-child(odd){ - background:white; -} -.openerp .oe_fileupload .oe_attachments .oe_attachment:nth-child(even){ - background: #F4F5FA; -} - @media print { .openerp { text-shadow: none; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index d76a33fb315..1719a863549 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -258,6 +258,7 @@ $sheet-padding: 16px // so remove position:relative .ui-tabs position: static + // Modal box &.ui-dialog display: none @@ -271,7 +272,7 @@ $sheet-padding: 16px @include box-shadow(0 1px 12px rgba(0, 0, 0, 0.6)) @include background-clip() .ui-dialog-content - padding: 0px + padding: 0 .ui-dialog-titlebar, .ui-dialog-content, .ui-dialog-buttonpane padding: 16px .ui-dialog-titlebar @@ -316,7 +317,7 @@ $sheet-padding: 16px text-decoration: none .oe_about background-color: white - background-image: url(data:image/pngbase64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAKUlEQVQIHWO8e/fufwYsgAUkJigoiCIF5DMyoYggcUiXgNnBiGQKmAkARpcEQeriln4AAAAASUVORK5CYII=) + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAKUlEQVQIHWO8e/fufwYsgAUkJigoiCIF5DMyoYggcUiXgNnBiGQKmAkARpcEQeriln4AAAAASUVORK5CYII=) @include radius(0 0 2px 2px) a color: $link-color @@ -681,7 +682,7 @@ $sheet-padding: 16px // }}} // Login {{{ .oe_login - background-image: url(data:image/pngbase64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAKUlEQVQIHWO8e/fufwYsgAUkJigoiCIF5DMyoYggcUiXgNnBiGQKmAkARpcEQeriln4AAAAASUVORK5CYII=) + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAKUlEQVQIHWO8e/fufwYsgAUkJigoiCIF5DMyoYggcUiXgNnBiGQKmAkARpcEQeriln4AAAAASUVORK5CYII=) text-align: center font-size: 14px height: 100% @@ -1028,7 +1029,7 @@ $sheet-padding: 16px // About openerp {{{ .oe_about background-color: white - background-image: url(data:image/pngbase64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAKUlEQVQIHWO8e/fufwYsgAUkJigoiCIF5DMyoYggcUiXgNnBiGQKmAkARpcEQeriln4AAAAASUVORK5CYII=) + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAKUlEQVQIHWO8e/fufwYsgAUkJigoiCIF5DMyoYggcUiXgNnBiGQKmAkARpcEQeriln4AAAAASUVORK5CYII=) @include radius(0 0 2px 2px) a color: $link-color @@ -2033,9 +2034,6 @@ $sheet-padding: 16px .oe_list_content td.oe_list_field_cell padding: 4px 6px 3px 6px - .oe_list.oe_list_editable - td.oe_list_record_delete - position: absolute .oe_list.oe_list_editable.oe_editing .oe_edition .oe_list_field_cell:not(.oe_readonly) * @@ -2336,7 +2334,7 @@ $sheet-padding: 16px .oe_e:hover text-decoration: none .oe_attachment:nth-child(odd) - background:white + background: white .oe_attachment:nth-child(even) background: #F4F5FA diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 95a21877bd0..c145b05a75f 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -3329,7 +3329,7 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({ e.cancel = true; }); _(controller.columns).find(function (column) { - if (!column instanceof instance.web.list.Handle) { + if (!(column instanceof instance.web.list.Handle)) { return false; } column.modifiers.invisible = true; diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js index acc1d781976..021e5549c18 100644 --- a/addons/web/static/src/js/view_list_editable.js +++ b/addons/web/static/src/js/view_list_editable.js @@ -252,9 +252,10 @@ openerp.web.list_editable = function (instance) { var position = $cell.position(); field.set_dimensions($cell.outerHeight(), $cell.outerWidth()); - field.$el.css({ - top: position.top, - left: position.left, + field.$el.position({ + my: 'left top', + at: 'left top', + of: $cell }); }, /** @@ -410,15 +411,15 @@ openerp.web.list_editable = function (instance) { }); this.editor.$el.on('keyup keydown', function (e) { - if (!self.editor.is_editing()) { return; } + if (!self.editor.is_editing()) { return true; } var key = _($.ui.keyCode).chain() .map(function (v, k) { return {name: k, code: v}; }) .find(function (o) { return o.code === e.which; }) .value(); - if (!key) { return; } + if (!key) { return true; } var method = e.type + '_' + key.name; - if (!(method in self)) { return; } - self[method](e); + if (!(method in self)) { return true; } + return self[method](e); }); }, /** @@ -446,7 +447,10 @@ openerp.web.list_editable = function (instance) { keyup_ENTER: function () { return this._next(); }, - keyup_ESCAPE: function () { + keydown_ESCAPE: function (e) { + return false; + }, + keyup_ESCAPE: function (e) { return this.cancel_edition(); }, /**