wco_email 0.1.1.63 → 0.1.1.65

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: f805c9c1a7afca2746021a03262841dea1d91082a484a8466fbf97aec6f33a45
4
- data.tar.gz: ee6aa3515782753729fed878741e8e10e8751699d0c40c885ca2b4a3c1d1ebbd
3
+ metadata.gz: 8f1bba276e599e860b51cc4fad99157e27b12559317b1724a343253da2a324d2
4
+ data.tar.gz: 1afae0dec1bada6b63e1d60731346ee59b95bf6f8879a5d2b3b3b1759af68a66
5
5
  SHA512:
6
- metadata.gz: 3c76002ef3aeda957bf51df966885aa2167e267812f974869d912a78031e46103d912030f3d0074d0322b2dd96b9e7b2c7d1b5edd4a3ffaa054bf58bc75eed4e
7
- data.tar.gz: 2f27caae727569baa76656185c9fc68940c11ed5ba42ca29826611ef912b6b848aca4033d37d0646e0553e50b2d3a312d3781743b422ca7185b3152bb322bfed
6
+ metadata.gz: 4e0cc2b4582118dbf63c386213027ce366acdd2f89dc28d95acf3914be075706ec5e8c4e42e5d27fbb5b27766aae93a7bd6655ffc57331174e24e31574c49cdb
7
+ data.tar.gz: 9b77844e9c3aa78078cdf55be1e39e71e8e44b24fca28dae52e258c35f17ab5a083e4e13fad754e4379b2288ef005cbec61ed98457af381ac42e9b2710186dc8
@@ -1,45 +1,6 @@
1
1
  $(function() {
2
2
 
3
3
 
4
- /*
5
- * select-all
6
- * _vp_ 2023-02-28
7
- **/
8
- $("input[type='checkbox'].i-sel").change((ev) => {
9
- // logg(ev, 'changed-112')
10
-
11
- $( $(".n-selected")[0] ).html( $("input[type='checkbox'].i-sel:checked").length )
12
- })
13
- $("th.select-all input[type='checkbox']").change((e) => {
14
- const count = $("input[type='checkbox'].i-sel:checked").length
15
- const new_state = count ? false : true // all will be checked?
16
-
17
- $(".select-all input[type='checkbox']").prop('checked', new_state)
18
-
19
- $( $("input[type='checkbox'].i-sel") ).each( i => {
20
- $( $("input[type='checkbox'].i-sel")[i] ).prop('checked', new_state)
21
- })
22
-
23
- $( $(".n-selected")[0] ).html( $("input[type='checkbox'].i-sel:checked").length )
24
- })
25
-
26
-
27
-
28
- // $("body.email_conversations-show .preview-btn").click(function(e) {
29
- // // logg($(this).data(), 'clicked')
30
- // var msgId = $(this).data().msg.id
31
- // var msgC = $(`.msg-container[data-msg-id='${msgId}']`) // msgContainer
32
- // if ($(msgC).data('expanded')) {
33
- // $(msgC).data('expanded', false)
34
- // msgC.find(".to-expand").css('display', 'none')
35
- // } else {
36
- // $(msgC).data('expanded', true)
37
- // msgC.find(".to-expand").css('display', 'block')
38
- // }
39
- // })
40
-
41
-
42
-
43
4
  $(".archive-btn").click(function(e) {
44
5
  if ( !confirm('Are you sure?') ) { return; }
45
6
 
@@ -107,7 +107,11 @@ class WcoEmail::ConversationsController < WcoEmail::ApplicationController
107
107
  def show
108
108
  @conversation = ::WcoEmail::Conversation.find( params[:id] )
109
109
  authorize! :show, @conversation
110
- @messages = @conversation.messages.order_by( date: :asc )
110
+ @messages = @conversation.messages(
111
+ ).order_by( date: :asc
112
+ ).page( params[:messages_page ] ).per( @current_profile.per_page
113
+ )
114
+
111
115
  @conversation.update_attributes({ status: Conv::STATUS_READ })
112
116
 
113
117
  @conversation.messages.unread.update_all({ read_at: Time.now })
@@ -7,7 +7,7 @@
7
7
  .conversations-show.maxwidth
8
8
  %h5
9
9
  = @conversation.subject
10
- <b>(#{@conversation.messages.length})</b>
10
+ <b>(#{@messages.length})</b>
11
11
  = link_to '[~]', edit_conversation_path(@conversation)
12
12
  %span.gray.mini= @conversation.id
13
13
 
@@ -31,13 +31,15 @@
31
31
 
32
32
 
33
33
  .m-0.p-0
34
- - @conversation.messages.each do |msg|
34
+ = paginate @messages, param_name: :messages_page
35
+ - @messages.each do |msg|
35
36
  .Message.mb-2
36
37
  = render '/wco_email/messages/meta', message: msg
37
38
  = link_to '[expand]', message_iframe_path(msg, expand_history: true), target: "iframe_#{msg.id}"
38
39
  = link_to '[collapse]', message_iframe_path(msg), target: "iframe_#{msg.id}"
39
40
  %span.collapse-expand{ id: "iframe_#{msg.id}" } [<>]
40
41
  %iframe.message-iframe{ src: message_iframe_path(msg), name: "iframe_#{msg.id}", onload: "resizeIframe(this)" }
42
+ = paginate @messages, param_name: :messages_page
41
43
 
42
- - msg = @conversation.messages.last
44
+ - msg = @messages.last
43
45
  = 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 })
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.63
4
+ version: 0.1.1.65
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-03-08 00:00:00.000000000 Z
11
+ date: 2024-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3