Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3733 Lượt xem

Hi,


ATM, when displaying an email that contains a table wider than 590 odd px, the width of the div of the message,

the table is cut off.


What magic css tricks can I do to make the whole table readable?



Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

This works for me, there's probably better jquery filters I could use.


openerp.kkproject = function (instance) {

instance.mail.ThreadMessage.include({

start: function () {

this._super.apply(this, arguments);

this.$("div.oe_msg_body_long, div.oe_msg_body_short").children().each(function() {

if ($(this).width() > $("div.oe_msg_center").width() ) {

$(this).wrap('<div style="overflow-x:scroll"></div>' );

}

});

},

on_expand: function (event) {

this._super.apply(this, arguments);

this.$("div.oe_msg_body_long, div.oe_msg_body_short").children().each(function() {

if ($(this).width() > $("div.oe_msg_center").width() ) {

$(this).wrap('<div style="overflow-x:scroll"></div>' );

}

});

}

});

};

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
11
thg 4 23
33670
0
thg 6 21
3203
0
thg 9 16
3328
0
thg 2 16
3681
5
thg 11 15
7667