wco_email 0.1.1.52 → 0.1.1.54

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28a0e3f46a3cccd5b9607d7aae2cf8d921844838d900b8e47c84a5d721b0d2e3
4
- data.tar.gz: e9243eb7d0d9c2435055ad3daf015e98c14989e45bd9aaf0f62dea339f31732e
3
+ metadata.gz: 0f6ede374892e4ee2d1d74b9493abbc3b723786f53da7e5009db344cb075f481
4
+ data.tar.gz: b5850a2cab796944d3beb0f5b654fd3fd6388868bc655464c90fcc892996d831
5
5
  SHA512:
6
- metadata.gz: 33db1149aaf32bc64860eb202e42319291908d3b74cf53530d392cf061d6af88db55d3ca5dd3df4a6cdf85df13f984ea5e5d1122eac956634adea0e23ad03840
7
- data.tar.gz: b40ea4db0555ec9717990ff0cdc1ffc297e3679cfc723b7cf21878cb1d286d818004c7de384df1c153ae6db1bc65f159dcb970ca4c9a18d0198654ab49f5f2d3
6
+ metadata.gz: ebc21b5cd1660e3132b27cb64ca994971cdd3b06beb5ea1ee5fef0b53e5afe1f40a3fe88c3699c57f4c29d0dba53e523a28eefc4dae707a72e352fa7b3c2a51c
7
+ data.tar.gz: 5147c26369314cf73e8085a2135fdd901e2b3975805d66500ecbadcc6c2ffb36c17f217b8dc43063720adbae17583dfa37294919e0b3f58e815f2459cc94e42a
@@ -5,6 +5,11 @@
5
5
  //= require ./conversations
6
6
  //
7
7
 
