[MIG] Migrated js and css

pull/59/head
tarteo 2016-06-24 17:43:52 +02:00 committed by Andrea
parent 7be6ff98be
commit 4817dc24e8
3 changed files with 8 additions and 6 deletions

View File

@ -13,7 +13,7 @@
'version': '9.0.1.0.0', 'version': '9.0.1.0.0',
'depends': [ 'depends': [
'base', 'base',
'web', 'web'
], ],
'data': [ 'data': [
'security/ir.model.access.csv', 'security/ir.model.access.csv',

View File

@ -7,7 +7,7 @@
width: 100%; width: 100%;
height: 50px; height: 50px;
background-color: #7c7bad; background-color: #7c7bad;
color: #fff; color: #000;
} }
.oe_form_field_bi_editor .footer { .oe_form_field_bi_editor .footer {
@ -123,6 +123,7 @@
border: none; border: none;
background-image: none; background-image: none;
padding: 0; padding: 0;
cursor: pointer;
} }
.oe_form_field_bi_editor .body .right .field-list tbody tr:hover { .oe_form_field_bi_editor .body .right .field-list tbody tr:hover {

View File

@ -1,4 +1,3 @@
openerp.bi_view_editor = function (instance, local) { openerp.bi_view_editor = function (instance, local) {
instance.bi_view_editor.BVEEditor = instance.web.form.AbstractField.extend({ instance.bi_view_editor.BVEEditor = instance.web.form.AbstractField.extend({
@ -146,6 +145,7 @@ openerp.bi_view_editor = function (instance, local) {
var index = self.activeModelMenus.indexOf(item.find(".class").data('model-data').id); var index = self.activeModelMenus.indexOf(item.find(".class").data('model-data').id);
if(index != -1 && !self.get("effective_readonly")) { if(index != -1 && !self.get("effective_readonly")) {
model.call("get_fields", [self.activeModelMenus[index]], { context: new instance.web.CompoundContext() }).then(function(result) { model.call("get_fields", [self.activeModelMenus[index]], { context: new instance.web.CompoundContext() }).then(function(result) {
console.log(result);
var item = self.$el.find(".class-list #bve-class-" + result[0].model_id); var item = self.$el.find(".class-list #bve-class-" + result[0].model_id);
for (var o = 0; o < result.length; o++) { for (var o = 0; o < result.length; o++) {
if(self.$el.find(".field-list tbody [name=label-" + result[o].id + "]").length > 0) continue; if(self.$el.find(".field-list tbody [name=label-" + result[o].id + "]").length > 0) continue;
@ -196,7 +196,7 @@ openerp.bi_view_editor = function (instance, local) {
var delete_button = ""; var delete_button = "";
var disabled = " disabled=\"disabled\" "; var disabled = " disabled=\"disabled\" ";
if (!this.get("effective_readonly")) { if (!this.get("effective_readonly")) {
delete_button = "<button id=\"delete-" + data.id + "\" class=\"delete-button oe_i\">d</button>"; delete_button = "<span id=\"delete-" + data.id + "\" class=\"delete-button fa fa-trash-o\"/>";
disabled = ""; disabled = "";
} }
@ -365,7 +365,7 @@ openerp.bi_view_editor = function (instance, local) {
self.internal_set_value(JSON.stringify(self.get_fields())); self.internal_set_value(JSON.stringify(self.get_fields()));
//self.load_classes(data); //self.load_classes(data);
} else if (result.length > 1) { } else if (result.length > 1) {
var pop = new instance.bi_view_editor.JoinNodePopup(self); var pop = new local.JoinNodePopup(self);
pop.display_popup(result, self.get_model_data(), self.add_field_and_join_node.bind(self), data); pop.display_popup(result, self.get_model_data(), self.add_field_and_join_node.bind(self), data);
} else { } else {
// first field and table only. // first field and table only.
@ -430,7 +430,8 @@ openerp.bi_view_editor = function (instance, local) {
var dialog = new instance.web.Dialog(this, { var dialog = new instance.web.Dialog(this, {
dialogClass: 'oe_act_window', dialogClass: 'oe_act_window',
title: "Choose Join Node", title: "Choose Join Node",
}, this.$el).open(); $content: this.$el
}).open();
joinnodes.find('a').click(function() { joinnodes.find('a').click(function() {
callback(callback_data, choices[$(this).data('idx')]); callback(callback_data, choices[$(this).data('idx')]);