Skip to content

Commit e82bcbe

Browse files
committed
Version 4.0.0
1 parent d364c72 commit e82bcbe

File tree

123 files changed

+8608
-20274
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+8608
-20274
lines changed

frontend/css/main.min.css

Lines changed: 0 additions & 5 deletions
This file was deleted.

frontend/css/main.min.css.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

frontend/css/tailwind/main.css

Lines changed: 413 additions & 0 deletions
Large diffs are not rendered by default.

frontend/js/article.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ $(document).ready(function () {
44
$(".sp-comment-text a:not([href^='#'])").attr('target', '_blank').attr('rel', 'noopener');
55

66
// Previews for attachments.
7-
App.attachments.loadPreviews('.sp-content');
7+
App.attachments.loadPreviews($('.sp-content'));
88

99
// Previews for inline images.
1010
var $article = $('.sp-article');
@@ -14,7 +14,7 @@ $(document).ready(function () {
1414
$(this).attr('data-src', $(this).attr('src'));
1515
}
1616
});
17-
$article.lightGallery({selector: '.sp-lightbox', counter: false});
17+
$article.gallery({selector: '.sp-lightbox'});
1818

1919
// Change ordering
2020
$('.sp-comment-ordering').on('change', function () {
@@ -260,10 +260,10 @@ $(document).ready(function () {
260260
$('input[type=password]').hideShowPassword();
261261

262262
// Date picker
263-
$(Swal.getContent()).find('.datepicker').datepicker();
263+
$(Swal.getHtmlContainer()).find('.datepicker').datepicker();
264264
},
265265
preConfirm: function () {
266-
var data = $(Swal.getContent()).find("input, textarea, select").serializeArray();
266+
var data = $(Swal.getHtmlContainer()).find("input, textarea, select").serializeArray();
267267
data.push({name: '_token', value: $('meta[name="csrf_token"]').prop('content') });
268268

269269
$.post(laroute.route('selfservice.article.feedback.store', {'id': feedbackLog.id}), data);

frontend/js/newticket.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
$(document).ready(function () {
2-
// Date picker
32
$('.datepicker').datepicker();
4-
5-
// Enable hide / show password toggle
63
$('input[type=password]').hideShowPassword();
7-
8-
// Redactor
9-
$('textarea[name="text"]').redactor();
4+
$('textarea[name="text"]').editor();
105

116
// Regex for email
127
var re = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;

frontend/js/ticket.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ $(document).ready(function() {
5454
$(this).attr('target', '_blank').attr('rel', 'noopener');
5555
});
5656

57-
// Redactor
58-
var instance = $('textarea[name=text]').redactor();
57+
// Editor
58+
$('textarea[name=text]').editor();
5959

6060
// Regex for email
6161
var re = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
@@ -178,7 +178,7 @@ $(document).ready(function() {
178178

179179
// Reset the form
180180
form.find('textarea[name="text"]').val('').prop('disabled', false);
181-
instance.source.setCode('');
181+
tinymce.activeEditor.setContent('');
182182
$('.sp-attached-files').find('li:not(:first)').remove();
183183
$('.sp-attachment-details').find('input[type=hidden][name^="attachment["]:not(:first)').remove();
184184

@@ -216,7 +216,7 @@ $(document).ready(function() {
216216
this.runNow = function () {
217217
instance.stop();
218218

219-
void 0;
219+
console.log('[' + new Date().toUTCString() + '][Poll replies] Sending AJAX');
220220

221221
return xhr = $.ajax({
222222
url: laroute.route('ticket.frontend.message.poll'),
@@ -295,24 +295,24 @@ $(document).ready(function() {
295295
};
296296

297297
this.startAfter = function (milliseconds) {
298-
void 0;
298+
console.log('[' + new Date().toUTCString() + '][Poll replies] Starting after ' + milliseconds + ' milliseconds');
299299
clearTimeout(startAfterTimer);
300300
startAfterTimer = setTimeout(instance.start, milliseconds);
301301
};
302302

303303
this.stop = function () {
304-
void 0;
304+
console.log('[' + new Date().toUTCString() + '][Poll replies] Cancelling current running requests.');
305305
clearTimeout(loopTimer);
306306
xhr && xhr.abort();
307307
};
308308

309309
// When window is not active, stop polling.
310310
$(document).on('visibilitychange', function () {
311311
if (document.hidden) {
312-
void 0;
312+
console.log('[' + new Date().toUTCString() + '][Poll replies] Tab is not visible.');
313313
instance.stop();
314314
} else {
315-
void 0;
315+
console.log('[' + new Date().toUTCString() + '][Poll replies] Tab is visible.');
316316
instance.startAfter(2000);
317317
}
318318
});

frontend/js/ticketgrid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ $(document).ready(function () {
1010
// Change filter row to include submit ticket and filter results buttons.
1111
$("div.dataTables_filter")
1212
.removeClass('dataTables_filter')
13-
.addClass('sp-flex sp-flex-grow')
13+
.addClass('sp-flex sp-grow')
1414
.append(
1515
$('<a>', {
1616
class: 'sp-filter-results sp-button sp-rounded-l-none sp-hidden md:sp-inline-block',

general/css/codemirror.css

Lines changed: 50 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,60 @@
11
.codemirror-box {
2-
border: 1px solid var(--color-background-tertiary);
3-
border-radius: 0.25rem;
2+
@apply sp-border sp-border-tertiary sp-rounded;
43
}
54

6-
.redactor-box .CodeMirror {
7-
border-top: 1px solid var(--color-background-tertiary);
8-
border-radius: 0 0 0.25rem 0.25rem;
5+
.codemirror-box .toolbar-wrapper + .CodeMirror {
6+
border-radius: unset !important;
97
}
108

11-
.CodeMirror {
12-
border-radius: 0.25rem;
9+
/*
10+
* toolbar
11+
*/
12+
13+
.codemirror-box .toolbar-wrapper {
14+
@apply sp-sticky sp-top-0;
15+
z-index: 1000;
16+
}
17+
18+
.codemirror-box .toolbar {
19+
@apply sp-px-1 sp-py-0 sp-bg-secondary sp-border-0 sp-border-b sp-border-solid sp-border-tertiary;
20+
@apply sp-leading-normal !important;
21+
22+
line-height: 1.5 !important;
23+
padding: 0 .25rem;
24+
}
25+
26+
.codemirror-box .toolbar a {
27+
@apply sp-m-0 sp-shadow-none sp-text-primary;
28+
background: 0;
29+
display: inline-block;
30+
box-sizing: border-box;
31+
text-align: center;
32+
cursor: pointer;
33+
outline: 0;
34+
border: none;
35+
vertical-align: middle;
36+
text-decoration: none;
37+
position: relative;
38+
border-radius: 2px;
39+
}
40+
41+
.codemirror-box .toolbar a.button-icon {
42+
@apply sp-p-3/2 sp-text-sm;
43+
}
44+
45+
.codemirror-box .toolbar a:hover,
46+
.codemirror-box .toolbar a.button-active,
47+
.codemirror-box .toolbar a.active {
48+
background: 0;
1349
}
1450

15-
.codemirror-box .redactor-toolbar-wrapper + .CodeMirror {
16-
border-radius: 0 0 0.25rem 0.25rem;
51+
.codemirror-box .toolbar a:hover,
52+
.codemirror-box .toolbar a:hover .fa,
53+
.codemirror-box .toolbar a.button-active,
54+
.codemirror-box .toolbar a.button-active .fa,
55+
.codemirror-box .toolbar a.active,
56+
.codemirror-box .toolbar a.active .fa {
57+
@apply sp-text-secondary;
1758
}
1859

1960
/*

0 commit comments

Comments
 (0)