wco_email 0.1.1.7 → 0.1.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aefcf5045641d214959f3cb2895410b7037f6df8ea914c604a8ff79216864251
4
- data.tar.gz: 03ae9281b8bae48810e84fb994ee28ec451b4700fba179e50b93bc4b12aeca03
3
+ metadata.gz: e57ecd1bf1d0b46720dcccaa03f2d64dd5f2cdad1f388deb3c8911dd0aa6d356
4
+ data.tar.gz: 13b0c8d1e091583953a55c4df15649ad013941d2edf55490daa291e1b2a6b705
5
5
  SHA512:
6
- metadata.gz: 76000396421a16c11b77ddb5d0d9c234c9a5635b3caee0881e39b1978531e73750a41d671121955f09964d161af9de3eef70f6172a25f1eb870714e1def6ad1f
7
- data.tar.gz: 47db6a4513a6043e99bbc672c5425b66161ec4d308b5f309d300e262d538bacda0d5a946e28cdea11a53e2acb1b0adc0fdb6fde32ead49dc1e78c4b78f795812
6
+ metadata.gz: 95cea1283f602b863a91c45fa6a8d0fe0ac1ed4a719a4b4acbe6466b7553efdff646e4f990b2653d6cd692e9c7181dceab79004440cd147e1ec8f5e7e4b751fb
7
+ data.tar.gz: e549dec48e17c1aa283ed2163c6bf52937bca3a5bf14b5d6a4c1b261fab888a45bff52f97cd5590e73940b6eda76ddff10c1278e5d4676cc27bf423c6b67bf87
@@ -0,0 +1,6 @@
1
+ //
2
+ //= link wco/application.css
3
+ //= link_directory ../stylesheets/wco_email .css
4
+ //
5
+
6
+ console.log('Loaded wco_email_rb/wco_email_manifest.js')
@@ -1,11 +1,16 @@
1
1
  //
2
- //= require rails-ujs
2
+ // trash: require rails-ujs
3
3
  //
4
4
  //= require ./contexts
5
5
  //= require ./conversations
6
6
  //
7
- // require wco/application
8
- //
9
7
 
8
+ $(function () {
9
+
10
+ if ($(".tinymce").length > 0) {
11
+ $(".tinymce").summernote()
12
+ }
13
+
14
+ logg('loaded wco_email/application.js')
15
+ }) // END
10
16
 
11
- // logg('loaded wco_email/application.js')
@@ -16,4 +16,5 @@ $(document).ready(() => {
16
16
  })
17
17
  }
18
18
 
