BUGFIX Don't reload TreeDropdownField title via ajax if no value is set (which causes infinite loops)

This commit is contained in:
Ingo Schommer 2012-02-22 17:27:02 +01:00
parent 6ffb941c28
commit 5f635d8315

View File

@ -118,7 +118,7 @@
* Update title from tree node value
*/
updateTitle: function() {
var self = this, tree = self.find('.tree-holder');
var self = this, tree = self.find('.tree-holder'), val = this.getValue();
var updateFn = function() {
var val = self.getValue();
if(val) {
@ -131,7 +131,7 @@
};
// Load the tree if its not already present
if(jQuery.jstree._reference(tree)) updateFn();
if(jQuery.jstree._reference(tree) || !val) updateFn();
else this.loadTree(null, updateFn);
},
setValue: function(val) {