Modal in Calendar - Modal in datatable error

3 replies · opened Oct 13, 2016

SsmirmarkOct 13, 2016

Good day, I have a problem when I use the calendar / modal inline, and datatable - modal inline. it does not work correctly.

If I make a click on next-previous-current on the calendar, the modal window is no longer displayed, the ID appears instead of the modal window in the URL.

In one of the fields in the table is a button with a modal inline, when changing the page table and modal windows do not work.

Please excuse my English, I need a quick solution.

Sending video showing the error, can not send url is an internal site and html file

https://www.youtube.com/watch?v=OqhFxTB0MPo&feature=youtu.be

SSemicolon WebSTAFFOct 15, 2016

Hello,

Thank You for your Patience and such an Amazing Explanation of the Issue! Since the Data Tables, Calendario and the Inline Modal, all three are jQuery Plugins, you will need to re-initialize the Inline Modal when any of the jQuery Actions are performed on Data Tables and Calendario. However, it is Definitely Possible to fix this issue. Simply use the following JS Codes:

For Calenderio, simply find the following code:

function updateMonthYear() {
	$month.html( cal.getMonthName() );
	$year.html( cal.getYear() );
}

and replace it with:

function updateMonthYear() {
	$month.html( cal.getMonthName() );
	$year.html( cal.getYear() );
	SEMICOLON.initialize.lightbox();
}

For Data Tables, find the following code:

$(document).ready(function() {
	$('#datatable1').dataTable();
});

and replace it with:

$(document).ready(function() {
	$('#datatable1').dataTable({
		"fnDrawCallback": function() {
			SEMICOLON.initialize.lightbox();
		}
	});
});

This should definitely fix the issue. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

SsmirmarkOct 18, 2016

Hey!!! I appreciate the help, now everything works properly!

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard