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 2017/09/08 17:33:21 UTC
[whimsy] branch master updated: more consolidation
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 2b30f93 more consolidation
2b30f93 is described below
commit 2b30f93b206a68daf1cd6fa796719e24614b0725
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Fri Sep 8 13:33:07 2017 -0400
more consolidation
---
www/roster/views/app.js.rb | 3 +-
www/roster/views/pmc/main.js.rb | 2 +-
www/roster/views/ppmc/main.js.rb | 3 +-
www/roster/views/ppmc/roster.js.rb | 70 ----------------------
.../{pmc/roster.js.rb => projectSearch.js.rb} | 10 ++--
5 files changed, 9 insertions(+), 79 deletions(-)
diff --git a/www/roster/views/app.js.rb b/www/roster/views/app.js.rb
index dd9a79f..49c972e 100644
--- a/www/roster/views/app.js.rb
+++ b/www/roster/views/app.js.rb
@@ -7,7 +7,6 @@ require_relative 'mixins/mod'
require_relative 'pmc/main'
require_relative 'pmc/pmc'
require_relative 'pmc/committers'
-require_relative 'pmc/roster'
require_relative 'pmc/add'
require_relative 'pmc/mod'
@@ -27,12 +26,12 @@ require_relative 'ppmc/main'
require_relative 'ppmc/mentors'
require_relative 'ppmc/members'
require_relative 'ppmc/committers'
-require_relative 'ppmc/roster'
require_relative 'ppmc/add'
require_relative 'ppmc/mod'
require_relative 'ppmc/graduate'
require_relative 'committerSearch'
+require_relative 'projectSearch'
require_relative 'confirm'
require_relative 'group'
diff --git a/www/roster/views/pmc/main.js.rb b/www/roster/views/pmc/main.js.rb
index f52f559..5f1ecf7 100644
--- a/www/roster/views/pmc/main.js.rb
+++ b/www/roster/views/pmc/main.js.rb
@@ -88,7 +88,7 @@ class PMC < Vue
# main content
if @search
- _PMCRoster auth: auth, committee: @committee, search: @search
+ _ProjectSearch auth: auth, project: @committee, search: @search
else
_PMCMembers auth: auth, committee: @committee
_PMCCommitters auth: auth, committee: @committee
diff --git a/www/roster/views/ppmc/main.js.rb b/www/roster/views/ppmc/main.js.rb
index 0423f42..2786a4f 100644
--- a/www/roster/views/ppmc/main.js.rb
+++ b/www/roster/views/ppmc/main.js.rb
@@ -78,7 +78,8 @@ class PPMC < Vue
# main content
if @search
- _PPMCRoster auth: @@auth, ppmc: @ppmc, search: @search
+ _ProjectSearch project: @ppmc, search: @search,
+ auth: (@@auth.ipmc or @@auth.ppmc)
else
_PPMCMentors auth: @@auth, ppmc: @ppmc
_PPMCMembers auth: @@auth, ppmc: @ppmc
diff --git a/www/roster/views/ppmc/roster.js.rb b/www/roster/views/ppmc/roster.js.rb
deleted file mode 100644
index 67c2c67..0000000
--- a/www/roster/views/ppmc/roster.js.rb
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# Searchable PPMC roster
-#
-
-class PPMCRoster < Vue
- def render
- matches = []
- found = false
-
- search = @@search.downcase().strip().split(/\s+/)
-
- for id in @@ppmc.roster do
- person = @@ppmc.roster[id]
-
- match = search.all? {|term|
- id.include? term or person.name.downcase().include? term or
- person.role.downcase().include? term
- }
-
- next unless match or person.selected
- found = true if match
-
- person.id = id
- matches << person
- end
-
- matches = matches.sort_by {|person| person.name}
-
- _table.table.table_hover do
- _thead do
- _tr do
- _th if @@auth.ipmc or @@auth.ppmc
- _th 'id'
- _th 'public name'
- _th 'role'
- end
- end
-
- _tbody do
- matches.each do |person|
- _tr key: "pmc_#{person.id}" do
- if @@auth.ipmc or @@auth.ppmc
- _td do
- _input type: 'checkbox', checked: person.selected || false,
- onChange: -> {self.toggleSelect(person)}
- end
- end
-
- if person.member
- _td { _b { _a person.id, href: "committer/#{person.id}" } }
- _td { _b person.name }
- else
- _td { _a person.id, href: "committer/#{person.id}" }
- _td person.name
- end
-
- _td person.role
- end
- end
- end
- end
-
- _div.alert.alert_warning 'No matches' unless found
- end
-
- def toggleSelect(person)
- person.selected = !person.selected
- @@ppmc.refresh()
- end
-end
diff --git a/www/roster/views/pmc/roster.js.rb b/www/roster/views/projectSearch.js.rb
similarity index 90%
rename from www/roster/views/pmc/roster.js.rb
rename to www/roster/views/projectSearch.js.rb
index 0976a93..afba5a0 100644
--- a/www/roster/views/pmc/roster.js.rb
+++ b/www/roster/views/projectSearch.js.rb
@@ -1,16 +1,16 @@
#
-# Searchable PMC roster
+# Searchable Project roster
#
-class PMCRoster < Vue
+class ProjectSearch < Vue
def render
matches = []
found = false
search = @@search.downcase().strip().split(/\s+/)
- for id in @@committee.roster do
- person = @@committee.roster[id]
+ for id in @@project.roster do
+ person = @@project.roster[id]
match = search.all? {|term|
id.include? term or person.name.downcase().include? term or
@@ -65,6 +65,6 @@ class PMCRoster < Vue
def toggleSelect(person)
person.selected = !person.selected
- @@committee.refresh()
+ @@project.refresh()
end
end
--
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].