Permalink
Browse files

Fix bug 979996 - Event participation status can be reset to back to N…

…EEDS-ACTION if the user already has replied. r=philipp

--HG--
extra : rebase_source : abd0af6821ca8f38c227baa4744572c25e0a98ed
  • Loading branch information...
1 parent 1d73112 commit 87b2b280eafd1e43d153c98850419ad09dceddb2 @make-my-day make-my-day committed Mar 5, 2014
@@ -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");
+ }
}
}
@@ -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];
@@ -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>

0 comments on commit 87b2b28

Please sign in to comment.