mirror of
https://github.com/VTECRM/vtenext.git
synced 2026-02-26 16:18:47 +00:00
45 lines
1.1 KiB
Smarty
45 lines
1.1 KiB
Smarty
{* crmv@215354 *}
|
|
|
|
{include file='Buttons_List.tpl'}
|
|
<style>
|
|
#klondike_buttons {
|
|
border: none;
|
|
background-color: transparent;
|
|
width:100%;
|
|
min-height: 500px;
|
|
overflow: hidden;
|
|
}
|
|
</style>
|
|
|
|
<br>
|
|
<br>
|
|
<div id="klondike_cont" class="container">
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<iframe id="klondike_buttons" src="https://cloud.klondike.ai/vtePanel/index.php?lang={$AUTHENTICATED_USER_LANGUAGE}"></iframe>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script type="text/javascript">
|
|
/* resize based on contents */
|
|
window.addEventListener("message", function(event) {
|
|
if (event.origin === 'https://cloud.klondike.ai') {
|
|
if (event.data) {
|
|
if (event.data.action === 'set_height') {
|
|
var frame = document.getElementById("klondike_buttons");
|
|
frame.style.height = event.data.height;
|
|
} else if (event.data.action == 'link_not_configured') {
|
|
vtealert('{$MOD.LBL_KLONDIKE_LINK_NOT_CONFIGURED}');
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
jQuery('#klondike_buttons').on('load', function() {
|
|
// send the token
|
|
document.getElementById('klondike_buttons').contentWindow.postMessage({ action:'set_token', token: '{$ATOKEN}', url: '{$KLONDIKE_URL}' }, 'https://cloud.klondike.ai/');
|
|
});
|
|
</script>
|