Clark Gable is dead. Frankly, my dear, I don't give a damn.
authorAntony Lesuisse <al@openerp.com>
Mon, 30 Apr 2012 00:01:58 +0000 (02:01 +0200)
committerAntony Lesuisse <al@openerp.com>
Mon, 30 Apr 2012 00:01:58 +0000 (02:01 +0200)
bzr revid: al@openerp.com-20120430000158-fp451ymdjxgzwi8v

addons/web/static/src/js/view_form.js
addons/web/static/src/js/view_list.js
addons/web/static/src/js/view_list_editable.js
addons/web/static/src/xml/base.xml

index 5f24822..b77bbd7 100644 (file)
@@ -2705,7 +2705,6 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({
                 if (self.get("effective_readonly")) {
                     view.options.addable = null;
                     view.options.deletable = null;
-                    view.options.isClarkGable = false;
                 }
             } else if (view.view_type === "form") {
                 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"),
                     'deletable': self.get("effective_readonly") ? false : true,
                     'selectable': self.multi_selection,
-                    'isClarkGable': self.get("effective_readonly") ? false : true
             });
         var embedded = (this.field.views || {}).tree;
         if (embedded) {
index ced7279..b8ce905 100644 (file)
@@ -20,8 +20,6 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
         'sortable': true,
         // whether the view rows can be reordered (via vertical drag & drop)
         'reorderable': true,
-        // display an edit icon linking to form view
-        'isClarkGable': true
     },
     /**
      * 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)) {
                         throw "Could not find id in dataset"
                     }
-                    var view;
-                    if ($(e.target).is('.oe-record-edit-link-img')) {
-                        view = 'form';
-                    }
-                    self.row_clicked(e, view);
+                    self.row_clicked(e);
                 }
             });
     },
@@ -1011,9 +1005,6 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
         if (this.options.selectable) {
             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) {
             if (column.invisible === '1') {
                 return;
@@ -1322,9 +1313,6 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we
             if (self.options.selectable) {
                 $row.append('<td>');
             }
-            if (self.options.isClarkGable) {
-                $row.append('<td>');
-            }
             _(self.columns).chain()
                 .filter(function (column) {return !column.invisible;})
                 .each(function (column) {
index 816143a..e539d17 100644 (file)
@@ -398,8 +398,6 @@ openerp.web.list_editable = function (instance) {
             
             if (this.view.editable_list.options.selectable)
                 $("<td>").appendTo($element);
-            if (this.view.editable_list.options.isClarkGable)
-                $("<td>").appendTo($element);
                 
             $xml.children().each(function(i, el) {
                 var modifiers = JSON.parse($(el).attr("modifiers") || "{}");
index 7c99777..76d75d6 100644 (file)
 </tr>
 
 <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>
         <tr t-if="(!!options.action_buttons and !options.$buttons) or (!!options.pager and !options.$pager)">
             <th t-att-colspan="columns_count">
             <th t-if="options.selectable" width="1"  >
                 <input type="checkbox" class="all-record-selector"/>
             </th>
-            <th t-if="options.isClarkGable" width="1"></th>
             <t t-foreach="columns" t-as="column">
                 <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)">
     <tfoot>
         <tr>
             <td t-if="options.selectable"/>
-            <td t-if="options.isClarkGable"/>
             <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">
             </td>
         <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"/>
     </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-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"