On Sun, Nov 15, 2015 at 10:58 PM, Craig L Russell
<[email protected]> wrote:
> I’ve followed the README in projects/whimsy and done what was asked.
>
> When I run ruby examples/board.rb I get the board from a couple of years ago, 
> with Roy and Doug instead of Rich and David.

Yup.  I don't know the history or purpose of this LDAP 'service'
(that's what it is called in LDAP).  Nor do I know if the secretary
can change it.  It looks like the commands to do so would be:

% modify_appgroups.pl board --add=rbowen,ke4qqq
% modify_appgroups.pl board --rm=rfielding,cutting

> What else should I run to continue?

You didn't mention whether or not you were able to run it as a web
server.  If you have Apache httpd installed, you can run it as a CGI
script (takes a bit more to set up, but once done has the advantage
that every time you run you will pick up the latest changes), or as a
standalone server (to pick up a change, you will need to stop and
restart the server).

The next command you will want to try is:

ruby www/secretary/icla-lint.cgi

To get this to work you will need to install an additional gem
(ruby2js) and add a line to your ~/.whimsy file (for documents/iclas).

Once you get that working, here is a patch to add a button immediately
before the note (feel free to move the button to a different place).
Pushing the button won't do much (just issue an alert), but we can add
that later.

Index: icla-lint.cgi
===================================================================
--- icla-lint.cgi    (revision 968959)
+++ icla-lint.cgi    (working copy)
@@ -120,7 +120,11 @@
             _td name
           end

-          _td note
+          _td do
+            _button 'email', data_id: id
+            _span note
+          end
+
           _td comment2
         end
       end
@@ -142,5 +146,13 @@
         end
       end
     end
+
+    buttons = document.querySelectorAll('button')
+    for i in 0...buttons.length
+      buttons[i].addEventListener('click') do |event|
+        id = event.target.getAttribute('data-id')
+        alert(id)
+      end
+    end
   end
 end

- Sam Ruby

Reply via email to