Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 29 additions & 10 deletions sao/src/view/tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -2616,7 +2616,9 @@
if (!value) {
value = field.get_client(record) || '';
}
cell.text(value);
if (cell.text() != value) {
cell.text(value);
}
}
};
if (!record.is_loaded(this.attributes.name)) {
Expand Down Expand Up @@ -2708,7 +2710,9 @@
},
update_text: function(cell, record) {
var text = this.get_textual_value(record);
cell.text(text).attr('title', text);
if (text != cell.text()) {
cell.text(text).attr('title', text);
}
},
render: function(record, cell) {
if (!cell) {
Expand Down Expand Up @@ -2900,7 +2904,9 @@
if (!this.tree.editable &&
(this.field.name + ':string' in record._values)) {
var text_value = this.get_textual_value(record);
cell.text(text_value).attr('title', text_value);
if (cell.text() != text_value) {
cell.text(text_value).attr('title', text_value);
}
} else {
this.update_selection(record, () => {
var value = this.field.get(record);
Expand All @@ -2921,7 +2927,9 @@
prm = jQuery.when(text);
}
prm.done(text_value => {
cell.text(text_value).attr('title', text_value);
if (cell.text() != text_value) {
cell.text(text_value).attr('title', text_value);
}
});
});
}
Expand Down Expand Up @@ -2963,11 +2971,15 @@
if (!this.tree.editable &&
(this.field_name + ':string' in record._values)) {
var text_value = this.get_textual_value(record);
cell.text(text_value).attr('title', text_value);
if (cell.text() != text_value) {
cell.text(text_value).attr('title', text_value);
}
} else {
this.update_selection(record, () => {
var text_value = this.get_textual_value(record);
cell.text(text_value).attr('title', text_value);
if (cell.text() != text_value) {
cell.text(text_value).attr('title', text_value);
}
});
}
},
Expand Down Expand Up @@ -3025,7 +3037,9 @@
cell.unbind('click');
this.update_selection(record, () => {
var text = this.get_textual_value(record);
cell.text(text).attr('title', text);
if (cell.text() != text) {
cell.text(text).attr('title', text);
}
cell.click(event => {
event.stopPropagation();
var value = this.field.get(record);
Expand Down Expand Up @@ -3108,7 +3122,10 @@
},
update_text: function(cell, record) {
var text = this.get_textual_value(record);
cell.children('span').text(text).attr('title', text);
let span = cell.children('span')
if (span.text() != text) {
span.text(text).attr('title', text);
}
var button = cell.children('button');
if (!button.length) {
button = jQuery('<button/>', {
Expand Down Expand Up @@ -3244,8 +3261,10 @@
var value = this.field.get(record) || 0;
var progressbar = cell.find('.progress-bar');
progressbar.attr('aria-valuenow', value * 100);
progressbar.css('width', value * 100 + '%');
progressbar.text(text).attr('title', text);
if (progressbar.text() != text) {
progressbar.css('width', value * 100 + '%');
progressbar.text(text).attr('title', text);
}
}
});

Expand Down