Vidhin Mehta (OpenERP) has proposed merging
lp:~openerp-dev/openerp-web/trunk-view_editor-vme into lp:openerp-web.
Requested reviews:
OpenERP R&D Web Team (openerp-dev-web)
Related bugs:
Bug #968002 in OpenERP Web: "view editor will remove any inner form elements"
https://bugs.launchpad.net/openerp-web/+bug/968002
For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-view_editor-vme/+merge/106943
Add attribute of invisble,render list view to dialog box,apply css,used qweb
for rendering for issue of 968002 and according to that change code of add node
functionality.
--
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-view_editor-vme/+merge/106943
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openerp-web/trunk-view_editor-vme.
=== modified file 'addons/web/static/src/css/base.css'
--- addons/web/static/src/css/base.css 2012-05-22 13:22:46 +0000
+++ addons/web/static/src/css/base.css 2012-05-23 06:59:25 +0000
@@ -2149,6 +2149,28 @@
color: #333333;
}
+.openerp .oe_view_editor {
+ width: 100%;
+ border-collapse: collapse;
+ margin-left: -12px;
+ width: 100%;
+ background-color: white;
+ border-spacing: 0;
+}
+.openerp .oe_view_editor td {
+ text-align: center;
+ white-space: nowrap;
+ border: 1px solid #d8d8d8;
+ cursor: pointer;
+ font-size: 90%;
+}
+.openerp .oe_view_editor_field td {
+ border: 0px !important;
+}
+.openerp .oe_view_editor tr:hover {
+ background-color: #ecebf2;
+}
+
.openerp .oe_form_field_many2one td:first-child {
position: relative;
}
=== modified file 'addons/web/static/src/css/base.sass'
--- addons/web/static/src/css/base.sass 2012-05-22 13:22:46 +0000
+++ addons/web/static/src/css/base.sass 2012-05-23 06:59:25 +0000
@@ -1776,6 +1776,25 @@
float: right
color: #333
// }}}
+//view editor
+.openerp
+ .oe_view_editor
+ width: 100%
+ border-collapse: collapse
+ margin-left: -12px
+ width: 100%
+ background-color: white
+ border-spacing: 0
+ td
+ text-align: center
+ white-space: nowrap
+ border: 1px solid #D8D8D8
+ cursor: pointer
+ font-size: 90%
+ .oe_view_editor_field td
+ border: 0px !important
+ .oe_view_editor tr:hover
+ background-color: #ecebf2
// Transitional overrides for old styles {{{
.openerp
=== modified file 'addons/web/static/src/js/view_editor.js'
--- addons/web/static/src/js/view_editor.js 2012-05-10 10:35:13 +0000
+++ addons/web/static/src/js/view_editor.js 2012-05-23 06:59:25 +0000
@@ -52,10 +52,11 @@
this.view_edit_dialog.on_close.add_last(function(){window.location.reload();});
this.main_view_id = this.parent.fields_view.view_id;
this.action_manager = new instance.web.ActionManager(this);
- this.action_manager.appendTo(this.view_edit_dialog);
$.when(this.action_manager.do_action(action)).then(function() {
var viewmanager = self.action_manager.inner_viewmanager,
controller = viewmanager.views[viewmanager.active_view].controller;
+ self.action_manager.appendTo(self.view_edit_dialog.$element);
+ self.action_manager.renderElement(self.view_edit_dialog);
controller.on_loaded.add_last(function(){
$(controller.groups).bind({
'selected': function(e, ids, records) {
@@ -630,11 +631,9 @@
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);
}
- 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],obj[0].child_id, move_direct, update_values,arch);
+ return self.do_save_xml(xml_arch.documentElement, 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;
@@ -708,12 +707,12 @@
case "After":
self.edit_xml_dialog.$element.
find("tr[id='viewedit-"+after_append+"']").after(clone);
- $(arch1).after(update_values[0]);
+ $(arch1).after($(update_values[0]));
child_list.splice(index + 1, 0, object_xml);
break;
case "Before":
tr_click.before(clone);
- $(arch1).before(update_values[0]);
+ $(arch1).before($(update_values[0]));
child_list.splice(index - 1, 0, object_xml);
break;
case "Inside":
@@ -724,7 +723,7 @@
self.do_parent_img_hide_show(this);
}));
}
- $(arch1).append(update_values[0]);
+ $(arch1).append($(update_values[0]));
self.edit_xml_dialog.$element.
find("tr[id='viewedit-"+after_append+"']").after(clone);
obj.child_id.push(object_xml);
@@ -841,6 +840,7 @@
'string' : {'name':'string', 'string': 'String', 'type': 'char'},
'required' : {'name':'required', 'string': 'Required', 'type': 'boolean'},
'readonly' : {'name':'readonly', 'string': 'Readonly', 'type': 'boolean'},
+ 'invisible' : {'name':'invisible', 'string': 'Invisible', 'type': 'boolean'},
'domain' : {'name':'domain', 'string': 'Domain', 'type': 'char'},
'context' : {'name':'context', 'string': 'Context', 'type': 'char'},
'limit' : {'name':'limit', 'string': 'Limit', 'type': 'float'},
@@ -1136,12 +1136,12 @@
});
var _PROPERTIES = {
- 'field' : ['name', 'string', 'required', 'readonly', 'domain', 'context', 'nolabel', 'completion',
+ 'field' : ['name', 'string', 'required', 'readonly','invisible', 'domain', 'context', 'nolabel', 'completion',
'colspan', 'widget', 'eval', 'ref', 'on_change', 'attrs', 'groups'],
'form' : ['string', 'col', 'link'],
'notebook' : ['colspan', 'position', 'groups'],
'page' : ['string', 'states', 'attrs', 'groups'],
- 'group' : ['string', 'col', 'colspan', 'states', 'attrs', 'groups'],
+ 'group' : ['string', 'col', 'colspan','invisible', 'states', 'attrs', 'groups'],
'image' : ['filename', 'width', 'height', 'groups'],
'separator' : ['string', 'colspan', 'groups'],
'label': ['string', 'align', 'colspan', 'groups'],
_______________________________________________
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