Hesk v3.2.0

This commit is contained in:
Luke Tainton
2021-03-06 16:23:18 +00:00
parent a5296eea55
commit ac0640212a
222 changed files with 16911 additions and 1089 deletions

View File

@@ -789,9 +789,9 @@ button { font-family: "Lato", Arial, sans-serif; color: #26282a; }
.btn-empty { padding: 0; }
.btn-full { width: 152px; height: 40px; background-color: #1776ea; color: #fff; font-weight: 600; transition: all 250ms ease; text-decoration: none; }
.btn-full { min-width: 152px; height: 40px; background-color: #1776ea; color: #fff; font-weight: 600; transition: all 250ms ease; text-decoration: none; }
.notification a.btn-full { color: #fff ! important; text-decoration: none ! important; }
.notification a.btn-full { color: #fff ! important; text-decoration: none ! important; width: 152px; }
.btn-full:hover { background-color: #025cca; }
@@ -801,7 +801,7 @@ button { font-family: "Lato", Arial, sans-serif; color: #26282a; }
.btn--blue .icon { fill: currentColor; }
.btn-border { width: 152px; height: 40px; border: 1px solid #002d73; color: #002d73; padding: 0; }
.btn-border { min-width: 152px; height: 40px; border: 1px solid #002d73; color: #002d73; padding: 0; }
.btn--blue-border { width: auto; padding: 0 16px; display: -ms-inline-flexbox; display: inline-flex; height: 48px; border: 1px solid #1776ea; color: #1776ea; font-weight: 600; }
@@ -1644,7 +1644,7 @@ input::-ms-clear { display: none; }
.form-footer { display: -ms-flexbox; display: flex; -ms-flex-direction: column; flex-direction: column; -ms-flex-align: center; align-items: center; -ms-flex-pack: center; justify-content: center; }
.form-footer .btn { width: 240px; height: 56px; }
.form-footer .btn { min-width: 240px; height: 56px; }
.form-footer .link { display: -ms-inline-flexbox; display: inline-flex; -ms-flex-align: center; align-items: center; height: 40px; margin-top: 32px; font-size: 13px; font-weight: 600; text-align: center; color: #1776ea; }
@@ -2040,6 +2040,41 @@ sub {
border: 1px solid gray;
}
.browser-default blockquote {
border-left: 2px solid #ccc ! important;
margin-left: 1.5rem ! important;
padding-left: 1rem ! important;
font-style: normal ! important;
}
.browser-default pre {
display: block;
font-family: monospace;
margin: 1em 0;
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
.browser-default em {
font-style: italic;
}
.browser-default code {
font-family: monospace;
margin: 1em 0;
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
background-color: #e8e8e8;
border-radius: 3px;
padding: .1rem .2rem;
}
.selectize-dropdown .option, .selectize-input.input-active {
cursor: pointer ! important;
}
@@ -2110,4 +2145,4 @@ sub {
.rate .icon {
height: 1.5em;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,112 @@
.blocker {
position: fixed;
top: 0; right: 0; bottom: 0; left: 0;
width: 100%; height: 100%;
overflow: auto;
z-index: 1001;
padding: 20px;
box-sizing: border-box;
background-color: rgb(0,0,0);
background-color: rgba(0,0,0,0.75);
text-align: center;
}
.blocker:before{
content: "";
display: inline-block;
height: 100%;
vertical-align: middle;
margin-right: -0.05em;
}
.blocker.behind {
background-color: transparent;
}
.modal {
display: none;
vertical-align: middle;
position: relative;
z-index: 1002;
max-width: 700px;
box-sizing: border-box;
width: 90%;
background: #fff;
padding: 15px 30px;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
-o-border-radius: 8px;
-ms-border-radius: 8px;
border-radius: 8px;
-webkit-box-shadow: 0 0 10px #000;
-moz-box-shadow: 0 0 10px #000;
-o-box-shadow: 0 0 10px #000;
-ms-box-shadow: 0 0 10px #000;
box-shadow: 0 0 10px #000;
text-align: left;
}
.modal a.close-modal {
position: absolute;
top: -12.5px;
right: -12.5px;
display: block;
width: 30px;
height: 30px;
text-indent: -9999px;
background-size: contain;
background-repeat: no-repeat;
background-position: center center;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8C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0blKnth66rKCnU0VRGu37ONrQaA4eZDFtWAu2fXj9zjFkxTBOo8F7t926gTp/83Kyzzcy2kZD6xiqxTYnHLRFm3vHiRSwNSjkz3hoIzo8lCKWUlg/YtGs7tObunDAZfpDLbfEI15zsEIY3U/x/gHHc/G1zltnAgAAAABJRU5ErkJggg==');
}
.modal-spinner {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translateY(-50%) translateX(-50%);
padding: 12px 16px;
border-radius: 5px;
background-color: #111;
height: 20px;
}
.modal-spinner > div {
border-radius: 100px;
background-color: #fff;
height: 20px;
width: 2px;
margin: 0 1px;
display: inline-block;
-webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out;
animation: sk-stretchdelay 1.2s infinite ease-in-out;
}
.modal-spinner .rect2 {
-webkit-animation-delay: -1.1s;
animation-delay: -1.1s;
}
.modal-spinner .rect3 {
-webkit-animation-delay: -1.0s;
animation-delay: -1.0s;
}
.modal-spinner .rect4 {
-webkit-animation-delay: -0.9s;
animation-delay: -0.9s;
}
@-webkit-keyframes sk-stretchdelay {
0%, 40%, 100% { -webkit-transform: scaleY(0.5) }
20% { -webkit-transform: scaleY(1.0) }
}
@keyframes sk-stretchdelay {
0%, 40%, 100% {
transform: scaleY(0.5);
-webkit-transform: scaleY(0.5);
} 20% {
transform: scaleY(1.0);
-webkit-transform: scaleY(1.0);
}
}

View File

@@ -539,7 +539,7 @@ $(document).ready(function() {
});
// Never allow typing in dropdowns
$('.selectize-input input').prop('disabled', 'disabled');
$('.selectize-input input').prop('readonly', 'true');
});
window.onload = function() {

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,5 @@
/*
A simple jQuery modal (http://github.com/kylefox/jquery-modal)
Version 0.9.2
*/
!function(o){"object"==typeof module&&"object"==typeof module.exports?o(require("jquery"),window,document):o(jQuery,window,document)}(function(o,t,i,e){var s=[],l=function(){return s.length?s[s.length-1]:null},n=function(){var o,t=!1;for(o=s.length-1;o>=0;o--)s[o].$blocker&&(s[o].$blocker.toggleClass("current",!t).toggleClass("behind",t),t=!0)};o.modal=function(t,i){var e,n;if(this.$body=o("body"),this.options=o.extend({},o.modal.defaults,i),this.options.doFade=!isNaN(parseInt(this.options.fadeDuration,10)),this.$blocker=null,this.options.closeExisting)for(;o.modal.isActive();)o.modal.close();if(s.push(this),t.is("a"))if(n=t.attr("href"),this.anchor=t,/^#/.test(n)){if(this.$elm=o(n),1!==this.$elm.length)return null;this.$body.append(this.$elm),this.open()}else this.$elm=o("<div>"),this.$body.append(this.$elm),e=function(o,t){t.elm.remove()},this.showSpinner(),t.trigger(o.modal.AJAX_SEND),o.get(n).done(function(i){if(o.modal.isActive()){t.trigger(o.modal.AJAX_SUCCESS);var s=l();s.$elm.empty().append(i).on(o.modal.CLOSE,e),s.hideSpinner(),s.open(),t.trigger(o.modal.AJAX_COMPLETE)}}).fail(function(){t.trigger(o.modal.AJAX_FAIL);var i=l();i.hideSpinner(),s.pop(),t.trigger(o.modal.AJAX_COMPLETE)});else this.$elm=t,this.anchor=t,this.$body.append(this.$elm),this.open()},o.modal.prototype={constructor:o.modal,open:function(){var t=this;this.block(),this.anchor.blur(),this.options.doFade?setTimeout(function(){t.show()},this.options.fadeDuration*this.options.fadeDelay):this.show(),o(i).off("keydown.modal").on("keydown.modal",function(o){var t=l();27===o.which&&t.options.escapeClose&&t.close()}),this.options.clickClose&&this.$blocker.click(function(t){t.target===this&&o.modal.close()})},close:function(){s.pop(),this.unblock(),this.hide(),o.modal.isActive()||o(i).off("keydown.modal")},block:function(){this.$elm.trigger(o.modal.BEFORE_BLOCK,[this._ctx()]),this.$body.css("overflow","hidden"),this.$blocker=o('<div class="'+this.options.blockerClass+' blocker current"></div>').appendTo(this.$body),n(),this.options.doFade&&this.$blocker.css("opacity",0).animate({opacity:1},this.options.fadeDuration),this.$elm.trigger(o.modal.BLOCK,[this._ctx()])},unblock:function(t){!t&&this.options.doFade?this.$blocker.fadeOut(this.options.fadeDuration,this.unblock.bind(this,!0)):(this.$blocker.children().appendTo(this.$body),this.$blocker.remove(),this.$blocker=null,n(),o.modal.isActive()||this.$body.css("overflow",""))},show:function(){this.$elm.trigger(o.modal.BEFORE_OPEN,[this._ctx()]),this.options.showClose&&(this.closeButton=o('<a href="#close-modal" rel="modal:close" class="close-modal '+this.options.closeClass+'">'+this.options.closeText+"</a>"),this.$elm.append(this.closeButton)),this.$elm.addClass(this.options.modalClass).appendTo(this.$blocker),this.options.doFade?this.$elm.css({opacity:0,display:"inline-block"}).animate({opacity:1},this.options.fadeDuration):this.$elm.css("display","inline-block"),this.$elm.trigger(o.modal.OPEN,[this._ctx()])},hide:function(){this.$elm.trigger(o.modal.BEFORE_CLOSE,[this._ctx()]),this.closeButton&&this.closeButton.remove();var t=this;this.options.doFade?this.$elm.fadeOut(this.options.fadeDuration,function(){t.$elm.trigger(o.modal.AFTER_CLOSE,[t._ctx()])}):this.$elm.hide(0,function(){t.$elm.trigger(o.modal.AFTER_CLOSE,[t._ctx()])}),this.$elm.trigger(o.modal.CLOSE,[this._ctx()])},showSpinner:function(){this.options.showSpinner&&(this.spinner=this.spinner||o('<div class="'+this.options.modalClass+'-spinner"></div>').append(this.options.spinnerHtml),this.$body.append(this.spinner),this.spinner.show())},hideSpinner:function(){this.spinner&&this.spinner.remove()},_ctx:function(){return{elm:this.$elm,$elm:this.$elm,$blocker:this.$blocker,options:this.options,$anchor:this.anchor}}},o.modal.close=function(t){if(o.modal.isActive()){t&&t.preventDefault();var i=l();return i.close(),i.$elm}},o.modal.isActive=function(){return s.length>0},o.modal.getCurrent=l,o.modal.defaults={closeExisting:!0,escapeClose:!0,clickClose:!0,closeText:"Close",closeClass:"",modalClass:"modal",blockerClass:"jquery-modal",spinnerHtml:'<div class="rect1"></div><div class="rect2"></div><div class="rect3"></div><div class="rect4"></div>',showSpinner:!0,showClose:!0,fadeDuration:null,fadeDelay:1},o.modal.BEFORE_BLOCK="modal:before-block",o.modal.BLOCK="modal:block",o.modal.BEFORE_OPEN="modal:before-open",o.modal.OPEN="modal:open",o.modal.BEFORE_CLOSE="modal:before-close",o.modal.CLOSE="modal:close",o.modal.AFTER_CLOSE="modal:after-close",o.modal.AJAX_SEND="modal:ajax:send",o.modal.AJAX_SUCCESS="modal:ajax:success",o.modal.AJAX_FAIL="modal:ajax:fail",o.modal.AJAX_COMPLETE="modal:ajax:complete",o.fn.modal=function(t){return 1===this.length&&new o.modal(this,t),this},o(i).on("click.modal",'a[rel~="modal:close"]',o.modal.close),o(i).on("click.modal",'a[rel~="modal:open"]',function(t){t.preventDefault(),o(this).modal()})});

View File

@@ -4,6 +4,7 @@ global $hesk_settings, $hesklang;
* @var string $trackingId
* @var string $email
* @var boolean $rememberEmail
* @var boolean $displayForgotTrackingIdForm
* @var boolean $submittedForgotTrackingIdForm
*/
@@ -41,6 +42,7 @@ require_once(TEMPLATE_PATH . 'customer/util/alerts.php');
width: 200px;
}
</style>
<link rel="stylesheet" href="<?php echo TEMPLATE_PATH; ?>customer/css/jquery.modal.css" />
<?php include(TEMPLATE_PATH . '../../head.txt'); ?>
</head>
@@ -95,7 +97,9 @@ require_once(TEMPLATE_PATH . 'customer/util/alerts.php');
<div class="contr">
<div style="margin-bottom: 20px;">
<?php
hesk3_show_messages($messages);
if (!$submittedForgotTrackingIdForm) {
hesk3_show_messages($messages);
}
?>
</div>
<h3 class="article__heading article__heading--form">
@@ -137,19 +141,24 @@ require_once(TEMPLATE_PATH . 'customer/util/alerts.php');
</section>
<div class="form-footer">
<button type="submit" class="btn btn-full" ripple="ripple"><?php echo $hesklang['view_ticket']; ?></button>
<a href="javascript:" onclick="$('#forgot').toggle()" class="link"><?php echo $hesklang['forgot_tid']; ?></a>
<a href="ticket.php?forgot=1#modal-contents" data-modal="#forgot-modal" class="link"><?php echo $hesklang['forgot_tid']; ?></a>
</div>
</form>
<!-- Start ticket reminder form -->
<div id="forgot" style="display: <?php echo $submittedForgotTrackingIdForm ? 'block' : 'none'; ?>;">
<div class="notification orange" style="margin-bottom:0px;">
<div id="forgot-modal" class="<?php echo !$displayForgotTrackingIdForm ? 'modal' : ''; ?>">
<div id="modal-contents" class="<?php echo !$displayForgotTrackingIdForm ? '' : 'notification orange'; ?>" style="padding-bottom:15px">
<?php
if ($submittedForgotTrackingIdForm) {
hesk3_show_messages($messages);
}
?>
<b><?php echo $hesklang['forgot_tid']; ?></b><br><br>
<?php echo $hesklang['tid_mail']; ?>
<form action="index.php" method="post" name="form1" class="form">
<div class="form-group">
<label class="label" style="display: none"><?php echo $hesklang['email']; ?></label>
<input type="email" class="form-control" name="email" value="<?php echo $email; ?>">
<input id="forgot-email" type="email" class="form-control" name="email" value="<?php echo $email; ?>">
</div>
<div class="form-group">
<div class="radio-custom">
@@ -166,6 +175,7 @@ require_once(TEMPLATE_PATH . 'customer/util/alerts.php');
</div>
</div>
<input type="hidden" name="a" value="forgot_tid">
<input type="hidden" id="js" name="forgot" value="<?php echo (hesk_GET('forgot') ? '1' : '0'); ?>">
<button id="forgot-tid-submit" type="submit" class="btn btn-full"><?php echo $hesklang['tid_send']; ?></button>
</form>
</div>
@@ -201,9 +211,18 @@ END LICENSE CODE
<script src="<?php echo TEMPLATE_PATH; ?>customer/js/hesk_functions.js"></script>
<script src="<?php echo TEMPLATE_PATH; ?>customer/js/svg4everybody.min.js"></script>
<script src="<?php echo TEMPLATE_PATH; ?>customer/js/selectize.min.js"></script>
<script src="<?php echo TEMPLATE_PATH; ?>customer/js/jquery.modal.min.js"></script>
<script>
$(document).ready(function() {
$('#select_category').selectize();
$('a[data-modal]').on('click', function() {
$($(this).data('modal')).modal();
return false;
});
<?php if ($submittedForgotTrackingIdForm) { ?>
$('#forgot-modal').modal();
$('#forgot-email').select();
<?php } ?>
});
</script>
<script src="<?php echo TEMPLATE_PATH; ?>customer/js/app<?php echo $hesk_settings['debug_mode'] ? '' : '.min'; ?>.js"></script>

View File

@@ -41,6 +41,10 @@ require(TEMPLATE_PATH . 'customer/view-ticket/partial/add-reply.php');
<meta name="format-detection" content="telephone=no" />
<link rel="stylesheet" media="all" href="<?php echo TEMPLATE_PATH; ?>customer/css/app<?php echo $hesk_settings['debug_mode'] ? '' : '.min'; ?>.css" />
<link rel="stylesheet" href="./css/zebra_tooltips.css">
<?php if ($hesk_settings['staff_ticket_formatting'] == 2): ?>
<script type="text/javascript" src="<?php echo HESK_PATH; ?>js/prism.js?<?php echo $hesk_settings['hesk_version']; ?>"></script>
<link rel="stylesheet" media="all" href="<?php echo HESK_PATH; ?>css/prism.css?<?php echo $hesk_settings['hesk_version']; ?>">
<?php endif; ?>
<?php include(TEMPLATE_PATH . '../../head.txt'); ?>
</head>
@@ -137,10 +141,10 @@ require(TEMPLATE_PATH . 'customer/view-ticket/partial/add-reply.php');
</div>
<?php
hesk3_output_custom_fields_for_display($customFieldsBeforeMessage);
if ($ticket['message'] != ''):
if ($ticket['message_html'] != ''):
?>
<div class="block--description">
<p><?php echo $ticket['message']; ?></p>
<div class="block--description browser-default">
<p><?php echo $ticket['message_html']; ?></p>
</div>
<?php
endif;
@@ -153,7 +157,7 @@ require(TEMPLATE_PATH . 'customer/view-ticket/partial/add-reply.php');
displayReplies($replies, $trackingID);
}
if ($ticket['locked'] != 1 && $ticket['status'] != 3 && !$hesk_settings['reply_top']) {
if ($ticket['locked'] != 1 && $ticket['status'] != 3 && !$hesk_settings['reply_top'] && !$ticketJustReopened) {
showReplyForm($trackingID, $email, false);
}
?>
@@ -322,8 +326,8 @@ function displayReplies($replies, $trackingId) {
</svg>
</a>
</div>
<div class="block--description">
<p><?php echo $reply['message']; ?></p>
<div class="block--description browser-default">
<p><?php echo $reply['message_html']; ?></p>
</div>
<?php listAttachments($reply['attachments'], $trackingId); ?>
<?php if ($hesk_settings['rating'] && $reply['staffid']): ?>