This is a migrated thread and some comments may be shown as answers.

Appointment Content Rendering differently

1 Answer 53 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 07 Apr 2016, 09:29 PM

I just upgrade to 2016.1.225 (Feb 25, 2016) and I'm having a problem with legacy code that used a client side template to add some more information to the appointment.

This is how the appointment div was rendered before.

<div class="rsAptContent" style="">
Anthony Lee, Jr.<span class="apptDate "> - 1:30 PM</span>
<div class="apptDescription"> - Civil</div>
<a href="#" class="rsAptDelete" style="visibility: hidden;">delete</a>
</div>

This is how it renders now in release 2016.1.225 (Feb 25, 2016) 

<div class="rsAptContent" style="">DAP Clinic Salisbury 10-1 Ann Shaw</div>
 
<span class="apptDate "> - 9:30 AM</span><div class="apptDescription"></div>
 
<a href="#" class="rsAptDelete" style="visibility: hidden;" title="delete"><span class="rsIcon rsIconDelete"></span></a>
 
<span class="rsAptResize rsAptResizeStart"></span>
 
<span class="rsAptResize rsAptResizeEnd"></span>

The rsAptDelete link is not inside of the appointment content div.

I got this code from Telerik to modify the appointment content.

function OnClientDataBound(scheduler) {
     var $ = jQuery;
     // using templates to create the subject & date on the appointment
     $(".rsAptDelete").each(function () {
         var apt = scheduler.getAppointmentFromDomElement(this);
         // creating an object containing the data that should be applied on the template
         var descValue = { Description: apt.get_description() };
         var startValue = { Start: apt.get_start().format('h:mm tt') };
         if (descValue.Description.indexOf('Cambridge') != -1)
             apt.set_cssClass('rsCategoryYellow');
 
         // instantiate the template, populate it and insert before the delete handler (".rsAptDelete")
         $("#tmplAppDate").tmpl(startValue).insertBefore(this);
         $("#tmplAppDescription").tmpl(descValue).insertBefore(this);
     });
 }

 

Not sure how to get this working now.

 

1 Answer, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 12 Apr 2016, 07:13 AM
Hi Tim,

As far as I see this code uses jQuery Templates. We are not using jQuery templates in our code.
It seems that with the old rendering templates were added to the apptDescription and apptDate 
div elements. Try to modify templates and append them to the rsAptContent div.

Regards,
Hristo Valyavicharski
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Scheduler
Asked by
Tim
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Share this question
or