summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorAntony Lesuisse <al@openerp.com>2012-12-19 03:50:47 +0100
committerAntony Lesuisse <al@openerp.com>2012-12-19 03:50:47 +0100
commit7826bd85f8e2bee372b3e0df9f2a30eb84a116b6 (patch)
treece379fbf79b8aed913cb9d20c8e6a733082fe400 /addons/web/static/src
parent3e1bce4badab7a2c38d68d6ff409c6093a3aacd9 (diff)
parent677b783dc5a7214e47e8a11ec1fb84ea630fee8a (diff)
[MERGE] trunk
bzr revid: al@openerp.com-20121219025047-og0v9r8x09y0wmd3
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/css/base.css174
-rw-r--r--addons/web/static/src/css/base.sass136
-rw-r--r--addons/web/static/src/img/nologo.pngbin0 -> 3977 bytes
-rw-r--r--addons/web/static/src/js/chrome.js83
-rw-r--r--addons/web/static/src/js/coresetup.js4
-rw-r--r--addons/web/static/src/js/search.js2
-rw-r--r--addons/web/static/src/js/view_form.js173
-rw-r--r--addons/web/static/src/js/view_list.js4
-rw-r--r--addons/web/static/src/js/view_tree.js5
-rw-r--r--addons/web/static/src/js/views.js47
-rw-r--r--addons/web/static/src/xml/base.xml25
11 files changed, 519 insertions, 134 deletions
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css
index 132c9d7993f..7e8242a8d5c 100644
--- a/addons/web/static/src/css/base.css
+++ b/addons/web/static/src/css/base.css
@@ -43,6 +43,10 @@
color: #afafb6 !important;
font-style: italic !important;
}
+.openerp :-ms-input-placeholder {
+ color: #afafb6 !important;
+ font-style: italic !important;
+}
.openerp a {
text-decoration: none;
cursor: pointer !important;
@@ -608,6 +612,9 @@
}
.openerp .oe_notebook > li > a {
display: block;
+ color: gray;
+}
+.openerp .oe_notebook > li.ui-tabs-active > a {
color: #4c4c4c;
}
.openerp .oe_notebook {
@@ -703,6 +710,9 @@
display: block;
color: #4c4c4c;
text-decoration: none;
+ width: 200px;
+ text-overflow: ellipsis;
+ overflow: hidden;
}
.openerp .oe_dropdown_menu > li > a:hover {
text-decoration: none;
@@ -998,6 +1008,39 @@
background-image: -o-linear-gradient(top, #646060, #262626);
background-image: linear-gradient(to bottom, #646060, #262626);
}
+.openerp .oe_topbar .oe_topbar_anonymous_login {
+ background-color: #dc5f59;
+ color: #eeeeee;
+ background-color: #fc8787;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#fc8787), to(maroon));
+ background-image: -webkit-linear-gradient(top, #fc8787, maroon);
+ background-image: -moz-linear-gradient(top, #fc8787, maroon);
+ background-image: -ms-linear-gradient(top, #fc8787, maroon);
+ background-image: -o-linear-gradient(top, #fc8787, maroon);
+ background-image: linear-gradient(to bottom, #fc8787, maroon);
+}
+.openerp .oe_topbar .oe_topbar_anonymous_login a {
+ display: block;
+ padding: 5px 10px 7px;
+ line-height: 20px;
+ height: 20px;
+ text-decoration: none;
+ color: white;
+ background: transparent;
+ -webkit-transition: all 0.2s ease-out;
+ -moz-transition: all 0.2s ease-out;
+ -ms-transition: all 0.2s ease-out;
+ -o-transition: all 0.2s ease-out;
+ transition: all 0.2s ease-out;
+}
+.openerp .oe_topbar .oe_topbar_anonymous_login a:hover {
+ background: rgba(0, 0, 0, 0.1);
+ color: white;
+ text-shadow: 0px 0px 3px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset;
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset;
+}
.openerp .oe_topbar .oe_topbar_item {
display: block;
padding: 5px 10px 7px;
@@ -1069,6 +1112,14 @@
-webkit-box-shadow: none;
box-shadow: none;
}
+.openerp .oe_topbar .oe_topbar_name {
+ max-width: 150px;
+ overflow: hidden;
+ display: inline-block;
+ max-height: 100%;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
.openerp .oe_menu {
float: left;
padding: 0;
@@ -1141,18 +1192,33 @@
padding-bottom: 16px;
}
.openerp a.oe_logo {
+ position: relative;
width: 220px;
display: block;
text-align: center;
- height: 70px;
- line-height: 70px;
}
.openerp a.oe_logo img {
- height: 40px;
- width: 157px;
margin: 14px 0;
border: 0;
}
+.openerp a.oe_logo .oe_logo_edit {
+ margin: 14px 0;
+ position: absolute;
+ top: 1px;
+ padding: 4px;
+ width: 100%;
+ display: none;
+ text-align: center;
+ color: #eeeeee;
+ background: rgba(37, 37, 37, 0.9);
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -ms-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.openerp a.oe_logo:hover .oe_logo_edit_admin {
+ display: block;
+}
.openerp .oe_footer {
position: fixed;
bottom: 0;
@@ -1162,14 +1228,11 @@
text-align: center;
}
.openerp .oe_footer a {
- font-weight: 800;
- font-family: serif;
- font-size: 16px;
+ font-weight: bold;
color: black;
}
.openerp .oe_footer a span {
color: #c81010;
- font-style: italic;
}
.openerp .oe_secondary_menu_section {
font-weight: bold;
@@ -1202,7 +1265,7 @@
color: white;
padding: 2px 4px;
margin: 1px 6px 0 0;
- border: 1px solid lightGray;
+ border: 1px solid lightgrey;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
@@ -1227,7 +1290,7 @@
transform: scale(1.1);
}
.openerp .oe_secondary_submenu .oe_active {
- border-top: 1px solid lightGray;
+ border-top: 1px solid lightgrey;
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);
@@ -1332,12 +1395,14 @@
height: 100%;
}
.openerp .oe_application .oe_breadcrumb_item:not(:last-child) {
- display: inline-block;
max-width: 7em;
white-space: nowrap;
- overflow: hidden;
text-overflow: ellipsis;
}
+.openerp .oe_application .oe_breadcrumb_title > * {
+ display: inline-block;
+ overflow: hidden;
+}
.openerp .oe_view_manager .oe_view_manager_body {
height: inherit;
}
@@ -1345,6 +1410,7 @@
height: inherit;
}
.openerp .oe_view_manager table.oe_view_manager_header {
+ border-collapse: separate;
width: 100%;
table-layout: fixed;
}
@@ -2028,6 +2094,12 @@
margin: -16px -16px 0 -16px;
padding: 0;
}
+.openerp .oe_form_nosheet.oe_form_nomargin {
+ margin: 0;
+}
+.openerp .oe_form_nosheet.oe_form_nomargin > header {
+ margin: 0;
+}
.openerp .oe_form_sheetbg {
padding: 16px 0;
}
@@ -2041,6 +2113,9 @@
min-height: 330px;
padding: 16px;
}
+.openerp .oe_form_sheet .oe_list {
+ overflow-x: auto;
+}
.openerp .oe_application .oe_form_sheetbg {
background: url(/web/static/src/img/form_sheetbg.png);
border-bottom: 1px solid #dddddd;
@@ -2164,7 +2239,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;
@@ -2545,6 +2620,7 @@
background: -moz-linear-gradient(135deg, #dedede, #fcfcfc);
background: -o-linear-gradient(135deg, #fcfcfc, #dedede);
background: -webkit-gradient(linear, left top, right bottom, from(#fcfcfc), to(#dedede));
+ background: -ms-linear-gradient(top, #fcfcfc, #dedede);
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
@@ -2568,6 +2644,7 @@
background: -moz-linear-gradient(135deg, #3465a4, #729fcf);
background: -o-linear-gradient(135deg, #729fcf, #3465a4);
background: -webkit-gradient(linear, left top, right bottom, from(#729fcf), to(#3465a4));
+ background: -ms-linear-gradient(top, #729fcf, #3465a4);
}
.openerp ul.oe_form_status li.oe_active .label, .openerp ul.oe_form_status_clickable li.oe_active .label {
color: white;
@@ -2617,6 +2694,7 @@
background: -moz-linear-gradient(135deg, #284d7d, #4c85c2);
background: -o-linear-gradient(135deg, #4c85c2, #284d7d);
background: -webkit-gradient(linear, left top, right bottom, from(#4c85c2), to(#284d7d));
+ background: -ms-linear-gradient(top, #4c85c2, #284d7d);
}
.openerp .oe_form .oe_form_field_one2many > .oe_view_manager .oe_list_pager_single_page {
display: none;
@@ -3049,6 +3127,69 @@ div.ui-widget-overlay {
border-radius: 3px;
}
+.openerp_ie input[type='checkbox'] {
+ border: none;
+ background: none;
+ box-shadow: none;
+}
+.openerp_ie .oe_logo img {
+ border: none;
+}
+.openerp_ie .oe_header_row button.oe_highlight {
+ padding-top: 0;
+ padding-bottom: 0;
+}
+.openerp_ie .oe_view_manager_buttons button.oe_write_full {
+ padding-top: 0;
+ padding-bottom: 0;
+}
+.openerp_ie .oe_view_manager_buttons button.oe_highlight {
+ padding-top: 0;
+ padding-bottom: 0;
+}
+.openerp_ie .oe_view_manager_buttons button .oe_form_button_edit {
+ padding-top: 0;
+ padding-bottom: 0;
+}
+.openerp_ie .oe_view_manager_buttons button .oe_form_button_create {
+ padding-top: 0;
+ padding-bottom: 0;
+}
+.openerp_ie .oe_kanban_image {
+ border: none;
+}
+.openerp_ie .oe_msg_icon {
+ border: none;
+}
+.openerp_ie .oe_form header ul {
+ height: 29px;
+}
+.openerp_ie .oe_attach {
+ filter: none;
+}
+.openerp_ie .oe_link {
+ filter: none;
+}
+.openerp_ie .oe_kanban_show_more {
+ clear: both;
+ text-align: center;
+}
+.openerp_ie.oe_kanban_grouped .oe_kanban_show_more .oe_button {
+ width: 100%;
+ padding: 3px 12px;
+}
+.openerp_ie .oe_form_buttons button {
+ padding-top: 0;
+ padding-bottom: 0;
+}
+.openerp_ie .oe_sidebar button {
+ padding-top: 0;
+ padding-bottom: 0;
+}
+.openerp_ie .oe_form_field.oe_tags {
+ float: left;
+}
+
@media print {
.openerp {
text-shadow: none;
@@ -3075,6 +3216,9 @@ div.ui-widget-overlay {
border: 0px !important;
box-shadow: 0px 0px 0px;
}
+ .openerp .oe_application .oe_form_sheet .oe_list, .openerp .oe_application .oe_form_sheetbg .oe_list {
+ overflow-x: visible;
+ }
.openerp .oe_view_manager_current > .oe_view_manager_header {
border: 0px !important;
box-shadow: 0px 0px 0px;
@@ -3086,3 +3230,7 @@ div.ui-widget-overlay {
overflow: hidden !important;
}
}
+.blockUI.blockOverlay {
+ background-color: black;
+ opacity: 0.6;
+}
diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass
index c389f0534d5..0369f5fd4b5 100644
--- a/addons/web/static/src/css/base.sass
+++ b/addons/web/static/src/css/base.sass
@@ -95,6 +95,7 @@ $sheet-padding: 16px
background: -moz-linear-gradient(135deg, $endColor, $startColor)
background: -o-linear-gradient(135deg, $startColor, $endColor)
background: -webkit-gradient(linear, left top, right bottom, from($startColor), to($endColor))
+ background: -ms-linear-gradient(top, $startColor, $endColor) /* IE10 */
@mixin transform($transform)
-webkit-transform: $transform
@@ -159,6 +160,9 @@ $sheet-padding: 16px
\::-webkit-input-placeholder
color: $tag-border !important
font-style: italic !important
+ \:-ms-input-placeholder
+ color: $tag-border !important
+ font-style: italic !important
//}}}
// Tag reset {{{
a
@@ -530,6 +534,8 @@ $sheet-padding: 16px
float: left
.oe_notebook > li > a
display: block
+ color: #808080
+ .oe_notebook > li.ui-tabs-active > a
color: #4c4c4c
.oe_notebook
border-color: #ddd
@@ -598,6 +604,9 @@ $sheet-padding: 16px
display: block
color: #4c4c4c
text-decoration: none
+ width: 200px
+ text-overflow: ellipsis
+ overflow: hidden
&:hover
text-decoration: none
.oe_dropdown_arrow:after
@@ -827,6 +836,24 @@ $sheet-padding: 16px
height: 32px
background-color: #414141
@include vertical-gradient(#646060, #262626)
+ .oe_topbar_anonymous_login
+ background-color: #dc5f59
+ color: #eeeeee
+ @include vertical-gradient(#FC8787, #800000)
+ a
+ display: block
+ padding: 5px 10px 7px
+ line-height: 20px
+ height: 20px
+ text-decoration: none
+ color: white
+ background: transparent
+ @include transition(all 0.2s ease-out)
+ a:hover
+ background: rgba(0,0,0,0.1)
+ color: white
+ text-shadow: 0px 0px 3px rgba(0,0,0,0.2)
+ @include box-shadow(0 1px 2px rgba(0,0,0,0.2) inset)
.oe_topbar_item
display: block
padding: 5px 10px 7px
@@ -870,6 +897,13 @@ $sheet-padding: 16px
&:hover
@include vertical-gradient(#292929, #191919)
@include box-shadow(none)
+ .oe_topbar_name
+ max-width: 150px
+ overflow: hidden
+ display: inline-block
+ max-height: 100%
+ text-overflow: ellipsis
+ white-space: nowrap
// oe menu is the list of the buttons on the left side of the bar.
// So why aren't the buttons oe_topbar_items ? This sad state of affairs
@@ -933,16 +967,26 @@ $sheet-padding: 16px
text-shadow: 0 1px 1px white
padding-bottom: 16px
a.oe_logo
+ position: relative
width: 220px
display: block
text-align: center
- height: 70px
- line-height: 70px
img
- height: 40px
- width: 157px
margin: 14px 0
border: 0
+ .oe_logo_edit
+ margin: 14px 0
+ position: absolute
+ top: 1px
+ padding: 4px
+ width: 100%
+ display: none
+ text-align: center
+ color: #eee
+ background: rgba(37,37,37,0.9)
+ @include box-sizing(border)
+ &:hover .oe_logo_edit_admin
+ display: block
.oe_footer
position: fixed
bottom: 0
@@ -951,13 +995,10 @@ $sheet-padding: 16px
width: 220px
text-align: center
a
- font-weight: 800
- font-family: serif
- font-size: 16px
+ font-weight: bold
color: black
span
color: #c81010
- font-style: italic
// }}}
// Webclient.leftbar items {{{
@@ -1078,11 +1119,12 @@ $sheet-padding: 16px
> div
height: 100%
.oe_breadcrumb_item:not(:last-child)
- display: inline-block
max-width: 7em
white-space: nowrap
- overflow: hidden
text-overflow: ellipsis
+ .oe_breadcrumb_title > *
+ display: inline-block
+ overflow: hidden
// }}}
// ViewManager common {{{
.oe_view_manager
@@ -1092,6 +1134,7 @@ $sheet-padding: 16px
height: inherit
table.oe_view_manager_header
+ border-collapse: separate
width: 100%
table-layout: fixed
.oe_header_row
@@ -1615,6 +1658,10 @@ $sheet-padding: 16px
> header
margin: -16px -16px 0 -16px
padding: 0
+ .oe_form_nosheet.oe_form_nomargin
+ margin: 0
+ > header
+ margin: 0
.oe_form_sheetbg
padding: 16px 0
.oe_form_sheet_width
@@ -1625,6 +1672,8 @@ $sheet-padding: 16px
background: white
min-height: 330px
padding: 16px
+ .oe_list
+ overflow-x: auto
// Sheet inline mode
.oe_application
.oe_form_sheetbg
@@ -1662,7 +1711,7 @@ $sheet-padding: 16px
width: 400px
padding-bottom: 0
div.oe_chatter
- box-sizing: border-box
+ box-sizing: border-box
min-width: $sheet-min-width + 2* $sheet-padding
max-width: $sheet-max-width + 2* $sheet-padding
margin: 0 auto
@@ -1934,7 +1983,7 @@ $sheet-padding: 16px
overflow: hidden
width: 24px
overflow: hidden
- background: transparent
+ background: transparent
color: #7C7BAD
box-shadow: none
border: none
@@ -2418,6 +2467,63 @@ div.ui-widget-overlay
@include radius(3px)
// }}}
+// Internet Explorer 9+ specifics {{{
+.openerp_ie
+ input[type='checkbox']
+ border: none
+ background: none
+ box-shadow: none
+ .oe_logo
+ img
+ border: none
+ .oe_header_row
+ button.oe_highlight
+ padding-top: 0
+ padding-bottom: 0
+ .oe_view_manager_buttons
+ button.oe_write_full
+ padding-top: 0
+ padding-bottom: 0
+ button.oe_highlight
+ padding-top: 0
+ padding-bottom: 0
+ button .oe_form_button_edit
+ padding-top: 0
+ padding-bottom: 0
+ button .oe_form_button_create
+ padding-top: 0
+ padding-bottom: 0
+ .oe_kanban_image
+ border: none
+ .oe_msg_icon
+ border: none
+ .oe_form
+ header
+ ul
+ height: 29px
+ .oe_attach
+ filter: none
+ .oe_link
+ filter: none
+
+ .oe_kanban_show_more
+ clear: both
+ text-align: center
+ &.oe_kanban_grouped .oe_kanban_show_more .oe_button
+ width: 100%
+ padding: 3px 12px
+
+ .oe_form_buttons button
+ padding-top: 0
+ padding-bottom: 0
+ .oe_sidebar button
+ padding-top: 0
+ padding-bottom: 0
+
+ .oe_form_field.oe_tags
+ float: left
+// }}}
+
// @media print {{{
@media print
.openerp
@@ -2441,6 +2547,8 @@ div.ui-widget-overlay
.oe_form_sheet, .oe_form_sheetbg
border: 0px !important
box-shadow: 0px 0px 0px
+ .oe_list
+ overflow-x: visible
.oe_view_manager_current > .oe_view_manager_header
border: 0px !important
box-shadow: 0px 0px 0px
@@ -2451,5 +2559,9 @@ div.ui-widget-overlay
overflow: hidden !important
// }}}
+.blockUI.blockOverlay
+ background-color: black
+ opacity: 0.6000000238418579
+
// au BufWritePost,FileWritePost *.sass :!sass --style expanded --line-numbers <afile> > "%:p:r.css"
// vim:tabstop=4:shiftwidth=4:softtabstop=4:fdm=marker:
diff --git a/addons/web/static/src/img/nologo.png b/addons/web/static/src/img/nologo.png
new file mode 100644
index 00000000000..711269813a1
--- /dev/null
+++ b/addons/web/static/src/img/nologo.png
Binary files differ
diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js
index a2ff00c5f03..632e782c67c 100644
--- a/addons/web/static/src/js/chrome.js
+++ b/addons/web/static/src/js/chrome.js
@@ -565,8 +565,7 @@ instance.web.DatabaseManager = instance.web.Widget.extend({
},
do_exit: function () {
this.$el.remove();
- instance.webclient.toggle_bars(false);
- this.do_action('login');
+ instance.webclient.show_login();
}
});
instance.web.client_actions.add("database_manager", "instance.web.DatabaseManager");
@@ -805,13 +804,14 @@ instance.web.Menu = instance.web.Widget.extend({
this.has_been_loaded = $.Deferred();
this.maximum_visible_links = 'auto'; // # of menu to show. 0 = do not crop, 'auto' = algo
this.data = {data:{children:[]}};
- this.on("menu_loaded", this, function (e) {
+ this.on("menu_loaded", this, function (menu_data) {
// launch the fetch of needaction counters, asynchronous
- this.rpc("/web/menu/load_needaction", {menu_ids: false}).done(function(r) {
- self.on_needaction_loaded(r);
- });
+ if (!_.isEmpty(menu_data.all_menu_ids)) {
+ this.rpc("/web/menu/load_needaction", {menu_ids: menu_data.all_menu_ids}).done(function(r) {
+ self.on_needaction_loaded(r);
+ });
+ }
});
-
},
start: function() {
this._super.apply(this, arguments);
@@ -827,7 +827,7 @@ instance.web.Menu = instance.web.Widget.extend({
},
menu_loaded: function(data) {
var self = this;
- this.data = data;
+ this.data = {data: data};
this.renderElement();
this.limit_entries();
// Hide toplevel item if there is only one
@@ -848,7 +848,7 @@ instance.web.Menu = instance.web.Widget.extend({
on_needaction_loaded: function(data) {
var self = this;
this.needaction_data = data;
- _.each(this.needaction_data.data, function (item, menu_id) {
+ _.each(this.needaction_data, function (item, menu_id) {
var $item = self.$secondary_menus.find('a[data-menu="' + menu_id + '"]');
$item.remove('oe_menu_counter');
if (item.needaction_counter && item.needaction_counter > 0) {
@@ -1119,9 +1119,14 @@ instance.web.Client = instance.web.Widget.extend({
instance.web.WebClient = instance.web.Client.extend({
_template: 'WebClient',
+ events: {
+ 'click .oe_logo_edit_admin': 'logo_edit'
+ },
init: function(parent) {
this._super(parent);
this._current_state = null;
+ this.menu_dm = new instance.web.DropMisordered();
+ this.action_mutex = new $.Mutex();
},
start: function() {
var self = this;
@@ -1173,6 +1178,7 @@ instance.web.WebClient = instance.web.Client.extend({
show_application: function() {
var self = this;
self.toggle_bars(true);
+ self.update_logo();
self.menu = new instance.web.Menu(self);
self.menu.replace(this.$el.find('.oe_menu_placeholder'));
self.menu.on('menu_click', this, this.on_menu_action);
@@ -1184,6 +1190,32 @@ instance.web.WebClient = instance.web.Client.extend({
self.set_title();
self.check_timezone();
},
+ update_logo: function() {
+ var img = this.session.url('/web/binary/company_logo');
+ this.$('.oe_logo img').attr('src', '').attr('src', img);
+ this.$('.oe_logo_edit').toggleClass('oe_logo_edit_admin', this.session.uid === 1);
+ },
+ logo_edit: function(ev) {
+ var self = this;
+ new instance.web.Model("res.users").get_func("read")(this.session.uid, ["company_id"]).then(function(res) {
+ self.rpc("/web/action/load", { action_id: "base.action_res_company_form" }).done(function(result) {
+ result.res_id = res['company_id'][0];
+ result.target = "new";
+ result.views = [[false, 'form']];
+ result.flags = {
+ action_buttons: true,
+ };
+ self.action_manager.do_action(result);
+ var form = self.action_manager.dialog_widget.views.form.controller;
+ form.on("on_button_cancel", self.action_manager.dialog, self.action_manager.dialog.close);
+ form.on('record_saved', self, function() {
+ self.action_manager.dialog.close();
+ self.update_logo();
+ });
+ });
+ });
+ return false;
+ },
check_timezone: function() {
var self = this;
return new instance.web.Model('res.users').call('read', [[this.session.uid], ['tz_offset']]).then(function(result) {
@@ -1287,18 +1319,29 @@ instance.web.WebClient = instance.web.Client.extend({
},
on_menu_action: function(options) {
var self = this;
- return this.rpc("/web/action/load", { action_id: options.action_id })
+ return this.menu_dm.add(this.rpc("/web/action/load", { action_id: options.action_id }))
.then(function (result) {
- if (options.needaction) {
- result.context = new instance.web.CompoundContext(
- result.context,
- {search_default_message_unread: true});
- }
- return $.when(self.action_manager.do_action(result, {
- clear_breadcrumbs: true,
- action_menu_id: self.menu.current_menu,
- })).fail(function() {
- self.menu.open_menu(options.previous_menu_id);
+ return self.action_mutex.exec(function() {
+ if (options.needaction) {
+ result.context = new instance.web.CompoundContext(
+ result.context,
+ {search_default_message_unread: true});
+ }
+ var completed = $.Deferred();
+ $.when(self.action_manager.do_action(result, {
+ clear_breadcrumbs: true,
+ action_menu_id: self.menu.current_menu,
+ })).fail(function() {
+ self.menu.open_menu(options.previous_menu_id);
+ }).always(function() {
+ completed.resolve();
+ });
+ setTimeout(function() {
+ completed.resolve();
+ }, 2000);
+ // We block the menu when clicking on an element until the action has correctly finished
+ // loading. If something crash, there is a 2 seconds timeout before it's unblocked.
+ return completed;
});
});
},
diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js
index c28a51ebe6b..eac26520301 100644
--- a/addons/web/static/src/js/coresetup.js
+++ b/addons/web/static/src/js/coresetup.js
@@ -125,9 +125,7 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess
},
session_logout: function() {
this.set_cookie('session_id', '');
- var url = "#";
- $.bbq.pushState(url);
- window.location.search = "";
+ $.bbq.removeState();
return this.rpc("/web/session/destroy", {});
},
get_cookie: function (name) {
diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js
index eea8bba726d..34ab101fea7 100644
--- a/addons/web/static/src/js/search.js
+++ b/addons/web/static/src/js/search.js
@@ -640,7 +640,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
.then(this.proxy('setup_default_query'));
return $.when(drawer_started, defaults_fetched)
- .done(function () {
+ .then(function () {
self.trigger("search_view_loaded", data);
self.ready.resolve();
});
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 814995da5f7..299d579803d 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -128,13 +128,15 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
self.init_pager();
});
self.on("load_record", self, self.load_record);
- this.on('view_loaded', self, self.load_form);
instance.web.bus.on('clear_uncommitted_changes', this, function(e) {
if (!this.can_be_discarded()) {
e.preventDefault();
}
});
},
+ view_loading: function(r) {
+ return this.load_form(r);
+ },
destroy: function() {
_.each(this.get_widgets(), function(w) {
w.off('focused blurred');
@@ -194,7 +196,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
}
this.sidebar.add_items('other', _.compact([
self.is_action_enabled('delete') && { label: _t('Delete'), callback: self.on_button_delete },
- self.is_action_enabled('create') && { label: _t('Duplicate'), callback: self.on_button_duplicate },
+ self.is_action_enabled('create') && { label: _t('Duplicate'), callback: self.on_button_duplicate }
]));
}
@@ -211,7 +213,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
});
//bounce effect on red button when click on statusbar.
this.$el.find(".oe_form_field_status:not(.oe_form_status_clickable)").on('click', function (e) {
- if((self.get("actual_mode") == "view")) {
+ if((self.get("actual_mode") == "view")) {
var $button = self.$el.find(".oe_highlight:not(.oe_form_invisible)").css({'float':'left','clear':'none'});
$button.effect('bounce', {distance:18, times: 5}, 150);
e.stopPropagation();
@@ -917,7 +919,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
this.do_update_pager();
if (this.sidebar) {
this.sidebar.do_attachement_update(this.dataset, this.datarecord.id);
- }
+ }
//openerp.log("The record has been created with id #" + this.datarecord.id);
return $.when(this.reload()).then(function () {
self.trigger('record_created', r);
@@ -1694,6 +1696,10 @@ instance.web.form.compute_domain = function(expr, fields) {
return _.all(stack, _.identity);
};
+instance.web.form.is_bin_size = function(v) {
+ return /^\d+(\.\d*)? \w+$/.test(v);
+};
+
/**
* Must be applied over an class already possessing the PropertiesMixin.
*
@@ -2216,19 +2222,28 @@ instance.web.form.ReinitializeFieldMixin = _.extend({}, instance.web.form.Reini
instance.web.form.FieldChar = instance.web.form.AbstractField.extend(instance.web.form.ReinitializeFieldMixin, {
template: 'FieldChar',
widget_class: 'oe_form_field_char',
+ events: {
+ 'change input': 'store_dom_value',
+ },
init: function (field_manager, node) {
this._super(field_manager, node);
this.password = this.node.attrs.password === 'True' || this.node.attrs.password === '1';
},
initialize_content: function() {
- var self = this;
- var $input = this.$el.find('input');
- $input.change(function() {
- if(self.is_syntax_valid()){
- self.internal_set_value(self.parse_value($input.val()));
- }
- });
- this.setupFocus($input);
+ this.setupFocus(this.$('input'));
+ },
+ store_dom_value: function () {
+ if (!this.get('effective_readonly')
+ && this.$('input').length
+ && this.is_syntax_valid()) {
+ this.internal_set_value(
+ this.parse_value(
+ this.$('input').val()));
+ }
+ },
+ commit_value: function () {
+ this.store_dom_value();
+ return this._super();
},
render_value: function() {
var show_value = this.format_value(this.get('value'), '');
@@ -2244,7 +2259,7 @@ instance.web.form.FieldChar = instance.web.form.AbstractField.extend(instance.we
is_syntax_valid: function() {
if (!this.get("effective_readonly") && this.$("input").size() > 0) {
try {
- var value_ = this.parse_value(this.$el.find('input').val(), '');
+ this.parse_value(this.$('input').val(), '');
return true;
} catch(e) {
return false;
@@ -2262,7 +2277,7 @@ instance.web.form.FieldChar = instance.web.form.AbstractField.extend(instance.we
return this.get('value') === '' || this._super();
},
focus: function() {
- this.$('input:first').focus();
+ this.$('input:first')[0].focus();
},
set_dimensions: function (height, width) {
this._super(height, width);
@@ -2274,7 +2289,10 @@ instance.web.form.FieldChar = instance.web.form.AbstractField.extend(instance.we
});
instance.web.form.FieldID = instance.web.form.FieldChar.extend({
-
+ process_modifiers: function () {
+ this._super();
+ this.set({ readonly: true });
+ },
});
instance.web.form.FieldEmail = instance.web.form.FieldChar.extend({
@@ -2363,6 +2381,9 @@ instance.web.DateTimeWidget = instance.web.Widget.extend({
template: "web.datepicker",
jqueryui_object: 'datetimepicker',
type_of_date: "datetime",
+ events: {
+ 'change .oe_datepicker_master': 'change_datetime',
+ },
init: function(parent) {
this._super(parent);
this.name = parent.name;
@@ -2371,10 +2392,7 @@ instance.web.DateTimeWidget = instance.web.Widget.extend({
var self = this;
this.$input = this.$el.find('input.oe_datepicker_master');
this.$input_picker = this.$el.find('input.oe_datepicker_container');
- this.$input.change(function(){
- self.change_datetime();
- });
-
+
this.picker({
onClose: this.on_picker_select,
onSelect: this.on_picker_select,
@@ -2447,7 +2465,10 @@ instance.web.DateTimeWidget = instance.web.Widget.extend({
this.set_value_from_ui_();
this.trigger("datetime_changed");
}
- }
+ },
+ commit_value: function () {
+ this.change_datetime();
+ },
});
instance.web.DateWidget = instance.web.DateTimeWidget.extend({
@@ -2494,7 +2515,7 @@ instance.web.form.FieldDatetime = instance.web.form.AbstractField.extend(instanc
},
focus: function() {
if (this.datewidget && this.datewidget.$input) {
- this.datewidget.$input.focus();
+ this.datewidget.$input[0].focus();
}
},
set_dimensions: function (height, width) {
@@ -2512,40 +2533,56 @@ instance.web.form.FieldDate = instance.web.form.FieldDatetime.extend({
instance.web.form.FieldText = instance.web.form.AbstractField.extend(instance.web.form.ReinitializeFieldMixin, {
template: 'FieldText',
+ events: {
+ 'keyup': function (e) {
+ if (e.which === $.ui.keyCode.ENTER) {
+ e.stopPropagation();
+ }
+ },
+ 'change textarea': 'store_dom_value',
+ },
init: function (field_manager, node) {
this._super(field_manager, node);
},
initialize_content: function() {
var self = this;
this.$textarea = this.$el.find('textarea');
+ this.auto_sized = false;
this.default_height = this.$textarea.css('height');
- if (!this.get("effective_readonly")) {
- this.$textarea.change(_.bind(function() {
- self.internal_set_value(instance.web.parse_value(self.$textarea.val(), self));
- }, this));
- } else {
+ if (this.get("effective_readonly")) {
this.$textarea.attr('disabled', 'disabled');
}
- this.$el.keyup(function (e) {
- if (e.which === $.ui.keyCode.ENTER) {
- e.stopPropagation();
- }
- });
this.setupFocus(this.$textarea);
},
+ commit_value: function () {
+ this.store_dom_value();
+ return this._super();
+ },
+ store_dom_value: function () {
+ if (!this.get('effective_readonly') && this.$('textarea').length) {
+ this.internal_set_value(
+ instance.web.parse_value(
+ this.$textarea.val(),
+ this));
+ }
+ },
render_value: function() {
- $(window).resize();
var show_value = instance.web.format_value(this.get('value'), this, '');
if (show_value === '') {
this.$textarea.css('height', parseInt(this.default_height)+"px");
}
this.$textarea.val(show_value);
- this.$textarea.autosize();
+ if (! this.auto_sized) {
+ this.auto_sized = true;
+ this.$textarea.autosize();
+ } else {
+ this.$textarea.trigger("autosize");
+ }
},
is_syntax_valid: function() {
if (!this.get("effective_readonly") && this.$textarea) {
try {
- var value_ = instance.web.parse_value(this.$textarea.val(), this, '');
+ instance.web.parse_value(this.$textarea.val(), this, '');
return true;
} catch(e) {
return false;
@@ -2557,7 +2594,7 @@ instance.web.form.FieldText = instance.web.form.AbstractField.extend(instance.we
return this.get('value') === '' || this._super();
},
focus: function($el) {
- this.$textarea.focus();
+ this.$textarea[0].focus();
},
set_dimensions: function (height, width) {
this._super(height, width);
@@ -2638,7 +2675,7 @@ instance.web.form.FieldBoolean = instance.web.form.AbstractField.extend({
this.$checkbox[0].checked = this.get('value');
},
focus: function() {
- this.$checkbox.focus();
+ this.$checkbox[0].focus();
}
});
@@ -2660,6 +2697,9 @@ instance.web.form.FieldProgressBar = instance.web.form.AbstractField.extend({
instance.web.form.FieldSelection = instance.web.form.AbstractField.extend(instance.web.form.ReinitializeFieldMixin, {
template: 'FieldSelection',
+ events: {
+ 'change select': 'store_dom_value',
+ },
init: function(field_manager, node) {
var self = this;
this._super(field_manager, node);
@@ -2682,9 +2722,6 @@ instance.web.form.FieldSelection = instance.web.form.AbstractField.extend(instan
// row
var ischanging = false;
var $select = this.$el.find('select')
- .change(_.bind(function() {
- this.internal_set_value(this.values[this.$el.find('select')[0].selectedIndex][0]);
- }, this))
.change(function () { ischanging = true; })
.click(function () { ischanging = false; })
.keyup(function (e) {
@@ -2694,6 +2731,16 @@ instance.web.form.FieldSelection = instance.web.form.AbstractField.extend(instan
});
this.setupFocus($select);
},
+ commit_value: function () {
+ this.store_dom_value();
+ return this._super();
+ },
+ store_dom_value: function () {
+ if (!this.get('effective_readonly') && this.$('select').length) {
+ this.internal_set_value(
+ this.values[this.$('select')[0].selectedIndex][0]);
+ }
+ },
set_value: function(value_) {
value_ = value_ === null ? false : value_;
value_ = value_ instanceof Array ? value_[0] : value_;
@@ -2714,7 +2761,7 @@ instance.web.form.FieldSelection = instance.web.form.AbstractField.extend(instan
}
},
focus: function() {
- this.$el.find('select:first').focus();
+ this.$('select:first')[0].focus();
},
set_dimensions: function (height, width) {
this._super(height, width);
@@ -3200,7 +3247,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
},
focus: function () {
if (!this.get('effective_readonly')) {
- this.$input.focus();
+ this.$input[0].focus();
}
},
_quick_create: function() {
@@ -4050,6 +4097,9 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
add_id: function(id) {
this.set({'value': _.uniq(this.get('value').concat([id]))});
},
+ focus: function () {
+ this.$text[0].focus();
+ },
});
/**
@@ -4386,7 +4436,7 @@ instance.web.form.Many2ManyQuickCreate = instance.web.Widget.extend({
});
},
focus: function() {
- this.$text.focus();
+ this.$text[0].focus();
},
add_id: function(id) {
var self = this;
@@ -4834,11 +4884,6 @@ instance.web.form.FieldBinary = instance.web.form.AbstractField.extend(instance.
if (!value) {
this.do_warn(_t("Save As..."), _t("The field is empty, there's nothing to save !"));
ev.stopPropagation();
- } else if (this._dirty_flag) {
- var link = this.$('.oe_form_binary_file_save_data')[0];
- link.download = this.filename || "download.bin"; // Works on only on Google Chrome
- //link.target = '_blank';
- link.href = "data:application/octet-stream;base64," + value;
} else {
instance.web.blockUI();
var c = instance.webclient.crashmanager;
@@ -4849,6 +4894,7 @@ instance.web.form.FieldBinary = instance.web.form.AbstractField.extend(instance.
id: (this.view.datarecord.id || ''),
field: this.name,
filename_field: (this.node.attrs.filename || ''),
+ data: instance.web.form.is_bin_size(value) ? null : value,
context: this.view.dataset.get_context()
})},
complete: instance.web.unblockUI,
@@ -4928,7 +4974,7 @@ instance.web.form.FieldBinaryImage = instance.web.form.FieldBinary.extend({
render_value: function() {
var self = this;
var url;
- if (this.get('value') && ! /^\d+(\.\d*)? \w+$/.test(this.get('value'))) {
+ if (this.get('value') && !instance.web.form.is_bin_size(this.get('value'))) {
url = 'data:image/png;base64,' + this.get('value');
} else if (this.get('value')) {
var id = JSON.stringify(this.view.datarecord.id || null);
@@ -5029,7 +5075,7 @@ instance.web.form.FieldMany2ManyBinaryMultiFiles = instance.web.form.AbstractFie
this._super( ids );
},
get_value: function() {
- return _.map(this.get('value'), function (value) { return commands.link_to( value.id ); });
+ return _.map(this.get('value'), function (value) { return commands.link_to( isNaN(value) ? value.id : value ); });
},
get_file_url: function (attachment) {
return this.session.url('/web/binary/saveas', {model: 'ir.attachment', field: 'datas', filename_field: 'datas_fname', id: attachment['id']});
@@ -5049,7 +5095,7 @@ instance.web.form.FieldMany2ManyBinaryMultiFiles = instance.web.form.AbstractFie
_.each(datas, function (data) {
data.no_unlink = true;
data.url = self.session.url('/web/binary/saveas', {model: 'ir.attachment', field: 'datas', filename_field: 'datas_fname', id: data.id});
-
+
_.each(self.get('value'), function (val, key) {
if(val == data.id) {
self.get('value')[key] = data;
@@ -5123,6 +5169,8 @@ instance.web.form.FieldMany2ManyBinaryMultiFiles = instance.web.form.AbstractFie
}
},
on_file_loaded: function (event, result) {
+ var files = this.get('value');
+
// unblock UI
if(this.node.attrs.blockui>0) {
instance.web.unblockUI();
@@ -5130,15 +5178,19 @@ instance.web.form.FieldMany2ManyBinaryMultiFiles = instance.web.form.AbstractFie
// TODO : activate send on wizard and form
- var files = this.get('value');
- for(var i in files){
- if(files[i].filename == result.filename && files[i].upload) {
- files[i] = {
- 'id': result.id,
- 'name': result.name,
- 'filename': result.filename,
- 'url': this.get_file_url(result)
- };
+ if (result.error || !result.id ) {
+ this.do_warn( _t('Uploading error'), result.error);
+ files = _.filter(files, function (val) { return !val.upload; });
+ } else {
+ for(var i in files){
+ if(files[i].filename == result.filename && files[i].upload) {
+ files[i] = {
+ 'id': result.id,
+ 'name': result.name,
+ 'filename': result.filename,
+ 'url': this.get_file_url(result)
+ };
+ }
}
}
@@ -5209,7 +5261,8 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({
if (this.field.type == "many2one") {
var domain = [];
if(!_.isEmpty(this.field.domain) || !_.isEmpty(this.node.attrs.domain)) {
- domain = new instance.web.CompoundDomain(['|'], self.build_domain(), [['id', '=', self.get('value')]]);
+ var d = instance.web.pyeval.eval('domain', self.build_domain());
+ domain = ['|', ['id', '=', self.get('value')]].concat(d);
}
var ds = new instance.web.DataSetSearch(this, this.field.relation, self.build_context(), domain);
return ds.read_slice(['name'], {}).then(function (records) {
diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js
index 04ff8b48923..f6794bd435c 100644
--- a/addons/web/static/src/js/view_list.js
+++ b/addons/web/static/src/js/view_list.js
@@ -90,7 +90,9 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
this.no_leaf = false;
this.grouped = false;
- this.on('view_loaded', self, self.load_list);
+ },
+ view_loading: function(r) {
+ return this.load_list(r);
},
set_default_options: function (options) {
this._super(options);
diff --git a/addons/web/static/src/js/view_tree.js b/addons/web/static/src/js/view_tree.js
index acac93f1842..2f9efad9171 100644
--- a/addons/web/static/src/js/view_tree.js
+++ b/addons/web/static/src/js/view_tree.js
@@ -37,7 +37,10 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
this.options = _.extend({}, this.defaults, options || {});
_.bindAll(this, 'color_for');
- this.on('view_loaded', this, this.load_tree);
+ },
+
+ view_loading: function(r) {
+ return this.load_tree(r);
},
/**
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js
index c0c6ae1f31d..92f66849fec 100644
--- a/addons/web/static/src/js/views.js
+++ b/addons/web/static/src/js/views.js
@@ -467,6 +467,7 @@ instance.web.ViewManager = instance.web.Widget.extend({
this.flags = flags || {};
this.registry = instance.web.views;
this.views_history = [];
+ this.view_completely_inited = $.Deferred();
},
/**
* @returns {jQuery.Deferred} initial view loading promise
@@ -586,6 +587,8 @@ instance.web.ViewManager = instance.web.Widget.extend({
&& self.flags.auto_search
&& view.controller.searchable !== false) {
self.searchview.ready.done(self.searchview.do_search);
+ } else {
+ self.view_completely_inited.resolve();
}
self.trigger("controller_inited",view_type,controller);
});
@@ -700,7 +703,9 @@ instance.web.ViewManager = instance.web.Widget.extend({
if (_.isString(groupby)) {
groupby = [groupby];
}
- controller.do_search(results.domain, results.context, groupby || []);
+ $.when(controller.do_search(results.domain, results.context, groupby || [])).then(function() {
+ self.view_completely_inited.resolve();
+ });
});
},
/**
@@ -782,7 +787,7 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({
var main_view_loaded = this._super();
- var manager_ready = $.when(searchview_loaded, main_view_loaded);
+ var manager_ready = $.when(searchview_loaded, main_view_loaded, this.view_completely_inited);
this.$el.find('.oe_debug_view').change(this.on_debug_changed);
this.$el.addClass("oe_view_manager_" + (this.action.target || 'current'));
@@ -1027,6 +1032,11 @@ instance.web.Sidebar = instance.web.Widget.extend({
this.$('.oe_form_dropdown_section').each(function() {
$(this).toggle(!!$(this).find('li').length);
});
+
+ self.$("[title]").tipsy({
+ 'html': true,
+ 'delayIn': 500,
+ })
},
/**
* For each item added to the section:
@@ -1110,27 +1120,19 @@ instance.web.Sidebar = instance.web.Widget.extend({
});
});
},
- do_attachement_update: function(dataset, model_id,args) {
+ do_attachement_update: function(dataset, model_id, args) {
var self = this;
this.dataset = dataset;
this.model_id = model_id;
- if (args && args[0]["erorr"]) {
- instance.web.dialog($('<div>'),{
- modal: true,
- title: "OpenERP " + _.str.capitalize(args[0]["title"]),
- buttons: [{
- text: _t("Ok"),
- click: function(){
- $(this).dialog("close");
- }}]
- }).html(args[0]["erorr"]);
+ if (args && args[0].error) {
+ this.do_warn( instance.web.qweb.render('message_error_uploading'), args[0].error);
}
if (!model_id) {
this.on_attachments_loaded([]);
} else {
var dom = [ ['res_model', '=', dataset.model], ['res_id', '=', model_id], ['type', 'in', ['binary', 'url']] ];
var ds = new instance.web.DataSetSearch(this, 'ir.attachment', dataset.get_context(), dom);
- ds.read_slice(['name', 'url', 'type'], {}).done(this.on_attachments_loaded);
+ ds.read_slice(['name', 'url', 'type', 'create_uid', 'create_date', 'write_uid', 'write_date'], {}).done(this.on_attachments_loaded);
}
},
on_attachments_loaded: function(attachments) {
@@ -1189,31 +1191,36 @@ instance.web.View = instance.web.Widget.extend({
},
load_view: function(context) {
var self = this;
- var view_loaded;
+ var view_loaded_def;
if (this.embedded_view) {
- view_loaded = $.Deferred();
+ view_loaded_def = $.Deferred();
$.async_when().done(function() {
- view_loaded.resolve(self.embedded_view);
+ view_loaded_def.resolve(self.embedded_view);
});
} else {
if (! this.view_type)
console.warn("view_type is not defined", this);
- view_loaded = instance.web.fields_view_get({
+ view_loaded_def = instance.web.fields_view_get({
"model": this.dataset._model,
"view_id": this.view_id,
"view_type": this.view_type,
"toolbar": !!this.options.$sidebar,
});
}
- return view_loaded.then(function(r) {
- self.trigger('view_loaded', r);
+ return view_loaded_def.then(function(r) {
+ self.fields_view = r;
// add css classes that reflect the (absence of) access rights
self.$el.addClass('oe_view')
.toggleClass('oe_cannot_create', !self.is_action_enabled('create'))
.toggleClass('oe_cannot_edit', !self.is_action_enabled('edit'))
.toggleClass('oe_cannot_delete', !self.is_action_enabled('delete'));
+ return $.when(self.view_loading(r)).then(function() {
+ self.trigger('view_loaded', r);
+ });
});
},
+ view_loading: function(r) {
+ },
set_default_options: function(options) {
this.options = options || {};
_.defaults(this.options, {
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index a1062cc0444..82714c22aa8 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -439,7 +439,10 @@
<tr>
<td class="oe_leftbar" valign="top">
<t t-set="debug" t-value="__debug__ ? '&amp;debug' : ''"/>
- <a class="oe_logo" t-attf-href="/?ts=#{Date.now()}#{debug}"><img t-att-src='_s + "/web/static/src/img/logo.png"'/></a>
+ <a class="oe_logo" t-attf-href="/?ts=#{Date.now()}#{debug}">
+ <span class="oe_logo_edit">Edit Company data</span>
+ <img t-att-src='widget.session.url("/web/binary/company_logo")'/>
+ </a>
<div class="oe_secondary_menus_container"/>
<div class="oe_footer">
Powered by <a href="http://www.openerp.com" target="_blank"><span>OpenERP</span></a>
@@ -602,7 +605,23 @@
</button>
<ul class="oe_dropdown_menu">
<li t-foreach="widget.items[section.name]" t-as="item" t-att-class="item.classname">
- <a class="oe_sidebar_action_a" t-att-title="item.title" t-att-data-section="section.name" t-att-data-index="item_index" t-att-href="item.url" target="_blank">
+ <t t-if="section.name == 'files'">
+ <t t-set="item.title">
+ <b>Attachment : </b><br/>
+ <t t-raw="item.name"/>
+ </t>
+ <t t-if="item.create_uid and item.create_uid[0]" t-set="item.title">
+ <t t-raw="item.title"/><br/>
+ <b>Created by : </b><br/>
+ <t t-raw="item.create_uid[1] + ' ' + item.create_date"/>
+ </t>
+ <t t-if="item.create_uid and item.write_uid and item.create_uid[0] != item.write_uid[0]" t-set="item.title">
+ <t t-raw="item.title"/><br/>
+ <b>Modified by : </b><br/>
+ <t t-raw="item.write_uid[1] + ' ' + item.write_date"/>
+ </t>
+ </t>
+ <a class="oe_sidebar_action_a" t-att-title="item.title or ''" t-att-data-section="section.name" t-att-data-index="item_index" t-att-href="item.url" target="_blank">
<t t-raw="item.label"/>
</a>
<a t-if="section.name == 'files' and !item.callback" class="oe_sidebar_delete_item" t-att-data-id="item.id" title="Delete this attachment">x</a>
@@ -1352,7 +1371,7 @@
</t>
<t t-name="SelectCreatePopup.search.buttons">
<t t-if="! widget.options.disable_multiple_selection">
- <button type="button" class="oe_button oe_selectcreatepopup-search-select" disabled="disabled">Select</button>
+ <button type="button" class="oe_button oe_selectcreatepopup-search-select oe_highlight" disabled="disabled">Select</button>
</t>
<button type="button" class="oe_button oe_selectcreatepopup-search-create">Create</button>
or <a class="oe_button oe_selectcreatepopup-search-close oe_bold oe_form_button_cancel" href="javascript:void(0)">Cancel</a>