Fix bug 498587 - Invite Attendees dialog: add tooltips to attendee role icons. r=philipp
--HG-- extra : rebase_source : 70ed3add9f8d60587991788cbdf61384a379418b
This commit is contained in:
Родитель
2109f4a934
Коммит
62f1d97894
|
@ -199,7 +199,7 @@
|
|||
? organizer.id
|
||||
: calendar.getProperty("organizerId"));
|
||||
|
||||
this.mIsInvitation = (calInstanceOf(calendar, Components.interfaces.calISchedulingSupport) &&
|
||||
this.mIsInvitation = (calInstanceOf(calendar, Components.interfaces.calISchedulingSupport) &&
|
||||
calendar.isInvitation(args.item));
|
||||
|
||||
var listbox =
|
||||
|
@ -374,6 +374,10 @@
|
|||
|
||||
icon.setAttribute("class", "role-icon");
|
||||
setElementValue(icon, aAttendee.role || false, "role");
|
||||
|
||||
// Set tooltip for rolenames
|
||||
this.updateTooltip(icon);
|
||||
|
||||
return true;
|
||||
]]></body>
|
||||
</method>
|
||||
|
@ -431,6 +435,9 @@
|
|||
icon.setAttribute("class", "role-icon");
|
||||
icon.setAttribute("role", "REQ-PARTICIPANT");
|
||||
|
||||
// Set tooltip for rolenames
|
||||
this.updateTooltip(icon);
|
||||
|
||||
// We always clone the first row. The problem is that the first row
|
||||
// could be focused. When we clone that row, we end up with a cloned
|
||||
// XUL textbox that has a focused attribute set. Therefore we think
|
||||
|
@ -625,6 +632,32 @@
|
|||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="updateTooltip">
|
||||
<parameter name="targetIcon"/>
|
||||
<body><![CDATA[
|
||||
// Function setting the tooltip of attendeeicons based on their role
|
||||
if (targetIcon.className == "role-icon") {
|
||||
let role = targetIcon.getAttribute("role");
|
||||
// Set tooltip for rolenames
|
||||
|
||||
const strMap = {
|
||||
"REQ-PARTICIPANT": "required",
|
||||
"OPT-PARTICIPANT": "optional",
|
||||
"NON-PARTICIPANT": "nonparticipant",
|
||||
"CHAIR": "chair"
|
||||
}
|
||||
|
||||
let roleNameString = "event.attendee.role." + (role in strMap ? strMap[role] : "unknown");
|
||||
let tooltip = cal.calGetString("calendar-event-dialog-attendees",
|
||||
roleNameString,
|
||||
(role in strMap ? null : [role]));
|
||||
targetIcon.setAttribute("tooltiptext", tooltip);
|
||||
|
||||
return;
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<property name="documentSize">
|
||||
<getter><![CDATA[
|
||||
return this.mRowHeight * this.mMaxAttendees;
|
||||
|
@ -1259,6 +1292,7 @@
|
|||
|
||||
let nextValue = cycle(roleCycle, target.getAttribute("role"));
|
||||
target.setAttribute("role", nextValue);
|
||||
this.updateTooltip(target);
|
||||
}
|
||||
} else if (target.className == "status-icon") {
|
||||
if (target.getAttribute("disabled") != "true") {
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Mozilla Calendar code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Marc Zahnlecker <m.zahnlecker@googlemail.com>
|
||||
# Portions created by the Initial Developer are Copyright (C) 2009
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
event.attendee.role.required = Required Attendee
|
||||
event.attendee.role.optional = Optional Attendee
|
||||
event.attendee.role.nonparticipant = Non Participant
|
||||
event.attendee.role.chair = Chair
|
||||
event.attendee.role.unknown = Unknown Attendee (%1$S)
|
|
@ -30,3 +30,4 @@ calendar-@AB_CD@.jar:
|
|||
locale/@AB_CD@/calendar/preferences/timezones.dtd (%chrome/calendar/preferences/timezones.dtd)
|
||||
locale/@AB_CD@/calendar/preferences/views.dtd (%chrome/calendar/preferences/views.dtd)
|
||||
locale/@AB_CD@/calendar/dialogs/calendar-event-dialog-reminder.dtd (%chrome/calendar/dialogs/calendar-event-dialog-reminder.dtd)
|
||||
locale/@AB_CD@/calendar/calendar-event-dialog-attendees.properties (%chrome/calendar/calendar-event-dialog-attendees.properties)
|
||||
|
|
Загрузка…
Ссылка в новой задаче