This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new a3000e3 switch to a computed property; fixes a timing problem on load
a3000e3 is described below
commit a3000e3b10d4cdfd244e779e280d21ee515ae892
Author: Sam Ruby <[email protected]>
AuthorDate: Fri Jan 19 09:14:29 2018 -0500
switch to a computed property; fixes a timing problem on load
---
www/board/agenda/views/buttons/attend.js.rb | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/www/board/agenda/views/buttons/attend.js.rb
b/www/board/agenda/views/buttons/attend.js.rb
index 1703af0..300af78 100644
--- a/www/board/agenda/views/buttons/attend.js.rb
+++ b/www/board/agenda/views/buttons/attend.js.rb
@@ -7,28 +7,29 @@ class Attend < Vue
end
def render
- _button.btn.btn_primary (@attending ? 'regrets' : 'attend'),
+ _button.btn.btn_primary (attending ? 'regrets' : 'attend'),
onClick: self.click, disabled: @disabled
end
# match person by either userid or name
- def created()
+ def attending
+ return false unless @@item.people
person = @@item.people[User.id]
if person
- @attending = person.attending
+ return person.attending
else
- @attending = false
for id in @@item.people
person = @@item.people[id]
- @attending = person.attending if person.name == User.username
+ return person.attending if person.name == User.username
end
+ return false
end
end
def click(event)
data = {
agenda: Agenda.file,
- action: (@attending ? 'regrets' : 'attend'),
+ action: (attending ? 'regrets' : 'attend'),
name: User.username,
userid: User.id
}
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].