19
- })
19
+ logg('loaded wco_email/contexts.js')
20
+ }) // END
@@ -7,7 +7,8 @@
7
7
  .email-templates--form {
8
8
  form {
9
9
  > .actions {
10
- text-align: right;
10
+ display: flex;
11
+ justify-content: space-between;
11
12
  }
12
13
 
13
14
  .tab-labels {
@@ -31,6 +32,9 @@
31
32
 
32
33
  }
33
34
  .tabs {
35
+ > div {
36
+ border: 2px dotted gray;
37
+ }
34
38
  .tab-raw {
35
39
  display: none;
36
40
  }
@@ -5,7 +5,7 @@ class WcoEmail::ApiController < ActionController::Base
5
5
  skip_before_action :verify_authenticity_token
6
6
 
7
7
  def create_email_message
8
- # puts! params, 'params'
8
+ puts! params, 'params'
9
9
 
10
10
  stub = WcoEmail::MessageStub.create!({
11
11
  bucket: params[:bucket],
@@ -23,7 +23,7 @@ class WcoEmail::ApiController < ActionController::Base
23
23
 
24
24
  def check_credentials
25
25
  if params[:secret] != AWS_SES_LAMBDA_SECRET
26
- render status: 400, json: { status: 400 }
26
+ render status: 400, json: { status: 400, message: "#check_credentials says unauthorized." }
27
27
  return
28
28
  end
29
29
  end
@@ -9,8 +9,8 @@ class WcoEmail::ApplicationController < Wco::ApplicationController
9
9
  ##
10
10
  private
11
11
 
12
- # def set_lists
13
- # @tags = Wco::Tag.all
14
- # end
12
+ ## Nothing should be here.
13
+ def set_lists
14
+ end
15
15
 
16
16
  end
@@ -78,7 +78,7 @@ class WcoEmail::ContextsController < WcoEmail::ApplicationController
78
78
  authorize! :new, WcoEmail::Context
79
79
  @tmpl = @email_template = WcoEmail::EmailTemplate.where( slug: params[:template_slug] ).first ||
80
80
  WcoEmail::EmailTemplate.where( id: params[:template_slug] ).first ||
81
- WcoEmail::EmailTemplate.new
81
+ WcoEmail::EmailTemplate.where({ slug: 'blank' }).last
82
82
  attrs = {}
83
83
  if @tmpl
84
84
  attrs = @tmpl.attributes.slice( :subject, :body, :from_email )
@@ -146,10 +146,9 @@ class WcoEmail::ContextsController < WcoEmail::ApplicationController
146
146
  private
147
147
 
148
148
  def set_lists
149
- super
150
149
  @email_layouts_list = WcoEmail::EmailTemplate::LAYOUTS
151
150
  @email_templates_list = [ [nil, nil] ] + WcoEmail::EmailTemplate.all.map { |tmpl| [ tmpl.slug, tmpl.id ] }
152
- @leads_list = Wco::Lead.list
151
+ @leads_list = Wco::Lead.list
153
152
  end
154
153
 
155
154
  end
@@ -2,8 +2,6 @@
2
2
 
3
3
  class WcoEmail::EmailTemplatesController < WcoEmail::ApplicationController
4
4
 
5
- # before_action :set_lists, only: %i| new |
6
-
7
5
  def create
8
6
  authorize! :create, WcoEmail::EmailTemplate
9
7
  @template = WcoEmail::EmailTemplate.create params[:template].permit!
@@ -8,11 +8,8 @@ require 'sidekiq'
8
8
  ## 2023-03-07 _vp_ Continue
9
9
  ## 2023-12-28 _vp_ Continue
10
10
  ##
11
- ## class_name EIJ
12
- ##
13
11
  class WcoEmail::MessageIntakeJob
14
12
  include Sidekiq::Job
15
- # include Sidekiq::Util
16
13
 
17
14
  sidekiq_options queue: 'wco_email_rb'
18
15
 
@@ -9,7 +9,7 @@
9
9
 
10
10
  = javascript_include_tag "//code.jquery.com/jquery-3.3.1.min.js"
11
11
 
12
- %script{ :src => "//cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js" }
12
+ = javascript_include_tag "//cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"
13
13
  = stylesheet_link_tag "//cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css"
14
14
 
15
15
  = stylesheet_link_tag "//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css", :media => 'all'
@@ -1,30 +1,23 @@
1
1
 
2
- -# = ctx.inspect
2
+ -# - blank_tmpl_id = WcoEmail::EmailTemplate.where({ slug: 'blank' }).first&.id
3
3
 
4
4
  .email-contexts--form
5
- -# - url = ctx.new_record? ? contexts_path : context_path(ctx)
6
5
  = form_for ctx, as: :context do |f|
7
6
 
8
7
  .flex-row
9
- = f.label "Template"
10
- = f.select :email_template_id, options_for_select(@email_templates_list, selected: params[:email_template_id] || ctx.email_template_id ), {}, { class: 'select2' }
8
+ = f.label :email_template_id
9
+ = f.select :email_template_id, options_for_select(@email_templates_list, selected: params[:email_template_id] || ctx.email_template_id || blank_tmpl_id ), {}, { class: 'select2', required: true }
11
10
  - if ctx.email_template_id
12
11
  = link_to '[view]', email_template_path( ctx.email_template_id ), target: :_blank, class: [ 'action-view' ]
13
12
  = link_to '[~]', edit_email_template_path( ctx.email_template_id ), target: :_blank, class: [ 'action-view' ]
14
13
  <b>Layout:</b>
15
14
  = ctx.email_template.layout
16
15
 
17
- -# .field
18
- -# %label Layout
19
- -# = f.select :layout, options_for_select( @layouts_list, selected: ctx.layout_id )
20
-
21
16
  .flex-row
22
17
  %label From
23
18
  = f.select :from_email, options_for_select(WcoEmail::EmailTemplate.from_emails_list, selected: ctx.from_email), {}, { class: 'select2' }
24
-
25
19
  %label To lead
26
20
  = f.select :lead_id, options_for_select( @leads_list, selected: ctx.lead_id ), {}, { class: 'select2' }
27
-
28
21
  %label cc
29
22
  = f.text_field :cc, class: 'w-100'
30
23
 
@@ -36,6 +29,7 @@
36
29
  = f.label :reply_to_message
37
30
  = f.select :reply_to_message_id, options_for_select([[ ctx.reply_to_message, ctx.reply_to_message_id ]], selected: ctx.reply_to_message_id), {}, class: 'w-100'
38
31
 
32
+
39
33
  .tab-labels.flex-row
40
34
  %a.label-raw{ href: "javascript: void(0)", data: { ref: '.tab-raw' } } Raw
41
35
  %a.label-preview.active{ href: "javascript: void(0)", data: { ref: '.tab-preview' } } Preview
@@ -2,8 +2,8 @@
2
2
  Rails.application.config.assets.version = '1.0'
3
3
 
4
4
  Rails.application.config.assets.precompile += %w(
5
- wco/application.js
6
- wco/application.css
5
+ wco_models/application.js
6
+ wco_models/application.css
7
7
 
8
8
  wco_email/application.js
9
9
  wco_email/application.css
@@ -0,0 +1 @@
1
+ WHqoOCnqWBlZw7b6AEldEVt6/kukDrxD2tep9qvR7l7+GMGiBSSIXpcUu8jR5pO2raAtgkyCFgTe5gcy/AHWXSeHWZXV+4Af7Yuu1SZd0TohrbDMdTwoTa3dqVTxi0rJ2XEcHX6balRTA2xDdYluOGKE+ZRjw9ISXdBcmPVyass6A3Alq/Drpn2qH+xGoEORXl6aup3dPEQXNeZke94qmOy4b2Bu4xbK+D6ef1KYfiFyOD6ZCC6LhOp3hYD5id64e6ztIxxjYDhfodoez5ShpdG94QQxwf3IYvRw360MpCYoADhfNqWjDle+U7vSirVjS2cvI6kM5J5a8Rqiyl/hlGZAhlRrR2kCPO8Y7uUVltioGjAful0G8TuCmBqVvkyCDmCQOIy8PR5d4lFmCC836Wq5+xCrhx94HRBO--R2UXrOlTjc009hgy--wRmj1n2ydKGptUJ3j+E+0g==
data/lib/wco_email.rb CHANGED
@@ -6,6 +6,7 @@ require 'cancancan'
6
6
  require 'haml'
7
7
  require 'httparty'
8
8
 
9
+ require 'wco_models'
9
10
  require "wco_email/engine"
10
11
 
11
12
  ## From: https://github.com/rails/rails/issues/30701
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.7
4
+ version: 0.1.1.9
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-01-11 00:00:00.000000000 Z
11
+ date: 2024-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3
@@ -285,7 +285,7 @@ extra_rdoc_files: []
285
285
  files:
286
286
  - README.txt
287
287
  - Rakefile
288
- - app/assets/config/wco_email_manifest.js
288
+ - app/assets/config-trash/wco_email_manifest.js
289
289
  - app/assets/javascript/vendor-trash/jquery-ui.min.js
290
290
  - app/assets/javascript/vendor-trash/jquery.fileupload.js
291
291
  - app/assets/javascript/vendor-trash/jquery.iframe-transport.js
@@ -450,6 +450,7 @@ files:
450
450
  - app/views/wco_email/unsubscribes/_table.haml
451
451
  - config/initializers/assets.rb
452
452
  - config/routes.rb
453
+ - config/trash/credentials.yml.enc
453
454
  - lib/systemd/system/wco_email_sidekiq.service
454
455
  - lib/tasks/bjjcollective/sitemap.rb
455
456
  - lib/tasks/db_tasks.rake
@@ -1,7 +0,0 @@
1
- //
2
- //= link wco_models/application.css
3
- //= link_directory ../stylesheets/wco_email .css
4
- //
5
-
6
-
7
- // console.log('Loaded wco_email_rb/wco_email_manifest.js')