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 2018/04/08 00:55:27 UTC
[whimsy] branch master updated: edit discussion item support
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 edaded2 edit discussion item support
edaded2 is described below
commit edaded29b286bec48757773a94b7c0fbcb4abf63
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Sat Apr 7 20:55:15 2018 -0400
edit discussion item support
---
www/board/agenda/views/actions/post.json.rb | 2 +-
www/board/agenda/views/buttons/post.js.rb | 5 +++++
www/board/agenda/views/models/agenda.js.rb | 8 ++++----
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/www/board/agenda/views/actions/post.json.rb b/www/board/agenda/views/actions/post.json.rb
index 6f58c47..9a2ee84 100644
--- a/www/board/agenda/views/actions/post.json.rb
+++ b/www/board/agenda/views/actions/post.json.rb
@@ -106,7 +106,7 @@ Agenda.update(@agenda, @message) do |agenda|
if @attach =~ /^4\w/
pattern = /(\n\n #{@attach[-1]}\. #{item['title']} \[.*?\]).*?\n\n( [B-Z]\.| 5\.)/m
@report.gsub! /^(.)/, ' \1'
- elsif @attach =~ /^7\w/
+ elsif @attach =~ /^[78]\w/
title = item['fulltitle'] || item['title']
pattern = /(^\s+#{@attach[-1]}\.\s+#{title})\n.*?\n( {1,6}\w\.)/m
@report.gsub! /^(.)/, ' \1'
diff --git a/www/board/agenda/views/buttons/post.js.rb b/www/board/agenda/views/buttons/post.js.rb
index 58c6e66..96aaba1 100644
--- a/www/board/agenda/views/buttons/post.js.rb
+++ b/www/board/agenda/views/buttons/post.js.rb
@@ -250,6 +250,11 @@ class Post < Vue
@label = 'report'
@message = "Post #{@@item.title} Report"
+ when 'edit item'
+ @header = 'Edit Discussion Item'
+ @label = 'discussion item'
+ @message = "Edit #{@@item.title} Discussion Item"
+
when 'edit report'
@header = 'Edit Report'
@label = 'report'
diff --git a/www/board/agenda/views/models/agenda.js.rb b/www/board/agenda/views/models/agenda.js.rb
index d27546b..a022fcf 100644
--- a/www/board/agenda/views/models/agenda.js.rb
+++ b/www/board/agenda/views/models/agenda.js.rb
@@ -441,12 +441,12 @@ class Agenda
if @attach =~ /^(\d|7?[A-Z]+|4[A-Z]|8[.A-Z])$/
if User.role == :secretary or not Minutes.complete
if @attach.start_with? '8'
- if @text.strip().empty?
+ if @attach =~ /^8[A-Z]/
+ list << {form: Post, text: 'edit item'}
+ elsif @text.strip().empty?
list << {form: Post, text: 'post item'}
- elsif @attach =='8.'
- list << {form: Post, text: 'edit items'}
else
- list << {form: Post, text: 'edit item'}
+ list << {form: Post, text: 'edit items'}
end
elsif self.missing
list << {form: Post, text: 'post report'}
--
To stop receiving notification emails like this one, please contact
rubys@apache.org.