[REM] Removed reference to view_manager.flags from views. The action flags are merged in View's options constructor argument so we shall not fetch them from view_manager anymore.
bzr revid: fme@openerp.com-20110727080319-nztgq4txu2tt6odq
This commit is contained in:
parent
d0234fa5dd
commit
30bca60907
|
@ -32,7 +32,6 @@ openerp.base.FormView = openerp.base.View.extend( /** @lends openerp.base.FormVi
|
|||
this.ready = false;
|
||||
this.show_invalid = true;
|
||||
this.touched = false;
|
||||
this.flags = this.view_manager.flags || {};
|
||||
this.default_focus_field = null;
|
||||
this.default_focus_button = null;
|
||||
this.registry = openerp.base.form.widgets;
|
||||
|
|
|
@ -111,7 +111,6 @@ openerp.base.ListView = openerp.base.View.extend( /** @lends openerp.base.ListVi
|
|||
this.columns = [];
|
||||
|
||||
this.options = _.extend({}, this.defaults, options || {});
|
||||
this.flags = this.view_manager.flags || {};
|
||||
|
||||
this.set_groups(new openerp.base.ListView.Groups(this));
|
||||
|
||||
|
|
|
@ -18,15 +18,6 @@ $(document).ready(function () {
|
|||
}
|
||||
}};
|
||||
|
||||
var fuck_that_shit = {
|
||||
action: {
|
||||
flags: {}
|
||||
},
|
||||
sidebar: {
|
||||
set_toolbar: function () {}
|
||||
}
|
||||
};
|
||||
|
||||
var openerp;
|
||||
module("ListView", {
|
||||
setup: function () {
|
||||
|
@ -42,8 +33,7 @@ $(document).ready(function () {
|
|||
|
||||
test('render selection checkboxes', 2, function () {
|
||||
var listview = new openerp.base.ListView(
|
||||
fuck_that_shit, null,
|
||||
'qunit-fixture', {model: null, ids: [null, null, null], index: 0});
|
||||
null, 'qunit-fixture', {model: null, ids: [null, null, null], index: 0});
|
||||
|
||||
listview.on_loaded(fvg);
|
||||
|
||||
|
@ -60,8 +50,7 @@ $(document).ready(function () {
|
|||
});
|
||||
test('render no checkbox if selectable=false', 1, function () {
|
||||
var listview = new openerp.base.ListView(
|
||||
fuck_that_shit, null,
|
||||
'qunit-fixture', {model: null, ids: [null, null, null], index: 0}, false,
|
||||
null, 'qunit-fixture', {model: null, ids: [null, null, null], index: 0}, false,
|
||||
{selectable: false});
|
||||
|
||||
listview.on_loaded(fvg);
|
||||
|
@ -75,8 +64,7 @@ $(document).ready(function () {
|
|||
});
|
||||
test('select a bunch of records', 2, function () {
|
||||
var listview = new openerp.base.ListView(
|
||||
fuck_that_shit, null, 'qunit-fixture',
|
||||
{model: null, ids: [1, 2, 3], index: 0});
|
||||
null, 'qunit-fixture', {model: null, ids: [1, 2, 3], index: 0});
|
||||
listview.on_loaded(fvg);
|
||||
|
||||
listview.do_fill_table({records: [
|
||||
|
@ -94,8 +82,7 @@ $(document).ready(function () {
|
|||
});
|
||||
test('render deletion button if list is deletable', 1, function () {
|
||||
var listview = new openerp.base.ListView(
|
||||
fuck_that_shit, null, 'qunit-fixture',
|
||||
{model: null, ids: [null, null, null], index: 0});
|
||||
null, 'qunit-fixture', {model: null, ids: [null, null, null], index: 0});
|
||||
|
||||
listview.on_loaded(fvg);
|
||||
|
||||
|
@ -112,7 +99,7 @@ $(document).ready(function () {
|
|||
2, function () {
|
||||
var deleted;
|
||||
var listview = new openerp.base.ListView(
|
||||
fuck_that_shit, null, 'qunit-fixture',
|
||||
null, 'qunit-fixture',
|
||||
{model: null, unlink: function (ids) {
|
||||
deleted = ids;
|
||||
}, ids: [1, 2, 3], index: 0});
|
||||
|
@ -132,7 +119,7 @@ $(document).ready(function () {
|
|||
test('multiple records deletion', 1, function () {
|
||||
var deleted;
|
||||
var listview = new openerp.base.ListView(
|
||||
fuck_that_shit, null, 'qunit-fixture',
|
||||
null, 'qunit-fixture',
|
||||
{model: null, unlink: function (ids) {
|
||||
deleted = ids;
|
||||
}, ids: [1, 2, 3], index: 0});
|
||||
|
|
Loading…
Reference in New Issue