Skip to content

Commit

Permalink
Fix bug 979996 - Event participation status can be reset to back to N…
Browse files Browse the repository at this point in the history
…EEDS-ACTION if the user already has replied. r=philipp

--HG--
extra : rebase_source : abd0af6821ca8f38c227baa4744572c25e0a98ed
  • Loading branch information
make-my-day committed Mar 5, 2014
1 parent 1d73112 commit 87b2b28
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
10 changes: 7 additions & 3 deletions calendar/base/content/dialogs/calendar-summary-dialog.js
Expand Up @@ -72,6 +72,12 @@ function onLoad() {
// (i.e REPLY on a mailing list)
item.removeAttendee(attendee);
item.addAttendee(window.attendee);

// make partstat NEEDS-ACTION only available as a option to change to,
// if the user hasn't ever made a decision prior to opening the dialog
if (window.attendee.participationStatus == "NEEDS-ACTION" && cal.isEvent(item)) {
document.getElementById("item-participation-needs-action").removeAttribute("hidden");
}
}
}

Expand Down Expand Up @@ -209,10 +215,8 @@ function updateInvitationStatus() {
/**
* When the summary dialog is showing an invitation, this function updates the
* user's invitation status from the value chosen in the dialog.
*
* XXX rename me!
*/
function updateInvitation() {
function updatePartStat() {
var statusElement = document.getElementById("item-participation");
if (window.attendee) {
let item = window.arguments[0];
Expand Down
5 changes: 3 additions & 2 deletions calendar/base/content/dialogs/calendar-summary-dialog.xul
Expand Up @@ -113,12 +113,13 @@
<row id="invitation-row" hidden="true" align="center">
<label value="&read.only.reply.label;" control="item-participation"/>
<hbox pack="start">
<menulist id="item-participation" oncommand="updateInvitation()">
<menulist id="item-participation" oncommand="updatePartStat()">
<menupopup>
<menuitem label="&read.only.accept.label;" value="ACCEPTED"/>
<menuitem label="&read.only.tentative.label;" value="TENTATIVE"/>
<menuitem label="&read.only.decline.label;" value="DECLINED"/>
<menuitem label="&read.only.needs.action.label;" value="NEEDS-ACTION"/>
<menuitem label="&read.only.needs.action.label;" value="NEEDS-ACTION"
hidden="true" id="item-participation-needs-action"/>
</menupopup>
</menulist>
</hbox>
Expand Down

0 comments on commit 87b2b28

Please sign in to comment.