Newer
Older
$(function() {
$(document).on('click', 'a.change-user', function(e) {
e.preventDefault();
var tid = <?php echo $ticket->getOwnerId(); ?>;
var cid = <?php echo $ticket->getOwnerId(); ?>;
var url = 'ajax.php/'+$(this).attr('href').substr(1);
$.userLookup(url, function(user) {
if(cid!=user.id
&& $('.dialog#confirm-action #changeuser-confirm').length) {
$('#newuser').html(user.name +' <'+user.email+'>');
$('.dialog#confirm-action #action').val('changeuser');
$('#confirm-form').append('<input type=hidden name=user_id value='+user.id+' />');
$('#overlay').show();
$('.dialog#confirm-action .confirm-action').hide();
$('.dialog#confirm-action p#changeuser-confirm')
.show()
.parent('div').show().trigger('click');
}
});
});
<?php
// Set the lock if one exists
if ($mylock) { ?>
!function() {
var setLock = setInterval(function() {
if (typeof(window.autoLock) === 'undefined')
return;
clearInterval(setLock);
id:<?php echo $mylock->getId(); ?>,
time: <?php echo $cfg->getLockTime() * 60; ?>}, 'acquire');
<?php
// Hover support for all inline images
$urls = array();
foreach (AttachmentFile::objects()->filter(array(
'attachments__thread_entry__thread__id' => $ticket->getThreadId(),
'attachments__inline' => true,
)) as $file) {
$urls[strtolower($file->getKey())] = array(
'download_url' => $file->getDownloadUrl(),
'filename' => $file->name,
);
} ?>
$('#ticket_thread').data('imageUrls', <?php echo JsonDataEncoder::encode($urls); ?>);