ish_manager 0.1.8.507 → 0.1.8.508

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: 30d8fffb3963caf574e73ae38e2dcdffebcfd384416542f40ce217ebd37536c1
4
- data.tar.gz: 4502f818961170f170e18c98152b6ea2155a34fe5becc5f7431d9a938d312ab2
3
+ metadata.gz: 17cbb493612672b0f3043e29c85cfe2faa0a4b39a07a2fd66978781e0516a3c5
4
+ data.tar.gz: b828311b72f6280cd95a9b1d510e7c085b45b5cf18703a270840462da6491de4
5
5
  SHA512:
6
- metadata.gz: 748321ccb2752c0a8aa8cfa259808fe1056c279029707c54efe96dd8be36b63d1d64d1e7060dfecf3df52a7d8917161d87341b30220e8219f70635b0f578dcf2
7
- data.tar.gz: aeac29f3bd45387784a06d185d28b3886b58c871f6e4bc69986b34fe48e32abd4a30df424a4c9d14621bf14bf68b583f12b102c4629599c0b21d85fa44244577
6
+ metadata.gz: 4800f83a73db4b42684fdd426cd5c0998d197bee8f5b6ab183a0169ca49495aca062f42a938a5d213c61361e807ed150fbc754adca290e3d6edd4751652ea550
7
+ data.tar.gz: b93193edea8b0cb84f8afeb986fb345c09be7f80d9e100e9679703249d922fc008ecf1320b22b7d3de8656b7bf21327f6d02352172be7cf40ca9cba7e99866c7
@@ -60,14 +60,25 @@ $(function () {
60
60
  return confirm($(this).attr('data-confirm'));
61
61
  });
62
62
 
63
- // if ($(".tinymce").length > 0) {
64
- // tinymce.init({
65
- // mode: "specific_textareas",
66
- // editor_selector: 'tinymce',
67
- // plugins: 'link'
68
- // });
69
- // }
70
- $(".tinymce").summernote()
63
+ /*
64
+ * text editor
65
+ **/
66
+ if ($(".tinymce").length > 0) {
67
+ // tinymce.init({
68
+ // mode: "specific_textareas",
69
+ // editor_selector: 'tinymce',
70
+ // plugins: 'link'
71
+ // });
72
+
73
+ $(".tinymce").summernote()
74
+
75
+ // var quill = new Quill('.tinymce', {
76
+ // theme: 'snow',
77
+ // toolbar: '.toolbar',
78
+ // });
79
+ }
80
+
81
+
71
82
 
72
83
  $(".caret").each(function(idx) {
73
84
  $($(".caret")[idx]).html('')
@@ -77,7 +77,7 @@
77
77
  }
78
78
  }
79
79
 
80
- .second-header {
80
+ .subheader {
81
81
  a {
82
82
  margin: 0 1em;
83
83
  }
@@ -1,9 +1,30 @@
1
1
 
2
2
  class ::IshManager::EmailMessagesController < IshManager::ApplicationController
3
3
 
4
+ ## with object_key, invoking EIJ
5
+ def create
6
+ authorize! :create, Office::EmailMessage
7
+
8
+ object_key = params[:msg][:object_key]
9
+ MsgStub.where({ object_key: object_key }).delete
10
+
11
+ stub = MsgStub.create({ object_key: object_key })
12
+ if !stub.persisted?
13
+ flash_alert "Stub could not be persisted: #{stub.errors.full_messages.join(', ')} ."
14
+ redirect_to request.referrer
15
+ return
16
+ end
17
+
18
+ Rails.env.production? ? EIJ.perform_later( stub.id.to_s ) : EIJ.perform_now( stub.id.to_s )
19
+
20
+ flash_notice "Re-inited proc'ing object_key #{object_key} ."
21
+ redirect_to request.referrer
22
+ end
23
+
4
24
  def index
5
25
  authorize! :email_messages_index, IshManager::Ability
6
- @email_messages = Office::EmailMessage.all.order_by( date: :desc )
26
+ redirect_to controller: :email_conversations, action: :index
27
+ # @email_messages = Office::EmailMessage.all.order_by( date: :desc )
7
28
  end
8
29
 
9
30
  def show
@@ -24,11 +24,6 @@
24
24
  %label cc
25
25
  = f.text_field :cc, class: 'w-100'
26
26
 
27
- -## unused b/c ccs is an array, i'm dealing with strings only here.
28
- -# .field.flex-row
29
- -# %label cc's
30
- -# = f.text_field :ccs
31
-
32
27
  .field.field-subject
33
28
  = f.label :subject
34
29
  = f.text_field :subject, class: 'w-100'
@@ -1,7 +1,7 @@
1
1
 
2
2
  .email-conversations-index
3
3
 
4
- .second-header
4
+ .subheader
5
5
  %i.material-icons mail
6
6
 
7
7
  - if params[:slug]
@@ -22,6 +22,13 @@
22
22
  %label New Tag:
23
23
  = f.text_field :name
24
24
  = f.submit '>'
25
+
26
+ .bordered.inline-block
27
+ = form_tag email_messages_path do
28
+ %label Process Object Key:
29
+ = text_field_tag 'msg[object_key]'
30
+ = submit_tag '>'
31
+
25
32
  .search.Card
26
33
  .inline-block
27
34
  = form_tag email_conversations_path do
@@ -67,8 +67,9 @@
67
67
  - new_ctx[:lead_id] = lead.id
68
68
  - new_ctx[:from_email] = new_from_email
69
69
  - new_ctx[:subject] = msg.subject
70
- - new_ctx[:body] = Ish::EmailTemplate::SIGNATURE + (msg.part_html||msg.part_txt||'')
70
+ - new_ctx[:body] = Ish::EmailTemplate::SIGNATURE + ActionView::Base.full_sanitizer.sanitize( msg.part_html )
71
71
  - new_ctx[:cc] = all_ccs.join(', ')
72
+
72
73
  = render 'ish_manager/email_contexts/form', ctx: new_ctx
73
74
 
74
75
 
@@ -1,6 +1,2 @@
1
1
 
2
- .email-messages-show-iframe
3
-
4
- .body
5
- = raw @email_message.part_html
6
-
2
+ = render 'ish_manager/email_messages/show_iframe', email_message: @email_message
@@ -23,10 +23,15 @@
23
23
  = stylesheet_link_tag "//cdn.jsdelivr.net/npm/select2@4.0.0/dist/css/select2.min.css"
24
24
  = javascript_include_tag "//cdn.jsdelivr.net/npm/select2@4.0.0/dist/js/select2.min.js"
25
25
 
26
- -# %script{ :src => "//cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.3/jquery.tinymce.min.js" }
27
- -# %script{ :src => "//cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.3/tinymce.min.js" }
26
+ -# summernote
28
27
  = stylesheet_link_tag "//cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.css"
29
28
  = javascript_include_tag "//cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.js"
29
+ -# quill core
30
+ -# = stylesheet_link_tag "//cdn.quilljs.com/1.3.6/quill.core.css"
31
+ -# = javascript_include_tag "//cdn.quilljs.com/1.3.6/quill.core.js"
32
+ -# quill
33
+ -# = stylesheet_link_tag "//cdn.quilljs.com/1.3.6/quill.snow.css"
34
+ -# = javascript_include_tag "//cdn.quilljs.com/1.3.6/quill.min.js"
30
35
 
31
36
  - # @TODO: document? test-drive?
32
37
  - if @include_materialize
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.507
4
+ version: 0.1.8.508
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-15 00:00:00.000000000 Z
11
+ date: 2023-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails