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/22 18:51:22 UTC

[whimsy] branch master updated: fix regression introduced in the conversion to Vue.js

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 14520f4  fix regression introduced in the conversion to Vue.js
14520f4 is described below

commit 14520f40ce2dce934839589761534e14d8ffce1b
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Fri Sep 22 14:50:59 2017 -0400

    fix regression introduced in the conversion to Vue.js
---
 www/secretary/workbench/views/forms/ccla.js.rb  | 2 +-
 www/secretary/workbench/views/forms/grant.js.rb | 2 +-
 www/secretary/workbench/views/forms/icla2.js.rb | 3 ---
 www/secretary/workbench/views/vue-config.js.rb  | 9 ++++++++-
 4 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/www/secretary/workbench/views/forms/ccla.js.rb b/www/secretary/workbench/views/forms/ccla.js.rb
index 8c6c8c4..2f7a0ad 100644
--- a/www/secretary/workbench/views/forms/ccla.js.rb
+++ b/www/secretary/workbench/views/forms/ccla.js.rb
@@ -108,7 +108,7 @@ class CCLA < Vue
       document.querySelector("input[name=#{name}]").validity.valid
     end
 
-    $file.disabled = !valid or @filed or @submitted
+    $refs.file.disabled = !valid or @filed or @submitted
 
     # wire up form
     jQuery('form')[0].addEventListener('submit', self.file)
diff --git a/www/secretary/workbench/views/forms/grant.js.rb b/www/secretary/workbench/views/forms/grant.js.rb
index a8450c6..b1ffed8 100644
--- a/www/secretary/workbench/views/forms/grant.js.rb
+++ b/www/secretary/workbench/views/forms/grant.js.rb
@@ -100,7 +100,7 @@ class Grant < Vue
 
     valid &= document.querySelector("textarea[name=description]").validity.valid
 
-    $file.disabled = !valid or @filed or @submitted
+    $refs.file.disabled = !valid or @filed or @submitted
 
     # wire up form
     jQuery('form')[0].addEventListener('submit', self.file)
diff --git a/www/secretary/workbench/views/forms/icla2.js.rb b/www/secretary/workbench/views/forms/icla2.js.rb
index 2e356da..88e64ad 100644
--- a/www/secretary/workbench/views/forms/icla2.js.rb
+++ b/www/secretary/workbench/views/forms/icla2.js.rb
@@ -149,9 +149,6 @@ class ICLA2 < Vue
       document.querySelector("input[name=#{name}]").validity.valid
     end
 
-    # $file.disabled = !valid or !icla or !@icla.filename or
-    #   @filed or @submitted
-
     # wire up form
     jQuery('form')[0].addEventListener('submit', self.file)
     jQuery('input[name=message]').val(window.parent.location.pathname)
diff --git a/www/secretary/workbench/views/vue-config.js.rb b/www/secretary/workbench/views/vue-config.js.rb
index 9022a15..bdcce94 100644
--- a/www/secretary/workbench/views/vue-config.js.rb
+++ b/www/secretary/workbench/views/vue-config.js.rb
@@ -1 +1,8 @@
-Vue.config.silent = true
+# Filter out "data property already declared as a prop" warnings
+Vue.config.warnHandler = proc do |msg, vm, trace|
+  return if msg =~ /^The data property "\w+" is already declared as a prop\./
+  console.error "[Vue warn]: " + msg + trace if defined? console
+end
+
+# reraise errors to enable easier debugging
+Vue.config.errorHandler = proc {|err, vm, info| raise err}

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