adminServicesTabFieldsIntegration.tpl 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <div class="lu-col-md-12">
  2. {include file='assets/css_assets.tpl'}
  3. {if $isCustomIntegrationCss}
  4. <link rel="stylesheet" href="{$customAssetsURL}/css/integration.css">
  5. {/if}
  6. <div id="layers">
  7. <div class="lu-app">
  8. <div class="lu-app-main">
  9. <div class="lu-app-main__body">
  10. {$content}
  11. </div>
  12. </div>
  13. </div>
  14. </div>
  15. {include file='assets/js_assets.tpl'}
  16. <script>
  17. if (typeof whmcsPostOriginal === 'undefined') {
  18. var whmcsPostOriginal = {};
  19. Object.assign(whmcsPostOriginal, WHMCS.http.jqClient);
  20. function whmcsPostWrapper(t, e, i, n) {
  21. if (e.indexOf('modop=suspend') > 0 || e.indexOf('modop=changepackage') > 0 || e.indexOf('modop=unsuspend') > 0
  22. || e.indexOf('modop=terminate') > 0 || e.indexOf('modop=create') > 0) {
  23. mgPageControler.vueLoader.$destroy();
  24. mgPageControler.vueLoader = false;
  25. }
  26. return whmcsPostOriginal.post(t, e, i, n);
  27. }
  28. WHMCS.http.jqClient.post = whmcsPostWrapper;
  29. }
  30. function mgWaitForAssets(){
  31. setTimeout(function(){
  32. if (typeof window.Vue === 'function' && typeof window.mgLoadPageContoler === 'function'
  33. && typeof window.initMassActionsOnDatatables === 'function') {
  34. if (mgPageControler.vueLoader === false) {
  35. mgLoadPageContoler();
  36. mgEventHandler.on('AppCreated', null, function (appId, params) {
  37. params.instance.$nextTick(function () {
  38. initContainerTooltips('layers');
  39. });
  40. }, 1000);
  41. }
  42. } else {
  43. mgWaitForAssets();
  44. }
  45. }, 1000);
  46. }
  47. mgWaitForAssets();
  48. </script>
  49. </div>