#326 Display a modal for user agent and screen res
This commit is contained in:
parent
9156e98169
commit
ce8c681a2c
@ -695,9 +695,6 @@ if($ticket['email'] != '') {
|
||||
/* Print admin navigation */
|
||||
require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
?>
|
||||
<script>
|
||||
var userAgent = platform.parse('<?php echo addslashes($ticket['user_agent']); ?>');
|
||||
</script>
|
||||
<div class="row" style="padding: 20px">
|
||||
<div class="col-md-2">
|
||||
<div class="panel panel-default">
|
||||
@ -885,12 +882,56 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
{
|
||||
echo '<span class="fa fa-lock"></span> ';
|
||||
}
|
||||
if (isset($ticket['user_agent']) && $ticket['user_agent'] !== NULL)
|
||||
{
|
||||
$tooltipText = $hesklang['ticket_submitted_using'];
|
||||
echo '<i class="fa fa-desktop" id="user-agent"></i>';
|
||||
echo '<script>$("#user-agent").tooltip({ title: \''.$tooltipText.'\' + userAgent })</script>';
|
||||
}
|
||||
if ($ticket['user_agent'] !== NULL
|
||||
&& $ticket['screen_resolution_height'] !== NULL
|
||||
&& $ticket['screen_resolution_width'] !== NULL):
|
||||
?>
|
||||
<span data-toggle="modal" data-target="#user-agent-modal" style="cursor: pointer">
|
||||
<i class="fa fa-desktop" data-toggle="tooltip"
|
||||
title="<?php echo htmlspecialchars($hesklang['click_for_device_information']); ?>"></i>
|
||||
</span>
|
||||
<div id="user-agent-modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4><?php echo $hesklang['device_information']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<script>
|
||||
var userAgent = platform.parse('<?php echo addslashes($ticket['user_agent']); ?>');
|
||||
console.log(userAgent);
|
||||
var screenResWidth = <?php echo intval($ticket['screen_resolution_width']); ?>;
|
||||
var screenResHeight = <?php echo intval($ticket['screen_resolution_height']); ?>;
|
||||
</script>
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong><?php echo $hesklang['operating_system']; ?></strong></td>
|
||||
<td id="operating-system"> </td>
|
||||
<script>$('#operating-system').html(userAgent.os.toString());</script>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php echo $hesklang['browser']; ?></strong></td>
|
||||
<td id="browser"> </td>
|
||||
<script>$('#browser').html(userAgent.name + ' ' + userAgent.version);</script>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php echo $hesklang['screen_resolution']; ?></strong></td>
|
||||
<td id="screen-resolution"> </td>
|
||||
<script>$('#screen-resolution').html(screenResWidth + ' x ' + screenResHeight);</script>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
if ($modsForHesk_settings['request_location'])
|
||||
{
|
||||
$locationText = '';
|
||||
|
@ -792,7 +792,11 @@ function execute250Scripts() {
|
||||
global $hesk_settings;
|
||||
|
||||
executeQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` ADD COLUMN `user_agent` TEXT");
|
||||
executeQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` ADD COLUMN `screen_resolution_width` INT");
|
||||
executeQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` ADD COLUMN `screen_resolution_height` INT");
|
||||
executeQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."stage_tickets` ADD COLUMN `user_agent` TEXT");
|
||||
executeQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."stage_tickets` ADD COLUMN `screen_resolution_width` INT");
|
||||
executeQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."stage_tickets` ADD COLUMN `screen_resolution_height` INT");
|
||||
}
|
||||
|
||||
function getSettingValue($settings, $setting, $default) {
|
||||
|
@ -23,7 +23,11 @@ $hesklang['EMAIL_HR']='------ Reply above this line ------';
|
||||
|
||||
// ADDED OR MODIFIED IN Mods for HESK 2.5.0
|
||||
$hesklang['ticket_message_no_attachments'] = 'Ticket/Reply message, however attachments will not be included in the email';
|
||||
$hesklang['ticket_submitted_using'] = 'Ticket submitted using: ';
|
||||
$hesklang['click_for_device_information'] = 'Click for device information';
|
||||
$hesklang['device_information'] = 'Device information';
|
||||
$hesklang['operating_system'] = 'Operating System';
|
||||
$hesklang['browser'] = 'Browser';
|
||||
$hesklang['screen_resolution'] = 'Screen Resolution';
|
||||
|
||||
// ADDED OR MODIFIED IN Mods for HESK 2.4.0
|
||||
$hesklang['sort_by_user_defined_order'] = 'Sort by user-defined order';
|
||||
|
Loading…
x
Reference in New Issue
Block a user