Iniit
This commit is contained in:
+1
@@ -0,0 +1 @@
|
||||
.gu-mirror{position:fixed!important;margin:0!important;z-index:9999!important;opacity:.8;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";filter:alpha(opacity=80)}.gu-hide{display:none!important}.gu-unselectable{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.gu-transit{opacity:.2;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";filter:alpha(opacity=20)}
|
||||
+1
File diff suppressed because one or more lines are too long
Vendored
+801
@@ -0,0 +1,801 @@
|
||||
/** *************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 *****/
|
||||
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
var rules_basic = {
|
||||
condition: 'AND',
|
||||
rules: [{
|
||||
id: 'price',
|
||||
operator: 'less',
|
||||
value: 10.25
|
||||
},
|
||||
{
|
||||
condition: 'OR',
|
||||
rules: [{
|
||||
id: 'category',
|
||||
operator: 'equal',
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
id: 'category',
|
||||
operator: 'equal',
|
||||
value: 1
|
||||
}]
|
||||
}]
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
$('#builder').queryBuilder({
|
||||
|
||||
filters: [{
|
||||
id: 'name',
|
||||
label: 'Name',
|
||||
type: 'string'
|
||||
},
|
||||
{
|
||||
id: 'category',
|
||||
label: 'Category',
|
||||
type: 'integer',
|
||||
input: 'select',
|
||||
values: {
|
||||
1: 'Books',
|
||||
2: 'Movies',
|
||||
3: 'Music',
|
||||
4: 'Tools',
|
||||
5: 'Goodies',
|
||||
6: 'Clothes'
|
||||
},
|
||||
|
||||
operators: ['equal', 'not_equal', 'in', 'not_in', 'is_null', 'is_not_null']
|
||||
},
|
||||
{
|
||||
id: 'in_stock',
|
||||
label: 'In stock',
|
||||
type: 'integer',
|
||||
input: 'radio',
|
||||
values: {
|
||||
1: 'Yes',
|
||||
0: 'No'
|
||||
},
|
||||
|
||||
operators: ['equal']
|
||||
},
|
||||
{
|
||||
id: 'price',
|
||||
label: 'Price',
|
||||
type: 'double',
|
||||
validation: {
|
||||
min: 0,
|
||||
step: 0.01
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
id: 'id',
|
||||
label: 'Identifier',
|
||||
type: 'string',
|
||||
placeholder: '____-____-____',
|
||||
operators: ['equal', 'not_equal'],
|
||||
validation: {
|
||||
format: /^.{4}-.{4}-.{4}$/
|
||||
}
|
||||
}],
|
||||
|
||||
|
||||
rules: rules_basic
|
||||
});
|
||||
|
||||
/****************************************************************
|
||||
Triggers and Changers QueryBuilder
|
||||
*****************************************************************/
|
||||
|
||||
$('#btn-get').on('click', function () {
|
||||
var result = $('#builder').queryBuilder('getRules');
|
||||
if (!$.isEmptyObject(result)) {
|
||||
alert(JSON.stringify(result, null, 2));
|
||||
} else {
|
||||
console.log("invalid object :");
|
||||
}
|
||||
console.log(result);
|
||||
});
|
||||
|
||||
$('#btn-reset').on('click', function () {
|
||||
$('#builder').queryBuilder('reset');
|
||||
});
|
||||
|
||||
$('#btn-set').on('click', function () {
|
||||
//$('#builder').queryBuilder('setRules', rules_basic);
|
||||
var result = $('#builder').queryBuilder('getRules');
|
||||
if (!$.isEmptyObject(result)) {
|
||||
rules_basic = result;
|
||||
}
|
||||
});
|
||||
|
||||
//When rules changed :
|
||||
$('#builder').on('getRules.queryBuilder.filter', function (e) {
|
||||
//$log.info(e.value);
|
||||
});
|
||||
//# sourceURL=pen.js
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
$(document).ready(function () {
|
||||
'use strict';
|
||||
$('.repeater').repeater({
|
||||
defaultValues: {
|
||||
},
|
||||
show: function () {
|
||||
$(this).slideDown();
|
||||
},
|
||||
hide: function (deleteElement) {
|
||||
$(this).slideUp(deleteElement);
|
||||
},
|
||||
ready: function (setIndexes) { }
|
||||
});
|
||||
|
||||
$('.repeater-swal').repeater({
|
||||
defaultValues: {
|
||||
},
|
||||
show: function () {
|
||||
$(this).slideDown();
|
||||
},
|
||||
hide: function (deleteElement) {
|
||||
Swal.fire({
|
||||
html:
|
||||
'<div class="mb-10"><i class="ri-delete-bin-6-line font-29 text-danger"></i></div><h5 class="text-danger">Delete Note ?</h5><p>Deleting a note will permanently remove from your library.</p>',
|
||||
customClass: {
|
||||
confirmButton: 'btn btn-outline-secondary text-danger',
|
||||
cancelButton: 'btn btn-outline-secondary text-grey',
|
||||
container: 'swal2-has-bg'
|
||||
},
|
||||
showCancelButton: true,
|
||||
buttonsStyling: false,
|
||||
confirmButtonText: 'YES, DELETE NOTE!',
|
||||
cancelButtonText: 'NO KEEP NOTE!',
|
||||
reverseButtons: true,
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
$(this).slideUp(deleteElement);
|
||||
Swal.fire({
|
||||
html:
|
||||
'<div class="d-flex align-items-center"><i class="ri-delete-bin-5-fill mr-15 font-24 text-danger"></i><h5 class="text-danger mb-0">Your file has been deleted!</h5></div>',
|
||||
customClass: {
|
||||
content: 'pa-0 text-left',
|
||||
confirmButton: 'btn btn-primary',
|
||||
actions: 'justify-content-start',
|
||||
},
|
||||
buttonsStyling: false,
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
ready: function (setIndexes) { }
|
||||
});
|
||||
});
|
||||
+514
@@ -0,0 +1,514 @@
|
||||
/*Tabulator Init*/
|
||||
var tabledata = [{
|
||||
id: 1,
|
||||
name: "Oli Bob",
|
||||
progress: 12,
|
||||
gender: "male",
|
||||
rating: 1,
|
||||
col: "red",
|
||||
dob: "19/02/1984",
|
||||
car: 1,
|
||||
lucky_no: 5,
|
||||
activity: [1, 20, 5, 3, 10, 13, 17, 15, 9, 11, 10, 12, 14, 16, 13, 9, 7, 11, 10, 13]
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "Mary May",
|
||||
progress: 1,
|
||||
gender: "female",
|
||||
rating: 2,
|
||||
col: "blue",
|
||||
dob: "14/05/1982",
|
||||
car: true,
|
||||
lucky_no: 10,
|
||||
activity: [10, 12, 14, 16, 13, 9, 7, 11, 10, 13, 1, 2, 5, 4, 1, 16, 4, 2, 1, 3]
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "Christine Lobowski",
|
||||
progress: 42,
|
||||
gender: "female",
|
||||
rating: 0,
|
||||
col: "green",
|
||||
dob: "22/05/1982",
|
||||
car: "true",
|
||||
lucky_no: 12,
|
||||
activity: [1, 2, 5, 4, 1, 16, 4, 2, 1, 3, 3, 7, 9, 1, 4, 8, 2, 6, 4, 2]
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: "Brendon Philips",
|
||||
progress: 100,
|
||||
gender: "male",
|
||||
rating: 1,
|
||||
col: "orange",
|
||||
dob: "01/08/1980",
|
||||
lucky_no: 18,
|
||||
activity: [3, 7, 9, 1, 4, 8, 2, 6, 4, 2, 1, 3, 1, 3, 3, 1, 1, 3, 1, 3]
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: "Margret Marmajuke",
|
||||
progress: 16,
|
||||
gender: "female",
|
||||
rating: 5,
|
||||
col: "yellow",
|
||||
dob: "31/01/1999",
|
||||
lucky_no: 33,
|
||||
activity: [1, 3, 1, 3, 3, 1, 1, 3, 1, 3, 20, 17, 15, 11, 16, 9, 12, 14, 20, 12]
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: "Frank Harbours",
|
||||
progress: 38,
|
||||
gender: "male",
|
||||
rating: 4,
|
||||
col: "red",
|
||||
dob: "12/05/1966",
|
||||
car: 1,
|
||||
lucky_no: 2,
|
||||
activity: [20, 17, 15, 11, 16, 9, 12, 14, 20, 12, 11, 7, 6, 12, 14, 13, 11, 10, 9, 6]
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
name: "Jamie Newhart",
|
||||
progress: 23,
|
||||
gender: "male",
|
||||
rating: 3,
|
||||
col: "green",
|
||||
dob: "14/05/1985",
|
||||
car: true,
|
||||
lucky_no: 63,
|
||||
activity: [11, 7, 6, 12, 14, 13, 11, 10, 9, 6, 4, 17, 11, 12, 0, 5, 12, 14, 18, 11]
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
name: "Gemma Jane",
|
||||
progress: 60,
|
||||
gender: "female",
|
||||
rating: 0,
|
||||
col: "red",
|
||||
dob: "22/05/1982",
|
||||
car: "true",
|
||||
lucky_no: 72,
|
||||
activity: [4, 17, 11, 12, 0, 5, 12, 14, 18, 11, 11, 15, 19, 20, 17, 16, 16, 5, 3, 2]
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
name: "Emily Sykes",
|
||||
progress: 42,
|
||||
gender: "female",
|
||||
rating: 1,
|
||||
col: "maroon",
|
||||
dob: "11/11/1970",
|
||||
lucky_no: 44,
|
||||
activity: [11, 15, 19, 20, 17, 16, 16, 5, 3, 2, 1, 2, 3, 4, 5, 4, 2, 5, 9, 8]
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
name: "James Newman",
|
||||
progress: 73,
|
||||
gender: "male",
|
||||
rating: 5,
|
||||
col: "red",
|
||||
dob: "22/03/1998",
|
||||
lucky_no: 9,
|
||||
activity: [1, 20, 5, 3, 10, 13, 17, 15, 9, 11, 1, 2, 3, 4, 5, 4, 2, 5, 9, 8]
|
||||
},
|
||||
{
|
||||
id: 11,
|
||||
name: "Martin Barryman",
|
||||
progress: 20,
|
||||
gender: "male",
|
||||
rating: 5,
|
||||
col: "violet",
|
||||
dob: "04/04/2001",
|
||||
activity: [1, 2, 3, 4, 5, 4, 11, 7, 6, 12, 14, 13, 11, 10, 9, 6, 2, 5, 9, 8]
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
name: "Jenny Green",
|
||||
progress: 56,
|
||||
gender: "female",
|
||||
rating: 4,
|
||||
col: "indigo",
|
||||
dob: "12/11/1998",
|
||||
car: true,
|
||||
activity: [11, 15, 19, 20, 17, 15, 11, 16, 9, 12, 14, 20, 12, 20, 17, 16, 16, 5, 3, 2]
|
||||
},
|
||||
{
|
||||
id: 13,
|
||||
name: "Alan Francis",
|
||||
progress: 90,
|
||||
gender: "male",
|
||||
rating: 3,
|
||||
col: "blue",
|
||||
dob: "07/08/1972",
|
||||
car: true,
|
||||
activity: [4, 17, 11, 7, 6, 12, 14, 13, 11, 10, 9, 6, 11, 12, 0, 5, 12, 14, 18, 11]
|
||||
},
|
||||
{
|
||||
id: 14,
|
||||
name: "John Phillips",
|
||||
progress: 80,
|
||||
gender: "male",
|
||||
rating: 1,
|
||||
col: "green",
|
||||
dob: "24/09/1950",
|
||||
car: true,
|
||||
activity: [11, 7, 6, 12, 14, 1, 20, 5, 3, 10, 13, 17, 15, 9, 1, 13, 11, 10, 9, 6]
|
||||
},
|
||||
{
|
||||
id: 15,
|
||||
name: "Ed White",
|
||||
progress: 70,
|
||||
gender: "male",
|
||||
rating: 0,
|
||||
col: "yellow",
|
||||
dob: "19/06/1976",
|
||||
activity: [20, 17, 15, 11, 16, 9, 4, 17, 11, 12, 0, 5, 12, 14, 18, 11, 12, 14, 20, 12]
|
||||
},
|
||||
{
|
||||
id: 16,
|
||||
name: "Paul Branderson",
|
||||
progress: 60,
|
||||
gender: "male",
|
||||
rating: 5,
|
||||
col: "orange",
|
||||
dob: "01/01/1982",
|
||||
activity: [1, 3, 1, 3, 3, 1, 11, 15, 19, 20, 17, 16, 16, 5, 3, 2, 1, 3, 1, 3]
|
||||
},
|
||||
{
|
||||
id: 18,
|
||||
name: "Emma Netwon",
|
||||
progress: 40,
|
||||
gender: "female",
|
||||
rating: 4,
|
||||
col: "brown",
|
||||
dob: "07/10/1963",
|
||||
car: true,
|
||||
activity: [3, 7, 9, 1, 4, 8, 3, 7, 9, 1, 4, 8, 2, 6, 4, 2, 2, 6, 4, 2]
|
||||
},
|
||||
{
|
||||
id: 19,
|
||||
name: "Hannah Farnsworth",
|
||||
progress: 30,
|
||||
gender: "female",
|
||||
rating: 1,
|
||||
col: "pink",
|
||||
dob: "11/02/1991",
|
||||
activity: [1, 2, 5, 4, 1, 16, 10, 12, 14, 16, 13, 9, 7, 11, 10, 13, 4, 2, 1, 3]
|
||||
},
|
||||
{
|
||||
id: 20,
|
||||
name: "Victoria Bath",
|
||||
progress: 20,
|
||||
gender: "female",
|
||||
rating: 2,
|
||||
col: "purple",
|
||||
dob: "22/03/1986",
|
||||
activity: [10, 12, 14, 16, 13, 9, 7, 1, 2, 3, 4, 5, 4, 2, 5, 9, 8, 11, 10, 13]
|
||||
},
|
||||
];
|
||||
var tableDataNested = [{
|
||||
name: "Oli Bob",
|
||||
location: "United Kingdom",
|
||||
gender: "male",
|
||||
col: "red",
|
||||
dob: "14/04/1984",
|
||||
_children: [{
|
||||
name: "Mary May",
|
||||
location: "Germany",
|
||||
gender: "female",
|
||||
col: "blue",
|
||||
dob: "14/05/1982"
|
||||
},
|
||||
{
|
||||
name: "Christine Lobowski",
|
||||
location: "France",
|
||||
gender: "female",
|
||||
col: "green",
|
||||
dob: "22/05/1982"
|
||||
},
|
||||
{
|
||||
name: "Brendon Philips",
|
||||
location: "USA",
|
||||
gender: "male",
|
||||
col: "orange",
|
||||
dob: "01/08/1980",
|
||||
_children: [{
|
||||
name: "Margret Marmajuke",
|
||||
location: "Canada",
|
||||
gender: "female",
|
||||
col: "yellow",
|
||||
dob: "31/01/1999"
|
||||
},
|
||||
{
|
||||
name: "Frank Harbours",
|
||||
location: "Russia",
|
||||
gender: "male",
|
||||
col: "red",
|
||||
dob: "12/05/1966"
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Jamie Newhart",
|
||||
location: "India",
|
||||
gender: "male",
|
||||
col: "green",
|
||||
dob: "14/05/1985"
|
||||
},
|
||||
{
|
||||
name: "Gemma Jane",
|
||||
location: "China",
|
||||
gender: "female",
|
||||
col: "red",
|
||||
dob: "22/05/1982",
|
||||
_children: [{
|
||||
name: "Emily Sykes",
|
||||
location: "South Korea",
|
||||
gender: "female",
|
||||
col: "maroon",
|
||||
dob: "11/11/1970"
|
||||
},]
|
||||
},
|
||||
{
|
||||
name: "James Newman",
|
||||
location: "Japan",
|
||||
gender: "male",
|
||||
col: "red",
|
||||
dob: "22/03/1998"
|
||||
},
|
||||
];
|
||||
|
||||
var nestedData = [{
|
||||
id: 1,
|
||||
make: "Ford",
|
||||
model: "focus",
|
||||
reg: "P232 NJP",
|
||||
color: "white",
|
||||
serviceHistory: [{
|
||||
date: "01/02/2016",
|
||||
engineer: "Steve Boberson",
|
||||
actions: "Changed oli filter"
|
||||
},
|
||||
{
|
||||
date: "07/02/2017",
|
||||
engineer: "Martin Stevenson",
|
||||
actions: "Break light broken"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
make: "BMW",
|
||||
model: "m3",
|
||||
reg: "W342 SEF",
|
||||
color: "red",
|
||||
serviceHistory: [{
|
||||
date: "22/05/2017",
|
||||
engineer: "Jimmy Brown",
|
||||
actions: "Aligned wheels"
|
||||
},
|
||||
{
|
||||
date: "11/02/2018",
|
||||
engineer: "Lotty Ferberson",
|
||||
actions: "Changed Oil"
|
||||
},
|
||||
{
|
||||
date: "04/04/2018",
|
||||
engineer: "Franco Martinez",
|
||||
actions: "Fixed Tracking"
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
var rowMenu = [{
|
||||
label: "Change Name",
|
||||
action: function (e, row) {
|
||||
row.update({
|
||||
name: "Steve Bobberson"
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Select Row",
|
||||
action: function (e, row) {
|
||||
row.select();
|
||||
}
|
||||
},
|
||||
{
|
||||
separator: true,
|
||||
},
|
||||
{
|
||||
label: "Delete Row",
|
||||
action: function (e, row) {
|
||||
row.delete();
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
//define row context menu
|
||||
var headerMenu = [{
|
||||
label: "COUNT",
|
||||
action: function (e, column) {
|
||||
//column.hide();
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "SUM",
|
||||
action: function (e, column) {
|
||||
//column.move("col");
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "AVERAGE",
|
||||
action: function (e, column) {
|
||||
//column.move("col");
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "MAX",
|
||||
action: function (e, column) {
|
||||
//column.move("col");
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "MIN",
|
||||
action: function (e, column) {
|
||||
//column.move("col");
|
||||
}
|
||||
},
|
||||
{
|
||||
separator: true,
|
||||
},
|
||||
{
|
||||
label: "Calendar",
|
||||
action: function (e, column) {
|
||||
//column.move("col");
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Hide Column",
|
||||
action: function (e, column) {
|
||||
//column.move("col");
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Remove column",
|
||||
action: function (e, column) {
|
||||
//column.move("col");
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
var table = new Tabulator("#tabulator-example", {
|
||||
height: '100%',
|
||||
data: tabledata,
|
||||
layout: "fitColumns",
|
||||
responsiveLayout: "hide",
|
||||
tooltips: true,
|
||||
addRowPos: "top",
|
||||
history: true,
|
||||
movableColumns: true,
|
||||
resizableRows: true,
|
||||
langs: {
|
||||
"fr-fr": { //French language definition
|
||||
"columns": {
|
||||
"name": "Nom",
|
||||
"gender": "Genre",
|
||||
"col": "Couleur",
|
||||
"dob": "Date de Naissance",
|
||||
},
|
||||
"pagination": {
|
||||
"first": "Premier",
|
||||
"first_title": "Première Page",
|
||||
"last": "Dernier",
|
||||
"last_title": "Dernière Page",
|
||||
"prev": "Précédent",
|
||||
"prev_title": "Page Précédente",
|
||||
"next": "Suivant",
|
||||
"next_title": "Page Suivante",
|
||||
"all": "Toute",
|
||||
},
|
||||
},
|
||||
"de-de": { //German language definition
|
||||
"columns": {
|
||||
"name": "Name",
|
||||
"gender": "Genre",
|
||||
"col": "Farbe",
|
||||
"dob": "Geburtsdatum",
|
||||
},
|
||||
"pagination": {
|
||||
"first": "Zuerst",
|
||||
"first_title": "Zuerst Seite",
|
||||
"last": "Last",
|
||||
"last_title": "Letzte Seite",
|
||||
"prev": "Zurück",
|
||||
"prev_title": "Zurück Seite",
|
||||
"next": "Nächster",
|
||||
"next_title": "Nächster Seite",
|
||||
"all": "Alle",
|
||||
},
|
||||
},
|
||||
},
|
||||
initialSort: [{
|
||||
column: "name",
|
||||
dir: "asc"
|
||||
},],
|
||||
columns: [
|
||||
{
|
||||
title: "#",
|
||||
field: "id",
|
||||
width: 100,
|
||||
minWidth: 80,
|
||||
},
|
||||
{
|
||||
title: "Name",
|
||||
field: "name",
|
||||
headerMenu: headerMenu,
|
||||
minWidth: 100,
|
||||
},
|
||||
{
|
||||
title: "Gender",
|
||||
field: "gender",
|
||||
headerMenu: headerMenu,
|
||||
width: 195,
|
||||
editorParams: {
|
||||
values: ["male", "female"]
|
||||
},
|
||||
editableTitle: true
|
||||
},
|
||||
{
|
||||
title: "Rating",
|
||||
field: "rating",
|
||||
width: 100,
|
||||
minWidth: 150,
|
||||
editableTitle: true
|
||||
},
|
||||
{
|
||||
title: "Color",
|
||||
field: "col",
|
||||
headerMenu: headerMenu,
|
||||
width: 130,
|
||||
editableTitle: true
|
||||
},
|
||||
{
|
||||
title: "Date Of Birth",
|
||||
field: "dob",
|
||||
headerMenu: headerMenu,
|
||||
width: 180,
|
||||
sorter: "date",
|
||||
hozAlign: "center",
|
||||
editableTitle: true
|
||||
}
|
||||
],
|
||||
});
|
||||
|
||||
$("#tabulator-controls input[name=name]").on("keyup", function () {
|
||||
table.setFilter("name", "like", $(this).val())
|
||||
});
|
||||
|
||||
Vendored
+1409
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user