From b20fea437c5260cd5868285e20110606fee2fd3c Mon Sep 17 00:00:00 2001 From: Manish Verma Date: Tue, 14 Aug 2018 13:30:27 +0530 Subject: [PATCH] Fixed timeline iframe issue Fixed issue for ticket detail page for client and agent panel where iframe does not show peroperly the content data of ticket. --- .../agent/helpdesk/ticket/timeline.blade.php | 90 +++++++++++-------- .../client/helpdesk/ckeckticket.blade.php | 53 ++++------- 2 files changed, 70 insertions(+), 73 deletions(-) diff --git a/resources/views/themes/default1/agent/helpdesk/ticket/timeline.blade.php b/resources/views/themes/default1/agent/helpdesk/ticket/timeline.blade.php index 74de111e7..a9ed23bdf 100644 --- a/resources/views/themes/default1/agent/helpdesk/ticket/timeline.blade.php +++ b/resources/views/themes/default1/agent/helpdesk/ticket/timeline.blade.php @@ -693,45 +693,59 @@ if ($thread->title != "") { -
- - - - @if($conversation->poster=='client') -
- - -
+ @if(\Lang::getLocale()=='ar') +
+ @else +
+ @endif + + + + @if($conversation->poster=='client') + + @else {!! $conversation->body !!} diff --git a/resources/views/themes/default1/client/helpdesk/ckeckticket.blade.php b/resources/views/themes/default1/client/helpdesk/ckeckticket.blade.php index 23fd68658..f5020352a 100644 --- a/resources/views/themes/default1/client/helpdesk/ckeckticket.blade.php +++ b/resources/views/themes/default1/client/helpdesk/ckeckticket.blade.php @@ -225,42 +225,25 @@ foreach ($conversations as $conversation) {
@if($conversation->firstContent()=='yes') -
- - -
+
- @else + setTimeout(function(){ + var $iframe="Id{{$conversation->id}}"; + $('').appendTo(".embed-responsive{{$conversation->id}}"); + setTimeout(function(){ + $('#'+$iframe).contents().find('body').append('{!!$conversation->purify(true)!!}'); + },100) + setTimeout(function(){ + var frameid=document.getElementById($iframe); + if(parseInt($("#"+$iframe).contents().find('img').css('width'))>700){ + $("#"+$iframe).contents().find('img').css('width','96%'); + } + frameid.contentWindow.document.body.style.width="100%"; + var iframe_height=frameid.contentWindow.document.body.scrollHeight; + frameid.style.height=iframe_height+"px"; + }, 1000); + }, 0); + @else {!! $conversation->body !!} @endif