Moved the Agents into their own repo. Kept the agent.pl just for reference
This commit is contained in:
parent
22381be29a
commit
8680a02b13
18132 changed files with 0 additions and 2569420 deletions
|
|
@ -1,11 +0,0 @@
|
|||
.attachment_add {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.attachment_inputs > .custom-file {
|
||||
margin-right: 0.4rem;
|
||||
}
|
||||
|
||||
.attachment_info {
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('#add_file_attachment').addClass('btn-secondary').prepend('<i class="fas fa-plus-circle mr-1"></i>');
|
||||
// $('#submit').addClass('mt-2');
|
||||
});
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
.ticketOptionLinks {
|
||||
border-bottom: none;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.ticketRow a {
|
||||
color: inherit;
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('[href="?m=tickets&p=submitticket"]').addClass('btn btn-primary btn-sm').prepend('<i class="fas fa-comment mr-1"></i>');
|
||||
|
||||
$('.main .ticket_closed').addClass('text-muted');
|
||||
$('.main .ticket_closed td:nth-child(2)').html('<span class="badge badge-danger"><i class="fas fa-times-circle mr-1"></i>'+$('.main .ticket_closed td:nth-child(2)').html()+'</span>');
|
||||
|
||||
// check if current user is admin for correct response color
|
||||
$.ajax({
|
||||
cache: false,
|
||||
async: true,
|
||||
type: 'GET',
|
||||
url: 'themes/AdminLTE/dist/php/settings.php?m=global&p=check&v=isadmin',
|
||||
success: function(isadmin)
|
||||
{
|
||||
if(isadmin==1)
|
||||
{
|
||||
$('.main .ticket_admin_response td:nth-child(2)').html('<span class="badge badge-secondary"><i class="fas fa-comment-dots mr-1"></i>'+$('.main .ticket_admin_response td:nth-child(2)').html()+'</span>');
|
||||
$('.main .ticket_customer_response td:nth-child(2)').html('<span class="badge badge-warning"><i class="fas fa-exclamation-triangle mr-1"></i>'+$('.main .ticket_customer_response td:nth-child(2)').html()+'</span>');
|
||||
}else
|
||||
{
|
||||
$('.main .ticket_admin_response td:nth-child(2)').html('<span class="badge badge-warning"><i class="fas fa-exclamation-triangle mr-1"></i>'+$('.main .ticket_admin_response td:nth-child(2)').html()+'</span>');
|
||||
$('.main .ticket_customer_response td:nth-child(2)').html('<span class="badge badge-secondary"><i class="fas fa-comment-dots mr-1"></i>'+$('.main .ticket_customer_response td:nth-child(2)').html()+'</span>');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('.main .ticketRow a').prepend('<i class="fas fa-angle-double-right mr-1 text-sm"></i>');
|
||||
});
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
input.star {
|
||||
display: none;
|
||||
}
|
||||
|
||||
label.star {
|
||||
float: right;
|
||||
transition: all .2s;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
input.star:checked ~ label.star:before {
|
||||
content: '\2605';
|
||||
color: #FD4;
|
||||
transition: all .25s;
|
||||
}
|
||||
|
||||
input.star-1:checked ~ label.star:before {
|
||||
color: #F62;
|
||||
}
|
||||
|
||||
label.star:hover {
|
||||
transform: rotate(-15deg) scale(1.3);
|
||||
}
|
||||
|
||||
label.star:before {
|
||||
content: '\2605';
|
||||
}
|
||||
|
||||
|
||||
.attachment_add {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.attachment_inputs > .custom-file {
|
||||
margin-right: 0.4rem;
|
||||
}
|
||||
|
||||
.attachment_info {
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
.direct-chat {
|
||||
max-height: calc(100% - 1rem);
|
||||
overflow: scroll;
|
||||
}
|
||||
.direct-chat-messages
|
||||
{
|
||||
max-height: 600px;
|
||||
height: auto !important;
|
||||
}
|
||||
.direct-chat-footer
|
||||
{
|
||||
font-size: 0.8rem;
|
||||
opacity: 0.8;
|
||||
}
|
||||
.direct-chat-msg.right .direct-chat-footer
|
||||
{
|
||||
padding-right: 55px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
.direct-chat-msg:not(.right) .direct-chat-footer
|
||||
{
|
||||
padding-left: 55px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
.footer_row:not(.attachmentContainer) .left,
|
||||
.footer_row:not(.attachmentContainer) .right
|
||||
{
|
||||
display: inline-block;
|
||||
}
|
||||
.direct-chat-footer .footer_row:not(.attachmentContainer) .right
|
||||
{
|
||||
float: right;
|
||||
}
|
||||
|
|
@ -1,191 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
//prepare main row for side by side layout
|
||||
$('section.content > .container-fluid > .row > .col-12').addClass('col-md-6');
|
||||
|
||||
//replace css table with real table
|
||||
$('.divTableCell').each(function()
|
||||
{
|
||||
$(this).replaceWith('<td>'+$(this).html()+'</td>');
|
||||
});
|
||||
$('.divTableRow').each(function()
|
||||
{
|
||||
$(this).replaceWith('<tr>'+$(this).html()+'</tr>');
|
||||
});
|
||||
$('.divTableBody').each(function()
|
||||
{
|
||||
$(this).replaceWith('<tbody>'+$(this).html()+'</tbody>');
|
||||
});
|
||||
$('.divTable').each(function()
|
||||
{
|
||||
$(this).replaceWith('<table>'+$(this).html()+'</table>');
|
||||
});
|
||||
|
||||
//buttons
|
||||
$('#add_file_attachment').addClass('btn-secondary');
|
||||
$('[name="ticket_close"]').addClass('btn-danger');
|
||||
|
||||
if($('.ticket_closed').length>0)
|
||||
{
|
||||
$('.ticket_closed').wrap('<div class="callout callout-danger mt-2"><p></p></div>');
|
||||
|
||||
var newReplyBox = '\
|
||||
<div class="card collapsed-card">\
|
||||
<div class="card-header" data-card-widget="collapse" role="button">\
|
||||
<h3 class="card-title">'+$('#toggleNoticeMessage').text()+'\</h3>\
|
||||
<div class="card-tools">\
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse"> \
|
||||
<i class="fas fa-plus"></i>\
|
||||
</button>\
|
||||
</div>\
|
||||
</div>\
|
||||
<div class="card-body" style="display: none;">\
|
||||
'+$('.ticket_ReplyBox').html()+'\
|
||||
</div>\
|
||||
</div>\
|
||||
';
|
||||
|
||||
$('.ticket_reply_notice').remove();
|
||||
$('.ticket_ReplyBox').replaceWith(newReplyBox);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(window).load(function()
|
||||
{
|
||||
//replace direct chat
|
||||
var username = $('.user-panel > .info > a').text();
|
||||
var allChats = [];
|
||||
$('.ticket_reply').each(function()
|
||||
{
|
||||
if($(this).hasClass('admin'))
|
||||
{
|
||||
var isAdmin = true
|
||||
}else
|
||||
{
|
||||
var isAdmin = false
|
||||
}
|
||||
|
||||
if($(this).find('.name').find('a').text()==username)
|
||||
{
|
||||
var direction = 'left'
|
||||
}else
|
||||
{
|
||||
var direction = 'right'
|
||||
}
|
||||
|
||||
// add text-dark class to userlink
|
||||
$(this).find('.name').find('a').addClass('text-dark');
|
||||
|
||||
var date = $(this).find('.date').text().replace(/\s+/g, ' ').trim();
|
||||
var user = $(this).find('.name').html().replace(/\s+/g, ' ').trim();
|
||||
var message = $(this).find('.message').html().trim();
|
||||
var footer = $(this).find('.ticket_footer').html().trim();
|
||||
|
||||
//Create chatItem object for current reply
|
||||
var chatItem = {
|
||||
direction: direction,
|
||||
isAdmin: isAdmin,
|
||||
date: date,
|
||||
user: user,
|
||||
message: message,
|
||||
footer: footer
|
||||
};
|
||||
|
||||
//Push chatItem object into allChats array
|
||||
allChats.push(chatItem);
|
||||
});
|
||||
|
||||
//remove .replyContainer
|
||||
$('.replyContainer').remove();
|
||||
|
||||
var newReplyContainer = '\
|
||||
<div class="col-12 col-md-6">\
|
||||
<div class="card card-primary direct-chat direct-chat-primary">\
|
||||
<div class="card-body p-2">\
|
||||
<div class="direct-chat-messages">\
|
||||
';
|
||||
|
||||
Object.keys(allChats).forEach(function(key)
|
||||
{
|
||||
var isAdmin = '';
|
||||
if(allChats[key]['isAdmin'])
|
||||
{
|
||||
isAdmin = '<span class="badge badge-danger mx-1">Admin</span>';
|
||||
}
|
||||
|
||||
var avatarUrl = 'themes/AdminLTE/dist/img/default-avatar.png';
|
||||
var avatarUserId = new URLSearchParams($($.parseHTML(allChats[key]['user'])).filter('a').attr('href')).get('user_id');
|
||||
if(!localStorage.getItem('avatar_' + avatarUserId))
|
||||
{
|
||||
// load avatar from db
|
||||
$.ajax({
|
||||
cache: false,
|
||||
async: false,
|
||||
type: 'GET',
|
||||
url: 'themes/AdminLTE/dist/php/settings.php?m=user&p=getavatar&userid=' + avatarUserId,
|
||||
success: function(avatar)
|
||||
{
|
||||
// create avatar cookie
|
||||
localStorage.setItem('avatar_' + avatarUserId, avatar);
|
||||
|
||||
// set user avatar
|
||||
avatarUrl = avatar;
|
||||
}
|
||||
});
|
||||
}else
|
||||
{
|
||||
// read user avatar cookie value
|
||||
avatarUrl = localStorage.getItem('avatar_' + avatarUserId);
|
||||
}
|
||||
|
||||
if(allChats[key]['direction']=='left')
|
||||
{
|
||||
newReplyContainer += '\
|
||||
<div class="direct-chat-msg">\
|
||||
<div class="direct-chat-infos clearfix">\
|
||||
<span class="direct-chat-name float-left font-weight-bold">' + allChats[key]['user'] + isAdmin + '</span>\
|
||||
<span class="direct-chat-timestamp float-right">' + allChats[key]['date'] + '</span>\
|
||||
</div>\
|
||||
<img class="direct-chat-img" src="' + avatarUrl + '" data-userid="' + avatarUserId + '" alt="message user image">\
|
||||
<div class="direct-chat-text">\
|
||||
' + allChats[key]['message'] + '\
|
||||
</div>\
|
||||
<div class="direct-chat-footer">\
|
||||
' + allChats[key]['footer'] + '\
|
||||
</div>\
|
||||
</div>\
|
||||
';
|
||||
}else
|
||||
{
|
||||
newReplyContainer += '\
|
||||
<div class="direct-chat-msg right">\
|
||||
<div class="direct-chat-infos clearfix">\
|
||||
<span class="direct-chat-name float-right font-weight-bold">' + isAdmin + allChats[key]['user'] + '</span>\
|
||||
<span class="direct-chat-timestamp float-left">' + allChats[key]['date'] + '</span>\
|
||||
</div>\
|
||||
<img class="direct-chat-img" src="' + avatarUrl + '" data-userid="' + avatarUserId + '" alt="message user image">\
|
||||
<div class="direct-chat-text">\
|
||||
' + allChats[key]['message'] + '\
|
||||
</div>\
|
||||
<div class="direct-chat-footer">\
|
||||
' + allChats[key]['footer'] + '\
|
||||
</div>\
|
||||
</div>\
|
||||
';
|
||||
}
|
||||
});
|
||||
|
||||
newReplyContainer += '\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
';
|
||||
|
||||
$('section.content > .container-fluid > .row').append(newReplyContainer);
|
||||
$('.downloadAttachmentLink').addClass('btn btn-primary btn-sm')
|
||||
|
||||
// reload body scripts after dom modify
|
||||
reloadBodyScripts();
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue