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 () {
|
||||
if (TreeNodeDetailController.controllers.length > 0) {
|
||||
TreeNodeDetailController.controllers.forEach(function(elements, type) {
|
||||
if (elements.length > 0) {
|
||||
elements.forEach(function(element, id) {
|
||||
element.remove();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
getController: function () {
|
||||
var controller = {
|
||||
@ -457,26 +461,39 @@ TreeNodeDetailController = {
|
||||
this.recipient.empty();
|
||||
}
|
||||
if (this.type != 'none' && this.id > -1) {
|
||||
try {
|
||||
delete TreeNodeDetailController.controllers[this.type][this.id];
|
||||
}
|
||||
catch (error) {
|
||||
// console.log('Item not deleted');
|
||||
}
|
||||
}
|
||||
},
|
||||
closeOther: function () {
|
||||
if (TreeNodeDetailController.controllers.length > 0) {
|
||||
TreeNodeDetailController.controllers.forEach(function(elements, type) {
|
||||
if (elements.length > 0) {
|
||||
elements.forEach(function(element, id) {
|
||||
if (this.type != type && this.id != id)
|
||||
element.close();
|
||||
}, this);
|
||||
}
|
||||
}, this);
|
||||
}
|
||||
},
|
||||
removeOther: function () {
|
||||
if (TreeNodeDetailController.controllers.length > 0) {
|
||||
TreeNodeDetailController.controllers.forEach(function(elements, type) {
|
||||
if (elements.length > 0) {
|
||||
elements.forEach(function(element, id) {
|
||||
if (this.type != type && this.id != id)
|
||||
element.remove();
|
||||
}, this);
|
||||
}
|
||||
}, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
return controller;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user