[ADD] README, copyrights, EOFs

This commit is contained in:
tarteo
2016-11-11 01:11:49 +01:00
parent 618a67ea29
commit cdc150eb9a
7 changed files with 92 additions and 10 deletions

View File

@@ -0,0 +1,7 @@
/* Copyright 2016 Onestein
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */
table.o_list_view th.o_list_record_delete,
table.o_list_view th.o_list_record_delete span {
cursor: pointer;
}

View File

@@ -1,3 +1,6 @@
/* Copyright 2016 Onestein
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */
odoo.define('web_x2many_delete_all', function (require) {
"use strict";
var core = require('web.core'),
@@ -8,8 +11,8 @@ odoo.define('web_x2many_delete_all', function (require) {
'click th.o_list_record_delete': 'btn_delete_all_clicked'
},
reload_current_view: function() {
var res = this._super.apply(this, arguments);
var self = this;
var res = this._super.apply(this, arguments);
res.then(function() {
self.toggle_btn_delete_all();
});
@@ -23,9 +26,8 @@ odoo.define('web_x2many_delete_all', function (require) {
}
},
btn_delete_all_clicked: function() {
if(!this.get('effective_readonly')) {
this.delete_all();
}
if(this.get('effective_readonly')) return;
this.delete_all();
},
delete_all: function() {
this.viewmanager.views.list.controller.do_delete(this.dataset.ids);
@@ -34,4 +36,4 @@ odoo.define('web_x2many_delete_all', function (require) {
core.form_widget_registry.get('many2many').include(X2ManyListDeleteAllMixin);
core.form_widget_registry.get('one2many').include(X2ManyListDeleteAllMixin);
});
});

View File

@@ -1,4 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2016 Onestein
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<templates>
<t t-extend="ListView">
<t t-jquery=".o_list_record_delete" t-operation="inner">