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 6243d1b rough in posting a new discussion item 6243d1b is described below commit 6243d1bce8e6359a5da2b2be415f949bc6322d42 Author: Sam Ruby <ru...@intertwingly.net> AuthorDate: Sat Apr 7 12:59:16 2018 -0400 rough in posting a new discussion item --- www/board/agenda/views/actions/post.json.rb | 12 ++++++++++++ www/board/agenda/views/buttons/post.js.rb | 10 +++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/www/board/agenda/views/actions/post.json.rb b/www/board/agenda/views/actions/post.json.rb index e88a950..4d53bca 100644 --- a/www/board/agenda/views/actions/post.json.rb +++ b/www/board/agenda/views/actions/post.json.rb @@ -38,6 +38,18 @@ Agenda.update(@agenda, @message) do |agenda| # insert into agenda agenda[/\n() 8\. Discussion Items/, 1] = "#{title}#{@report}\n\n" + elsif @attach == '8?' + # new discussion item + + # add item letter to title + discussion = agenda[/ 8\. Discussion Items.*\n 9\./m] + items = discussion.scan(/^ ([A-Z]+)\./).flatten + item = items.empty? ? 'A' : items.sort.last.succ + title = " #{order}. #{@title}\n\n" + + # insert into agenda + agenda[/\n() 9\. Action Items/, 1] = "#{title}#{@report}\n\n" + elsif @attach.start_with? '+' pmc_reports = parsed.select {|section| section[:attach] =~ /^[A-Z]/} attach = pmc_reports.last[:attach].succ diff --git a/www/board/agenda/views/buttons/post.js.rb b/www/board/agenda/views/buttons/post.js.rb index 5013c3f..cca30d4 100644 --- a/www/board/agenda/views/buttons/post.js.rb +++ b/www/board/agenda/views/buttons/post.js.rb @@ -144,7 +144,7 @@ class Post < Vue _h4 @header #input field: title - if @header == 'Add Resolution' or @header == 'Post Discussion Item' + if @header == 'Add Resolution' or @header == 'Add Discussion Item' _input.post_report_title! label: 'title', disabled: @disabled, placeholder: 'title', value: @title, onFocus: self.default_title end @@ -261,9 +261,9 @@ class Post < Vue @message = "Edit #{@@item.title} Resolution" when 'post item' - @header = 'Post Discussion Item' + @header = 'Add Discussion Item' @label = 'discussion item' - @message = "Post Discussion Item" + @message = "Add Discussion Item" when 'post items' @header = 'Post Discussion Items' @@ -405,10 +405,10 @@ class Post < Vue def submit(event) @edited = false - if @header == 'Add Resolution' + if @header == 'Add Resolution' or @header == 'Add Discussion Item' data = { agenda: Agenda.file, - attach: '7?', + attach: (@header == 'Add Resolution') ? '7?' : '8?', title: @title, report: @report } -- To stop receiving notification emails like this one, please contact ru...@apache.org.