mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Improved the stability
This commit is contained in:
parent
93b248bf14
commit
b568156211
@ -298,11 +298,15 @@ TreeNodeDetailController = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
removeControllers: function () {
|
removeControllers: function () {
|
||||||
TreeNodeDetailController.controllers.forEach(function(elements, type) {
|
if (TreeNodeDetailController.controllers.length > 0) {
|
||||||
elements.forEach(function(element, id) {
|
TreeNodeDetailController.controllers.forEach(function(elements, type) {
|
||||||
element.remove();
|
if (elements.length > 0) {
|
||||||
|
elements.forEach(function(element, id) {
|
||||||
|
element.remove();
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
},
|
},
|
||||||
getController: function () {
|
getController: function () {
|
||||||
var controller = {
|
var controller = {
|
||||||
@ -457,24 +461,37 @@ TreeNodeDetailController = {
|
|||||||
this.recipient.empty();
|
this.recipient.empty();
|
||||||
}
|
}
|
||||||
if (this.type != 'none' && this.id > -1) {
|
if (this.type != 'none' && this.id > -1) {
|
||||||
delete TreeNodeDetailController.controllers[this.type][this.id];
|
try {
|
||||||
|
delete TreeNodeDetailController.controllers[this.type][this.id];
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
// console.log('Item not deleted');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
closeOther: function () {
|
closeOther: function () {
|
||||||
TreeNodeDetailController.controllers.forEach(function(elements, type) {
|
if (TreeNodeDetailController.controllers.length > 0) {
|
||||||
elements.forEach(function(element, id) {
|
TreeNodeDetailController.controllers.forEach(function(elements, type) {
|
||||||
if (this.type != type && this.id != id)
|
if (elements.length > 0) {
|
||||||
element.close();
|
elements.forEach(function(element, id) {
|
||||||
|
if (this.type != type && this.id != id)
|
||||||
|
element.close();
|
||||||
|
}, this);
|
||||||
|
}
|
||||||
}, this);
|
}, this);
|
||||||
}, this);
|
}
|
||||||
},
|
},
|
||||||
removeOther: function () {
|
removeOther: function () {
|
||||||
TreeNodeDetailController.controllers.forEach(function(elements, type) {
|
if (TreeNodeDetailController.controllers.length > 0) {
|
||||||
elements.forEach(function(element, id) {
|
TreeNodeDetailController.controllers.forEach(function(elements, type) {
|
||||||
if (this.type != type && this.id != id)
|
if (elements.length > 0) {
|
||||||
element.remove();
|
elements.forEach(function(element, id) {
|
||||||
|
if (this.type != type && this.id != id)
|
||||||
|
element.remove();
|
||||||
|
}, this);
|
||||||
|
}
|
||||||
}, this);
|
}, this);
|
||||||
}, this);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return controller;
|
return controller;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user