ish_manager 0.1.8.372 → 0.1.8.374
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 +4 -4
- data/app/assets/javascripts/ish_manager/application.js +0 -28
- data/app/assets/javascripts/ish_manager/email_conversations.js +29 -0
- data/app/assets/stylesheets/ish_manager/email_conversations.scss +6 -0
- data/app/controllers/ish_manager/email_conversations_controller.rb +7 -1
- data/app/views/ish_manager/email_conversations/index.haml +9 -2
- data/app/views/ish_manager/email_conversations/show.haml +5 -1
- data/config/routes.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39b64d928f290a56cb8566d6e3e41883fbdffa45342900d55cc86d2ac650b01f
|
4
|
+
data.tar.gz: f6c64a2bf55a68bfe3ececa0d03ae3b89761db23b29fcb0ebcf1a5fc445b4eec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b871f0b6e1c35d5dae63efbd7c92f940bfb4cca42e0d0fa132448276db4789594d8644d94ac92f09a4f9d75001c34eac080de100eebf0147a15880df9f29214
|
7
|
+
data.tar.gz: 726aded514ecd4998a7be06d37488afa6688020fe4f28d1b3feb5dfcaa3f31ae7e00f1580225ccbb404123f7e16d909dc422a6148b1e32fca6c0c69a6d3fe5cc
|
@@ -129,34 +129,6 @@ $(function () {
|
|
129
129
|
$( $(".n-selected")[0] ).html( $("input[type='checkbox'].i-sel:checked").length )
|
130
130
|
})
|
131
131
|
|
132
|
-
$(".delete-btn").click(function(e) {
|
133
|
-
const jwt_token = $("#Config").data('jwt-token')
|
134
|
-
const action_path = $(this).data('url')
|
135
|
-
const out = []
|
136
|
-
|
137
|
-
$( $("input[type='checkbox'].i-sel:checked") ).each( idx => {
|
138
|
-
let val = $($("input[type='checkbox'].i-sel:checked")[idx]).val()
|
139
|
-
out.push(val)
|
140
|
-
})
|
141
|
-
|
142
|
-
$.ajax({
|
143
|
-
url: action_path,
|
144
|
-
type: 'DELETE',
|
145
|
-
data: {
|
146
|
-
ids: out,
|
147
|
-
jwt_token: jwt_token,
|
148
|
-
},
|
149
|
-
success: e => {
|
150
|
-
logg((e||{}).responseText, 'deleted Ok')
|
151
|
-
location.reload()
|
152
|
-
},
|
153
|
-
error: e => {
|
154
|
-
logg((e||{}).responseText, 'deleted Err')
|
155
|
-
},
|
156
|
-
})
|
157
|
-
|
158
|
-
})
|
159
|
-
|
160
132
|
$(".select-all input[type='checkbox']").change((e) => {
|
161
133
|
const count = $("input[type='checkbox'].i-sel:checked").length
|
162
134
|
const new_state = count ? false : true // all will be checked?
|
@@ -16,4 +16,33 @@ $(document).ready(() => {
|
|
16
16
|
|
17
17
|
})
|
18
18
|
|
19
|
+
|
20
|
+
$(".delete-btn").click(function(e) {
|
21
|
+
const jwt_token = $("#Config").data('jwt-token')
|
22
|
+
const action_path = $(this).data('url')
|
23
|
+
const out = []
|
24
|
+
|
25
|
+
$( $("input[type='checkbox'].i-sel:checked") ).each( idx => {
|
26
|
+
let val = $($("input[type='checkbox'].i-sel:checked")[idx]).val()
|
27
|
+
out.push(val)
|
28
|
+
})
|
29
|
+
|
30
|
+
$.ajax({
|
31
|
+
url: action_path,
|
32
|
+
type: 'DELETE',
|
33
|
+
data: {
|
34
|
+
ids: out,
|
35
|
+
jwt_token: jwt_token,
|
36
|
+
},
|
37
|
+
success: e => {
|
38
|
+
logg((e||{}).responseText, 'deleted Ok')
|
39
|
+
location.reload()
|
40
|
+
},
|
41
|
+
error: e => {
|
42
|
+
logg((e||{}).responseText, 'deleted Err')
|
43
|
+
},
|
44
|
+
})
|
45
|
+
|
46
|
+
})
|
47
|
+
|
19
48
|
})
|
@@ -7,7 +7,13 @@ class ::IshManager::EmailConversationsController < IshManager::ApplicationContro
|
|
7
7
|
|
8
8
|
def index
|
9
9
|
authorize! :email_conversations_index, IshManager::Ability
|
10
|
-
|
10
|
+
|
11
|
+
if params[:slug]
|
12
|
+
@email_conversations = ::Office::EmailConversation.in_emailtag( params[:slug] )
|
13
|
+
else
|
14
|
+
@email_conversations = ::Office::EmailConversation.in_no_trash
|
15
|
+
end
|
16
|
+
@email_conversations = @email_conversations.order_by( latest_at: :desc )
|
11
17
|
end
|
12
18
|
|
13
19
|
def show
|
@@ -1,9 +1,16 @@
|
|
1
1
|
|
2
2
|
.email-conversations-index
|
3
3
|
|
4
|
-
.header
|
4
|
+
.second-header
|
5
5
|
%i.material-icons mail
|
6
|
-
|
6
|
+
= link_to email_conversations_in_emailtag_path(WpTag::EMAILTAG_INBOX) do
|
7
|
+
Inbox (#{Office::EmailConversation.in_inbox.length})
|
8
|
+
= link_to email_conversations_path do
|
9
|
+
Archived (#{Office::EmailConversation.in_no_trash.length})
|
10
|
+
= link_to email_conversations_in_emailtag_path(WpTag::EMAILTAG_TRASH) do
|
11
|
+
Trash (#{Office::EmailConversation.in_emailtag(WpTag::EMAILTAG_TRASH).length})
|
12
|
+
|
13
|
+
Selected: #{params[:slug] || 'archived' }
|
7
14
|
|
8
15
|
.actions
|
9
16
|
|
@@ -10,6 +10,11 @@
|
|
10
10
|
#{@email_conversation.subject}
|
11
11
|
(#{@email_conversation.email_messages.all.count})
|
12
12
|
|
13
|
+
.tags.max-width
|
14
|
+
Tags:
|
15
|
+
= @email_conversation.wp_term_ids
|
16
|
+
= @email_conversation.tags.map(&:name).join(", ")
|
17
|
+
|
13
18
|
.leads.max-width
|
14
19
|
Leads (#{@email_conversation.leads.length}):
|
15
20
|
%ul
|
@@ -30,7 +35,6 @@
|
|
30
35
|
.gray= msg.id
|
31
36
|
|
32
37
|
.chip.from
|
33
|
-
-# = msg.from
|
34
38
|
= lead.email
|
35
39
|
|
36
40
|
.relative
|
data/config/routes.rb
CHANGED
@@ -63,8 +63,9 @@ IshManager::Engine.routes.draw do
|
|
63
63
|
get 'email_messages/stripped/:id', to: 'email_messages#show_stripped', as: :email_message_stripped
|
64
64
|
resources :email_messages
|
65
65
|
|
66
|
-
get 'email_conversations',
|
67
|
-
get 'email_conversations/:
|
66
|
+
get 'email_conversations', to: 'email_conversations#index'
|
67
|
+
get 'email_conversations/in_emailtag/:slug', to: 'email_conversations#index', as: :email_conversations_in_emailtag
|
68
|
+
get 'email_conversations/show/:id', to: 'email_conversations#show', as: :email_conversation
|
68
69
|
|
69
70
|
get 'email_contexts/for_lead/:lead_id', to: 'email_contexts#index', as: :email_contexts_for_lead
|
70
71
|
get 'email_contexts/iframe_src/:id', to: 'email_contexts#iframe_src', as: :email_context_iframe
|