[MERGE] Merge lp:openerp-web/7.0.
bzr revid: bth@bth-laptop-20130326093643-746n0kzeu3nlwfe2
This commit is contained in:
commit
3a971d10a6
|
@ -13,6 +13,7 @@ This module provides the core of the OpenERP Web Client.
|
|||
'auto_install': True,
|
||||
'post_load': 'wsgi_postload',
|
||||
'js' : [
|
||||
"static/src/fixbind.js",
|
||||
"static/lib/datejs/globalization/en-US.js",
|
||||
"static/lib/datejs/core.js",
|
||||
"static/lib/datejs/parser.js",
|
||||
|
|
|
@ -8,14 +8,15 @@ msgstr ""
|
|||
"Project-Id-Version: openerp-web\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2013-03-07 08:39+0000\n"
|
||||
"PO-Revision-Date: 2012-12-22 13:31+0000\n"
|
||||
"Last-Translator: Felix Schubert <Unknown>\n"
|
||||
"PO-Revision-Date: 2013-03-20 12:46+0000\n"
|
||||
"Last-Translator: Thorsten Vocks (OpenBig.org) <thorsten.vocks@big-"
|
||||
"consulting.net>\n"
|
||||
"Language-Team: German <de@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2013-03-08 06:06+0000\n"
|
||||
"X-Generator: Launchpad (build 16523)\n"
|
||||
"X-Launchpad-Export-Date: 2013-03-21 05:03+0000\n"
|
||||
"X-Generator: Launchpad (build 16532)\n"
|
||||
|
||||
#. module: web
|
||||
#. openerp-web
|
||||
|
@ -440,7 +441,7 @@ msgstr "Datei hochladen"
|
|||
#: code:addons/web/static/src/js/view_form.js:3838
|
||||
#, python-format
|
||||
msgid "Action Button"
|
||||
msgstr ""
|
||||
msgstr "Aktion Button"
|
||||
|
||||
#. module: web
|
||||
#. openerp-web
|
||||
|
@ -1012,6 +1013,10 @@ msgid ""
|
|||
"\n"
|
||||
"%s"
|
||||
msgstr ""
|
||||
"Fehler bei Sprachversion Evaluierung\n"
|
||||
"%s\n"
|
||||
"\n"
|
||||
"%s"
|
||||
|
||||
#. module: web
|
||||
#. openerp-web
|
||||
|
@ -1417,7 +1422,7 @@ msgstr "99+"
|
|||
#: code:addons/web/static/src/xml/base.xml:408
|
||||
#, python-format
|
||||
msgid "Help"
|
||||
msgstr ""
|
||||
msgstr "Hilfe"
|
||||
|
||||
#. module: web
|
||||
#. openerp-web
|
||||
|
@ -2467,6 +2472,8 @@ msgstr "Aktion bearbeiten"
|
|||
msgid ""
|
||||
"This filter is global and will be removed for everybody if you continue."
|
||||
msgstr ""
|
||||
"Der Filter ist allgemeingültig und wird bei Fortführung für alle Benutzer "
|
||||
"entfernt"
|
||||
|
||||
#. module: web
|
||||
#. openerp-web
|
||||
|
|
|
@ -1269,7 +1269,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;
|
||||
|
@ -1301,7 +1301,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);
|
||||
|
@ -1703,6 +1703,7 @@
|
|||
font-size: 1px;
|
||||
letter-spacing: -1px;
|
||||
color: transparent;
|
||||
text-shadow: none;
|
||||
font-weight: normal;
|
||||
-moz-box-shadow: none;
|
||||
-webkit-box-shadow: none;
|
||||
|
@ -2287,7 +2288,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;
|
||||
|
@ -3021,6 +3022,7 @@
|
|||
font-size: 1px;
|
||||
letter-spacing: -1px;
|
||||
color: transparent;
|
||||
text-shadow: none;
|
||||
font-weight: normal;
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
@ -3192,6 +3194,9 @@ div.ui-widget-overlay {
|
|||
color: #afafb6 !important;
|
||||
font-style: italic !important;
|
||||
}
|
||||
.openerp_ie .oe_form_binary_file {
|
||||
width: 80px;
|
||||
}
|
||||
.openerp_ie .oe_form_field_boolean input {
|
||||
background: white;
|
||||
}
|
||||
|
|
|
@ -123,6 +123,7 @@ $sheet-padding: 16px
|
|||
font-size: 1px
|
||||
letter-spacing: -1px
|
||||
color: transparent
|
||||
text-shadow: none
|
||||
font-weight: normal
|
||||
&:before
|
||||
font: 21px "mnmliconsRegular"
|
||||
|
@ -133,6 +134,7 @@ $sheet-padding: 16px
|
|||
font-size: 1px
|
||||
letter-spacing: -1px
|
||||
color: transparent
|
||||
text-shadow: none
|
||||
font-weight: normal
|
||||
&:before
|
||||
font: $size "entypoRegular"
|
||||
|
@ -2519,6 +2521,8 @@ div.ui-widget-overlay
|
|||
.placeholder
|
||||
color: $tag-border !important
|
||||
font-style: italic !important
|
||||
.oe_form_binary_file
|
||||
width: 80px
|
||||
.oe_form_field_boolean input
|
||||
background: #fff
|
||||
.db_option_table .oe_form_field_selection
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
// Fix old versions of Webkit (such as ones used on iOS < 6 or PhantomJS <= 1.7)
|
||||
// which does not have Function.prototype.bind function
|
||||
|
||||
// Use moz polyfill:
|
||||
// https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function/bind#Compatibility
|
||||
if (!Function.prototype.bind) {
|
||||
Function.prototype.bind = function (oThis) {
|
||||
if (typeof this !== "function") {
|
||||
// closest thing possible to the ECMAScript 5 internal IsCallable function
|
||||
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
|
||||
}
|
||||
|
||||
var aArgs = Array.prototype.slice.call(arguments, 1),
|
||||
fToBind = this,
|
||||
fNOP = function () {},
|
||||
fBound = function () {
|
||||
return fToBind.apply(this instanceof fNOP && oThis
|
||||
? this
|
||||
: oThis,
|
||||
aArgs.concat(Array.prototype.slice.call(arguments)));
|
||||
};
|
||||
|
||||
fNOP.prototype = this.prototype;
|
||||
fBound.prototype = new fNOP();
|
||||
|
||||
return fBound;
|
||||
};
|
||||
}
|
|
@ -1046,7 +1046,9 @@ instance.web.search.FilterGroup = instance.web.search.Input.extend(/** @lends in
|
|||
facet.values.each(function (v) {
|
||||
var i = _(self.filters).indexOf(v.get('value'));
|
||||
if (i === -1) { return; }
|
||||
$filters.eq(i).addClass('oe_selected');
|
||||
$filters.filter(function () {
|
||||
return Number($(this).data('index')) === i;
|
||||
}).addClass('oe_selected');
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -1136,7 +1138,7 @@ instance.web.search.FilterGroup = instance.web.search.Input.extend(/** @lends in
|
|||
});
|
||||
},
|
||||
toggle_filter: function (e) {
|
||||
this.toggle(this.filters[$(e.target).index()]);
|
||||
this.toggle(this.filters[Number($(e.target).data('index'))]);
|
||||
},
|
||||
toggle: function (filter) {
|
||||
this.view.query.toggle(this.make_facet([this.make_value(filter)]));
|
||||
|
|
|
@ -176,9 +176,9 @@ openerp.testing = {};
|
|||
});
|
||||
|
||||
QUnit.module(testing.current_module + '.' + name, {_oe: options});
|
||||
body(testing.case);
|
||||
body(testing['case']);
|
||||
};
|
||||
testing.case = function (name, options, callback) {
|
||||
testing['case'] = function (name, options, callback) {
|
||||
if (_.isFunction(options)) {
|
||||
callback = options;
|
||||
options = {};
|
||||
|
|
|
@ -1021,7 +1021,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
|||
return value;
|
||||
}
|
||||
var fields = _.chain(this.fields)
|
||||
.map(function (field, name) {
|
||||
.map(function (field) {
|
||||
var value = field.get_value();
|
||||
// ignore fields which are empty, invisible, readonly, o2m
|
||||
// or m2m
|
||||
|
@ -1036,7 +1036,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
|||
}
|
||||
|
||||
return {
|
||||
name: name,
|
||||
name: field.name,
|
||||
string: field.string,
|
||||
value: value,
|
||||
displayed: display(field, value),
|
||||
|
@ -1047,10 +1047,10 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
|||
.value();
|
||||
var conditions = _.chain(self.fields)
|
||||
.filter(function (field) { return field.field.change_default; })
|
||||
.map(function (field, name) {
|
||||
.map(function (field) {
|
||||
var value = field.get_value();
|
||||
return {
|
||||
name: name,
|
||||
name: field.name,
|
||||
string: field.string,
|
||||
value: value,
|
||||
displayed: display(field, value),
|
||||
|
@ -2296,7 +2296,8 @@ instance.web.form.FieldChar = instance.web.form.AbstractField.extend(instance.we
|
|||
return this.get('value') === '' || this._super();
|
||||
},
|
||||
focus: function() {
|
||||
this.$('input:first')[0].focus();
|
||||
var input = this.$('input:first')[0];
|
||||
return input ? input.focus() : false;
|
||||
},
|
||||
set_dimensions: function (height, width) {
|
||||
this._super(height, width);
|
||||
|
@ -2393,7 +2394,8 @@ instance.web.form.FieldFloat = instance.web.form.FieldChar.extend({
|
|||
this._super.apply(this, [value_]);
|
||||
},
|
||||
focus: function () {
|
||||
this.$('input:first').select();
|
||||
var $input = this.$('input:first');
|
||||
return $input.length ? $input.select() : false;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -2413,6 +2415,42 @@ instance.web.DateTimeWidget = instance.web.Widget.extend({
|
|||
this.$input = this.$el.find('input.oe_datepicker_master');
|
||||
this.$input_picker = this.$el.find('input.oe_datepicker_container');
|
||||
|
||||
$.datepicker.setDefaults({
|
||||
clearText: _t('Clear'),
|
||||
clearStatus: _t('Erase the current date'),
|
||||
closeText: _t('Done'),
|
||||
closeStatus: _t('Close without change'),
|
||||
prevText: _t('<Prev'),
|
||||
prevStatus: _t('Show the previous month'),
|
||||
nextText: _t('Next>'),
|
||||
nextStatus: _t('Show the next month'),
|
||||
currentText: _t('Today'),
|
||||
currentStatus: _t('Show the current month'),
|
||||
monthNames: Date.CultureInfo.monthNames,
|
||||
monthNamesShort: Date.CultureInfo.abbreviatedMonthNames,
|
||||
monthStatus: _t('Show a different month'),
|
||||
yearStatus: _t('Show a different year'),
|
||||
weekHeader: _t('Wk'),
|
||||
weekStatus: _t('Week of the year'),
|
||||
dayNames: Date.CultureInfo.dayNames,
|
||||
dayNamesShort: Date.CultureInfo.abbreviatedDayNames,
|
||||
dayNamesMin: Date.CultureInfo.shortestDayNames,
|
||||
dayStatus: _t('Set DD as first week day'),
|
||||
dateStatus: _t('Select D, M d'),
|
||||
firstDay: Date.CultureInfo.firstDayOfWeek,
|
||||
initStatus: _t('Select a date'),
|
||||
isRTL: false
|
||||
});
|
||||
$.timepicker.setDefaults({
|
||||
timeOnlyTitle: _t('Choose Time'),
|
||||
timeText: _t('Time'),
|
||||
hourText: _t('Hour'),
|
||||
minuteText: _t('Minute'),
|
||||
secondText: _t('Second'),
|
||||
currentText: _t('Now'),
|
||||
closeText: _t('Done')
|
||||
});
|
||||
|
||||
this.picker({
|
||||
onClose: this.on_picker_select,
|
||||
onSelect: this.on_picker_select,
|
||||
|
@ -2539,9 +2577,8 @@ instance.web.form.FieldDatetime = instance.web.form.AbstractField.extend(instanc
|
|||
return this.get('value') === '' || this._super();
|
||||
},
|
||||
focus: function() {
|
||||
if (this.datewidget && this.datewidget.$input) {
|
||||
this.datewidget.$input[0].focus();
|
||||
}
|
||||
var input = this.datewidget && this.datewidget.$input[0];
|
||||
return input ? input.focus() : false;
|
||||
},
|
||||
set_dimensions: function (height, width) {
|
||||
this._super(height, width);
|
||||
|
@ -2622,9 +2659,8 @@ instance.web.form.FieldText = instance.web.form.AbstractField.extend(instance.we
|
|||
return this.get('value') === '' || this._super();
|
||||
},
|
||||
focus: function($el) {
|
||||
if (!this.get("effective_readonly") && this.$textarea) {
|
||||
this.$textarea[0].focus();
|
||||
}
|
||||
var input = !this.get("effective_readonly") && this.$textarea && this.$textarea[0];
|
||||
return input ? input.focus() : false;
|
||||
},
|
||||
set_dimensions: function (height, width) {
|
||||
this._super(height, width);
|
||||
|
@ -2707,7 +2743,8 @@ instance.web.form.FieldBoolean = instance.web.form.AbstractField.extend({
|
|||
this.$checkbox[0].checked = this.get('value');
|
||||
},
|
||||
focus: function() {
|
||||
this.$checkbox[0].focus();
|
||||
var input = this.$checkbox && this.$checkbox[0];
|
||||
return input ? input.focus() : false;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -2793,7 +2830,8 @@ instance.web.form.FieldSelection = instance.web.form.AbstractField.extend(instan
|
|||
}
|
||||
},
|
||||
focus: function() {
|
||||
this.$('select:first')[0].focus();
|
||||
var input = this.$('select:first')[0];
|
||||
return input ? input.focus() : false;
|
||||
},
|
||||
set_dimensions: function (height, width) {
|
||||
this._super(height, width);
|
||||
|
@ -3308,9 +3346,8 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
|
|||
return ! this.get("value");
|
||||
},
|
||||
focus: function () {
|
||||
if (!this.get('effective_readonly')) {
|
||||
this.$input && this.$input[0].focus();
|
||||
}
|
||||
var input = !this.get('effective_readonly') && this.$input && this.$input[0];
|
||||
return input ? input.focus() : false;
|
||||
},
|
||||
_quick_create: function() {
|
||||
this.no_ed = true;
|
||||
|
@ -4170,7 +4207,8 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
|
|||
this.set({'value': _.uniq(this.get('value').concat([id]))});
|
||||
},
|
||||
focus: function () {
|
||||
this.$text[0].focus();
|
||||
var input = this.$text && this.$text[0];
|
||||
return input ? input.focus() : false;
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -578,7 +578,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
|
|||
this.no_leaf = !!context['group_by_no_leaf'];
|
||||
this.grouped = !!group_by;
|
||||
|
||||
return this.load_view(context).then(
|
||||
return this.alive(this.load_view(context)).then(
|
||||
this.proxy('reload_content'));
|
||||
},
|
||||
/**
|
||||
|
|
|
@ -1011,7 +1011,7 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({
|
|||
switch_mode: function (view_type, no_store, options) {
|
||||
var self = this;
|
||||
|
||||
return $.when(this._super.apply(this, arguments)).done(function () {
|
||||
return this.alive($.when(this._super.apply(this, arguments))).done(function () {
|
||||
var controller = self.views[self.active_view].controller;
|
||||
self.$el.find('.oe_debug_view').html(QWeb.render('ViewManagerDebug', {
|
||||
view: controller,
|
||||
|
|
|
@ -1520,8 +1520,9 @@
|
|||
<t t-esc="attrs.string"/>
|
||||
</button>
|
||||
<ul t-name="SearchView.filters">
|
||||
<li t-foreach="widget.filters" t-as="filter" t-if="filter.visible()"
|
||||
t-att-title="filter.attrs.string ? filter.attrs.help : undefined">
|
||||
<li t-foreach="widget.filters" t-as="filter" t-if="!filter.visible || filter.visible()"
|
||||
t-att-title="filter.attrs.string ? filter.attrs.help : undefined"
|
||||
t-att-data-index="filter_index">
|
||||
<t t-esc="filter.attrs.string or filter.attrs.help or filter.attrs.name or 'Ω'"/>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -1361,7 +1361,7 @@ openerp.testing.section('search.invisible', {
|
|||
}, ['<search>',
|
||||
'<field name="field0"/>',
|
||||
'<field name="field1" modifiers="{"invisible": true}"/>',
|
||||
'</search>'].join());
|
||||
'</search>'].join(''));
|
||||
return view.appendTo($fix)
|
||||
.then(function () {
|
||||
var done = $.Deferred();
|
||||
|
@ -1380,7 +1380,7 @@ openerp.testing.section('search.invisible', {
|
|||
'<search>',
|
||||
'<filter string="filter 0"/>',
|
||||
'<filter string="filter 1" modifiers="{"invisible": true}"/>',
|
||||
'</search>'].join());
|
||||
'</search>'].join(''));
|
||||
return view.appendTo($fix)
|
||||
.then(function () {
|
||||
var $fs = $fix.find('.oe_searchview_filters ul');
|
||||
|
@ -1400,6 +1400,26 @@ openerp.testing.section('search.invisible', {
|
|||
return done;
|
||||
});
|
||||
});
|
||||
test('invisible-previous-sibling', {asserts: 3}, function (instance, $fix, mock) {
|
||||
var view = makeView(instance, mock, {}, [
|
||||
'<search>',
|
||||
'<filter string="filter 0" context="{"test": 0}"/>',
|
||||
'<filter string="filter 1" modifiers="{"invisible": true}" context="{"test": 1}"/>',
|
||||
'<filter string="filter 2" modifiers="{"invisible": true}" context="{"test": 2}"/>',
|
||||
'<filter string="filter 3" context="{"test": 3}"/>',
|
||||
'</search>'].join(''));
|
||||
return view.appendTo($fix)
|
||||
.done(function () {
|
||||
// Select filter 3
|
||||
$fix.find('.oe_searchview_filters ul li:contains("filter 3")').click();
|
||||
equal(view.query.length, 1, "should have selected a filter");
|
||||
var facet = view.query.at(0);
|
||||
strictEqual(facet.values.at(0).get('label'), "filter 3",
|
||||
"should have correctly labelled the facet");
|
||||
deepEqual(view.build_search_data().contexts, [{test: 3}],
|
||||
"should have built correct context");
|
||||
});
|
||||
});
|
||||
// Invisible filter groups should not appear in the drawer
|
||||
// Group invisibility should be inherited by children
|
||||
test('group-invisibility', {asserts: 6}, function (instance, $fix, mock) {
|
||||
|
|
|
@ -339,7 +339,7 @@ instance.web_calendar.CalendarView = instance.web.View.extend({
|
|||
},
|
||||
get_event_data: function(event_obj) {
|
||||
var data = {
|
||||
name: event_obj.text
|
||||
name: event_obj.text || scheduler.locale.labels.new_event
|
||||
};
|
||||
data[this.date_start] = instance.web.datetime_to_str(event_obj.start_date);
|
||||
if (this.date_stop) {
|
||||
|
|
|
@ -637,12 +637,12 @@ instance.web_view_editor.ViewEditor = instance.web.Widget.extend({
|
|||
var children = _.filter(xml_arch.childNodes[0].childNodes, function (child) {
|
||||
return child.nodeType == 1;
|
||||
});
|
||||
arch.arch = _.detect(children, function(xml_child) {
|
||||
var inherited_view = _.detect(children, function(xml_child) {
|
||||
var temp_obj = self.create_View_Node(xml_child),
|
||||
insert = _.intersection(_.flatten(temp_obj.att_list),_.uniq(check_list));
|
||||
if (insert.length == _.uniq(check_list).length ) {return xml_child;}
|
||||
});
|
||||
xml_arch = QWeb.load_xml(arch.arch);
|
||||
xml_arch = QWeb.load_xml(instance.web.xml_to_str(inherited_view));
|
||||
}
|
||||
return self.do_save_xml(xml_arch.documentElement, obj[0].child_id[0],obj[0].child_id, move_direct, update_values,arch);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue