harden CheckFolderNoSelect to ensure that we are ablen to enter tree context

This commit is contained in:
Klaus Leithoff 2014-02-12 13:10:04 +00:00
parent 6d23dfbd31
commit 9da0b4c9e2

View File

@ -863,13 +863,17 @@ app.classes.mail = AppJS.extend(
* @param _senders - the representation of the tree leaf to be manipulated * @param _senders - the representation of the tree leaf to be manipulated
*/ */
mail_CheckFolderNoSelect: function(action,_senders,_currentNode) { mail_CheckFolderNoSelect: function(action,_senders,_currentNode) {
console.log(action,_senders,_currentNode); //console.log(action,_senders,_currentNode);
// Abort if user selected an un-selectable node // Abort if user selected an un-selectable node
// Use image over anything else because...? // Use image over anything else because...?
var ftree = this.et2.getWidgetById(this.nm_index+'[foldertree]'); var ftree, node;
var node = ftree.getNode(_senders[0].id); ftree = this.et2.getWidgetById(this.nm_index+'[foldertree]');
if (ftree)
{
node = ftree.getNode(_senders[0].id);
}
if (node.im0.indexOf('NoSelect') !== -1) if (node && node.im0.indexOf('NoSelect') !== -1)
{ {
//ftree.reSelectItem(_previous); //ftree.reSelectItem(_previous);
return false; return false;