whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: more Server => Pending
Date Mon, 13 Nov 2017 19:03:01 GMT
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 5995bb6  more Server => Pending
5995bb6 is described below

commit 5995bb69d9fcd31820291b07db90ceda80e476ad
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Mon Nov 13 14:02:39 2017 -0500

    more Server => Pending
---
 www/board/agenda/views/buttons/add-comment.js.rb | 7 +++----
 www/board/agenda/views/buttons/approve.js.rb     | 4 ++--
 www/board/agenda/views/buttons/attend.js.rb      | 8 ++++----
 www/board/agenda/views/buttons/email.js.rb       | 6 +++---
 www/board/agenda/views/keyboard.js.rb            | 2 +-
 www/board/agenda/views/layout/footer.js.rb       | 4 ++--
 www/board/agenda/views/models/pending.js.rb      | 5 +++++
 www/board/agenda/views/pages/backchannel.js.rb   | 2 +-
 www/board/agenda/views/pages/queue.js.rb         | 2 +-
 www/board/agenda/views/pages/shepherd.js.rb      | 4 ++--
 10 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/www/board/agenda/views/buttons/add-comment.js.rb b/www/board/agenda/views/buttons/add-comment.js.rb
index ee5cb96..dd8cf6f 100644
--- a/www/board/agenda/views/buttons/add-comment.js.rb
+++ b/www/board/agenda/views/buttons/add-comment.js.rb
@@ -81,12 +81,11 @@ class AddComment < Vue
 
   # when save button is pushed, post comment and dismiss modal when complete
   def save(event)
-    Server.initials = document.getElementById("comment-initials").value
-
     data = {
       agenda: Agenda.file,
       attach: @@item.attach,
-      initials: Server.initials,
+      initials: document.getElementById("comment-initials").value || 
+        Pending.initials,
       comment: @comment
     }
 
@@ -104,7 +103,7 @@ class AddComment < Vue
 
     data = {
       agenda: Agenda.file,
-      initials: Server.initials,
+      initials: Pending.initials,
       attach: @@item.attach,
       request: (event.target.checked ? 'flag' : 'unflag')
     }
diff --git a/www/board/agenda/views/buttons/approve.js.rb b/www/board/agenda/views/buttons/approve.js.rb
index 4b7318b..d6cabbf 100644
--- a/www/board/agenda/views/buttons/approve.js.rb
+++ b/www/board/agenda/views/buttons/approve.js.rb
@@ -18,7 +18,7 @@ class Approve < Vue
       'unapprove'
     elsif Pending.unapproved.include? @@item.attach
       'approve'
-    elsif @@item.approved and @@item.approved.include? Server.initials
+    elsif @@item.approved and @@item.approved.include? Pending.initials
       'unapprove'
     else
       'approve'
@@ -29,7 +29,7 @@ class Approve < Vue
   def click(event)
     data = {
       agenda: Agenda.file,
-      initials: Server.initials,
+      initials: Pending.initials,
       attach: @@item.attach,
       request: request
     }
diff --git a/www/board/agenda/views/buttons/attend.js.rb b/www/board/agenda/views/buttons/attend.js.rb
index c7b10b4..bf6c2a3 100644
--- a/www/board/agenda/views/buttons/attend.js.rb
+++ b/www/board/agenda/views/buttons/attend.js.rb
@@ -13,14 +13,14 @@ class Attend < Vue
 
   # match person by either userid or name
   def created()
-    person = @@item.people[Server.userid]
+    person = @@item.people[Pending.userid]
     if person
       @attending = person.attending
     else
       @attending = false
       for id in @@item.people
         person = @@item.people[id]
-        @attending = person.attending if person.name == Server.username
+        @attending = person.attending if person.name == Pending.username
       end
     end
   end
@@ -29,8 +29,8 @@ class Attend < Vue
     data = {
       agenda: Agenda.file,
       action: (@attending ? 'regrets' : 'attend'),
-      name: Server.username,
-      userid: Server.userid
+      name: Pending.username,
+      userid: Pending.userid
     }
 
     @disabled = true
diff --git a/www/board/agenda/views/buttons/email.js.rb b/www/board/agenda/views/buttons/email.js.rb
index c1764cc..1d3a58e 100644
--- a/www/board/agenda/views/buttons/email.js.rb
+++ b/www/board/agenda/views/buttons/email.js.rb
@@ -12,8 +12,8 @@ class Email < Vue
   # the report, otherwise render the text as a simple link.
   def mailto_class()
     if 
-      Server.firstname and @@item.shepherd and
-      Server.firstname.start_with? @@item.shepherd.downcase()
+      Pending.firstname and @@item.shepherd and
+      Pending.firstname.start_with? @@item.shepherd.downcase()
     then
       return 'btn-primary'
     else
@@ -40,7 +40,7 @@ class Email < Vue
 
         Thanks,
 
