base_diagram

bzr revid: al@openerp.com-20110404155209-muckezl9xvm8ocxl
This commit is contained in:
Antony Lesuisse 2011-04-04 17:52:09 +02:00
parent 345496d9a3
commit 04969e8bf1
3 changed files with 34 additions and 10 deletions

View File

@ -2,8 +2,7 @@
openerp.base.form = function (openerp) {
openerp.base.views.add('form', 'openerp.base.FormView');
openerp.base.FormView = openerp.base.Controller.extend(
/** @lends openerp.base.FormView# */{
openerp.base.FormView = openerp.base.Controller.extend( /** @lends openerp.base.FormView# */{
/**
* Indicates that this view is not searchable, and thus that no search
* view should be displayed (if there is one active).
@ -142,8 +141,6 @@ openerp.base.FormView = openerp.base.Controller.extend(
openerp.base.form = {};
openerp.base.form.Widget = openerp.base.Controller.extend({
// TODO Change this to init: function(view, node) { and use view.session and a new element_id for the super
// it means that widgets are special controllers
init: function(view, node) {
this.view = view;
this.node = node;
@ -551,6 +548,24 @@ openerp.base.form.FieldOne2Many = openerp.base.form.Field.extend({
init: function(view, node) {
this._super(view, node);
this.template = "FieldOne2Many";
this.viewmanager = null;
this.operations = [];
thise.iewq.on
},
set_value: function(value) {
this.value = value;
},
get_value: function(value) {
return this.operations;
},
update_dom: function() {
this._super.apply(this, arguments);
this.$element.toggleClass('disabled', this.readonly);
this.$element.toggleClass('required', this.required);
},
on_ui_change: function() {
this.view.on_form_changed(this);
}
});

View File

@ -161,11 +161,11 @@ openerp.base.ViewManager = openerp.base.Controller.extend({
}
});
openerp.base.ViewManagerRoot = openerp.base.Controller.extend({
openerp.base.ViewManagerRoot = openerp.base.ViewManager.extend({
// Extends view manager
});
openerp.base.ViewManagerUsedAsAMany2One = openerp.base.Controller.extend({
openerp.base.ViewManagerUsedAsAMany2One = openerp.base.ViewManager.extend({
// Extends view manager
});
@ -276,19 +276,16 @@ openerp.base.GanttView = openerp.base.Controller.extend({
});
openerp.base.views.add('tree', 'openerp.base.TreeView');
openerp.base.TreeView = openerp.base.Controller.extend({
/**
* Genuine tree view (the one displayed as a tree, not the list)
*/
openerp.base.TreeView = openerp.base.Controller.extend({
start: function () {
this._super();
this.$element.append('Tree view');
}
});
openerp.base.DiagramView = openerp.base.Controller.extend({
});
openerp.base.views.add('graph', 'openerp.base.GraphView');
openerp.base.GraphView = openerp.base.Controller.extend({
start: function () {

View File

@ -0,0 +1,12 @@
/*---------------------------------------------------------
* OpenERP base library
*---------------------------------------------------------*/
openerp.base_diagram = function(openerp) {
openerp.base_diagram.DiagramView = openerp.base.Controller.extend({
});
};
// vim:et fdc=0 fdl=0 foldnestmax=3 fdm=syntax: