Jiten (OpenERP) has proposed merging
lp:~openerp-dev/openerp-web/web-view-editor-jra into lp:openerp-web.
Requested reviews:
OpenERP R&D Web Team (openerp-dev-web)
For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/web-view-editor-jra/+merge/91240
In view editor issue of "new fields saving" will solve with
bug:https://bugs.launchpad.net/openobject-server/+bug/912769.
Implement css class and in groups full name displayed.
--
https://code.launchpad.net/~openerp-dev/openerp-web/web-view-editor-jra/+merge/91240
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openerp-web/web-view-editor-jra.
=== modified file 'addons/web/static/src/css/base.css'
--- addons/web/static/src/css/base.css 2012-01-31 12:54:31 +0000
+++ addons/web/static/src/css/base.css 2012-02-02 11:30:53 +0000
@@ -1879,6 +1879,7 @@
width: 100%;
background-color : #FFFFFF;
border-spacing: 0;
+
}
.openerp .oe-treeview-table tr:hover{
color: blue;
@@ -2022,33 +2023,30 @@
border-bottom-right-radius: 3px;
}
.openerp .oe_view_editor {
- border-collapse: collapse;
- padding: 0;
- align: left;
+ width:100%;
+ border-collapse : collapse;
+ margin-left: -12px;
+
width: 100%;
+ background-color : white;
+ border-spacing: 0;
}
-.openerp .oe_view_editor_colum{
+.openerp .oe_view_editor td{
+ text-align: center;
+ white-space: nowrap;
+ border: 1px solid #D8D8D8;
+
+ cursor: pointer;
font-size: 90%;
- font-weight: normal;
- padding: 0;
- border-bottom: 1px solid #CFCCCC;
-}
-.openerp .oe_view_editor_row:hover {
- background-color: #F3F3F3;
-}
-
-.openerp .oe_view_editor_tree_grid{
- text-align: left;
- white-space: nowrap;
- border-collapse: collapse;
- width: 100%;
-}
-.openerp .oe_view_editor_tree_grid a:hover {
- color: blue;
-}
-.openerp .oe_view_editor_tree_grid a {
- display: block;
-}
+}
+.openerp .oe_view_editor_field td{
+ border: 0px !important;
+}
+
+.openerp .oe_view_editor tr:hover {
+ background-color: #ecebf2;
+}
+
/* Dialog traceback cases */
.openerp .oe_error_detail{
=== modified file 'addons/web/static/src/js/view_editor.js'
--- addons/web/static/src/js/view_editor.js 2012-01-25 08:53:10 +0000
+++ addons/web/static/src/js/view_editor.js 2012-02-02 11:30:53 +0000
@@ -27,6 +27,7 @@
type: 'ir.actions.act_window',
target: "current",
limit: this.dataset.limit || 80,
+ auto_search : true,
flags: {
sidebar: false,
deletable: false,
@@ -368,6 +369,7 @@
views: [[self.main_view_id, self.main_view_type]],
type: 'ir.actions.act_window',
target: "new",
+ auto_search: true,
flags: {
sidebar: false,
views_switcher: false,
@@ -449,7 +451,7 @@
},
do_node_add: function(side){
var self = this;
- var tr = $(side).find('a').text();
+ var tr = self.get_object_by_id(this.one_object.clicked_tr_id, this.one_object['main_object'], [])[0].att_list[0];
var parent_tr = ($(side).prevAll("tr[level=" + String(this.one_object.clicked_tr_level - 1) + "]"))[0];
var field_dataset = new openerp.web.DataSetSearch(this, this.model, null, null);
parent_tr = $(parent_tr).find('a').text();
@@ -568,7 +570,7 @@
arch_to_pass = _.filter($(arch.arch), function (child) {
return child.nodeType == 1;
});
- return self.do_save_xml(arch_to_pass[0], obj[0].child_id[0],[], move_direct, update_values,arch);
+ return self.do_save_xml(arch_to_pass[0], obj[0].child_id[0],obj[0].child_id, move_direct, update_values,arch);
},
get_object_by_id: function(id, one_object, result) {
var self = this;
@@ -823,6 +825,7 @@
var value = _.detect(arch_val[0]['att_list'],function(res) {
return res instanceof Array? _.include(res, widget.name): false;
});
+
value = value instanceof Array ? value[1] : value;
self.edit_node_dialog.$element.find('table[id=rec_table]').append('<tr><td align="right">' + widget.string + ':</td>' + type_widget.render() + '</tr>');
type_widget.start();
@@ -845,7 +848,11 @@
res_groups.read_slice([], {}).done(function (res_grp) {
_.each(res_grp, function (res) {
var key = res.id;
+<<<<<<< TREE
+ group_names[key]=res.full_name;
+=======
group_names[key] = res.name;
+>>>>>>> MERGE-SOURCE
group_ids.push(res.id);
});
model_data.read_slice([], {domain: [
@@ -933,16 +940,16 @@
var action_manager = new openerp.web.ActionManager(self);
$.when(action_manager.do_action(action)).then(function() {
var controller = action_manager.dialog_viewmanager.views['form'].controller;
- // TODO NIV: use page view
- controller.do_set_readonly.add_last(function(){
+ controller.on_button_cancel.add_last(function(){
+ action_manager.stop()
+ });
+ controller.do_save.add_last(function(){
action_manager.stop();
- new_fields_name = new openerp.web.DataSetSearch(self,'ir.model.fields', null, null);
- new_fields_name.read_ids([controller.datarecord.id], ['name']).then(function(result) {
- self.add_node_dialog.$element.find('select[id=field_value]').append($("<option selected></option>").attr("value", result[0].name).text(result[0].name));
+ var value =controller.fields.name.value;
+ self.add_node_dialog.$element.find('select[id=field_value]').append($("<option selected></option>").attr("value",value).text(value));
_.detect(self.add_widget,function(widget){
- widget.name == "field_value"? widget.selection.push(result[0].name): false;
+ widget.name == "field_value"? widget.selection.push(value): false;
});
- });
});
});
}
@@ -1039,7 +1046,7 @@
var index = 0;
value = value === null? false: value;
for (var i = 0, ii = this.selection.length; i < ii; i++) {
- if ((this.selection[i] instanceof Array && this.selection[i][1] === value) || this.selection[i] === value) index = i;
+ if ((this.selection[i] instanceof Array && this.selection[i][0] === value) || this.selection[i] === value) index = i;
}
this.$element.find("select[id=" + this.name + "]")[0].selectedIndex = index;
},
@@ -1092,7 +1099,7 @@
'calendar': ['field'],
'notebook': ['page'],
'page': ['notebook', 'group', 'field', 'label', 'button', 'newline', 'separator'],
- 'group': ['field', 'label', 'button', 'separator', 'newline'],
+ 'group': ['field', 'label', 'button', 'separator', 'newline','group'],
'board': ['column'],
'action': [],
'field': ['form', 'tree', 'graph'],
=== modified file 'addons/web/static/src/xml/base.xml'
--- addons/web/static/src/xml/base.xml 2012-02-01 12:29:26 +0000
+++ addons/web/static/src/xml/base.xml 2012-02-02 11:30:53 +0000
@@ -1481,9 +1481,9 @@
</table>
</t>
<t t-name="view_editor.row">
- <tr class="oe_view_editor_row" t-att-id="'viewedit-' + rec.id" t-att-level="rec.level" t-foreach="data" t-as="rec">
- <td class="oe_view_editor_colum" width="85%">
- <table class="oe_view_editor_tree_grid">
+ <tr t-att-id="'viewedit-' + rec.id" t-att-level="rec.level" t-foreach="data" t-as="rec">
+ <td width="90%">
+ <table class="oe_view_editor_field">
<tr>
<td width="16px" t-att-style="'background-position: ' + 20*rec.level + 'px; padding-left: ' + 20*rec.level + 'px'">
<img t-if="rec.child_id.length" t-att-id="'parentimg-' + rec.id"
@@ -1497,30 +1497,24 @@
</tr>
</table>
</td>
- <td align="left" class="oe_view_editor_colum" width="15%">
- <table width="100%">
- <tr>
- <td width="20%">
- <img t-if="rec.att_list.length"
- id="side-add" src="/web/static/src/img/icons/gtk-add.png" style="cursor: pointer;"/>
- </td>
- <td width="20%">
- <img id="side-remove" src="/web/static/src/img/icons/gtk-remove.png" style="cursor: pointer;"/>
- </td>
- <td width="20%">
- <img t-if="rec.att_list.length and !_.include(no_properties, rec.att_list[0])"
- id="side-edit" src="/web/static/src/img/icons/gtk-edit.png" style="cursor: pointer;"/>
- </td>
- <td width="20%">
- <img t-if="rec.att_list.length"
- id="side-up" src="/web/static/src/img/icons/gtk-go-up.png" style="cursor: pointer;"/>
- </td>
- <td width="20%">
- <img t-if="rec.att_list.length"
- id="side-down" src="/web/static/src/img/icons/gtk-go-down.png" style="cursor: pointer;"/>
- </td>
- </tr>
- </table>
+ <td width="2%">
+ <img t-if="rec.att_list.length"
+ id="side-add" src="/web/static/src/img/icons/gtk-add.png" style="cursor: pointer;"/>
+ </td>
+ <td width="2%">
+ <img id="side-remove" src="/web/static/src/img/icons/gtk-remove.png" style="cursor: pointer;"/>
+ </td>
+ <td width="2%">
+ <img t-if="rec.att_list.length and !_.include(no_properties, rec.att_list[0])"
+ id="side-edit" src="/web/static/src/img/icons/gtk-edit.png" style="cursor: pointer;"/>
+ </td>
+ <td width="2%">
+ <img t-if="rec.att_list.length"
+ id="side-up" src="/web/static/src/img/icons/gtk-go-up.png" style="cursor: pointer;"/>
+ </td>
+ <td width="2%">
+ <img t-if="rec.att_list.length"
+ id="side-down" src="/web/static/src/img/icons/gtk-go-down.png" style="cursor: pointer;"/>
</td>
<t t-if="rec.child_id.length">
<t t-set="data" t-value="rec.child_id"/>
_______________________________________________
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