You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2018/04/23 18:46:34 UTC
[whimsy] branch master updated: further refine traversal order
during meeting - backward and forward
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 a5ca605 further refine traversal order during meeting - backward and forward
a5ca605 is described below
commit a5ca6054e5d0e97560d0f38ae5d222302ca21393
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Mon Apr 23 14:46:09 2018 -0400
further refine traversal order during meeting - backward and forward
---
www/board/agenda/views/layout/footer.js.rb | 13 +++++---
www/board/agenda/views/models/agenda.js.rb | 53 ++++++++++++++++--------------
2 files changed, 37 insertions(+), 29 deletions(-)
diff --git a/www/board/agenda/views/layout/footer.js.rb b/www/board/agenda/views/layout/footer.js.rb
index 5f713fd..781de62 100644
--- a/www/board/agenda/views/layout/footer.js.rb
+++ b/www/board/agenda/views/layout/footer.js.rb
@@ -32,8 +32,13 @@ class Footer < Vue
link ||= {href: "../#{@@item.shepherd}", title: 'Shepherd'}
elsif @@options.traversal == :flagged
prefix = 'flagged/'
- while link and not link.flagged
- link = link.prev
+ while link and link.skippable
+ if link.attach =~ /^\d[A-Z]/
+ prefix = ''
+ break
+ else
+ link = link.prev
+ end
end
unless link
@@ -122,11 +127,11 @@ class Footer < Vue
link = link.next
end
- prefix = 'flagged/' if link and link.attach =~ /^[A-Z]/
+ prefix = 'flagged/'
end
if link
- prefix = '' unless link.attach =~ /^[A-Z]/
+ prefix = '' unless link.attach =~ /^([A-Z]|\d+$)/
_Link.nextlink.navbar_brand text: link.title, rel: 'next',
href: "#{prefix}#{link.href}", class: link.color
elsif @@item.prev or @@item.next
diff --git a/www/board/agenda/views/models/agenda.js.rb b/www/board/agenda/views/models/agenda.js.rb
index c843699..886e629 100644
--- a/www/board/agenda/views/models/agenda.js.rb
+++ b/www/board/agenda/views/models/agenda.js.rb
@@ -1,4 +1,4 @@
-#
+
# This is the client model for an entire Agenda. Class methods refer to
# the agenda as a whole. Instance methods refer to an individual agenda
# item.
@@ -28,25 +28,27 @@ class Agenda
end
# 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)/))
- next unless match
-
- first = last = nil
- @@index.each do |item|
- first = item if item.attach == match[1]
- item._shepherd ||= pres.shepherd if first and !last
- last = item if item.attach == match[2]
- end
-
- if first and last
- first.prev.next = last.next
- last.next.prev = first.prev
- last.next.index = first.index
- first.index = nil
- last.next = pres
- first.prev = pres
+ unless Minutes.started
+ @@index.each do |pres|
+ match = (pres.title == 'President' and pres.text and pres.text.
+ match(/Additionally, please see Attachments (\d) through (\d)/))
+ next unless match
+
+ first = last = nil
+ @@index.each do |item|
+ first = item if item.attach == match[1]
+ item._shepherd ||= pres.shepherd if first and !last
+ last = item if item.attach == match[2]
+ end
+
+ if first and last
+ first.prev.next = last.next
+ last.next.prev = first.prev
+ last.next.index = first.index
+ first.index = nil
+ last.next = pres
+ first.prev = pres
+ end
end
end
@@ -515,14 +517,17 @@ class Agenda
# determine if this report can be skipped during the course of the meeting
def skippable
- return false if Minutes.started and self.missing
+ return true if self.flagged
+ return (@to == 'president') if Minutes.started and self.missing
return false if Minutes.started and @approved and @approved.length < 5
- return !self.flagged
+ return true
end
# banner color for this agenda item
def color
- if @color
+ if self.flagged
+ 'commented'
+ elsif @color
@color
elsif not @title
'blank'
@@ -530,8 +535,6 @@ class Agenda
'missing'
elsif self.missing or self.rejected
'missing'
- elsif self.flagged
- 'commented'
elsif @approved
if @approved.length < 5
'ready'
--
To stop receiving notification emails like this one, please contact
rubys@apache.org.