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: use native platform equivalents
Date Thu, 07 Jun 2018 11:38: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 82a1ea5  use native platform equivalents
82a1ea5 is described below

commit 82a1ea56cfb8fd3d32d3e00f52c8106d5fc6ab34
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Thu Jun 7 07:37:18 2018 -0400

    use native platform equivalents
---
 www/board/agenda/views/keyboard.js.rb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/www/board/agenda/views/keyboard.js.rb b/www/board/agenda/views/keyboard.js.rb
index e0d2889..6243435 100644
--- a/www/board/agenda/views/keyboard.js.rb
+++ b/www/board/agenda/views/keyboard.js.rb
@@ -25,11 +25,11 @@ class Keyboard
           return false
         end
       elsif event.keyCode == 13 # 'enter'
-        link = ~".default"[0]
+        link = document.querySelector(".default")
         Main.navigate link.getAttribute('href') if link
         return false
       elsif event.keyCode == 'C'.ord
-        link = ~"#comments"[0]
+        link = document.getElementById("comments")
         if link
           jQuery('html, body').animate({scrollTop: link.offsetTop}, :slow);
         else
@@ -44,7 +44,7 @@ class Keyboard
         Main.navigate 'missing'
         return false
       elsif event.keyCode == 'N'.ord
-        ~"#nav".click
+        document.getElementById("nav").click()
         return false
       elsif event.keyCode == 'A'.ord
         Main.navigate '.'
@@ -54,7 +54,7 @@ class Keyboard
           User.role = :secretary
           Main.refresh()
         else
-          link = ~"#shepherd"[0]
+          link = document.getElementById("shepherd")
           Main.navigate link.getAttribute('href') if link
         end
         return false

-- 
To stop receiving notification emails like this one, please contact
rubys@apache.org.

Mime
View raw message