whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [39/50] Commit 63c7453: add stats link
Date Fri, 22 Jan 2016 02:40:57 GMT
Commit 63c7453b66b810f82ac4c9e92d79b0ee954d6cd0:
    add stats link


Branch: refs/heads/master
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@apache.org>

------------------------------------------------------------
views/agenda.js.rb                                           | + -
views/header.js.rb                                           | +++++ -
views/utils.js.rb                                            | + -
------------------------------------------------------------
10 changes: 7 additions, 3 deletions.
------------------------------------------------------------


diff --git a/views/agenda.js.rb b/views/agenda.js.rb
index 66e7646..84a2dd8 100644
--- a/views/agenda.js.rb
+++ b/views/agenda.js.rb
@@ -33,7 +33,7 @@ def initialize(entry)
   end
 
   attr_reader :attach, :title, :owner, :shepherd, :index
-  attr_reader :approved, :roster, :prior_reports, :missing
+  attr_reader :approved, :roster, :prior_reports, :stats, :missing
 
   def href
     @title.gsub(/[^a-zA-Z0-9]+/, '-')
diff --git a/views/header.js.rb b/views/header.js.rb
index 4249915..b080c66 100644
--- a/views/header.js.rb
+++ b/views/header.js.rb
@@ -38,7 +38,7 @@ def render
                 _dd @@item.approved.join(', ')
               end
 
-              if @@item.roster or @@item.prior_reports
+              if @@item.roster or @@item.prior_reports or @@item.stats
                 _dt 'Links'
 
                 if @@item.roster
@@ -48,6 +48,10 @@ def render
                 if @@item.prior_reports
                   _dd { _a 'Prior Reports', href: @@item.prior_reports }
                 end
+
+                if @@item.stats
+                  _dd { _a 'Statistics', href: @@item.stats }
+                end
               end
             end
           end
diff --git a/views/utils.js.rb b/views/utils.js.rb
index 9634f78..981d7c4 100644
--- a/views/utils.js.rb
+++ b/views/utils.js.rb
@@ -9,7 +9,7 @@ def htmlEscape(string)
 # "AJAX" style post request to the server, with a callback
 def post(target, data, &block)
   xhr = XMLHttpRequest.new()
-  xhr.open('POST', target.link, true)
+  xhr.open('POST', target, true)
   xhr.setRequestHeader('Content-Type', 'application/json;charset=utf-8')
   xhr.responseType = 'text'
 

Mime
View raw message