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 80c3006 Fix Edit tab; this uses @selected which is URI-encoded
80c3006 is described below
commit 80c3006451b494243557186064483a8b64f967e1
Author: Sebb <[email protected]>
AuthorDate: Mon Oct 22 03:03:12 2018 +0100
Fix Edit tab; this uses @selected which is URI-encoded
---
www/secretary/workbench/views/parts.js.rb | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/www/secretary/workbench/views/parts.js.rb
b/www/secretary/workbench/views/parts.js.rb
index 7433d12..8807b79 100644
--- a/www/secretary/workbench/views/parts.js.rb
+++ b/www/secretary/workbench/views/parts.js.rb
@@ -345,10 +345,12 @@ class Parts < Vue
@busy = false
end
+ # N.B. @selected is an encoded URI; @menu is not encoded
+
# burst a PDF into individual pages
def burst(event)
data = {
- selected: @menu || @selected,
+ selected: @menu || decodeURI(@selected),
message: window.parent.location.pathname
}
@@ -367,7 +369,7 @@ class Parts < Vue
# delete an attachment
def delete_attachment(event)
data = {
- selected: @menu || @selected,
+ selected: @menu || decodeURI(@selected),
message: window.parent.location.pathname
}
@@ -396,7 +398,7 @@ class Parts < Vue
message = window.parent.location.pathname
data = {
- selected: @menu || @selected,
+ selected: @menu || decodeURI(@selected),
message: message,
direction: event.currentTarget.textContent
}
@@ -420,7 +422,7 @@ class Parts < Vue
message = window.parent.location.pathname
data = {
- selected: @menu || @selected,
+ selected: @menu || decodeURI(@selected),
message: message
}