How to integrate easyappointments backend in my intranet website like a "frame"

129 views
Skip to first unread message

Denny Vavalà

unread,
Nov 27, 2019, 11:27:58 AM11/27/19
to Easy!Appointments - Support Group
Hi, 
congratulations for the project. Really well done!

Structure:

htdocs
  |
  |------users
             |
             |------index.php
             |------  **all files**
             |-----calendar
                       |
                       |----------- **all files and directories of easy!appointments **

I've a intranet website. When I click an element of menu an ajax call return html code and it is insert in a wrapper.
I would insert backend of easy!appointments in this wrapper, but it doesn't recognize JS files  (obviously).

What is the best way to implement it?
I would make changes in backend controller. Do I have to create a new controller that extend backend controller (class MY_Backend extends Backend)?

Thank you
easy.jpg

Denny Vavalà

unread,
Nov 27, 2019, 12:05:11 PM11/27/19
to Easy!Appointments - Support Group
 
 I would make changes in backend controller. Do I have to create a new controller that extend backend controller (class MY_Backend extends Backend)?

require_once("Backend.php");


class MY_Backend extends Backend {
.
.
.
}

Is it right?

Denny Vavalà

unread,
Feb 14, 2020, 4:30:46 AM2/14/20
to Easy!Appointments - Support Group
I've found a solution:

At onclick on "Calendario" button I make an Ajax call to the Backend calendar address and render it into my content wrapper:

$.ajax({
url: RootAddress + "calendar/index.php",
type: 'GET',
dataType: 'html',
success: function(response) {
$('#contenuto').hide();
// rimuovo dall'html le librerie da non caricare (altrimenti vanno in conflitto e creano problemi)
response = response.replace(/^.+(bootstrap-css|jquery-js|jquery-ui-js|bootstrap-js).+$/gm,'');
$('#contenuto').html(response);
setTimeout(function(){
$('#contenuto').fadeIn();
}, 2000);
},
error: function(error) {
console.log(error)
}
});
Reply all
Reply to author
Forward
0 new messages