You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2019/11/28 16:23:11 UTC
[whimsy] branch master updated: Allow all PDFs to be parsed
This is an automated email from the ASF dual-hosted git repository.
sebb 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 484bdc2 Allow all PDFs to be parsed
484bdc2 is described below
commit 484bdc25f8942559cf9b554075843db300a579e2
Author: Sebb <se...@apache.org>
AuthorDate: Thu Nov 28 16:22:49 2019 +0000
Allow all PDFs to be parsed
---
www/secretary/workbench/views/parts.js.rb | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/www/secretary/workbench/views/parts.js.rb b/www/secretary/workbench/views/parts.js.rb
index 6f05196..c40521c 100644
--- a/www/secretary/workbench/views/parts.js.rb
+++ b/www/secretary/workbench/views/parts.js.rb
@@ -82,6 +82,8 @@ class Parts < Vue
_li.divider
_li "\u2716 delete", onMousedown: self.delete_attachment
_li "\u2709 pdf-ize", onMousedown: self.pdfize
+ _li.divider
+ _li "parse pdf", onMousedown: self.pdfparse
end
if @selected and not @menu and @selected !~ /\.(asc|sig)$/
@@ -203,10 +205,12 @@ class Parts < Vue
_li.divider
_li "\u21B7 right", onMousedown: self.rotate_attachment
_li "\u21c5 flip", onMousedown: self.rotate_attachment
- _li "\u21B6 left", onMousedown: self.rotate_attachment
+ _li "\u21B6 left", onMousedown: self.rotate_attachment
_li.divider
_li "\u2716 delete", onMousedown: self.delete_attachment
_li "\u2709 pdf-ize", onMousedown: self.pdfize
+ _li.divider
+ _li "parse pdf", onMousedown: self.pdfparse
end
elsif @form == :mail
@@ -440,6 +444,14 @@ class Parts < Vue
}
end
+ # parse pdf and display extracted data
+ def pdfparse(event)
+ message = window.parent.location.pathname
+ attachment = @menu || decodeURI(@selected)
+ url = message.sub('/workbench/','/icla-parse/') + attachment
+ window.parent.frames.content.location.href = url
+ end
+
########################################################################
# Update email #
########################################################################