Fix message labels handling
Selecting "none" from the label submenu on a multiple selection of messages is now working. When changing the label of multiple messages, the display is now properly updated. Fixes #2902
This commit is contained in:
parent
eaf815eae6
commit
1af52e6d6b
5
NEWS
5
NEWS
|
@ -6,8 +6,8 @@ New features
|
||||||
|
|
||||||
Enchancements
|
Enchancements
|
||||||
- major refactoring of the GCS component saving code (dropped OGoContentStore)
|
- major refactoring of the GCS component saving code (dropped OGoContentStore)
|
||||||
- users can now print their calendars in colors with every views; list, daily, weekly and multicolumns
|
- printing calendars in colors is now possible in all views; list, daily, weekly and multicolumns
|
||||||
- users can choose to print their calendars events and tasks with the background color or with a border color
|
- new option to print calendars events and tasks with a background color or with a border color
|
||||||
|
|
||||||
Bug fixes
|
Bug fixes
|
||||||
- fixed crasher when subscribing users to resources (#2892)
|
- fixed crasher when subscribing users to resources (#2892)
|
||||||
|
@ -18,6 +18,7 @@ Bug fixes
|
||||||
- fixed Can not delete mail when over quota (#2812)
|
- fixed Can not delete mail when over quota (#2812)
|
||||||
- fixed Events and tasks cannot be moved to other calendars using drag&drop (#2759)
|
- fixed Events and tasks cannot be moved to other calendars using drag&drop (#2759)
|
||||||
- fixed In "Multicolumn Day View" mouse position is not honored when creating an event (#2864)
|
- fixed In "Multicolumn Day View" mouse position is not honored when creating an event (#2864)
|
||||||
|
- fixed handling of messages labels (#2902)
|
||||||
|
|
||||||
2.2.7 (2014-07-30)
|
2.2.7 (2014-07-30)
|
||||||
------------------
|
------------------
|
||||||
|
|
|
@ -2440,15 +2440,15 @@ function onMenuToggleMessageRead(event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onMenuLabelNone() {
|
function onMenuLabelNone() {
|
||||||
var messages = new Array();
|
var messages = [];
|
||||||
|
|
||||||
if (document.menuTarget.tagName == "DIV")
|
if (document.menuTarget.tagName == "DIV")
|
||||||
// Menu called from message content view
|
// Menu called from message content view
|
||||||
messages.push(Mailer.currentMessages[Mailer.currentMailbox]);
|
messages.push(Mailer.currentMessages[Mailer.currentMailbox]);
|
||||||
else if (Object.isArray(document.menuTarget))
|
else if (Object.isArray(document.menuTarget))
|
||||||
// Menu called from multiple selection in messages list view
|
// Menu called from multiple selection in messages list view
|
||||||
$(document.menuTarget).collect(function(row) {
|
$(document.menuTarget).collect(function(rowID) {
|
||||||
messages.push(row.getAttribute("id").substr(4));
|
messages.push(rowID.substr(4));
|
||||||
});
|
});
|
||||||
else
|
else
|
||||||
// Menu called from one selection in messages list view
|
// Menu called from one selection in messages list view
|
||||||
|
@ -2561,21 +2561,18 @@ function messageFlagCallback(http) {
|
||||||
var operation = data["label"];
|
var operation = data["label"];
|
||||||
if (operation) {
|
if (operation) {
|
||||||
var labels = row.getAttribute("labels");
|
var labels = row.getAttribute("labels");
|
||||||
var flags;
|
var flags = [];
|
||||||
if (labels.length > 0)
|
if (labels.length > 0)
|
||||||
flags = labels.split(" ");
|
flags = labels.split(" ");
|
||||||
else
|
|
||||||
flags = new Array();
|
|
||||||
if (operation.substr(0, 3) == "add")
|
if (operation.substr(0, 3) == "add")
|
||||||
flags.push("label" + operation.substr(3));
|
flags.push(operation.substr(3));
|
||||||
else {
|
else {
|
||||||
var flag = "label" + operation.substr(6);
|
// Remove flag
|
||||||
|
var flag = operation.substr(6);
|
||||||
var idx = flags.indexOf(flag);
|
var idx = flags.indexOf(flag);
|
||||||
flags.splice(idx, 1);
|
flags.splice(idx, 1);
|
||||||
}
|
}
|
||||||
row.writeAttribute("labels", flags.join(" "));
|
row.writeAttribute("labels", flags.join(" "));
|
||||||
row.toggleClassName("_selected");
|
|
||||||
row.toggleClassName("_selected");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
row.writeAttribute("labels", "");
|
row.writeAttribute("labels", "");
|
||||||
|
|
Loading…
Reference in a new issue