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 de3b109 begin prep for es2015
de3b109 is described below
commit de3b1097856dd863238827ecec41cb8c9bdbd6e0
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Sat Jan 13 22:01:36 2018 -0500
begin prep for es2015
---
www/board/agenda/views/models/agenda.js.rb | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/www/board/agenda/views/models/agenda.js.rb b/www/board/agenda/views/models/agenda.js.rb
index 4b2e2d0..19df944 100644
--- a/www/board/agenda/views/models/agenda.js.rb
+++ b/www/board/agenda/views/models/agenda.js.rb
@@ -28,8 +28,8 @@ class Agenda
# remove president attachments from the normal flow
@@index.each do |pres|
- match = (pres.title == 'President') and pres.text and pres.text.
- match(/Additionally, please see Attachments (\d) through (\d)/)
+ match = (pres.title == 'President' and pres.text and pres.text.
+ match(/Additionally, please see Attachments (\d) through (\d)/))
next unless match
first = last = nil
@@ -139,13 +139,21 @@ class Agenda
for name in entry
self["_#{name}"] = entry[name]
end
+
+ @color = nil
end
+ # provide read-write access to a number of properties
+ attr :index, :color
+
# provide read-only access to a number of properties
- attr_reader :attach, :title, :owner, :shepherd, :index, :timestamp, :digest
+ attr_reader :attach, :title, :owner, :shepherd, :timestamp, :digest
attr_reader :approved, :roster, :prior_reports, :stats, :people, :notes
attr_reader :chair_email, :mail_list, :warnings, :flagged_by
+ # provide write access to a number of properties
+ attr_writer :color
+
def fulltitle
@fulltitle || @title
end
@@ -265,7 +273,11 @@ class Agenda
# the default banner color to use for the agenda as a whole
def self.color
- 'blank'
+ @@color || 'blank'
+ end
+
+ def self.color=(color)
+ @@color = color
end
# fetch the start date
@@ -487,7 +499,9 @@ class Agenda
# banner color for this agenda item
def color
- if not @title
+ if @color
+ @color
+ elsif not @title
'blank'
elsif @warnings
'missing'
--
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].
|