Skip to content

Commit c8babf1

Browse files
committed
updates
1 parent e688c4e commit c8babf1

File tree

18 files changed

+236
-79
lines changed

18 files changed

+236
-79
lines changed

assets/css/main.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,13 @@ label.labelBold {
333333
box-shadow: none;
334334
}
335335

336+
.tabulator .tabulator-cell.semibold {
337+
font-weight: 400;
338+
}
339+
.tabulator .tabulator-cell.slimpadding {
340+
padding: 4px 4px;
341+
}
342+
336343

337344
/* Sidebar */
338345
.sidebar {

assets/js/contacts.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ function addContact() {
7575
jsCreateElement('input', {
7676
attrs: {
7777
type: 'checkbox',
78-
checked: 'checked',
7978
id: 'requiresDoubleOptInNew'
8079
}
8180
}),

assets/js/flows.js

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
let
22
globalFlowID,
3+
globalFlowName,
34
globalFlowStepsData = [];
45

56

@@ -166,8 +167,9 @@ function removeFlowDo(flowID) {
166167

167168

168169
// -- Open flow
169-
function openFlow(flowID) {
170+
function openFlow(flowID, flowName) {
170171
globalFlowID = flowID;
172+
globalFlowName = flowName || dqs("#flowName").innerText;
171173

172174
fetch("/api/flow_steps/all?flowID=" + flowID, {
173175
method: "GET"
@@ -390,6 +392,11 @@ async function buildFlowHTML(data) {
390392
const html = jsCreateElement('div', {
391393
children: [
392394
jsCreateElement('div', {
395+
attrs: {
396+
id: 'flowName',
397+
class: 'headingH3 mb20'
398+
},
399+
children: [globalFlowName]
393400
}),
394401
jsCreateElement('div', {
395402
children: flowSteps
@@ -724,11 +731,11 @@ function openStepStats(stepID) {
724731
ajaxURL:"/api/flow_steps/stats/contacts?flowStepID=" + stepID,
725732
progressiveLoad:"scroll",
726733
columns:[
727-
{title:"Status", field:"status", width:200},
728-
{title:"Contact", field:"user_email", width:200},
729-
{title:"Sent At", field:"sent_at", width:200},
730-
{title:"Opened times", field:"open_count", width:200},
731-
{title:"Scheduled for", field:"scheduled_for", width:200},
734+
{title:"Status", field:"status", headerFilter:true, width:200},
735+
{title:"Contact", field:"user_email", headerFilter:true, width:200},
736+
{title:"Sent At", field:"sent_at", headerFilter:true, width:200},
737+
{title:"Opened times", field:"open_count", headerFilter:true, width:200},
738+
{title:"Scheduled for", field:"scheduled_for", headerFilter:true, width:200},
732739
],
733740
});
734741

assets/js/index.js

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,22 @@ function rawModalLoader(content) {
212212
const modal = jsRender(
213213
jsCreateElement("div", {
214214
attrs: {
215-
class: "modalpop"
215+
class: "modalpop confirmclose"
216216
},
217217
children: [
218218
jsCreateElement("div", {
219219
attrs: {
220220
class: "modal-content"
221-
}
221+
},
222+
children: [
223+
jsCreateElement("div", {
224+
attrs: {
225+
style: "position: absolute;right: 20px;top: 7px;cursor: pointer;font-size: 22px;",
226+
onclick: "dqs('.modalpop').classList.remove('show')"
227+
},
228+
children: ["×"]
229+
}),
230+
]
222231
})
223232
]
224233
})
@@ -230,11 +239,27 @@ function rawModalLoader(content) {
230239
modal.classList.add("show");
231240
}, 10);
232241

242+
// Handle click outside modal to close
233243
window.onclick = function(event) {
234244
if (event.target == modal && !modal.classList.contains("confirmclose")) {
235245
modal.classList.remove('show');
236246
}
237247
}
248+
249+
// Handle ESC key to close modal - only add listener if not already present
250+
if (!window.escKeyListenerAdded) {
251+
const handleEscKey = function(event) {
252+
if (event.key === 'Escape') {
253+
const openModal = dqs('.modalpop.show');
254+
if (openModal) {
255+
openModal.classList.remove('show');
256+
}
257+
}
258+
};
259+
260+
document.addEventListener('keydown', handleEscKey);
261+
window.escKeyListenerAdded = true;
262+
}
238263
}
239264

240265

assets/js/mails.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,13 @@ function loadMail(id) {
363363
selected: data.category == 'event' ? 'selected' : false
364364
},
365365
children: ['Event']
366+
}),
367+
jsCreateElement('option', {
368+
attrs: {
369+
value: 'flow',
370+
selected: data.category == 'archived' ? 'selected' : false
371+
},
372+
children: ['Archived']
366373
})
367374
]
368375
})
@@ -796,7 +803,7 @@ async function duplicateMail(mailID) {
796803
.then(manageErrors)
797804
.then(response => response.json())
798805
.then(data => {
799-
window.location.reload();
806+
window.location.href = "/mails?viewMail=" + data.id;
800807
});
801808

802809
console.log(mailData);

assets/js/settings.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,8 @@ function saveSettingsMain() {
272272
pageName: dqs("#pageName").value,
273273
hostname: dqs("#hostname").value,
274274
logoUrl: dqs("#logoUrl").value,
275-
optinEmailID: dqs("#optinEmailID").value
275+
optinEmailID: dqs("#optinEmailID").value,
276+
linkSuccess: dqs("#linkSuccess").value
276277
})
277278
})
278279
.then(manageErrors)

0 commit comments

Comments
 (0)