Clark Gable is dead. Frankly, my dear, I don't give a damn.

bzr revid: al@openerp.com-20120430000158-fp451ymdjxgzwi8v
This commit is contained in:
Antony Lesuisse 2012-04-30 02:01:58 +02:00
parent 172f16cf52
commit bb8380314c
4 changed files with 2 additions and 23 deletions

View File

@ -2705,7 +2705,6 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({
if (self.get("effective_readonly")) { if (self.get("effective_readonly")) {
view.options.addable = null; view.options.addable = null;
view.options.deletable = null; view.options.deletable = null;
view.options.isClarkGable = false;
} }
} else if (view.view_type === "form") { } else if (view.view_type === "form") {
if (self.get("effective_readonly")) { if (self.get("effective_readonly")) {
@ -3081,7 +3080,6 @@ instance.web.form.FieldMany2Many = instance.web.form.AbstractField.extend({
'addable': self.get("effective_readonly") ? null : _t("Add"), 'addable': self.get("effective_readonly") ? null : _t("Add"),
'deletable': self.get("effective_readonly") ? false : true, 'deletable': self.get("effective_readonly") ? false : true,
'selectable': self.multi_selection, 'selectable': self.multi_selection,
'isClarkGable': self.get("effective_readonly") ? false : true
}); });
var embedded = (this.field.views || {}).tree; var embedded = (this.field.views || {}).tree;
if (embedded) { if (embedded) {

View File

@ -20,8 +20,6 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
'sortable': true, 'sortable': true,
// whether the view rows can be reordered (via vertical drag & drop) // whether the view rows can be reordered (via vertical drag & drop)
'reorderable': true, 'reorderable': true,
// display an edit icon linking to form view
'isClarkGable': true
}, },
/** /**
* Core class for list-type displays. * Core class for list-type displays.
@ -932,11 +930,7 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
if (!self.dataset.select_id(row_id)) { if (!self.dataset.select_id(row_id)) {
throw "Could not find id in dataset" throw "Could not find id in dataset"
} }
var view; self.row_clicked(e);
if ($(e.target).is('.oe-record-edit-link-img')) {
view = 'form';
}
self.row_clicked(e, view);
} }
}); });
}, },
@ -1011,9 +1005,6 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
if (this.options.selectable) { if (this.options.selectable) {
cells.push('<th class="oe-record-selector"></td>'); cells.push('<th class="oe-record-selector"></td>');
} }
if (this.options.isClarkGable) {
cells.push('<th class="oe-record-edit-link"></td>');
}
_(this.columns).each(function(column) { _(this.columns).each(function(column) {
if (column.invisible === '1') { if (column.invisible === '1') {
return; return;
@ -1322,9 +1313,6 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we
if (self.options.selectable) { if (self.options.selectable) {
$row.append('<td>'); $row.append('<td>');
} }
if (self.options.isClarkGable) {
$row.append('<td>');
}
_(self.columns).chain() _(self.columns).chain()
.filter(function (column) {return !column.invisible;}) .filter(function (column) {return !column.invisible;})
.each(function (column) { .each(function (column) {

View File

@ -398,8 +398,6 @@ openerp.web.list_editable = function (instance) {
if (this.view.editable_list.options.selectable) if (this.view.editable_list.options.selectable)
$("<td>").appendTo($element); $("<td>").appendTo($element);
if (this.view.editable_list.options.isClarkGable)
$("<td>").appendTo($element);
$xml.children().each(function(i, el) { $xml.children().each(function(i, el) {
var modifiers = JSON.parse($(el).attr("modifiers") || "{}"); var modifiers = JSON.parse($(el).attr("modifiers") || "{}");

View File

@ -619,7 +619,7 @@
</tr> </tr>
<table t-name="ListView" class="oe-listview-content"> <table t-name="ListView" class="oe-listview-content">
<t t-set="columns_count" t-value="visible_columns.length + (options.selectable ? 1 : 0) + (options.deletable ? 1 : 0) + (options.isClarkGable ? 1 : 0)"/> <t t-set="columns_count" t-value="visible_columns.length + (options.selectable ? 1 : 0) + (options.deletable ? 1 : 0)"/>
<thead> <thead>
<tr t-if="(!!options.action_buttons and !options.$buttons) or (!!options.pager and !options.$pager)"> <tr t-if="(!!options.action_buttons and !options.$buttons) or (!!options.pager and !options.$pager)">
<th t-att-colspan="columns_count"> <th t-att-colspan="columns_count">
@ -637,7 +637,6 @@
<th t-if="options.selectable" width="1" > <th t-if="options.selectable" width="1" >
<input type="checkbox" class="all-record-selector"/> <input type="checkbox" class="all-record-selector"/>
</th> </th>
<th t-if="options.isClarkGable" width="1"></th>
<t t-foreach="columns" t-as="column"> <t t-foreach="columns" t-as="column">
<th t-if="!column.meta and column.invisible !== '1'" t-att-data-id="column.id" <th t-if="!column.meta and column.invisible !== '1'" t-att-data-id="column.id"
t-att-class="((options.sortable and column.tag !== 'button') ? 'oe-sortable' : null)"> t-att-class="((options.sortable and column.tag !== 'button') ? 'oe-sortable' : null)">
@ -650,7 +649,6 @@
<tfoot> <tfoot>
<tr> <tr>
<td t-if="options.selectable"/> <td t-if="options.selectable"/>
<td t-if="options.isClarkGable"/>
<td t-foreach="aggregate_columns" t-as="column" class="oe-list-footer oe-number" <td t-foreach="aggregate_columns" t-as="column" class="oe-list-footer oe-number"
t-att-data-field="column.id" t-att-title="column.label"> t-att-data-field="column.id" t-att-title="column.label">
</td> </td>
@ -695,9 +693,6 @@
<input t-if="options.radio" type="radio" name="radiogroup" t-att-checked="checked"/> <input t-if="options.radio" type="radio" name="radiogroup" t-att-checked="checked"/>
<input t-if="!options.radio" type="checkbox" name="radiogroup" t-att-checked="checked"/> <input t-if="!options.radio" type="checkbox" name="radiogroup" t-att-checked="checked"/>
</th> </th>
<th t-if="options.isClarkGable" class="oe-record-edit-link" width="1">
<img src="/web/static/src/img/pencil.gif" width="12" height="12" class="oe-record-edit-link-img"/>
</th>
<t t-foreach="columns" t-as="column"> <t t-foreach="columns" t-as="column">
<t t-set="align" t-value="column.type === 'integer' or column.type == 'float'"/> <t t-set="align" t-value="column.type === 'integer' or column.type == 'float'"/>
<td t-if="!column.meta and column.invisible !== '1'" t-att-title="column.help" <td t-if="!column.meta and column.invisible !== '1'" t-att-title="column.help"