Use limit to expand tree

The screen switch to the form view if the limit is reached.

issue4901
review44021002
This commit is contained in:
Cédric Krier
2018-03-09 19:14:27 +01:00
parent bfb2fcaa71
commit 3196c82be6
2 changed files with 9 additions and 3 deletions
+1
View File
@@ -1,3 +1,4 @@
* Use limit to expand tree
* Use spellcheck and lang attributes for textbox widget
* Support icon on page
* Add keyword attribute to button tag
+8 -3
View File
@@ -856,9 +856,14 @@
delete this.tree.expanded[this.path];
this.collapse_children();
} else {
this.update_expander(true);
this.tree.expanded[this.path] = this;
this.expand_children();
if (this.tree.n_children(this) > Sao.config.limit) {
this.tree.screen.set_current_record(this.record);
this.tree.screen.switch_view('form');
} else {
this.update_expander(true);
this.tree.expanded[this.path] = this;
this.expand_children();
}
}
return false;
},