[MERGE] Bugfixes from the 7.0 branch, up to rev. 3845
rev.3845 = launchpad_translations_on_behalf_of_openerp-20130315064417-68iimts1xgj8bn5z bzr revid: odo@openerp.com-20130315090112-n4h5wpxk2sjhwvrd
This commit is contained in:
@@ -355,6 +355,12 @@
|
||||
float: right;
|
||||
margin-left: 8px;
|
||||
}
|
||||
.openerp .oe_text_center {
|
||||
text-align: center;
|
||||
}
|
||||
.openerp .oe_text_left {
|
||||
text-align: left;
|
||||
}
|
||||
.openerp .oe_text_right {
|
||||
text-align: right;
|
||||
}
|
||||
@@ -2228,6 +2234,26 @@
|
||||
.openerp .oe_form .oe_subtotal_footer label.oe_form_label_help {
|
||||
font-weight: normal;
|
||||
}
|
||||
.openerp .oe_form .oe_form_box_info {
|
||||
background: #ffee99;
|
||||
border-bottom: 1px solid #ccbb66;
|
||||
padding: 4px;
|
||||
}
|
||||
.openerp .oe_form .oe_form_box_info > p {
|
||||
margin: auto;
|
||||
}
|
||||
.openerp .oe_form .oe_form_box_warning {
|
||||
background: #bd362f;
|
||||
border-bottom: 1px solid #990000;
|
||||
padding: 4px;
|
||||
}
|
||||
.openerp .oe_form .oe_form_box_warning * {
|
||||
color: white;
|
||||
text-shadow: none;
|
||||
}
|
||||
.openerp .oe_form .oe_form_box_warning > p {
|
||||
margin: auto;
|
||||
}
|
||||
.openerp .oe_form .oe_form_button {
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
@@ -370,6 +370,10 @@ $sheet-padding: 16px
|
||||
.oe_right
|
||||
float: right
|
||||
margin-left: 8px
|
||||
.oe_text_center
|
||||
text-align: center
|
||||
.oe_text_left
|
||||
text-align: left
|
||||
.oe_text_right
|
||||
text-align: right
|
||||
.oe_clear
|
||||
@@ -1760,7 +1764,21 @@ $sheet-padding: 16px
|
||||
padding: 2px 11px 2px 0px !important
|
||||
label.oe_form_label_help
|
||||
font-weight: normal
|
||||
|
||||
.oe_form_box_info
|
||||
background: #fe9
|
||||
border-bottom: 1px solid #cb6
|
||||
padding: 4px
|
||||
> p
|
||||
margin: auto
|
||||
.oe_form_box_warning
|
||||
background: #bd362f
|
||||
border-bottom: 1px solid #900
|
||||
padding: 4px
|
||||
*
|
||||
color: white
|
||||
text-shadow: none
|
||||
> p
|
||||
margin: auto
|
||||
// }}}
|
||||
// FormView.group {{{
|
||||
.oe_form
|
||||
|
||||
@@ -1539,8 +1539,9 @@ instance.web.EmbeddedClient = instance.web.Client.extend({
|
||||
});
|
||||
},
|
||||
|
||||
do_action: function(action) {
|
||||
return this.action_manager.do_action(action);
|
||||
do_action: function(/*...*/) {
|
||||
var am = this.action_manager;
|
||||
return am.do_action.apply(am, arguments);
|
||||
},
|
||||
|
||||
authenticate: function() {
|
||||
|
||||
@@ -2357,7 +2357,8 @@ instance.web.form.FieldUrl = instance.web.form.FieldChar.extend({
|
||||
if (!s) {
|
||||
tmp = "http://" + this.get('value');
|
||||
}
|
||||
this.$el.find('a').attr('href', tmp).text(this.get('value') ? tmp : '');
|
||||
var text = this.get('value') ? this.node.attrs.text || tmp : '';
|
||||
this.$el.find('a').attr('href', tmp).text(text);
|
||||
}
|
||||
},
|
||||
on_button_clicked: function() {
|
||||
@@ -2602,7 +2603,7 @@ instance.web.form.FieldText = instance.web.form.AbstractField.extend(instance.we
|
||||
this.$textarea.trigger("autosize");
|
||||
}
|
||||
} else {
|
||||
var txt = this.get("value");
|
||||
var txt = this.get("value") || '';
|
||||
this.$(".oe_form_text_content").text(txt);
|
||||
}
|
||||
},
|
||||
@@ -2663,7 +2664,7 @@ instance.web.form.FieldTextHtml = instance.web.form.AbstractField.extend(instanc
|
||||
"| removeformat | bullets numbering | outdent " +
|
||||
"indent | link unlink | source",
|
||||
bodyStyle: // style to assign to document body contained within the editor
|
||||
"margin:4px; color:#4c4c4c; font-size:13px; font-family:\"Lucida Grande\",Helvetica,Verdana,Arial,sans-serif; cursor:text"
|
||||
"margin:4px; color:#4c4c4c; font-size:13px; font-family:'Lucida Grande',Helvetica,Verdana,Arial,sans-serif; cursor:text"
|
||||
});
|
||||
this.$cleditor = this.$textarea.cleditor()[0];
|
||||
this.$cleditor.change(function() {
|
||||
@@ -5301,7 +5302,12 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({
|
||||
},
|
||||
calc_domain: function() {
|
||||
var d = instance.web.pyeval.eval('domain', this.build_domain());
|
||||
domain = ['|', ['id', '=', this.get('value')]].concat(d);
|
||||
var domain = []; //if there is no domain defined, fetch all the records
|
||||
|
||||
if (d.length) {
|
||||
domain = ['|',['id', '=', this.get('value')]].concat(d);
|
||||
}
|
||||
|
||||
if (! _.isEqual(domain, this.get("evaluated_selection_domain"))) {
|
||||
this.set("evaluated_selection_domain", domain);
|
||||
}
|
||||
|
||||
@@ -149,6 +149,9 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
||||
for (var i = 0; i < this.breadcrumbs.length; i += 1) {
|
||||
var item = this.breadcrumbs[i];
|
||||
var tit = item.get_title();
|
||||
if (item.hide_breadcrumb) {
|
||||
continue;
|
||||
}
|
||||
if (!_.isArray(tit)) {
|
||||
tit = [tit];
|
||||
}
|
||||
@@ -282,6 +285,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
||||
* @param {Object} [options]
|
||||
* @param {Boolean} [options.clear_breadcrumbs=false] Clear the breadcrumbs history list
|
||||
* @param {Function} [options.on_reverse_breadcrumb] Callback to be executed whenever an anterior breadcrumb item is clicked on.
|
||||
* @param {Function} [options.hide_breadcrumb] Do not display this widget's title in the breadcrumb
|
||||
* @param {Function} [options.on_close] Callback to be executed when the dialog is closed (only relevant for target=new actions)
|
||||
* @param {Function} [options.action_menu_id] Manually set the menu id on the fly.
|
||||
* @param {Object} [options.additional_context] Additional context to be merged with the action's context.
|
||||
@@ -291,6 +295,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
||||
options = _.defaults(options || {}, {
|
||||
clear_breadcrumbs: false,
|
||||
on_reverse_breadcrumb: function() {},
|
||||
hide_breadcrumb: false,
|
||||
on_close: function() {},
|
||||
action_menu_id: null,
|
||||
additional_context: {},
|
||||
@@ -403,7 +408,12 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
||||
widget: function () { return new instance.web.ViewManagerAction(self, action); },
|
||||
action: action,
|
||||
klass: 'oe_act_window',
|
||||
post_process: function (widget) { widget.add_breadcrumb(options.on_reverse_breadcrumb); }
|
||||
post_process: function (widget) {
|
||||
widget.add_breadcrumb({
|
||||
on_reverse_breadcrumb: options.on_reverse_breadcrumb,
|
||||
hide_breadcrumb: options.hide_breadcrumb,
|
||||
});
|
||||
},
|
||||
}, options);
|
||||
},
|
||||
ir_actions_client: function (action, options) {
|
||||
@@ -427,6 +437,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
||||
widget: widget,
|
||||
title: action.name,
|
||||
on_reverse_breadcrumb: options.on_reverse_breadcrumb,
|
||||
hide_breadcrumb: options.hide_breadcrumb,
|
||||
});
|
||||
if (action.tag !== 'reload') {
|
||||
self.do_push_state({});
|
||||
@@ -649,7 +660,15 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
||||
set_title: function(title) {
|
||||
this.$el.find('.oe_view_title_text:first').text(title);
|
||||
},
|
||||
add_breadcrumb: function(on_reverse_breadcrumb) {
|
||||
add_breadcrumb: function(options) {
|
||||
var options = options || {};
|
||||
// 7.0 backward compatibility
|
||||
if (typeof options == 'function') {
|
||||
options = {
|
||||
on_reverse_breadcrumb: options
|
||||
};
|
||||
}
|
||||
// end of 7.0 backward compatibility
|
||||
var self = this;
|
||||
var views = [this.active_view || this.views_src[0].view_type];
|
||||
this.on('switch_mode', self, function(mode) {
|
||||
@@ -661,7 +680,7 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
||||
views.push(mode);
|
||||
}
|
||||
});
|
||||
this.getParent().push_breadcrumb({
|
||||
var item = _.extend({
|
||||
widget: this,
|
||||
action: this.action,
|
||||
show: function(index) {
|
||||
@@ -695,9 +714,9 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
||||
titles.pop();
|
||||
}
|
||||
return titles;
|
||||
},
|
||||
on_reverse_breadcrumb: on_reverse_breadcrumb,
|
||||
});
|
||||
}
|
||||
}, options);
|
||||
this.getParent().push_breadcrumb(item);
|
||||
},
|
||||
/**
|
||||
* Returns to the view preceding the caller view in this manager's
|
||||
|
||||
@@ -1325,7 +1325,7 @@
|
||||
<div class="oe_add" t-if="!widget.get('effective_readonly')">
|
||||
<!-- uploader of file -->
|
||||
<button class="oe_attach"><span class="oe_e">'</span></button>
|
||||
<span class='oe_attach_label'>File</span>
|
||||
<span class='oe_attach_label'><t t-esc="widget.string"/></span>
|
||||
<t t-call="HiddenInputFile">
|
||||
<t t-set="fileupload_id" t-value="widget.fileupload_id"/>
|
||||
<t t-set="fileupload_action" t-translation="off">/web/binary/upload_attachment</t>
|
||||
|
||||
Reference in New Issue
Block a user