From 77c88cc2294216df4d9b1a664845208eb14467f1 Mon Sep 17 00:00:00 2001 From: Manish Verma Date: Mon, 19 Dec 2016 15:47:17 +0530 Subject: [PATCH] bug-fix-patch # Counting only authenticated user's notification # Agents were not able to select canned resposne while replying --- .../Common/NotificationController.php | 2 +- .../agent/helpdesk/ticket/timeline.blade.php | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Common/NotificationController.php b/app/Http/Controllers/Common/NotificationController.php index 1ab7058b1..2507c2f7f 100644 --- a/app/Http/Controllers/Common/NotificationController.php +++ b/app/Http/Controllers/Common/NotificationController.php @@ -164,7 +164,7 @@ class NotificationController extends Controller }, 'notification.model' => function ($query) { $query->select('id', 'ticket_number'); }, - ]); + ])->where('id', '=', \Auth::user()->id); return $notifications; } 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 a9a0ab028..3a9d33bc6 100644 --- a/resources/views/themes/default1/agent/helpdesk/ticket/timeline.blade.php +++ b/resources/views/themes/default1/agent/helpdesk/ticket/timeline.blade.php @@ -397,14 +397,14 @@ if ($thread->title != "") {
- id)->get(); ?> @foreach($canneds as $canned) - + @endforeach {{-- --}} @@ -2210,5 +2210,20 @@ echo $ticket_data->title; $(this).html($('').width(Math.max(0, (Math.min(5, parseFloat($(this).html())))) * 16)); }); } + + function addCannedResponse() { + var selectedResponse = document.getElementById( "select" ); + var response = selectedResponse.options[selectedResponse.selectedIndex ].value; + if (response == 'zzz') { + for ( instance in CKEDITOR.instances ){ + CKEDITOR.instances[instance].updateElement(); + CKEDITOR.instances[instance].setData(''); + } + } else { + for ( instance in CKEDITOR.instances ) { + CKEDITOR.instances[instance].insertHtml(response); + } + } + } @stop \ No newline at end of file