8
+ function resizeIframe(obj) {
9
+ obj.style.height = '100px';
10
+ obj.style.height = obj.contentWindow.document.documentElement.scrollHeight + 10 + 'px';
11
+ }
12
+
8
13
  $(function () {
9
14
 
10
15
 
@@ -18,8 +18,8 @@ iframe.email-template-iframe {
18
18
 
19
19
  iframe.message-iframe {
20
20
  width: 100%;
21
- height: 100%;
22
- min-height: 80vh;
21
+ // height: 100%;
22
+ // min-height: 80vh;
23
23
  }
24
24
 
25
25
 
@@ -14,39 +14,6 @@
14
14
  = render '/wco_email/conversations/actions'
15
15
 
16
16
  = render '/wco/paginate', resource: @conversations, param_name: :conv_page
17
- %table.bordered
18
- %tr
19
- %th.select-all.nosort
20
- .a
21
- = check_box_tag :select_all
22
- .n-selected -
23
- %th.leads leads
24
- %th.subject subject, preview
25
- %th.tags Tags
26
- %th.latest-at latest_at
27
- - @conversations.each_with_index do |conv, idx|
28
- %tr
29
- %td.select-all
30
- .gray= idx+1
31
- = check_box_tag 'conversation_ids[]', conv.id.to_s, nil, { class: 'i-sel' }
32
- %td.leads.mini
33
- -# - conv.from_emails.each do |from|
34
- -# = link_to from, wco.lead_path( from )
35
- -# %hr
36
- - conv.leads.each do |lead|
37
- = link_to lead.email, wco.lead_path( lead )
38
- %td.subject
39
- - if conv.unread?
40
- <b>#{link_to conv.subject, conversation_path(conv)}</b>
41
- - else
42
- = link_to conv.subject, conversation_path(conv)
43
- <b>(#{conv.messages.length})</b>
44
- %span.gray= conv.preview
45
- %td.tags.mini
46
- - conv.tags.each do |tag|
47
- .mb-1
48
- .Chip= tag.slug
49
- %td.latest-at
50
- = pp_date conv.latest_at
51
- = pp_time conv.latest_at
17
+ = render '/wco_email/conversations/table', convs: @conversations
18
+
52
19
  = render '/wco/paginate', resource: @conversations, param_name: :conv_page
@@ -27,6 +27,9 @@
27
27
  - @conversation.messages.each do |msg|
28
28
  %li
29
29
  = render '/wco_email/messages/meta', message: msg
30
- %iframe.message-iframe{ src: message_iframe_path(msg) }
30
+ = link_to '[expand]', message_iframe_path(msg, expand_history: true), target: "iframe_#{msg.id}"
31
+ = link_to '[collapse]', message_iframe_path(msg), target: "iframe_#{msg.id}"
32
+ %iframe.message-iframe{ src: message_iframe_path(msg), id: "iframe_#{msg.id}", name: "iframe_#{msg.id}", onload: "resizeIframe(this)" }
31
33
 
32
- = render '/wco_email/contexts/form_reply', lead_id: msg.lead_id, message: msg, ctx: WcoEmail::Context.new({ from_email: msg.to&.downcase, subject: msg.subject, email_template_id: ET.find_by( slug: 'blank').id })
34
+ - msg = @conversation.messages.last
35
+ = render '/wco_email/contexts/form_reply', lead_id: msg.lead_id, message: msg, ctx: WcoEmail::Context.new({ from_email: msg.to&.downcase, subject: msg.subject, email_template_id: ET.find_by( slug: 'blank').id })
@@ -32,7 +32,7 @@
32
32
  = f.select :email_template_id, options_for_select(@email_templates_list, selected: params[:email_template_id] || email_filter.email_template_id ), {}, { class: 'select2' }
33
33
  .field
34
34
  = f.label :email_action_template
35
- = f.select :email_action_template, options_for_select( @email_action_templates_list, selected: email_filter.email_action_template ), {}, class: 'select2'
35
+ = f.select :email_action_template, options_for_select( @email_action_templates_list, selected: email_filter.email_action_template_id ), {}, class: 'select2'
36
36
  .field
37
37
  = f.label :tag
38
38
  = f.select :tag, options_for_select( @tags_list, selected: email_filter.tag_id ), {}, class: 'select2'
@@ -1,32 +1,36 @@
1
1
 
2
- .messages--meta.flex-row
3
- %ul
4
- %li <b>froms:</b> #{message.froms}
5
- %li <b>tos:</b> #{message.tos}
6
- %li <b>ccs:</b> #{message.ccs}
7
- %li <b>bccs:</b> #{message.bccs}
8
- %li <b>logs:</b> #{message.logs}
9
- %ul
10
- %li
11
- <b>date:</b> #{message.date}
12
- %li
13
- <b>id:</b> #{link_to message.id, message_path(message)}
14
- %li
15
- <b>message_id:</b> #{message.message_id}
16
- %li
17
- <b>object_key:</b> #{message.object_key}
18
- %li <b>in_reply_to_id:</b> #{message.in_reply_to_id}
19
- %li
20
- <b>n_images:</b> #{message.photos.length}
21
- %br
22
- - message.photos.each do |photo|
23
- = link_to photo.photo.url(:original), target: :_blank do
24
- %span.bordered.p-0= image_tag( photo.photo.url(:mini) )
25
- = photo.photo.original_filename
26
- %li
27
- <b>n_assets:</b> #{message.assets.length}
28
- - if !message.assets.blank?
29
- %ol
30
- - message.assets.each do |asset|
31
- %li
32
- = link_to asset.filename, asset.object.url(:original), target: :_blank
2
+ .d-inline-block
3
+ .collapse-expand{ id: "meta_#{message.id}" }
4
+ Meta
5
+ .messages--meta.flex-row{ style: 'display: none' }
6
+
7
+ %ul
8
+ %li <b>froms:</b> #{message.froms}
9
+ %li <b>tos:</b> #{message.tos}
10
+ %li <b>ccs:</b> #{message.ccs}
11
+ %li <b>bccs:</b> #{message.bccs}
12
+ %li <b>logs:</b> #{message.logs}
13
+ %ul
14
+ %li
15
+ <b>date:</b> #{message.date}
16
+ %li
17
+ <b>id:</b> #{link_to message.id, message_path(message)}
18
+ %li
19
+ <b>message_id:</b> #{message.message_id}
20
+ %li
21
+ <b>object_key:</b> #{message.object_key}
22
+ %li <b>in_reply_to_id:</b> #{message.in_reply_to_id}
23
+ %li
24
+ <b>n_images:</b> #{message.photos.length}
25
+ %br
26
+ - message.photos.each do |photo|
27
+ = link_to photo.photo.url(:original), target: :_blank do
28
+ %span.bordered.p-0= image_tag( photo.photo.url(:mini) )
29
+ = photo.photo.original_filename
30
+ %li
31
+ <b>n_assets:</b> #{message.assets.length}
32
+ - if !message.assets.blank?
33
+ %ol
34
+ - message.assets.each do |asset|
35
+ %li
36
+ = link_to asset.filename, asset.object.url(:original), target: :_blank
@@ -1,5 +1,14 @@
1
1
 
2
+ - if params[:expand_history] == 'true'
3
+ -# ;
4
+ - else
5
+ :css
6
+ blockquote {
7
+ display: none;
8
+ }
9
+
2
10
 
3
11
  = raw @message.part_html_sanitized
4
- %hr{ style: 'border-top: 1px solid red;' }
5
- %pre= @message.part_txt
12
+
13
+ -# %hr{ style: 'border-top: 1px solid red;' }
14
+ -# %pre= @message.part_txt
@@ -172,7 +172,6 @@ namespace :wco_email do
172
172
  unsub = WcoEmail::Unsubscribe.where({ lead_id: ctx.lead_id, template_id: ctx.email_template_id }).first
173
173
  if unsub
174
174
  puts! 'This user is unsubscribed; the context cannot be sent.' if DEBUG
175
- # Office::AdminMessage.create({ message: "Lead `#{ctx.lead.full_name}` [mailto:#{ctx.lead.email}] has already unsubscribed from template `#{Ish::EmailTemplate.find( ctx.email_template_id ).slug}` ." })
176
175
  email_action_template_ids = WcoEmail::EmailActionTemplate.where({ email_template_id: ctx.email_template_id }).map(&:id)
177
176
  schs = WcoEmail::EmailAction.active.where({
178
177
  lead_id: ctx.lead_id,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_email
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.52
4
+ version: 0.1.1.54
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-05 00:00:00.000000000 Z
11
+ date: 2024-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3