-        #{Server.username}
+        #{Pending.username}
 
         (on behalf of the ASF Board)
       }
diff --git a/www/board/agenda/views/keyboard.js.rb b/www/board/agenda/views/keyboard.js.rb
index ecdff85..f0d3892 100644
--- a/www/board/agenda/views/keyboard.js.rb
+++ b/www/board/agenda/views/keyboard.js.rb
@@ -60,7 +60,7 @@ class Keyboard
         return false
       elsif event.keyCode == 'X'.ord
         if Main.item.attach and Minutes.started and not Minutes.complete
-          Chat.changeTopic user: Server.userid, link: Main.item.href,
+          Chat.changeTopic user: Pending.userid, link: Main.item.href,
             text: "current topic: #{Main.item.title}"
           return false
         end
diff --git a/www/board/agenda/views/layout/footer.js.rb b/www/board/agenda/views/layout/footer.js.rb
index 1c76e17..0f1d68d 100644
--- a/www/board/agenda/views/layout/footer.js.rb
+++ b/www/board/agenda/views/layout/footer.js.rb
@@ -20,7 +20,7 @@ class Footer < Vue
 
       if @@options.traversal == :queue
         prefix = 'queue/'
-        while link and not link.ready_for_review(Server.initials)
+        while link and not link.ready_for_review(Pending.initials)
           link = link.prev
         end
         link ||= {href: '../queue', title: 'Queue'}
@@ -92,7 +92,7 @@ class Footer < Vue
       link = @@item.next
 
       if @@options.traversal == :queue
-        while link and not link.ready_for_review(Server.initials)
+        while link and not link.ready_for_review(Pending.initials)
           link = link.next
         end
         link ||= {href: 'queue', title: 'Queue'}
diff --git a/www/board/agenda/views/models/pending.js.rb b/www/board/agenda/views/models/pending.js.rb
index e933cd2..aaa61c2 100644
--- a/www/board/agenda/views/models/pending.js.rb
+++ b/www/board/agenda/views/models/pending.js.rb
@@ -16,6 +16,7 @@ class Pending
             Server.userid = json.userid if json.userid
             Server.initials = json.initials if json.initials
             Server.firstname = json.firstname if json.firstname
+            Server.username = json.firstname if json.username
           end
         end
       end
@@ -74,6 +75,10 @@ class Pending
     Server.pending.firstname || Server.firstname
   end
 
+  def self.username
+    Server.pending.username || Server.username
+  end
+
   def self.status
     Server.pending.status || []
   end
diff --git a/www/board/agenda/views/pages/backchannel.js.rb b/www/board/agenda/views/pages/backchannel.js.rb
index 805c3f4..f4a3fe6 100644
--- a/www/board/agenda/views/pages/backchannel.js.rb
+++ b/www/board/agenda/views/pages/backchannel.js.rb
@@ -56,7 +56,7 @@ class Backchannel < Vue
 
   # highlight mentions of my id
   def mention(text)
-    return text.gsub(/<.*?>|\b(#{Server.userid})\b/) do |match|
+    return text.gsub(/<.*?>|\b(#{Pending.userid})\b/) do |match|
       match[0] == '<' ? match : "<span class=mention>#{match}</span>"
     end
   end
diff --git a/www/board/agenda/views/pages/queue.js.rb b/www/board/agenda/views/pages/queue.js.rb
index fac438c..8984d1b 100644
--- a/www/board/agenda/views/pages/queue.js.rb
+++ b/www/board/agenda/views/pages/queue.js.rb
@@ -126,7 +126,7 @@ class Queue < Vue
         action = true
       end
 
-      if not action and item.ready_for_review(Server.initials)
+      if not action and item.ready_for_review(Pending.initials)
         result.ready << item 
       end
     end
diff --git a/www/board/agenda/views/pages/shepherd.js.rb b/www/board/agenda/views/pages/shepherd.js.rb
index 5cd5a26..00c11ee 100644
--- a/www/board/agenda/views/pages/shepherd.js.rb
+++ b/www/board/agenda/views/pages/shepherd.js.rb
@@ -31,7 +31,7 @@ class Shepherd < Vue
         # flag action
         if item.missing or not item.comments.empty?
           if item.attach =~ /^[A-Z]+$/
-            mine = (shepherd == Server.firstname ? 'btn-primary' : 'btn-link')
+            mine = (shepherd == Pending.firstname ? 'btn-primary' : 'btn-link')
 
             _div.shepherd do
               _button.btn (item.flagged ? 'unflag' : 'flag'), class: mine,
@@ -91,7 +91,7 @@ class Shepherd < Vue
   def click(event)
     data = {
       agenda: Agenda.file,
-      initials: Server.initials,
+      initials: Pending.initials,
       attach: event.target.getAttribute('data-attach'),
       request: event.target.textContent
     }

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message