Vishmita Jadeja (openerp) has proposed merging
lp:~openerp-dev/openerp-web/trunk-process-vja into
lp:~openerp-dev/openerp-web/trunk-process-vda.
Requested reviews:
OpenERP R&D Team (openerp-dev)
For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-process-vja/+merge/82997
Title should be changed when going to subflows.
--
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-process-vja/+merge/82997
Your team OpenERP R&D Team is requested to review the proposed merge of
lp:~openerp-dev/openerp-web/trunk-process-vja into
lp:~openerp-dev/openerp-web/trunk-process-vda.
=== modified file 'addons/web/static/lib/qweb/qweb2.js'
--- addons/web/static/lib/qweb/qweb2.js 2011-10-20 10:42:18 +0000
+++ addons/web/static/lib/qweb/qweb2.js 2011-11-22 10:46:50 +0000
@@ -4,7 +4,7 @@
// TODO: t-set + t-value + children node == scoped variable ?
var QWeb2 = {
expressions_cache: {},
- RESERVED_WORDS: 'true,false,NaN,null,undefined,debugger,in,instanceof,new,function,return,this,typeof,eval,Math,RegExp,Array,Object,Date'.split(','),
+ RESERVED_WORDS: 'true,false,NaN,null,undefined,debugger,console,in,instanceof,new,function,return,this,typeof,eval,Math,RegExp,Array,Object,Date'.split(','),
ACTIONS_PRECEDENCE: 'foreach,if,call,set,esc,escf,raw,rawf,js,debug,log'.split(','),
WORD_REPLACEMENT: {
'and': '&&',
=== modified file 'addons/web/static/src/css/base.css'
--- addons/web/static/src/css/base.css 2011-11-14 20:59:16 +0000
+++ addons/web/static/src/css/base.css 2011-11-22 10:46:50 +0000
@@ -967,20 +967,25 @@
.openerp .oe_forms textarea {
resize:vertical;
}
-.openerp .oe_forms input[type="text"], .openerp .oe_forms input[type="password"], .openerp .oe_forms select, .openerp .oe_forms .button {
+.openerp .oe_forms input[type="text"], .openerp .oe_forms input[type="password"], .openerp .oe_forms select, .openerp .oe_forms .oe_button {
height: 22px;
}
.openerp .oe_forms input.field_datetime {
min-width: 11em;
}
-.openerp .oe_forms.oe_frame .oe_datepicker_root {
- width: 100%;
-}
-.openerp .oe_forms .button {
+.openerp .oe_forms .oe_button {
color: #4c4c4c;
white-space: nowrap;
-}
-.openerp .oe_forms .button span {
+ min-width: 100%;
+ width: 100%;
+}
+@-moz-document url-prefix() {
+ /* Strange firefox behaviour on width: 100% + white-space: nowrap */
+ .openerp .oe_forms .oe_button {
+ width: auto;
+ }
+}
+.openerp .oe_forms .oe_button span {
position: relative;
vertical-align: top;
}
@@ -989,13 +994,20 @@
cursor: pointer;
right: 5px;
top: 3px;
+ z-index: 2;
+}
+.openerp .oe_datepicker_container {
+ position: absolute;
+ top: 0;
+ right: 0;
+ display: none;
}
.openerp .oe_datepicker_root {
position: relative;
display: inline-block;
}
-.openerp .oe_datepicker_root input[type="text"] {
- min-width: 160px;
+.openerp .oe_forms.oe_frame .oe_datepicker_root {
+ width: 100%;
}
.openerp .oe_input_icon_disabled {
position: absolute;
@@ -1003,7 +1015,7 @@
opacity: 0.5;
filter:alpha(opacity=50);
right: 5px;
- top: 5px;
+ top: 3px;
}
.openerp img.oe_field_translate {
margin-left: -21px;
=== modified file 'addons/web/static/src/js/search.js'
--- addons/web/static/src/js/search.js 2011-11-15 12:30:59 +0000
+++ addons/web/static/src/js/search.js 2011-11-22 10:46:50 +0000
@@ -41,7 +41,11 @@
if (this.headless) {
this.ready.resolve();
} else {
- this.rpc("/web/searchview/load", {"model": this.model, "view_id":this.view_id}, this.on_loaded);
+ this.rpc("/web/searchview/load", {
+ model: this.model,
+ view_id: this.view_id,
+ context: this.dataset.get_context()
+ }, this.on_loaded);
}
return this.ready.promise();
},
=== modified file 'addons/web/static/src/js/view_form.js'
--- addons/web/static/src/js/view_form.js 2011-11-16 07:52:46 +0000
+++ addons/web/static/src/js/view_form.js 2011-11-22 10:46:50 +0000
@@ -1350,54 +1350,58 @@
template: "web.datetimepicker",
jqueryui_object: 'datetimepicker',
type_of_date: "datetime",
+ init: function(parent) {
+ this._super(parent);
+ this.name = parent.name;
+ },
start: function() {
var self = this;
- this.$element.find('input').change(this.on_change);
+ this.$input = this.$element.find('input.oe_datepicker_master');
+ this.$input_picker = this.$element.find('input.oe_datepicker_container');
+ this.$input.change(this.on_change);
this.picker({
onSelect: this.on_picker_select,
changeMonth: true,
changeYear: true,
showWeek: true,
- showButtonPanel: false
+ showButtonPanel: true
});
this.$element.find('img.oe_datepicker_trigger').click(function() {
if (!self.readonly) {
self.picker('setDate', self.value ? openerp.web.auto_str_to_date(self.value) : new Date());
- self.$element.find('.oe_datepicker').toggle();
+ self.$input_picker.show();
+ self.picker('show');
+ self.$input_picker.hide();
}
});
- this.$element.find('.ui-datepicker-inline').removeClass('ui-widget-content ui-corner-all');
- this.$element.find('button.oe_datepicker_close').click(function() {
- self.$element.find('.oe_datepicker').hide();
- });
this.set_readonly(false);
this.value = false;
},
picker: function() {
- return $.fn[this.jqueryui_object].apply(this.$element.find('.oe_datepicker_container'), arguments);
+ return $.fn[this.jqueryui_object].apply(this.$input_picker, arguments);
},
on_picker_select: function(text, instance) {
var date = this.picker('getDate');
- this.$element.find('input').val(date ? this.format_client(date) : '').change();
+ this.$input.val(date ? this.format_client(date) : '').change();
},
set_value: function(value) {
this.value = value;
- this.$element.find('input').val(value ? this.format_client(value) : '');
+ this.$input.val(value ? this.format_client(value) : '');
},
get_value: function() {
return this.value;
},
set_value_from_ui: function() {
- var value = this.$element.find('input').val() || false;
+ var value = this.$input.val() || false;
this.value = this.parse_client(value);
},
set_readonly: function(readonly) {
this.readonly = readonly;
- this.$element.find('input').attr('disabled', this.readonly);
+ this.$input.attr('disabled', this.readonly);
this.$element.find('img.oe_datepicker_trigger').toggleClass('oe_input_icon_disabled', readonly);
},
is_valid: function(required) {
- var value = this.$element.find('input').val();
+ var value = this.$input.val();
if (value === "") {
return !required;
} else {
@@ -1410,7 +1414,7 @@
}
},
focus: function() {
- this.$element.find('input').focus();
+ this.$input.focus();
},
parse_client: function(v) {
return openerp.web.parse_value(v, {"widget": this.type_of_date});
@@ -1427,11 +1431,7 @@
openerp.web.DateWidget = openerp.web.DateTimeWidget.extend({
jqueryui_object: 'datepicker',
- type_of_date: "date",
- on_picker_select: function(text, instance) {
- this._super(text, instance);
- this.$element.find('.oe_datepicker').hide();
- }
+ type_of_date: "date"
});
openerp.web.form.FieldDatetime = openerp.web.form.Field.extend({
=== modified file 'addons/web/static/src/xml/base.xml'
--- addons/web/static/src/xml/base.xml 2011-11-15 16:55:30 +0000
+++ addons/web/static/src/xml/base.xml 2011-11-22 10:46:50 +0000
@@ -714,7 +714,7 @@
</t>
<t t-name="Widget">
Unhandled widget
- <t t-raw="console.log('Unhandled widget', widget)"/>
+ <t t-js="dict">console.warn('Unhandled widget', dict.widget);</t>
</t>
<t t-name="WidgetFrame">
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="oe_frame oe_forms">
@@ -907,13 +907,13 @@
</t>
<t t-name="web.datetimepicker">
<div class="oe_datepicker_root">
- <input type="text" size="1" style="width: 100%"/>
+ <input type="text" size="1" style="width: 100%"
+ t-att-name="widget.name"
+ t-attf-class="oe_datepicker_master field_#{widget.type_of_date}"
+ />
<img class="oe_input_icon oe_datepicker_trigger" src="/web/static/src/img/ui/field_calendar.png"
title="Select date" width="16" height="16" border="0"/>
- <div class="oe_datepicker ui-widget-content ui-corner-all" style="display: none; position: absolute; z-index: 1;">
- <div class="oe_datepicker_container"/>
- <button type="button" class="oe_datepicker_close ui-state-default ui-priority-primary ui-corner-all" style="float: right;">Done</button>
- </div>
+ <input type="text" size="1" class="oe_datepicker_container" disabled="disabled"/>
</div>
</t>
<t t-name="FieldSelection">
@@ -1081,7 +1081,7 @@
</table>
</t>
<t t-name="WidgetButton">
- <button type="button" style="width: 100%" class="button">
+ <button type="button" class="oe_button">
<img t-if="widget.node.attrs.icon" t-att-src="'/web/static/src/img/icons/' + widget.node.attrs.icon + '.png'" width="16" height="16"/>
<span t-if="widget.string"><t t-esc="widget.string"/></span>
</button>
@@ -1163,8 +1163,8 @@
t-att-title="attrs.help"
t-att-class="classes.join(' ')"
t-att-autofocus="attrs.default_focus === '1' ? 'autofocus' : undefined">
- <img t-if="attrs.icon" t-att-src="'/web/static/src/img/icons/' + attrs.icon + '.png'" width="16" height="16"/>
- <br t-if="attrs.icon and attrs.string"/>
+ <img t-att-src="'/web/static/src/img/icons/' + (attrs.icon || 'gtk-home') + '.png'" width="16" height="16"/>
+ <br t-if="attrs.string"/>
<t t-esc="attrs.string"/>
</button>
<span t-name="SearchView.filters" class="filter_label_group"
=== modified file 'addons/web_process/static/src/js/process.js'
--- addons/web_process/static/src/js/process.js 2011-11-17 07:14:52 +0000
+++ addons/web_process/static/src/js/process.js 2011-11-22 10:46:50 +0000
@@ -45,6 +45,7 @@
if(self.process_id) {
self.graph_get().done(function(res) {
self.process_notes = res.notes;
+ self.process_title = res.name;
self.process_subflows = _.filter(res.nodes, function(x) {
return x.subflow != false;
});
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp