Backport commit r48127, committed by Klaus Leithoff. fix broken move via nm-action-menu-entry

This commit is contained in:
Hadi Nategh 2014-08-21 15:36:29 +00:00
parent cfbb997d03
commit dd3601c420

View File

@ -2757,7 +2757,7 @@ app.classes.mail = AppJS.extend(
var key = window.localStorage.key(i); var key = window.localStorage.key(i);
// Find directly by what the key would look like // Find directly by what the key would look like
if(key.indexOf('cached_fetch_mail::{"selectedFolder":"'+_target.id+'"') == 0) if(key.indexOf('cached_fetch_mail::{"selectedFolder":"'+target+'"') == 0)
{ {
window.localStorage.removeItem(key); window.localStorage.removeItem(key);
} }
@ -3096,8 +3096,9 @@ app.classes.mail = AppJS.extend(
tmp = aliases.concat(addr.get_value()); tmp = aliases.concat(addr.get_value());
// returns de-duplicate items of an array // returns de-duplicate items of an array
var deDuplicator = function (item,pos){ var deDuplicator = function (item,pos)
return tmp.indexOf(item) == pos {
return tmp.indexOf(item) == pos;
}; };
aliases = tmp.filter(deDuplicator); aliases = tmp.filter(deDuplicator);
@ -3702,6 +3703,9 @@ app.classes.mail = AppJS.extend(
}, },
/** /**
* function to act as draggable starts dragging * function to act as draggable starts dragging
*
* @param {type} event
* @param {type} ui
*/ */
start:function(event, ui) start:function(event, ui)
{ {
@ -3760,7 +3764,7 @@ app.classes.mail = AppJS.extend(
{ {
emails = widget.get_value(); emails = widget.get_value();
if (emails) emails = emails.concat([draggedValue]) if (emails) emails = emails.concat([draggedValue]);
widget.set_value(emails); widget.set_value(emails);
@ -3789,7 +3793,7 @@ app.classes.mail = AppJS.extend(
//Destroy draggables after dropping, we need to enable them again //Destroy draggables after dropping, we need to enable them again
jQuery('div.ms-sel-item').draggable('destroy'); jQuery('div.ms-sel-item').draggable('destroy');
} }
}, }
}); });
/** /**
@ -3816,7 +3820,7 @@ app.classes.mail = AppJS.extend(
} }
} }
return true; return true;
} };
} }
}); });