123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801 |
- /** *************Init JS*********************
-
- TABLE OF CONTENTS
- ---------------------------
- 1.Ready function
- 2.Load function
- 3.Full height function
- 4.pangong function
- 5.Chat App function
- 6.Resize function
- ** ***************************************/
-
- "use strict";
- /*****Ready function start*****/
- $(document).ready(function () {
- pangong();
- /*Disabled*/
- $(document).on("click", "a.disabled,a:disabled", function (e) {
- return false;
- });
- });
- /*****Ready function end*****/
-
- /*****Load function start*****/
- $(window).on("load", function () {
- $(".preloader-it").delay(500).fadeOut("slow");
- });
- /*****Load function* end*****/
-
- /*Variables*/
- var height, width,
- $wrapper = $(".biz-wrapper"),
- $nav = $(".biz-nav"),
- $vertnaltNav = $(".biz-wrapper.biz-vertical-nav,.biz-wrapper.biz-alt-nav"),
- $horizontalNav = $(".biz-wrapper.biz-horizontal-nav"),
- $navbar = $(".biz-navbar");
-
- /***** pangong function start *****/
- var pangong = function () {
-
- /*Form Animation Icon*/
- $('.custom-form-animation .form-control').focus(function () {
- $(this).parents('.custom-form-animation').addClass('focused');
- });
- $('.custom-form-animation .form-control').attr('autocomplete', 'off');
- $('.custom-form-animation .form-control').blur(function () {
- var inputValue = $(this).val();
- if (inputValue == "")
- $(this).parents('.custom-form-animation').removeClass('focused');
- });
-
- /*Builder aside responsive*/
- $(document).on('click', '.left-aside-togglable', function (e) {
- $('.biz-bldr-wrap').toggleClass('bldr__aside__left__toggle');
- return false;
- });
-
- /*Counter Animation*/
- var counterAnim = $('.counter-anim');
- if (counterAnim.length > 0) {
- counterAnim.counterUp({
- delay: 10,
- time: 1000
- });
- }
-
- /*Navbar Collapse Animation*/
- var navbarNavAnchor = '.biz-nav .navbar-nav li a';
- $(document).on("click", navbarNavAnchor, function (e) {
- if ($(this).attr('aria-expanded') === "false")
- $(this).blur();
- $(this).parent().siblings().find('.collapse').collapse('hide');
- $(this).parent().find('.collapse').collapse('hide');
- });
-
- /*Card Remove*/
- $(document).on('click', '.card-close', function (e) {
- $(this).closest('.card').remove();
- return false;
- });
-
- /*Accordion js*/
- $(document).on('show.bs.collapse', '.accordion .collapse', function (e) {
- $(this).siblings('.card-header').addClass('activestate');
- });
-
- $(document).on('hide.bs.collapse', '.accordion .collapse', function (e) {
- $(this).siblings('.card-header').removeClass('activestate');
- });
-
- /*Navbar Collapse Animation*/
- var navbarNavAnchor = '.biz-main-menu .navbar-nav li a,.nav-vertical li a';
- $(document).on("click", navbarNavAnchor, function (e) {
- if ($(this).attr('aria-expanded') === "false")
- $(this).blur();
- $(this).parent().parent().siblings().find('.collapse').collapse('hide');
- $(this).parent().siblings().find('.collapse').collapse('hide');
- $(this).parent().find('.collapse').collapse('hide');
- });
-
- /*Icon Style Navbar*/
- $(document).on('click', '.biz__icon__menu .biz-main-menu .menu-content-wrap .nav-link', function (e) {
- $(this).parent().parent().find('.sunbnav-active').removeClass('sunbnav-active');
- $(this).parent().addClass('sunbnav-active');
- $wrapper.addClass('biz__submenu');
- var id = $(this).attr('data-target');
- $(".biz-submenu .subnav-list").removeClass('d-flex');
- $(".biz-submenu").find(id).addClass('d-flex');
- });
- $(document).on('click', '#pane_toggle_btn', function (e) {
- $wrapper.toggleClass('biz__submenu');
- $(window).trigger("resize");
- return;
- });
- $(document).on('click', '#close_pane', function (e) {
- $('.biz__icon__menu .biz-main-menu .navbar-nav').find('.sunbnav-active').removeClass('sunbnav-active');
- $wrapper.removeClass('biz__submenu');
- });
- var navbarNavAnchor = '.biz-submenu .navbar-nav li a';
- $(document).on("click", navbarNavAnchor, function (e) {
- if ($(this).attr('aria-expanded') === "false")
- $(this).blur();
- $(this).parent().siblings().find('.collapse').collapse('hide');
- $(this).parent().find('.collapse').collapse('hide');
- });
- $(document).on('click', '.btn-search-toggle', function (e) {
- $(this).closest('.nav-header').find('.collapse').collapse('toggle');
- return false;
- });
- $(document).on("input", ".nav-search input", function (e) {
- if (!$(this).val().length == 0) {
- $(this).closest('.input-group').find('.feather-icon.clear-search').show();
- $(this).closest('.input-group').find('.feather-icon.icon-search').hide();
- } else {
- $(this).closest('.input-group').find('.feather-icon.clear-search').hide();
- $(this).closest('.input-group').find('.feather-icon.icon-search').show();
- }
- return false;
- });
- $(document).on('click', '.nav-search .feather-icon.clear-search', function (e) {
- $(this).closest('.nav-header').find('input').val("");
- $(this).closest('.input-group').find('.feather-icon.icon-search').show();
- $(this).hide();
- return false;
- });
- $(document).on('click', '.nav-search .feather-icon.close-search', function (e) {
- $(this).closest('.header-wth-search').find('.nav-search').fadeOut();
- $(this).closest('.header-wth-search').find('.nav-header-text').css({ "opacity": "1", "pointer-events": "auto" });
-
- return false;
- });
- $(document).on('click', '.header-wth-search .btn-search-toggle', function (e) {
- $(this).closest('.nav-header').find('input').val("");
- $(this).closest('.nav-header').find('.feather-icon.clear-search').hide();
- $(this).closest('.header-wth-search').find('.feather-icon.icon-search').show();
- $(this).closest('.header-wth-search').find('.nav-header-text').css({ "opacity": "0", "pointer-events": "none" });
- $(this).closest('.header-wth-search').find('.nav-search').fadeIn();
- $(this).closest('.header-wth-search').find('.nav-search input').focus();
- });
- /*Drawer Js*/
- $(document).on('click', '.drawer-toggle-link', function (e) {
- /* New Code */
- $('.biz-wrapper2').addClass('biz-drawer-push biz-drawer-pushright');
- /* New Code */
-
- var targetDrawer = $(this).attr('data-target');
- $(this).addClass('active');
- $('.hk-drawer').css({ "box-shadow": "none" });
- $('.biz-drawer').removeClass('biz-drawer-toggle');
- $wrapper.remove('.biz-drawer-backdrop');
- $wrapper.removeClass(function (index, className) {
- return (className.match(/biz-drawer-\S+/g) || []).join(' ');
- });
-
- if ($(this).attr('data-drawer') == "push-normal") {
- if ($(targetDrawer).hasClass('drawer-left'))
- $wrapper.addClass('biz-drawer-push biz-drawer-pushleft');
- else
- $wrapper.addClass('biz-drawer-push biz-drawer-pushright');
-
- }
- else if ($(this).attr('data-drawer') == "push-wth-nav") {
- if ($(targetDrawer).hasClass('drawer-left'))
- $wrapper.addClass('biz-drawer-push biz-drawer-wth-nav-push biz-drawer-pushleft');
- else
- $wrapper.addClass('biz-drawer-push biz-drawer-wth-nav-push biz-drawer-pushright');
- }
-
- else if ($(this).attr('data-drawer') == "overlay") {
- $(targetDrawer).css({ "border": "none", "box-shadow": "0 8px 32px rgba(0, 0, 0, 0.1)" });
- if ($(this).attr('data-backdrop') == "")
- $wrapper.append('<div class="biz-drawer-backdrop"></div>');
- }
- $(targetDrawer).addClass('biz-drawer-toggle');
- $('#biz-wrapper').addClass('biz-drawer-pushright');
- $("#drawer_push").addClass("biz-drawer-toggle")
-
- return false;
- });
- $(document).on('click', '.biz-drawer-backdrop', function (e) {
- $(this).remove();
- $('.hk-drawer').css({ "box-shadow": "none" });
- $('.biz-drawer').removeClass('biz-drawer-toggle');
- $wrapper.removeClass(function (index, className) {
- return (className.match(/biz-drawer-\S+/g) || []).join(' ');
- });
- return false;
- });
- $(document).on('click', '.drawer-close', function (e) {
- /* New Code */
- $('.biz-wrapper2').removeClass('biz-drawer-push biz-drawer-pushright');
- /* New Code */
-
- $(this).closest('.biz-drawer').css({ "box-shadow": "none" });
- $('.bldr-body').removeClass('biz-body-margin-right');
- $('.biz-drawer-backdrop').remove();
- $(this).closest('.biz-drawer').removeClass('biz-drawer-toggle');
- $wrapper.removeClass(function (index, className) {
- return (className.match(/biz-drawer-\S+/g) || []).join(' ');
- });
- return false;
- });
- $(document).on('click', '.drawer-close', function (e) {
- var id = $(this).closest('.biz-drawer').attr('id');
- $('[data-target="#' + id + '"]').removeClass('active');
- $('#biz-wrapper').removeClass('biz-drawer-pushright');
- return false;
- });
- /*Settings panel Toggle*/
- $(document).on('click', '#settings_toggle_btn', function (e) {
- $wrapper.toggleClass('biz-settings-toggle');
- return false;
- });
- $(document).on('click', '#settings_panel_close', function (e) {
- $wrapper.removeClass('biz-settings-toggle');
- return false;
- });
- $(document).on('click', '#nav_light_select', function (e) {
- $nav.removeClass('biz-menu-dark').addClass('biz-menu-light');
- return false;
- });
- $(document).on('click', '#nav_dark_select', function (e) {
- $nav.removeClass('biz-menu-light').addClass('biz-menu-dark');
- return false;
- });
- $(document).on('click', '#nav_light_select,#nav_dark_select', function (e) {
- $('.biz-nav-select').find('.btn').removeClass('btn-outline-primary').addClass('btn-outline-light');
- $(this).removeClass('btn-outline-light').addClass('btn-outline-primary').blur();
- return false;
- });
- $(document).on('click', '#navtop_light_select,#navtop_dark_select', function (e) {
- $('.biz-navbar-select').find('.btn').removeClass('btn-outline-primary').addClass('btn-outline-light');
- $(this).removeClass('btn-outline-light').addClass('btn-outline-primary').blur();
- return false;
- });
- $(document).on('click', '#navtop_light_select', function (e) {
- $navbar.removeClass('navbar-dark').addClass('navbar-light').find('img.brand-img').attr('src', 'dist/img/logo-light.png');
- return false;
- });
- $(document).on('click', '#navtop_dark_select', function (e) {
- $navbar.removeClass('navbar-light').addClass('navbar-dark').find('img.brand-img').attr('src', 'dist/img/logo-dark.png');
- return false;
- });
- if ($('.scroll-nav-switch').length > 0) {
- $('.scroll-nav-switch').toggles({
- drag: true, // allow dragging the toggle between positions
- click: true, // allow clicking on the toggle
- text: {
- on: '', // text for the ON position
- off: '' // and off
- },
- on: false, // is the toggle ON on init
- animate: 250, // animation time (ms)
- easing: 'swing', // animation transition easing function
- checkbox: null, // the checkbox to toggle (for use in forms)
- clicker: null, // element that can be clicked on to toggle. removes binding from the toggle itself (use nesting)
-
- type: 'compact' // if this is set to 'select' then the select style toggle will be used
- });
- $('.scroll-nav-switch.toggle').on('toggle', function (e, active) {
- if (active) {
- $wrapper.addClass('scrollable-nav');
- } else {
- $wrapper.removeClass('scrollable-nav');
- }
- });
- }
- var navBarChk = ($('.biz-navbar').hasClass('navbar-dark')),
- navChk = ($('.biz-nav').hasClass('biz-menu-dark'))
- $(document).on('click', '#reset_settings', function (e) {
- if (navBarChk)
- $('#navtop_dark_select').click();
- else
- $('#navtop_light_select').click();
- if (navChk)
- $('#nav_dark_select').click();
- else
- $('#nav_light_select').click();
- $('.scroll-nav-switch').click();
- if ($('.scroll-nav-switch').find('.toggle-on').hasClass('active'))
- $('.scroll-nav-switch').click();
- return false;
- });
-
- /*Search form Collapse*/
- $(document).on('click', '#navbar_search_btn', function (e) {
- $('html,body').animate({ scrollTop: 0 }, 'slow');
- $(".navbar-search input").focus();
- $wrapper.addClass('navbar-search-toggle');
- $(window).trigger("resize");
- });
- $(document).on('click', '#navbar_search_close', function (e) {
- $wrapper.removeClass('navbar-search-toggle');
- $(window).trigger("resize");
- return false;
- });
-
- /*Slimscroll*/
- if ($('.nicescroll-bar').length > 0) {
- $('.nicescroll-bar').slimscroll({ height: '100%', color: '#d6d9da', disableFadeOut: true, borderRadius: 0, size: '6px', enableKeyNavigation: true, opacity: .8 });
- }
-
- //Report builder slimscroll
- $(document).on('click', '[data-target="adj_drawer_1"]', function (e) {
- if ($('.nicescroll-bar').length > 0) {
- $('.nicescroll-bar').slimscroll({ height: '100%', color: '#d6d9da', disableFadeOut: true, borderRadius: 0, size: '6px', enableKeyNavigation: true, opacity: .8 });
- }
- });
-
- /*Slimscroll Key Control*/
- $(".slimScrollDiv").hover(function () {
- $(this).find('[class*="nicescroll-bar"]').focus();
- }, function () {
- $(this).find('[class*="nicescroll-bar"]').blur();
- });
-
- /*Refresh Init Js*/
- var refreshMe = '.refresh';
- $(document).on("click", refreshMe, function (e) {
- var panelToRefresh = $(this).closest('.card').find('.refresh-container');
- var dataToRefresh = $(this).closest('.card').find('.panel-wrapper');
- var loadingAnim = panelToRefresh.find('.la-anim-1');
- panelToRefresh.show();
- setTimeout(function () {
- loadingAnim.addClass('la-animate');
- }, 100);
- function started() { } //function before timeout
- setTimeout(function () {
- function completed() { } //function after timeout
- panelToRefresh.fadeOut(800);
- setTimeout(function () {
- loadingAnim.removeClass('la-animate');
- }, 800);
- }, 1500);
- return false;
- });
-
- /*Fullscreen Init Js*/
- $(document).on("click", ".full-screen", function (e) {
- $(this).parents('.card').toggleClass('fullscreen');
- $(window).trigger("resize");
- return false;
- });
-
- /** Bizgaze **/
-
- /*Multi select Js*/
- $(document).on('click', '.multi-sel > li,.multi-sel > div', function (e) {
- if ($(this).hasClass('selected'))
- $(this).removeClass('selected');
- else
- $(this).addClass('selected');
- return false;
- });
-
- /*Bizgaze ext Js*/
- $(document).on('click', '.dataset-list-wrap #modalDataListItems .nav-item', function (e) {
- $(this).closest('.biz-new-report').find('.columns-list-wrap').addClass('active');
- return false;
- });
- $(document).on('click', '.close-columns-list', function (e) {
- $(this).closest('.columns-list-wrap').removeClass('active');
- return false;
- });
- $(document).on("click", ".save-draft", function (e) {
- $.notify({
- icon: 'ri-checkbox-line font-21 mr-10',
- message: "Report Saved in Draft",
- }, {
- type: "dismissible alert alert-inv alert-inv-primary",
- placement: {
- from: "top",
- align: "right"
- },
- animate: {
- enter: 'animated fadeInUp',
- exit: 'animated fadeOutUp'
- },
- delay: 500000,
- });
- });
-
- /*Add Sub Report*/
- $(document).on('click', '.add-sub-report', function (e) {
- $(this).closest('.modal-content').find('.modal-body').append('<div class="sub-report-block card"><header class="sub-report-head"><h6 class="required">Sub report</h6><i class="las la-braille dragger"></i></header><div class="report-body"><div class="form-group"><select class="form-control custom-select mb-10"><option selected>- Choose -</option><option value="1">Two</option><option value="2">Three</option></select><div class="repeater"><div data-repeater-list="category-group"><div class="form-row"><div class="col"><select class="form-control custom-select mb-10"><option selected>Main report column</option><option value="1">Two</option><option value="2">Three</option></select></div><div class="col-auto"><select class="form-control custom-select mb-10"><option value="1" selected>=</option><option value="2">Three</option></select></div><div class="col"><select class="form-control custom-select mb-10"><option selected>Sub report column</option><option value="1">Two</option><option value="2">Three</option></select></div><div class="col-auto"><button class="btn btn-icon btn-theme" data-repeater-create><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg></span></span></button></div></div><div data-repeater-item class="form-row"><div class="col"><input type="text" class="form-control mb-2" value="Main report column=Sub report column"></div><div class="col-auto"><a href="#" data-repeater-delete class="btn btn-icon btn-flush-danger flush-soft-hover btn-rounded"><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-trash-2"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg></span></span></a></div></div></div></div></div></div></div>');
- return false;
- });
-
- //Delete Subreport
- $(document).on('click', '.delete-report', function (e) {
- $(this).closest('.sub-report-block').remove();
- })
-
- /*Adjsent Drawer*/
- $(document).on('click', '.biz-adj-drawer-wrap > .adj-drawer-open', function (e) {
- $(this).closest('.biz-adj-drawer-wrap').find('.biz-adj-drawer').hide();
- var id = $(this).attr('data-target');
- var leftOffset = $('.bldr-aside-left').width(); var clickevent = $('.adj-drawer-open').attr('data-clickevent')
- $(this).closest('.biz-adj-drawer-wrap').find('#' + id).css({ 'left': leftOffset }).show();
- });
-
- $(document).on('click', '.biz-adj-drawer-wrap > .adj-drawer-open-parameters', function (e) {
- $(this).closest('.biz-adj-drawer-wrap').find('.biz-adj-drawer').hide();
- var id = $(this).attr('data-target');
- $('.drawer-header > .drawer-close.close').addClass('hidden');
- $(this).closest('.biz-adj-drawer-wrap').find('#' + id).css({ 'left': '0%', 'right': '0%', }).show();
- });
-
- $(document).on('click', '.btn-adj-drawer-close', function (e) {
- $('.drawer-header > .drawer-close.close').removeClass('hidden');
- $(this).closest('.biz-adj-drawer').hide();
- });
-
- /*Adjsent Mini Drawer*/
- $(document).on('click', '.biz-mini-adj-drawer-wrap > .adj-drawer-open', function (e) {
- $(this).closest('.biz-mini-adj-drawer-wrap').find('.biz-mini-adj-drawer').hide();
- var id = $(this).attr('data-target');
- var topOffset = $(this).offset().top;
- var leftOffset = $('.bldr-aside-left').width();
- var elementHeight = $(this).closest('.biz-mini-adj-drawer-wrap').find('#' + id).height();
- if (topOffset + elementHeight > height)
- $(this).closest('.biz-mini-adj-drawer-wrap').find('#' + id).css({ 'top': 'auto', 'bottom': 0, 'left': leftOffset }).show();
- else
- $(this).closest('.biz-mini-adj-drawer-wrap').find('#' + id).css({ 'top': topOffset, 'bottom': 'auto', 'left': leftOffset }).show();
- });
-
- $(document).on('click', '.btn-mini-drawer-close', function (e) {
- $(this).closest('.biz-mini-adj-drawer').hide();
- });
-
- $(document).on('click', '.dsl-block-wrap .dsl-block .dsl-block-close', function (e) {
- $(this).closest('.dsl-block').remove();
- });
-
- /*Dragula*/
- dragula([document.getElementById("sub_report")], {
- moves: function (el, container, handle) {
- return handle.classList.contains('sub-report-head');
- }
- });
- dragula([document.getElementById("tab_front")], {
- moves: function (el, container, handle) {
- return handle.classList.contains('sec-block-head');
- }
- });
- dragula([document.getElementById("sfl_1")], {
- moves: function (el, container, handle) {
- return handle.classList.contains('dragger');
- }
- });
- dragula([document.getElementById("sfl_2")], {
- moves: function (el, container, handle) {
- return handle.classList.contains('dragger');
- }
- });
- dragula([document.getElementById("sfl_3")], {
- moves: function (el, container, handle) {
- return handle.classList.contains('dragger');
- }
- });
- dragula([document.getElementById("sfl_4")], {
- moves: function (el, container, handle) {
- return handle.classList.contains('dragger');
- }
- });
- dragula([document.getElementById("sfl_5")], {
- moves: function (el, container, handle) {
- return handle.classList.contains('dragger');
- }
- });
- dragula([document.getElementById("sfl_6")], {
- moves: function (el, container, handle) {
- return handle.classList.contains('dragger');
- }
- });
- dragula([document.getElementById("sfl_7")], {
- moves: function (el, container, handle) {
- return handle.classList.contains('dragger');
- }
- });
- dragula([document.getElementById("sfl_8")], {
- moves: function (el, container, handle) {
- return handle.classList.contains('dragger');
- }
- });
- dragula([document.getElementById("sfl_9")], {
- moves: function (el, container, handle) {
- return handle.classList.contains('dragger');
- }
- });
-
- // Report Dragula
- $(document).on('click', '#headerLinkReportIcon', function (e) {
- dragula([document.getElementById("linkreport_modal")], {
- moves: function (el, container, handle) {
- return handle.classList.contains('sub-report-head');
- }
- });
- });
-
- dragula([document.getElementById("tab_front")], {
- moves: function (el, container, handle) {
- return handle.classList.contains('sec-block-head');
- }
- });
-
- $(document).on('click', '#groupby_selected_columns', function (e) {
- dragula([document.getElementById("groupby_selected_columns")], {
- moves: function (el, container, handle) {
- return handle.classList.contains('dragger');
- }
- });
- });
-
- $(document).on('click', '#categories_selected_columns', function (e) {
- dragula([document.getElementById("categories_selected_columns")], {
- moves: function (el, container, handle) {
- return handle.classList.contains('dragger');
- }
- });
- });
-
- $(document).on('click', '#xaxis_selected_columns', function (e) {
- dragula([document.getElementById("xaxis_selected_columns")], {
- moves: function (el, container, handle) {
- return handle.classList.contains('dragger');
- }
- });
- });
-
- $(document).on('click', '#yaxis_selected_columns', function (e) {
- dragula([document.getElementById("yaxis_selected_columns")], {
- moves: function (el, container, handle) {
- return handle.classList.contains('dragger');
- }
- });
- });
-
- $(document).on('click', '#selectedColumns', function (e) {
- dragula([document.getElementById("selectedColumns")], {
- moves: function (el, container, handle) {
- return handle.classList.contains('dragger');
- }
- });
- });
-
- $(document).on('click', '#tooltip_selected_columns', function (e) {
- dragula([document.getElementById("tooltip_selected_columns")], {
- moves: function (el, container, handle) {
- return handle.classList.contains('dragger');
- }
- });
- });
-
- /*Color Filter*/
- $(document).on("click", '.color-board .color-block', function (e) {
- $(this).closest('.color-board').find('.color-block').removeClass('selected');
- $(this).addClass('selected');
- return false;
- });
-
- /*Query Builder*/
- $(document).on("click", '.qry-builder-open', function (e) {
- $('.qry-builder-container').show();
- return false;
- });
- $(document).on("click", '.qry-builder-container header .close', function (e) {
- $('.qry-builder-container').hide();
- return false;
- });
-
- /*Builder aside responsive*/
- $(document).on('click', '.right-aside-togglable', function (e) {
- $('.biz-bldr-wrap').toggleClass('bldr__aside__right__toggle');
- $('.biz-wrapper').toggleClass('bldr__aside__right__toggle');
- $('.biz-wrapper .bldr-aside-right').toggleClass("biz-aside-margin-right");
- $(".bldr-body").toggleClass("biz-body-margin-right");
- return false;
- });
-
- /*Content editable*/
- $(document).on("click", '.inline-edit .inline-edit-btn', function (e) {
- $(this).closest('.inline-edit').find('.edit').attr("contenteditable", "true").focus();
- $(this).closest('.inline-edit').find('.edit').css("outline", "none");
- });
- $(document).on("focusout", ".inline-edit .edit", function (e) {
- $(this).attr("contenteditable", "false");
- });
-
- // Report Content Editable
- $(document).on("click", '#tooltip_selected_columns .inline-edit .inline-edit-btn', function (e) {
- $(this).closest('.inline-edit').find('.edit').removeAttr('disabled')
- $(this).closest('.inline-edit').find('.edit').addClass('input-styles');
- $(this).closest('.inline-edit').find('.reset-text').removeClass('hidden');
- });
-
- $(document).on("click", '#tooltip_selected_columns .inline-edit .reset-text', function (e) {
- $(this).closest('.inline-edit').find('.edit').attr('disabled', true);
- $(this).closest('.inline-edit').find('.edit').removeClass('input-styles');
- $(this).addClass('hidden');
- });
-
-
- /*Sub-Dropdown*/
- $('.dropdown-menu > .inner-dropdown-menu.dropdown > a').addClass('dropdown-toggle');
- $('.dropdown-menu a.dropdown-toggle').on('click', function (e) {
- if (!$(this).next().hasClass('show')) {
- $(this).parents('.dropdown-menu').first().find('.show').removeClass("show");
- }
- var $subMenu = $(this).next(".dropdown-menu");
- $subMenu.toggleClass('show');
- $(this).parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function (e) {
- $('.dropdown-menu > .dropdown .show').removeClass("show");
- });
- return false;
- });
-
- /*Coupon Modal*/
- $(document).on("click", '.coupon-modal-open', function (e) {
- var idTarget = $(this).attr('data-target');
- $('.timeline-wrap').addClass('d-none');
- $(idTarget).addClass('d-block');
- return false;
- });
- $(document).on("click", '.coupon-modal-close', function (e) {
- $('.timeline-wrap').removeClass('d-none');
- $(this).closest('.coupon-modal').removeClass('d-block');
- return false;
- });
- };
- /***** pangong function end *****/
-
- /***** Full height function start *****/
- var setHeightWidth = function () {
- height = window.innerHeight;
- width = window.innerWidth;
- /*Icon Nav Height for differnt brekpoints with Horizontal menu*/
- if (width > 1200) {
- if ($('.biz__icon__menu').hasClass('biz__nav__toggle'))
- $('.biz__icon__menu').removeClass('biz__nav__toggle');
- } else
- $('.biz__icon__menu').addClass('biz__submenu');
-
- //Right Tab Responsiveness below 1200 width
- $(function () {
- if ($(window).width() < 1200) {
- $('.biz-wrapper2 .drawer-close').trigger('click');
- }
- })
-
- /*Drawer Responsive JS*/
- if (width < 1200) {
- $wrapper.removeClass(function (index, className) {
- return (className.match(/biz-drawer-\S+/g) || []).join(' ');
- });
- $('.biz-drawer').removeClass('biz-drawer-toggle');
- $('.drawer-toggle-link').removeClass('active');
-
- } else {
- $("#form-builder-container .right-toggle-link").trigger('click');
- }
- };
- /***** Full height function end *****/
-
- /***** Resize function start *****/
- $(window).on("resize", function () {
- setHeightWidth();
- });
- $(window).trigger("resize");
- /***** Resize function end *****/
-
-
- /***** New Form Data *****/
-
- $(document).on('click', '.dsl-sec-block-wrap .dsl-block', function (e) {
- var hash = this.hash;
- if ($(this).hasClass('focused-block')) {
- $(this).removeClass('focused-block');
- $(hash).removeClass('focused');
- }
- else {
- $('.dsl-sec-block-wrap .dsl-block').removeClass('focused-block');
- $(this).addClass('focused-block');
- $('.form-sec-wrap').removeClass('focused');
- $(hash).addClass('focused');
- }
- });
-
- $(document).on('click', '.dsl-doc-type-wrap .dsl-block.selected', function (e) {
- var target = $(this).attr("data-target");
- console.log(target);
- if ($(this).hasClass('focused-block')) {
- $(this).removeClass('focused-block');
- $(target).removeClass('focused');
- }
- else {
- $('.dsl-doc-type-wrap .dsl-block.selected').removeClass('focused-block');
- $(this).addClass('focused-block');
- //$('.form-sec-block .form-group').removeClass('focused');
- $('.PropertyText').removeClass('focused');
- $(target).addClass('focused');
- }
- return false;
- });
-
- $(document).on('click', '.doc-type-close', function (e) {
- $(this).closest('.form-group').parent().remove();
- return false;
- });
- $(document).on('click', '.default-doc-type', function (e) {
- $('.already-created-doc').removeClass('default-doc');
- $(this).closest('.already-created-doc').addClass('default-doc');
- });
- var idCount = 0;
- $('.dsl-doc-type-wrap .dsl-block').each(function () {
- $(this).attr('id', 'doc_type_block_' + idCount);
- idCount++;
- });
- function hasClass(element, cls) {
- return (' ' + element.className + ' ').indexOf(' ' + cls + ' ') > -1;
- }
-
-
- dragula([document.getElementById("drag_elements"), document.getElementById("drop_elements"), document.getElementById("drop_elements_2"), document.getElementById("drop_elements_3"), document.getElementById("drop_elements_4"), document.getElementById("drop_elements_5")], {
- copy: function (el, source) {
- return source === document.getElementById("drag_elements")
- },
- accepts: function (el, target) {
- return target !== document.getElementById("drag_elements")
- },
- moves: function (el, container, handle) {
- return handle.classList.contains('dragger')
- }
- }).on('drop', function (el, target) {
- if (hasClass(el, 'dsl-block'))
- $('#' + el.id).addClass('selected');
- if ($('.form-sec-block .dsl-block').length > 0) {
- $('#' + target.id).append('<div class="col-lg-4"><div class="form-group form-name"><div><div class="form-label-group"> <label> <span class="required"> ' + $('.form-sec-block .row').find('.dsl-block-name').text() + ' </span> </label><div class="form-group-action"> <a class="btn btn-xs btn-icon btn-flush-dark btn-rounded flush-soft-hover" href="#"><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg></span></span></a> <a class="btn btn-xs btn-icon btn-flush-dark btn-rounded flush-soft-hover doc-type-close" href="#"><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x-circle"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg></span></span></a></div></div> <input type="text" class="form-control"></div></div></div>');
- }
- $('.form-sec-block .row').find('.dsl-block').remove();
- });
- dragula([document.getElementById("drag_elements_2"), document.getElementById("drop_elements"), document.getElementById("drop_elements_2"), document.getElementById("drop_elements_3"), document.getElementById("drop_elements_4"), document.getElementById("drop_elements_5")], {
- copy: function (el, source) {
- return source === document.getElementById("drag_elements_2")
- },
- accepts: function (el, target) {
- return target !== document.getElementById("drag_elements_2")
- },
- moves: function (el, container, handle) {
- return handle.classList.contains('dragger')
- }
- }).on('drop', function (el, target) {
- if (hasClass(el, 'dsl-block'))
- $('#' + el.id).addClass('selected');
- if ($('.form-sec-block .dsl-block').length > 0) {
- $('#' + target.id).append('<div class="col-lg-4"><div class="form-group form-name"><div><div class="form-label-group"> <label> <span class="required"> ' + $('.form-sec-block .row').find('.dsl-block-name').text() + ' </span> </label><div class="form-group-action"> <a class="btn btn-xs btn-icon btn-flush-dark btn-rounded flush-soft-hover" href="#"><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg></span></span></a> <a class="btn btn-xs btn-icon btn-flush-dark btn-rounded flush-soft-hover doc-type-close" href="#"><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x-circle"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg></span></span></a></div></div> <input type="text" class="form-control"></div></div></div>');
- }
- $('.form-sec-block .row').find('.dsl-block').remove();
- });
- dragula([document.getElementById("drag_elements_3"), document.getElementById("drop_elements"), document.getElementById("drop_elements_2"), document.getElementById("drop_elements_3"), document.getElementById("drop_elements_4"), document.getElementById("drop_elements_5")], {
- copy: function (el, source) {
- return source === document.getElementById("drag_elements_3")
- },
- accepts: function (el, target) {
- return target !== document.getElementById("drag_elements_3")
- },
- moves: function (el, container, handle) {
- return handle.classList.contains('dragger')
- }
- }).on('drop', function (el, target) {
- if (hasClass(el, 'dsl-block'))
- $('#' + el.id).addClass('selected');
- if ($('.form-sec-block .dsl-block').length > 0) {
- $('#' + target.id).append('<div class="col-lg-4"><div class="form-group"><div><div class="form-label-group"> <label> <span class="required"> ' + $('.form-sec-block .row').find('.dsl-block-name').text() + ' </span> </label><div class="form-group-action"> <a class="btn btn-xs btn-icon btn-flush-dark btn-rounded flush-soft-hover" href="#"><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg></span></span></a> <a class="btn btn-xs btn-icon btn-flush-dark btn-rounded flush-soft-hover doc-type-close" href="#"><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x-circle"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg></span></span></a></div></div> <input type="text" class="form-control"></div></div></div>');
- }
- $('.form-sec-block .row').find('.dsl-block').remove();
- });
- dragula([document.getElementById("drop_elements"), document.getElementById("drop_elements_2"), document.getElementById("drop_elements_3"), document.getElementById("drop_elements_4"), document.getElementById("drop_elements_5")]);
-
- /***** New Form Data *****/
|