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/27 14:55:23 UTC
[whimsy] branch master updated (a58f855 -> 6188e26)
This is an automated email from the ASF dual-hosted git repository.
rubys pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git.
from a58f855 add a dash
new 7839b7f disable posting new agenda if already posted
new 6188e26 post action items refresh issues
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
www/board/agenda/routes.rb | 5 ++++-
www/board/agenda/views/buttons/post-actions.js.rb | 4 ++--
www/board/agenda/views/new.html.rb | 2 +-
www/board/agenda/views/pages/action-items.js.rb | 12 ++++--------
www/board/agenda/views/pages/select-actions.rb | 13 +++++++++----
5 files changed, 20 insertions(+), 16 deletions(-)
--
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].
[whimsy] 02/02: post action items refresh issues
Posted by ru...@apache.org.
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
commit 6188e2659236d41642878c72e05df914ae899bbc
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Wed Sep 27 10:54:11 2017 -0400
post action items refresh issues
---
www/board/agenda/views/buttons/post-actions.js.rb | 4 ++--
www/board/agenda/views/pages/action-items.js.rb | 12 ++++--------
www/board/agenda/views/pages/select-actions.rb | 13 +++++++++----
3 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/www/board/agenda/views/buttons/post-actions.js.rb b/www/board/agenda/views/buttons/post-actions.js.rb
index 375337f..acf72dd 100644
--- a/www/board/agenda/views/buttons/post-actions.js.rb
+++ b/www/board/agenda/views/buttons/post-actions.js.rb
@@ -8,14 +8,14 @@ class PostActions < Vue
def render
_button.btn.btn_primary 'post actions', onClick: self.click,
- disabled: @disabled || SelectActions.list.empty?
+ disabled: @disabled || SelectActions.data.list.emtpy?
end
def click(event)
data = {
agenda: Agenda.file,
message: 'Post Action Items',
- actions: SelectActions.list
+ actions: SelectActions.data.list
}
@disabled = true
diff --git a/www/board/agenda/views/pages/action-items.js.rb b/www/board/agenda/views/pages/action-items.js.rb
index a14d96c..d3fe82a 100644
--- a/www/board/agenda/views/pages/action-items.js.rb
+++ b/www/board/agenda/views/pages/action-items.js.rb
@@ -186,24 +186,20 @@ class ActionItems < Vue
def updateStatus(event)
parent = event.target.parentNode
- # construct action from data attributes
- action = {}
+ # update state from data attributes
for i in 0...parent.attributes.length
attr = parent.attributes[i]
- action[attr.name[5..-1]] = attr.value if attr.name.start_with? 'data-'
+ $data[attr.name[5..-1]] = attr.value if attr.name.start_with? 'data-'
end
# unindent action
- action.status.gsub!(/\n {14}/, "\n")
+ @status.gsub!(/\n {14}/, "\n")
# set baseline to current value
- action.baseline = action.status
+ @baseline = @status
# show dialog
jQuery('#updateStatusForm').modal(:show)
-
- # update state
- self.setState(action)
end
# when save button is pushed, post update and dismiss modal when complete
diff --git a/www/board/agenda/views/pages/select-actions.rb b/www/board/agenda/views/pages/select-actions.rb
index 432fc3a..19078e4 100644
--- a/www/board/agenda/views/pages/select-actions.rb
+++ b/www/board/agenda/views/pages/select-actions.rb
@@ -9,10 +9,15 @@ class SelectActions < Vue
end
def initialize
- SelectActions.list = []
+ @list = []
@names = []
end
+ def created()
+ console.log 'created'
+ SelectActions.data = $data
+ end
+
def render
_h3 'Post Action Items'
@@ -21,7 +26,7 @@ class SelectActions < Vue
'Click on the "post actions" button when done.'
_pre.report do
- SelectActions.list.each do |action|
+ @list.each do |action|
_CandidateAction action: action, names: @names
end
end
@@ -30,7 +35,7 @@ class SelectActions < Vue
def mounted()
retrieve 'potential-actions', :json do |response|
if response
- SelectActions.list = response.actions
+ @list = response.actions
@names = response.names
end
end
@@ -40,7 +45,7 @@ end
class CandidateAction < Vue
def render
_input type: 'checkbox', checked: !@@action.complete,
- onChange:-> {@@action.complete = !@@action.complete; Vue.forceUpdate()}
+ onChange:-> {@@action.complete = !@@action.complete}
_span " "
_span @@action.owner
_span ": "
--
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <co...@whimsical.apache.org>.
[whimsy] 01/02: disable posting new agenda if already posted
Posted by ru...@apache.org.
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
commit 7839b7f6423105a5688c6c48848fe1bc801855cd
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Wed Sep 27 10:52:36 2017 -0400
disable posting new agenda if already posted
---
www/board/agenda/routes.rb | 5 ++++-
www/board/agenda/views/new.html.rb | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/www/board/agenda/routes.rb b/www/board/agenda/routes.rb
index eb974b4..19d1de3 100755
--- a/www/board/agenda/routes.rb
+++ b/www/board/agenda/routes.rb
@@ -347,10 +347,13 @@ get '/new' do
# Get list of unpublished and unapproved minutes
draft = YAML.load_file(Dir["#{AGENDA_WORK}/board_minutes*.yml"].sort.last)
- @minutes = Dir["#{ASF::SVN['private/foundation/board']}/board_minutes_*.txt"].
+ @minutes = dir("board_minutes_*.txt").
map {|file| Date.parse(file[/\d[_\d]+/].gsub('_', '-'))}.
select {|date| draft[date.strftime('%B %d, %Y')] != 'approved'}
+ @disabled = dir("board_agenda_*.txt").
+ include? @meeting.strftime("board_agenda_%Y_%m_%d.txt")
+
template = File.read('data/agenda.erb')
@agenda = Erubis::Eruby.new(template).result(binding)
diff --git a/www/board/agenda/views/new.html.rb b/www/board/agenda/views/new.html.rb
index f9ac956..816b1ef 100644
--- a/www/board/agenda/views/new.html.rb
+++ b/www/board/agenda/views/new.html.rb
@@ -12,7 +12,7 @@ _html do
_form method: 'post', action: @meeting.strftime("%Y-%m-%d/") do
_div.text_center do
- _button.btn.btn_primary 'Post'
+ _button.btn.btn_primary 'Post', disabled: @disabled
end
_textarea.form_control @agenda, name: 'agenda',
--
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <co...@whimsical.apache.org>.