api code global jain
This commit is contained in:
258
public/js/pages/features/miscellaneous/blockui.js
vendored
Normal file
258
public/js/pages/features/miscellaneous/blockui.js
vendored
Normal file
@@ -0,0 +1,258 @@
|
||||
"use strict";
|
||||
// Class definition
|
||||
|
||||
var KTBlockUIDemo = function () {
|
||||
// Private functions
|
||||
// Basic demo
|
||||
var _demo1 = function () {
|
||||
// default
|
||||
$('#kt_blockui_default').click(function() {
|
||||
KTApp.block('#kt_blockui_content', {});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_content');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_overlay_color').click(function() {
|
||||
KTApp.block('#kt_blockui_content', {
|
||||
overlayColor: 'red',
|
||||
opacity: 0.1,
|
||||
state: 'primary' // a bootstrap color
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_content');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_custom_spinner').click(function() {
|
||||
KTApp.block('#kt_blockui_content', {
|
||||
overlayColor: '#000000',
|
||||
state: 'warning', // a bootstrap color
|
||||
size: 'lg' //available custom sizes: sm|lg
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_content');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_custom_text_1').click(function() {
|
||||
KTApp.block('#kt_blockui_content', {
|
||||
overlayColor: '#000000',
|
||||
state: 'danger',
|
||||
message: 'Please wait...'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_content');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_custom_text_2').click(function() {
|
||||
KTApp.block('#kt_blockui_content', {
|
||||
overlayColor: '#000000',
|
||||
state: 'primary',
|
||||
message: 'Processing...'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_content');
|
||||
}, 2000);
|
||||
});
|
||||
}
|
||||
|
||||
// modal blocking
|
||||
var _demo2 = function () {
|
||||
// default
|
||||
$('#kt_blockui_modal_default_btn').click(function() {
|
||||
KTApp.block('#kt_blockui_modal_default .modal-dialog', {});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_modal_default .modal-content');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_modal_overlay_color_btn').click(function() {
|
||||
KTApp.block('#kt_blockui_modal_overlay_color .modal-content', {
|
||||
overlayColor: 'red',
|
||||
opacity: 0.1,
|
||||
state: 'primary' // a bootstrap color
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_modal_overlay_color .modal-content');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_modal_custom_spinner_btn').click(function() {
|
||||
KTApp.block('#kt_blockui_modal_custom_spinner .modal-content', {
|
||||
overlayColor: '#000000',
|
||||
state: 'warning', // a bootstrap color
|
||||
size: 'lg' //available custom sizes: sm|lg
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_modal_custom_spinner .modal-content');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_modal_custom_text_1_btn').click(function() {
|
||||
KTApp.block('#kt_blockui_modal_custom_text_1 .modal-content', {
|
||||
overlayColor: '#000000',
|
||||
state: 'danger',
|
||||
message: 'Please wait...'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_modal_custom_text_1 .modal-content');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_modal_custom_text_2_btn').click(function() {
|
||||
KTApp.block('#kt_blockui_modal_custom_text_2 .modal-content', {
|
||||
overlayColor: '#000000',
|
||||
state: 'primary',
|
||||
message: 'Processing...'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_modal_custom_text_2 .modal-content');
|
||||
}, 2000);
|
||||
});
|
||||
}
|
||||
|
||||
// card blocking
|
||||
var _demo3 = function () {
|
||||
// default
|
||||
$('#kt_blockui_card_default').click(function() {
|
||||
KTApp.block('#kt_blockui_card');
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_card');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_card_overlay_color').click(function() {
|
||||
KTApp.block('#kt_blockui_card', {
|
||||
overlayColor: 'red',
|
||||
opacity: 0.1,
|
||||
state: 'primary' // a bootstrap color
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_card');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_card_custom_spinner').click(function() {
|
||||
KTApp.block('#kt_blockui_card', {
|
||||
overlayColor: '#000000',
|
||||
state: 'warning', // a bootstrap color
|
||||
size: 'lg' //available custom sizes: sm|lg
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_card');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_card_custom_text_1').click(function() {
|
||||
KTApp.block('#kt_blockui_card', {
|
||||
overlayColor: '#000000',
|
||||
state: 'danger',
|
||||
message: 'Please wait...'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_card');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_card_custom_text_2').click(function() {
|
||||
KTApp.block('#kt_blockui_card', {
|
||||
overlayColor: '#000000',
|
||||
state: 'primary',
|
||||
message: 'Processing...'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_card');
|
||||
}, 2000);
|
||||
});
|
||||
}
|
||||
|
||||
// page blocking
|
||||
var _demo4 = function () {
|
||||
$('#kt_blockui_page_default').click(function() {
|
||||
KTApp.blockPage();
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblockPage();
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_page_overlay_color').click(function() {
|
||||
KTApp.blockPage({
|
||||
overlayColor: 'red',
|
||||
opacity: 0.1,
|
||||
state: 'primary' // a bootstrap color
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblockPage();
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_page_custom_spinner').click(function() {
|
||||
KTApp.blockPage({
|
||||
overlayColor: '#000000',
|
||||
state: 'warning', // a bootstrap color
|
||||
size: 'lg' //available custom sizes: sm|lg
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblockPage();
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_page_custom_text_1').click(function() {
|
||||
KTApp.blockPage({
|
||||
overlayColor: '#000000',
|
||||
state: 'danger',
|
||||
message: 'Please wait...'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblockPage();
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_page_custom_text_2').click(function() {
|
||||
KTApp.blockPage({
|
||||
overlayColor: '#000000',
|
||||
state: 'primary',
|
||||
message: 'Processing...'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblockPage();
|
||||
}, 2000);
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
// public functions
|
||||
init: function() {
|
||||
_demo1();
|
||||
_demo2();
|
||||
_demo3();
|
||||
_demo4();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
KTBlockUIDemo.init();
|
||||
});
|
||||
1
public/js/pages/features/miscellaneous/blockui.min.js
vendored
Normal file
1
public/js/pages/features/miscellaneous/blockui.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var KTBlockUIDemo={init:function(){$("#kt_blockui_default").click(function(){KTApp.block("#kt_blockui_content",{}),setTimeout(function(){KTApp.unblock("#kt_blockui_content")},2e3)}),$("#kt_blockui_overlay_color").click(function(){KTApp.block("#kt_blockui_content",{overlayColor:"red",opacity:.1,state:"primary"}),setTimeout(function(){KTApp.unblock("#kt_blockui_content")},2e3)}),$("#kt_blockui_custom_spinner").click(function(){KTApp.block("#kt_blockui_content",{overlayColor:"#000000",state:"warning",size:"lg"}),setTimeout(function(){KTApp.unblock("#kt_blockui_content")},2e3)}),$("#kt_blockui_custom_text_1").click(function(){KTApp.block("#kt_blockui_content",{overlayColor:"#000000",state:"danger",message:"Please wait..."}),setTimeout(function(){KTApp.unblock("#kt_blockui_content")},2e3)}),$("#kt_blockui_custom_text_2").click(function(){KTApp.block("#kt_blockui_content",{overlayColor:"#000000",state:"primary",message:"Processing..."}),setTimeout(function(){KTApp.unblock("#kt_blockui_content")},2e3)}),$("#kt_blockui_modal_default_btn").click(function(){KTApp.block("#kt_blockui_modal_default .modal-dialog",{}),setTimeout(function(){KTApp.unblock("#kt_blockui_modal_default .modal-content")},2e3)}),$("#kt_blockui_modal_overlay_color_btn").click(function(){KTApp.block("#kt_blockui_modal_overlay_color .modal-content",{overlayColor:"red",opacity:.1,state:"primary"}),setTimeout(function(){KTApp.unblock("#kt_blockui_modal_overlay_color .modal-content")},2e3)}),$("#kt_blockui_modal_custom_spinner_btn").click(function(){KTApp.block("#kt_blockui_modal_custom_spinner .modal-content",{overlayColor:"#000000",state:"warning",size:"lg"}),setTimeout(function(){KTApp.unblock("#kt_blockui_modal_custom_spinner .modal-content")},2e3)}),$("#kt_blockui_modal_custom_text_1_btn").click(function(){KTApp.block("#kt_blockui_modal_custom_text_1 .modal-content",{overlayColor:"#000000",state:"danger",message:"Please wait..."}),setTimeout(function(){KTApp.unblock("#kt_blockui_modal_custom_text_1 .modal-content")},2e3)}),$("#kt_blockui_modal_custom_text_2_btn").click(function(){KTApp.block("#kt_blockui_modal_custom_text_2 .modal-content",{overlayColor:"#000000",state:"primary",message:"Processing..."}),setTimeout(function(){KTApp.unblock("#kt_blockui_modal_custom_text_2 .modal-content")},2e3)}),$("#kt_blockui_card_default").click(function(){KTApp.block("#kt_blockui_card"),setTimeout(function(){KTApp.unblock("#kt_blockui_card")},2e3)}),$("#kt_blockui_card_overlay_color").click(function(){KTApp.block("#kt_blockui_card",{overlayColor:"red",opacity:.1,state:"primary"}),setTimeout(function(){KTApp.unblock("#kt_blockui_card")},2e3)}),$("#kt_blockui_card_custom_spinner").click(function(){KTApp.block("#kt_blockui_card",{overlayColor:"#000000",state:"warning",size:"lg"}),setTimeout(function(){KTApp.unblock("#kt_blockui_card")},2e3)}),$("#kt_blockui_card_custom_text_1").click(function(){KTApp.block("#kt_blockui_card",{overlayColor:"#000000",state:"danger",message:"Please wait..."}),setTimeout(function(){KTApp.unblock("#kt_blockui_card")},2e3)}),$("#kt_blockui_card_custom_text_2").click(function(){KTApp.block("#kt_blockui_card",{overlayColor:"#000000",state:"primary",message:"Processing..."}),setTimeout(function(){KTApp.unblock("#kt_blockui_card")},2e3)}),$("#kt_blockui_page_default").click(function(){KTApp.blockPage(),setTimeout(function(){KTApp.unblockPage()},2e3)}),$("#kt_blockui_page_overlay_color").click(function(){KTApp.blockPage({overlayColor:"red",opacity:.1,state:"primary"}),setTimeout(function(){KTApp.unblockPage()},2e3)}),$("#kt_blockui_page_custom_spinner").click(function(){KTApp.blockPage({overlayColor:"#000000",state:"warning",size:"lg"}),setTimeout(function(){KTApp.unblockPage()},2e3)}),$("#kt_blockui_page_custom_text_1").click(function(){KTApp.blockPage({overlayColor:"#000000",state:"danger",message:"Please wait..."}),setTimeout(function(){KTApp.unblockPage()},2e3)}),$("#kt_blockui_page_custom_text_2").click(function(){KTApp.blockPage({overlayColor:"#000000",state:"primary",message:"Processing..."}),setTimeout(function(){KTApp.unblockPage()},2e3)})}};jQuery(document).ready(function(){KTBlockUIDemo.init()});
|
||||
92
public/js/pages/features/miscellaneous/bootstrap-notify.js
vendored
Normal file
92
public/js/pages/features/miscellaneous/bootstrap-notify.js
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
|
||||
var KTBootstrapNotifyDemo = function () {
|
||||
|
||||
// Private functions
|
||||
|
||||
// basic demo
|
||||
var demo = function () {
|
||||
// init bootstrap switch
|
||||
$('[data-switch=true]').bootstrapSwitch();
|
||||
|
||||
// handle the demo
|
||||
$('#kt_notify_btn').click(function() {
|
||||
var content = {};
|
||||
|
||||
content.message = 'New order has been placed';
|
||||
if ($('#kt_notify_title').prop('checked')) {
|
||||
content.title = 'Notification Title';
|
||||
}
|
||||
if ($('#kt_notify_icon').val() != '') {
|
||||
content.icon = 'icon ' + $('#kt_notify_icon').val();
|
||||
}
|
||||
if ($('#kt_notify_url').prop('checked')) {
|
||||
content.url = 'www.keenthemes.com';
|
||||
content.target = '_blank';
|
||||
}
|
||||
|
||||
var notify = $.notify(content, {
|
||||
type: $('#kt_notify_state').val(),
|
||||
allow_dismiss: $('#kt_notify_dismiss').prop('checked'),
|
||||
newest_on_top: $('#kt_notify_top').prop('checked'),
|
||||
mouse_over: $('#kt_notify_pause').prop('checked'),
|
||||
showProgressbar: $('#kt_notify_progress').prop('checked'),
|
||||
spacing: $('#kt_notify_spacing').val(),
|
||||
timer: $('#kt_notify_timer').val(),
|
||||
placement: {
|
||||
from: $('#kt_notify_placement_from').val(),
|
||||
align: $('#kt_notify_placement_align').val()
|
||||
},
|
||||
offset: {
|
||||
x: $('#kt_notify_offset_x').val(),
|
||||
y: $('#kt_notify_offset_y').val()
|
||||
},
|
||||
delay: $('#kt_notify_delay').val(),
|
||||
z_index: $('#kt_notify_zindex').val(),
|
||||
animate: {
|
||||
enter: 'animate__animated animate__' + $('#kt_notify_animate_enter').val(),
|
||||
exit: 'animate__animated animate__' + $('#kt_notify_animate_exit').val()
|
||||
}
|
||||
});
|
||||
|
||||
if ($('#kt_notify_progress').prop('checked')) {
|
||||
setTimeout(function() {
|
||||
notify.update('message', '<strong>Saving</strong> Page Data.');
|
||||
notify.update('type', 'primary');
|
||||
notify.update('progress', 20);
|
||||
}, 1000);
|
||||
|
||||
setTimeout(function() {
|
||||
notify.update('message', '<strong>Saving</strong> User Data.');
|
||||
notify.update('type', 'warning');
|
||||
notify.update('progress', 40);
|
||||
}, 2000);
|
||||
|
||||
setTimeout(function() {
|
||||
notify.update('message', '<strong>Saving</strong> Profile Data.');
|
||||
notify.update('type', 'danger');
|
||||
notify.update('progress', 65);
|
||||
}, 3000);
|
||||
|
||||
setTimeout(function() {
|
||||
notify.update('message', '<strong>Checking</strong> for errors.');
|
||||
notify.update('type', 'success');
|
||||
notify.update('progress', 100);
|
||||
}, 4000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
// public functions
|
||||
init: function() {
|
||||
demo();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
KTBootstrapNotifyDemo.init();
|
||||
});
|
||||
1
public/js/pages/features/miscellaneous/bootstrap-notify.min.js
vendored
Normal file
1
public/js/pages/features/miscellaneous/bootstrap-notify.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var KTBootstrapNotifyDemo={init:function(){$("[data-switch=true]").bootstrapSwitch(),$("#kt_notify_btn").click(function(){var t={message:"New order has been placed"};$("#kt_notify_title").prop("checked")&&(t.title="Notification Title"),""!=$("#kt_notify_icon").val()&&(t.icon="icon "+$("#kt_notify_icon").val()),$("#kt_notify_url").prop("checked")&&(t.url="www.keenthemes.com",t.target="_blank");var e=$.notify(t,{type:$("#kt_notify_state").val(),allow_dismiss:$("#kt_notify_dismiss").prop("checked"),newest_on_top:$("#kt_notify_top").prop("checked"),mouse_over:$("#kt_notify_pause").prop("checked"),showProgressbar:$("#kt_notify_progress").prop("checked"),spacing:$("#kt_notify_spacing").val(),timer:$("#kt_notify_timer").val(),placement:{from:$("#kt_notify_placement_from").val(),align:$("#kt_notify_placement_align").val()},offset:{x:$("#kt_notify_offset_x").val(),y:$("#kt_notify_offset_y").val()},delay:$("#kt_notify_delay").val(),z_index:$("#kt_notify_zindex").val(),animate:{enter:"animate__animated animate__"+$("#kt_notify_animate_enter").val(),exit:"animate__animated animate__"+$("#kt_notify_animate_exit").val()}});$("#kt_notify_progress").prop("checked")&&(setTimeout(function(){e.update("message","<strong>Saving</strong> Page Data."),e.update("type","primary"),e.update("progress",20)},1e3),setTimeout(function(){e.update("message","<strong>Saving</strong> User Data."),e.update("type","warning"),e.update("progress",40)},2e3),setTimeout(function(){e.update("message","<strong>Saving</strong> Profile Data."),e.update("type","danger"),e.update("progress",65)},3e3),setTimeout(function(){e.update("message","<strong>Checking</strong> for errors."),e.update("type","success"),e.update("progress",100)},4e3))})}};jQuery(document).ready(function(){KTBootstrapNotifyDemo.init()});
|
||||
124
public/js/pages/features/miscellaneous/cropper.js
vendored
Normal file
124
public/js/pages/features/miscellaneous/cropper.js
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
'use strict';
|
||||
|
||||
// Class definition
|
||||
var KTCropperDemo = function() {
|
||||
|
||||
// Private functions
|
||||
var initCropperDemo = function() {
|
||||
var image = document.getElementById('image');
|
||||
|
||||
var options = {
|
||||
crop: function(event) {
|
||||
document.getElementById('dataX').value = Math.round(event.detail.x);
|
||||
document.getElementById('dataY').value = Math.round(event.detail.y);
|
||||
document.getElementById('dataWidth').value = Math.round(event.detail.width);
|
||||
document.getElementById('dataHeight').value = Math.round(event.detail.height);
|
||||
document.getElementById('dataRotate').value = event.detail.rotate;
|
||||
document.getElementById('dataScaleX').value = event.detail.scaleX;
|
||||
document.getElementById('dataScaleY').value = event.detail.scaleY;
|
||||
|
||||
var lg = document.getElementById('cropper-preview-lg');
|
||||
lg.innerHTML = '';
|
||||
lg.appendChild(cropper.getCroppedCanvas({width: 256, height: 160}));
|
||||
|
||||
var md = document.getElementById('cropper-preview-md');
|
||||
md.innerHTML = '';
|
||||
md.appendChild(cropper.getCroppedCanvas({width: 128, height: 80}));
|
||||
|
||||
var sm = document.getElementById('cropper-preview-sm');
|
||||
sm.innerHTML = '';
|
||||
sm.appendChild(cropper.getCroppedCanvas({width: 64, height: 40}));
|
||||
|
||||
var xs = document.getElementById('cropper-preview-xs');
|
||||
xs.innerHTML = '';
|
||||
xs.appendChild(cropper.getCroppedCanvas({width: 32, height: 20}));
|
||||
},
|
||||
};
|
||||
|
||||
var cropper = new Cropper(image, options);
|
||||
|
||||
var buttons = document.getElementById('cropper-buttons');
|
||||
var methods = buttons.querySelectorAll('[data-method]');
|
||||
methods.forEach(function(button) {
|
||||
button.addEventListener('click', function(e) {
|
||||
var method = button.getAttribute('data-method');
|
||||
var option = button.getAttribute('data-option');
|
||||
var option2 = button.getAttribute('data-second-option');
|
||||
|
||||
try {
|
||||
option = JSON.parse(option);
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
|
||||
var result;
|
||||
if (!option2) {
|
||||
result = cropper[method](option, option2);
|
||||
}
|
||||
else if (option) {
|
||||
result = cropper[method](option);
|
||||
}
|
||||
else {
|
||||
result = cropper[method]();
|
||||
}
|
||||
|
||||
if (method === 'getCroppedCanvas') {
|
||||
var modal = document.getElementById('getCroppedCanvasModal');
|
||||
var modalBody = modal.querySelector('.modal-body');
|
||||
modalBody.innerHTML = '';
|
||||
modalBody.appendChild(result);
|
||||
}
|
||||
|
||||
var input = document.querySelector('#putData');
|
||||
try {
|
||||
input.value = JSON.stringify(result);
|
||||
}
|
||||
catch (e) {
|
||||
if (!result) {
|
||||
input.value = result;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// set aspect ratio option buttons
|
||||
var radioOptions = document.getElementById('setAspectRatio').querySelectorAll('[name="aspectRatio"]');
|
||||
radioOptions.forEach(function(button) {
|
||||
button.addEventListener('click', function(e) {
|
||||
cropper.setAspectRatio(e.target.value);
|
||||
});
|
||||
});
|
||||
|
||||
// set view mode
|
||||
var viewModeOptions = document.getElementById('viewMode').querySelectorAll('[name="viewMode"]');
|
||||
viewModeOptions.forEach(function(button) {
|
||||
button.addEventListener('click', function(e) {
|
||||
cropper.destroy();
|
||||
cropper = new Cropper(image, Object.assign({}, options, {viewMode: e.target.value}));
|
||||
});
|
||||
});
|
||||
|
||||
var toggleoptions = document.getElementById('toggleOptionButtons').querySelectorAll('[type="checkbox"]');
|
||||
toggleoptions.forEach(function(checkbox) {
|
||||
checkbox.addEventListener('click', function(e) {
|
||||
var appendOption = {};
|
||||
appendOption[e.target.getAttribute('name')] = e.target.checked;
|
||||
options = Object.assign({}, options, appendOption);
|
||||
cropper.destroy();
|
||||
cropper = new Cropper(image, options);
|
||||
})
|
||||
})
|
||||
|
||||
};
|
||||
|
||||
return {
|
||||
// public functions
|
||||
init: function() {
|
||||
initCropperDemo();
|
||||
},
|
||||
};
|
||||
}();
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
KTCropperDemo.init();
|
||||
});
|
||||
1
public/js/pages/features/miscellaneous/cropper.min.js
vendored
Normal file
1
public/js/pages/features/miscellaneous/cropper.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var KTCropperDemo={init:function(){var e,t,n;e=document.getElementById("image"),t={crop:function(e){document.getElementById("dataX").value=Math.round(e.detail.x),document.getElementById("dataY").value=Math.round(e.detail.y),document.getElementById("dataWidth").value=Math.round(e.detail.width),document.getElementById("dataHeight").value=Math.round(e.detail.height),document.getElementById("dataRotate").value=e.detail.rotate,document.getElementById("dataScaleX").value=e.detail.scaleX,document.getElementById("dataScaleY").value=e.detail.scaleY;var t=document.getElementById("cropper-preview-lg");t.innerHTML="",t.appendChild(n.getCroppedCanvas({width:256,height:160}));var a=document.getElementById("cropper-preview-md");a.innerHTML="",a.appendChild(n.getCroppedCanvas({width:128,height:80}));var d=document.getElementById("cropper-preview-sm");d.innerHTML="",d.appendChild(n.getCroppedCanvas({width:64,height:40}));var o=document.getElementById("cropper-preview-xs");o.innerHTML="",o.appendChild(n.getCroppedCanvas({width:32,height:20}))}},n=new Cropper(e,t),document.getElementById("cropper-buttons").querySelectorAll("[data-method]").forEach(function(e){e.addEventListener("click",function(t){var a,d=e.getAttribute("data-method"),o=e.getAttribute("data-option"),r=e.getAttribute("data-second-option");try{o=JSON.parse(o)}catch(t){}if(a=r?o?n[d](o):n[d]():n[d](o,r),"getCroppedCanvas"===d){var i=document.getElementById("getCroppedCanvasModal").querySelector(".modal-body");i.innerHTML="",i.appendChild(a)}var c=document.querySelector("#putData");try{c.value=JSON.stringify(a)}catch(t){a||(c.value=a)}})}),document.getElementById("setAspectRatio").querySelectorAll('[name="aspectRatio"]').forEach(function(e){e.addEventListener("click",function(e){n.setAspectRatio(e.target.value)})}),document.getElementById("viewMode").querySelectorAll('[name="viewMode"]').forEach(function(a){a.addEventListener("click",function(a){n.destroy(),n=new Cropper(e,Object.assign({},t,{viewMode:a.target.value}))})}),document.getElementById("toggleOptionButtons").querySelectorAll('[type="checkbox"]').forEach(function(a){a.addEventListener("click",function(a){var d={};d[a.target.getAttribute("name")]=a.target.checked,t=Object.assign({},t,d),n.destroy(),n=new Cropper(e,t)})})}};jQuery(document).ready(function(){KTCropperDemo.init()});
|
||||
69
public/js/pages/features/miscellaneous/dual-listbox.js
vendored
Normal file
69
public/js/pages/features/miscellaneous/dual-listbox.js
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
'use strict';
|
||||
|
||||
// Class definition
|
||||
var KTDualListbox = function() {
|
||||
// Private functions
|
||||
var initDualListbox = function() {
|
||||
// Dual Listbox
|
||||
var listBoxes = $('.dual-listbox');
|
||||
|
||||
listBoxes.each(function() {
|
||||
var $this = $(this);
|
||||
// get titles
|
||||
var availableTitle = ($this.attr('data-available-title') != null) ? $this.attr('data-available-title') : 'Available options';
|
||||
var selectedTitle = ($this.attr('data-selected-title') != null) ? $this.attr('data-selected-title') : 'Selected options';
|
||||
|
||||
// get button labels
|
||||
var addLabel = ($this.attr('data-add') != null) ? $this.attr('data-add') : 'Add';
|
||||
var removeLabel = ($this.attr('data-remove') != null) ? $this.attr('data-remove') : 'Remove';
|
||||
var addAllLabel = ($this.attr('data-add-all') != null) ? $this.attr('data-add-all') : 'Add All';
|
||||
var removeAllLabel = ($this.attr('data-remove-all') != null) ? $this.attr('data-remove-all') : 'Remove All';
|
||||
|
||||
// get options
|
||||
var options = [];
|
||||
$this.children('option').each(function() {
|
||||
var value = $(this).val();
|
||||
var label = $(this).text();
|
||||
options.push({
|
||||
text: label,
|
||||
value: value
|
||||
});
|
||||
});
|
||||
|
||||
// get search option
|
||||
var search = ($this.attr('data-search') != null) ? $this.attr('data-search') : '';
|
||||
|
||||
// init dual listbox
|
||||
var dualListBox = new DualListbox($this.get(0), {
|
||||
addEvent: function(value) {
|
||||
console.log(value);
|
||||
},
|
||||
removeEvent: function(value) {
|
||||
console.log(value);
|
||||
},
|
||||
availableTitle: availableTitle,
|
||||
selectedTitle: selectedTitle,
|
||||
addButtonText: addLabel,
|
||||
removeButtonText: removeLabel,
|
||||
addAllButtonText: addAllLabel,
|
||||
removeAllButtonText: removeAllLabel,
|
||||
options: options,
|
||||
});
|
||||
|
||||
if (search == 'false') {
|
||||
dualListBox.search.classList.add('dual-listbox__search--hidden');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
// public functions
|
||||
init: function() {
|
||||
initDualListbox();
|
||||
},
|
||||
};
|
||||
}();
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
KTDualListbox.init();
|
||||
});
|
||||
1
public/js/pages/features/miscellaneous/dual-listbox.min.js
vendored
Normal file
1
public/js/pages/features/miscellaneous/dual-listbox.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var KTDualListbox={init:function(){$(".dual-listbox").each(function(){var t=$(this),a=null!=t.attr("data-available-title")?t.attr("data-available-title"):"Available options",e=null!=t.attr("data-selected-title")?t.attr("data-selected-title"):"Selected options",l=null!=t.attr("data-add")?t.attr("data-add"):"Add",d=null!=t.attr("data-remove")?t.attr("data-remove"):"Remove",o=null!=t.attr("data-add-all")?t.attr("data-add-all"):"Add All",n=null!=t.attr("data-remove-all")?t.attr("data-remove-all"):"Remove All",i=[];t.children("option").each(function(){var t=$(this).val(),a=$(this).text();i.push({text:a,value:t})});var r=null!=t.attr("data-search")?t.attr("data-search"):"",s=new DualListbox(t.get(0),{addEvent:function(t){console.log(t)},removeEvent:function(t){console.log(t)},availableTitle:a,selectedTitle:e,addButtonText:l,removeButtonText:d,addAllButtonText:o,removeAllButtonText:n,options:i});"false"==r&&s.search.classList.add("dual-listbox__search--hidden")})}};jQuery(document).ready(function(){KTDualListbox.init()});
|
||||
254
public/js/pages/features/miscellaneous/idle-timer.js
vendored
Normal file
254
public/js/pages/features/miscellaneous/idle-timer.js
vendored
Normal file
@@ -0,0 +1,254 @@
|
||||
"use strict";
|
||||
|
||||
var KTIdleTimerDemo = function() {
|
||||
var _initDemo1 = function() {
|
||||
//Define default
|
||||
var docTimeout = 5000;
|
||||
|
||||
/*
|
||||
Handle raised idle/active events
|
||||
*/
|
||||
$(document).on("idle.idleTimer", function(event, elem, obj) {
|
||||
$("#docStatus")
|
||||
.val(function(i, v) {
|
||||
return v + "Idle @ " + moment().format() + " \n";
|
||||
})
|
||||
.removeClass("alert-success")
|
||||
.addClass("alert-warning")
|
||||
.scrollTop($("#docStatus")[0].scrollHeight);
|
||||
});
|
||||
$(document).on("active.idleTimer", function(event, elem, obj, e) {
|
||||
$("#docStatus")
|
||||
.val(function(i, v) {
|
||||
return v + "Active [" + e.type + "] [" + e.target.nodeName + "] @ " + moment().format() + " \n";
|
||||
})
|
||||
.addClass("alert-success")
|
||||
.removeClass("alert-warning")
|
||||
.scrollTop($("#docStatus")[0].scrollHeight);
|
||||
});
|
||||
|
||||
/*
|
||||
Handle button events
|
||||
*/
|
||||
$("#btPause").click(function() {
|
||||
$(document).idleTimer("pause");
|
||||
$("#docStatus")
|
||||
.val(function(i, v) {
|
||||
return v + "Paused @ " + moment().format() + " \n";
|
||||
})
|
||||
.scrollTop($("#docStatus")[0].scrollHeight);
|
||||
$(this).blur();
|
||||
return false;
|
||||
});
|
||||
$("#btResume").click(function() {
|
||||
$(document).idleTimer("resume");
|
||||
$("#docStatus")
|
||||
.val(function(i, v) {
|
||||
return v + "Resumed @ " + moment().format() + " \n";
|
||||
})
|
||||
.scrollTop($("#docStatus")[0].scrollHeight);
|
||||
$(this).blur();
|
||||
return false;
|
||||
});
|
||||
$("#btElapsed").click(function() {
|
||||
$("#docStatus")
|
||||
.val(function(i, v) {
|
||||
return v + "Elapsed (since becoming active): " + $(document).idleTimer("getElapsedTime") + " \n";
|
||||
})
|
||||
.scrollTop($("#docStatus")[0].scrollHeight);
|
||||
$(this).blur();
|
||||
return false;
|
||||
});
|
||||
$("#btDestroy").click(function() {
|
||||
$(document).idleTimer("destroy");
|
||||
$("#docStatus")
|
||||
.val(function(i, v) {
|
||||
return v + "Destroyed: @ " + moment().format() + " \n";
|
||||
})
|
||||
.removeClass("alert-success")
|
||||
.removeClass("alert-warning")
|
||||
.scrollTop($("#docStatus")[0].scrollHeight);
|
||||
$(this).blur();
|
||||
return false;
|
||||
});
|
||||
$("#btInit").click(function() {
|
||||
// for demo purposes show init with just object
|
||||
$(document).idleTimer({
|
||||
timeout: docTimeout
|
||||
});
|
||||
$("#docStatus")
|
||||
.val(function(i, v) {
|
||||
return v + "Init: @ " + moment().format() + " \n";
|
||||
})
|
||||
.scrollTop($("#docStatus")[0].scrollHeight);
|
||||
|
||||
//Apply classes for default state
|
||||
if ($(document).idleTimer("isIdle")) {
|
||||
$("#docStatus")
|
||||
.removeClass("alert-success")
|
||||
.addClass("alert-warning");
|
||||
} else {
|
||||
$("#docStatus")
|
||||
.addClass("alert-success")
|
||||
.removeClass("alert-warning");
|
||||
}
|
||||
$(this).blur();
|
||||
return false;
|
||||
});
|
||||
|
||||
//Clear old statuses
|
||||
$("#docStatus").val("");
|
||||
|
||||
//Start timeout, passing no options
|
||||
//Same as $.idleTimer(docTimeout, docOptions);
|
||||
$(document).idleTimer(docTimeout);
|
||||
|
||||
//For demo purposes, style based on initial state
|
||||
if ($(document).idleTimer("isIdle")) {
|
||||
$("#docStatus")
|
||||
.val(function(i, v) {
|
||||
return v + "Initial Idle State @ " + moment().format() + " \n";
|
||||
})
|
||||
.removeClass("alert-success")
|
||||
.addClass("alert-warning")
|
||||
.scrollTop($("#docStatus")[0].scrollHeight);
|
||||
} else {
|
||||
$("#docStatus")
|
||||
.val(function(i, v) {
|
||||
return v + "Initial Active State @ " + moment().format() + " \n";
|
||||
})
|
||||
.addClass("alert-success")
|
||||
.removeClass("alert-warning")
|
||||
.scrollTop($("#docStatus")[0].scrollHeight);
|
||||
}
|
||||
|
||||
|
||||
//For demo purposes, display the actual timeout on the page
|
||||
$("#docTimeout").text(docTimeout / 1000);
|
||||
}
|
||||
|
||||
var _initDemo2 = function() {
|
||||
//Define textarea settings
|
||||
var
|
||||
taTimeout = 3000;
|
||||
|
||||
/*
|
||||
Handle raised idle/active events
|
||||
*/
|
||||
$("#elStatus").on("idle.idleTimer", function(event, elem, obj) {
|
||||
//If you dont stop propagation it will bubble up to document event handler
|
||||
event.stopPropagation();
|
||||
|
||||
$("#elStatus")
|
||||
.val(function(i, v) {
|
||||
return v + "Idle @ " + moment().format() + " \n";
|
||||
})
|
||||
.removeClass("alert-success")
|
||||
.addClass("alert-warning")
|
||||
.scrollTop($("#elStatus")[0].scrollHeight);
|
||||
|
||||
});
|
||||
$("#elStatus").on("active.idleTimer", function(event) {
|
||||
//If you dont stop propagation it will bubble up to document event handler
|
||||
event.stopPropagation();
|
||||
|
||||
$("#elStatus")
|
||||
.val(function(i, v) {
|
||||
return v + "Active @ " + moment().format() + " \n";
|
||||
})
|
||||
.addClass("alert-success")
|
||||
.removeClass("alert-warning")
|
||||
.scrollTop($("#elStatus")[0].scrollHeight);
|
||||
});
|
||||
|
||||
/*
|
||||
Handle button events
|
||||
*/
|
||||
$("#btReset").click(function() {
|
||||
$("#elStatus")
|
||||
.idleTimer("reset")
|
||||
.val(function(i, v) {
|
||||
return v + "Reset @ " + moment().format() + " \n";
|
||||
})
|
||||
.scrollTop($("#elStatus")[0].scrollHeight);
|
||||
|
||||
//Apply classes for default state
|
||||
if ($("#elStatus").idleTimer("isIdle")) {
|
||||
$("#elStatus")
|
||||
.removeClass("alert-success")
|
||||
.addClass("alert-warning");
|
||||
} else {
|
||||
$("#elStatus")
|
||||
.addClass("alert-success")
|
||||
.removeClass("alert-warning");
|
||||
}
|
||||
$(this).blur();
|
||||
return false;
|
||||
});
|
||||
$("#btRemaining").click(function() {
|
||||
$("#elStatus")
|
||||
.val(function(i, v) {
|
||||
return v + "Remaining: " + $("#elStatus").idleTimer("getRemainingTime") + " \n";
|
||||
})
|
||||
.scrollTop($("#elStatus")[0].scrollHeight);
|
||||
$(this).blur();
|
||||
return false;
|
||||
});
|
||||
$("#btLastActive").click(function() {
|
||||
$("#elStatus")
|
||||
.val(function(i, v) {
|
||||
return v + "LastActive: " + $("#elStatus").idleTimer("getLastActiveTime") + " \n";
|
||||
})
|
||||
.scrollTop($("#elStatus")[0].scrollHeight);
|
||||
$(this).blur();
|
||||
return false;
|
||||
});
|
||||
$("#btState").click(function() {
|
||||
$("#elStatus")
|
||||
.val(function(i, v) {
|
||||
return v + "State: " + ($("#elStatus").idleTimer("isIdle") ? "idle" : "active") + " \n";
|
||||
})
|
||||
.scrollTop($("#elStatus")[0].scrollHeight);
|
||||
$(this).blur();
|
||||
return false;
|
||||
});
|
||||
|
||||
//Clear value if there was one cached & start time
|
||||
$("#elStatus").val("").idleTimer(taTimeout);
|
||||
|
||||
//For demo purposes, show initial state
|
||||
if ($("#elStatus").idleTimer("isIdle")) {
|
||||
$("#elStatus")
|
||||
.val(function(i, v) {
|
||||
return v + "Initial Idle @ " + moment().format() + " \n";
|
||||
})
|
||||
.removeClass("alert-success")
|
||||
.addClass("alert-warning")
|
||||
.scrollTop($("#elStatus")[0].scrollHeight);
|
||||
} else {
|
||||
$("#elStatus")
|
||||
.val(function(i, v) {
|
||||
return v + "Initial Active @ " + moment().format() + " \n";
|
||||
})
|
||||
.addClass("alert-success")
|
||||
.removeClass("alert-warning")
|
||||
.scrollTop($("#elStatus")[0].scrollHeight);
|
||||
}
|
||||
|
||||
// Display the actual timeout on the page
|
||||
$("#elTimeout").text(taTimeout / 1000);
|
||||
|
||||
}
|
||||
|
||||
return {
|
||||
//main function to initiate the module
|
||||
init: function() {
|
||||
_initDemo1();
|
||||
_initDemo2();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
KTIdleTimerDemo.init();
|
||||
});
|
||||
1
public/js/pages/features/miscellaneous/idle-timer.min.js
vendored
Normal file
1
public/js/pages/features/miscellaneous/idle-timer.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var KTIdleTimerDemo={init:function(){$(document).on("idle.idleTimer",function(t,e,l){$("#docStatus").val(function(t,e){return e+"Idle @ "+moment().format()+" \n"}).removeClass("alert-success").addClass("alert-warning").scrollTop($("#docStatus")[0].scrollHeight)}),$(document).on("active.idleTimer",function(t,e,l,s){$("#docStatus").val(function(t,e){return e+"Active ["+s.type+"] ["+s.target.nodeName+"] @ "+moment().format()+" \n"}).addClass("alert-success").removeClass("alert-warning").scrollTop($("#docStatus")[0].scrollHeight)}),$("#btPause").click(function(){return $(document).idleTimer("pause"),$("#docStatus").val(function(t,e){return e+"Paused @ "+moment().format()+" \n"}).scrollTop($("#docStatus")[0].scrollHeight),$(this).blur(),!1}),$("#btResume").click(function(){return $(document).idleTimer("resume"),$("#docStatus").val(function(t,e){return e+"Resumed @ "+moment().format()+" \n"}).scrollTop($("#docStatus")[0].scrollHeight),$(this).blur(),!1}),$("#btElapsed").click(function(){return $("#docStatus").val(function(t,e){return e+"Elapsed (since becoming active): "+$(document).idleTimer("getElapsedTime")+" \n"}).scrollTop($("#docStatus")[0].scrollHeight),$(this).blur(),!1}),$("#btDestroy").click(function(){return $(document).idleTimer("destroy"),$("#docStatus").val(function(t,e){return e+"Destroyed: @ "+moment().format()+" \n"}).removeClass("alert-success").removeClass("alert-warning").scrollTop($("#docStatus")[0].scrollHeight),$(this).blur(),!1}),$("#btInit").click(function(){return $(document).idleTimer({timeout:5e3}),$("#docStatus").val(function(t,e){return e+"Init: @ "+moment().format()+" \n"}).scrollTop($("#docStatus")[0].scrollHeight),$(document).idleTimer("isIdle")?$("#docStatus").removeClass("alert-success").addClass("alert-warning"):$("#docStatus").addClass("alert-success").removeClass("alert-warning"),$(this).blur(),!1}),$("#docStatus").val(""),$(document).idleTimer(5e3),$(document).idleTimer("isIdle")?$("#docStatus").val(function(t,e){return e+"Initial Idle State @ "+moment().format()+" \n"}).removeClass("alert-success").addClass("alert-warning").scrollTop($("#docStatus")[0].scrollHeight):$("#docStatus").val(function(t,e){return e+"Initial Active State @ "+moment().format()+" \n"}).addClass("alert-success").removeClass("alert-warning").scrollTop($("#docStatus")[0].scrollHeight),$("#docTimeout").text(5),$("#elStatus").on("idle.idleTimer",function(t,e,l){t.stopPropagation(),$("#elStatus").val(function(t,e){return e+"Idle @ "+moment().format()+" \n"}).removeClass("alert-success").addClass("alert-warning").scrollTop($("#elStatus")[0].scrollHeight)}),$("#elStatus").on("active.idleTimer",function(t){t.stopPropagation(),$("#elStatus").val(function(t,e){return e+"Active @ "+moment().format()+" \n"}).addClass("alert-success").removeClass("alert-warning").scrollTop($("#elStatus")[0].scrollHeight)}),$("#btReset").click(function(){return $("#elStatus").idleTimer("reset").val(function(t,e){return e+"Reset @ "+moment().format()+" \n"}).scrollTop($("#elStatus")[0].scrollHeight),$("#elStatus").idleTimer("isIdle")?$("#elStatus").removeClass("alert-success").addClass("alert-warning"):$("#elStatus").addClass("alert-success").removeClass("alert-warning"),$(this).blur(),!1}),$("#btRemaining").click(function(){return $("#elStatus").val(function(t,e){return e+"Remaining: "+$("#elStatus").idleTimer("getRemainingTime")+" \n"}).scrollTop($("#elStatus")[0].scrollHeight),$(this).blur(),!1}),$("#btLastActive").click(function(){return $("#elStatus").val(function(t,e){return e+"LastActive: "+$("#elStatus").idleTimer("getLastActiveTime")+" \n"}).scrollTop($("#elStatus")[0].scrollHeight),$(this).blur(),!1}),$("#btState").click(function(){return $("#elStatus").val(function(t,e){return e+"State: "+($("#elStatus").idleTimer("isIdle")?"idle":"active")+" \n"}).scrollTop($("#elStatus")[0].scrollHeight),$(this).blur(),!1}),$("#elStatus").val("").idleTimer(3e3),$("#elStatus").idleTimer("isIdle")?$("#elStatus").val(function(t,e){return e+"Initial Idle @ "+moment().format()+" \n"}).removeClass("alert-success").addClass("alert-warning").scrollTop($("#elStatus")[0].scrollHeight):$("#elStatus").val(function(t,e){return e+"Initial Active @ "+moment().format()+" \n"}).addClass("alert-success").removeClass("alert-warning").scrollTop($("#elStatus")[0].scrollHeight),$("#elTimeout").text(3)}};jQuery(document).ready(function(){KTIdleTimerDemo.init()});
|
||||
409
public/js/pages/features/miscellaneous/kanban-board.js
vendored
Normal file
409
public/js/pages/features/miscellaneous/kanban-board.js
vendored
Normal file
@@ -0,0 +1,409 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
|
||||
var KTKanbanBoardDemo = function() {
|
||||
// Private functions
|
||||
var _demo1 = function() {
|
||||
var kanban = new jKanban({
|
||||
element: '#kt_kanban_1',
|
||||
gutter: '0',
|
||||
widthBoard: '250px',
|
||||
boards: [{
|
||||
'id': '_inprocess',
|
||||
'title': 'In Process',
|
||||
'item': [{
|
||||
'title': '<span class="font-weight-bold">You can drag me too</span>'
|
||||
},
|
||||
{
|
||||
'title': '<span class="font-weight-bold">Buy Milk</span>'
|
||||
}
|
||||
]
|
||||
}, {
|
||||
'id': '_working',
|
||||
'title': 'Working',
|
||||
'item': [{
|
||||
'title': '<span class="font-weight-bold">Do Something!</span>'
|
||||
},
|
||||
{
|
||||
'title': '<span class="font-weight-bold">Run?</span>'
|
||||
}
|
||||
]
|
||||
}, {
|
||||
'id': '_done',
|
||||
'title': 'Done',
|
||||
'item': [{
|
||||
'title': '<span class="font-weight-bold">All right</span>'
|
||||
},
|
||||
{
|
||||
'title': '<span class="font-weight-bold">Ok!</span>'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
var _demo2 = function() {
|
||||
var kanban = new jKanban({
|
||||
element: '#kt_kanban_2',
|
||||
gutter: '0',
|
||||
widthBoard: '250px',
|
||||
boards: [{
|
||||
'id': '_inprocess',
|
||||
'title': 'In Process',
|
||||
'class': 'primary',
|
||||
'item': [{
|
||||
'title': '<span class="font-weight-bold">You can drag me too</span>',
|
||||
'class': 'light-primary',
|
||||
},
|
||||
{
|
||||
'title': '<span class="font-weight-bold">Buy Milk</span>',
|
||||
'class': 'light-primary',
|
||||
}
|
||||
]
|
||||
}, {
|
||||
'id': '_working',
|
||||
'title': 'Working',
|
||||
'class': 'success',
|
||||
'item': [{
|
||||
'title': '<span class="font-weight-bold">Do Something!</span>',
|
||||
'class': 'light-success',
|
||||
},
|
||||
{
|
||||
'title': '<span class="font-weight-bold">Run?</span>',
|
||||
'class': 'light-success',
|
||||
}
|
||||
]
|
||||
}, {
|
||||
'id': '_done',
|
||||
'title': 'Done',
|
||||
'class': 'danger',
|
||||
'item': [{
|
||||
'title': '<span class="font-weight-bold">All right</span>',
|
||||
'class': 'light-danger',
|
||||
},
|
||||
{
|
||||
'title': '<span class="font-weight-bold">Ok!</span>',
|
||||
'class': 'light-danger',
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
var _demo3 = function() {
|
||||
var kanban = new jKanban({
|
||||
element: '#kt_kanban_3',
|
||||
gutter: '0',
|
||||
widthBoard: '250px',
|
||||
click: function(el) {
|
||||
alert(el.innerHTML);
|
||||
},
|
||||
boards: [{
|
||||
'id': '_todo',
|
||||
'title': 'To Do',
|
||||
'class': 'light-primary',
|
||||
'dragTo': ['_working'],
|
||||
'item': [{
|
||||
'title': 'My Task Test',
|
||||
'class': 'primary'
|
||||
},
|
||||
{
|
||||
'title': 'Buy Milk',
|
||||
'class': 'primary'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
'id': '_working',
|
||||
'title': 'Working',
|
||||
'class': 'light-warning',
|
||||
'item': [{
|
||||
'title': 'Do Something!',
|
||||
'class': 'warning'
|
||||
},
|
||||
{
|
||||
'title': 'Run?',
|
||||
'class': 'warning'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
'id': '_done',
|
||||
'title': 'Done',
|
||||
'class': 'light-success',
|
||||
'dragTo': ['_working'],
|
||||
'item': [{
|
||||
'title': 'All right',
|
||||
'class': 'success'
|
||||
},
|
||||
{
|
||||
'title': 'Ok!',
|
||||
'class': 'success'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
'id': '_notes',
|
||||
'title': 'Notes',
|
||||
'class': 'light-danger',
|
||||
'item': [{
|
||||
'title': 'Warning Task',
|
||||
'class': 'danger'
|
||||
},
|
||||
{
|
||||
'title': 'Do not enter',
|
||||
'class': 'danger'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
var _demo4 = function() {
|
||||
var kanban = new jKanban({
|
||||
element: '#kt_kanban_4',
|
||||
gutter: '0',
|
||||
click: function(el) {
|
||||
alert(el.innerHTML);
|
||||
},
|
||||
boards: [{
|
||||
'id': '_backlog',
|
||||
'title': 'Backlog',
|
||||
'class': 'light-dark',
|
||||
'item': [{
|
||||
'title': `
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="symbol symbol-success mr-3">
|
||||
<img alt="Pic" src="assets/media/users/300_24.jpg" />
|
||||
</div>
|
||||
<div class="d-flex flex-column align-items-start">
|
||||
<span class="text-dark-50 font-weight-bold mb-1">SEO Optimization</span>
|
||||
<span class="label label-inline label-light-success font-weight-bold">In progress</span>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
},
|
||||
{
|
||||
'title': `
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="symbol symbol-success mr-3">
|
||||
<span class="symbol-label font-size-h4">A.D</span>
|
||||
</div>
|
||||
<div class="d-flex flex-column align-items-start">
|
||||
<span class="text-dark-50 font-weight-bold mb-1">Finance</span>
|
||||
<span class="label label-inline label-light-danger font-weight-bold">Pending</span>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
'id': '_todo',
|
||||
'title': 'To Do',
|
||||
'class': 'light-danger',
|
||||
'item': [{
|
||||
'title': `
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="symbol symbol-success mr-3">
|
||||
<img alt="Pic" src="assets/media/users/300_16.jpg" />
|
||||
</div>
|
||||
<div class="d-flex flex-column align-items-start">
|
||||
<span class="text-dark-50 font-weight-bold mb-1">Server Setup</span>
|
||||
<span class="label label-inline label-light-dark font-weight-bold">Completed</span>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
},
|
||||
{
|
||||
'title': `
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="symbol symbol-success mr-3">
|
||||
<img alt="Pic" src="assets/media/users/300_15.jpg" />
|
||||
</div>
|
||||
<div class="d-flex flex-column align-items-start">
|
||||
<span class="text-dark-50 font-weight-bold mb-1">Report Generation</span>
|
||||
<span class="label label-inline label-light-warning font-weight-bold">Due</span>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
'id': '_working',
|
||||
'title': 'Working',
|
||||
'class': 'light-primary',
|
||||
'item': [{
|
||||
'title': `
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="symbol symbol-success mr-3">
|
||||
<img alt="Pic" src="assets/media/users/300_24.jpg" />
|
||||
</div>
|
||||
<div class="d-flex flex-column align-items-start">
|
||||
<span class="text-dark-50 font-weight-bold mb-1">Marketing</span>
|
||||
<span class="label label-inline label-light-danger font-weight-bold">Planning</span>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
},
|
||||
{
|
||||
'title': `
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="symbol symbol-light-info mr-3">
|
||||
<span class="symbol-label font-size-h4">A.P</span>
|
||||
</div>
|
||||
<div class="d-flex flex-column align-items-start">
|
||||
<span class="text-dark-50 font-weight-bold mb-1">Finance</span>
|
||||
<span class="label label-inline label-light-primary font-weight-bold">Done</span>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
'id': '_done',
|
||||
'title': 'Done',
|
||||
'class': 'light-success',
|
||||
'item': [{
|
||||
'title': `
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="symbol symbol-success mr-3">
|
||||
<img alt="Pic" src="assets/media/users/300_11.jpg" />
|
||||
</div>
|
||||
<div class="d-flex flex-column align-items-start">
|
||||
<span class="text-dark-50 font-weight-bold mb-1">SEO Optimization</span>
|
||||
<span class="label label-inline label-light-success font-weight-bold">In progress</span>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
},
|
||||
{
|
||||
'title': `
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="symbol symbol-success mr-3">
|
||||
<img alt="Pic" src="assets/media/users/300_20.jpg" />
|
||||
</div>
|
||||
<div class="d-flex flex-column align-items-start">
|
||||
<span class="text-dark-50 font-weight-bold mb-1">Product Team</span>
|
||||
<span class="label label-inline label-light-danger font-weight-bold">In progress</span>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
'id': '_deploy',
|
||||
'title': 'Deploy',
|
||||
'class': 'light-primary',
|
||||
'item': [{
|
||||
'title': `
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="symbol symbol-light-warning mr-3">
|
||||
<span class="symbol-label font-size-h4">D.L</span>
|
||||
</div>
|
||||
<div class="d-flex flex-column align-items-start">
|
||||
<span class="text-dark-50 font-weight-bold mb-1">SEO Optimization</span>
|
||||
<span class="label label-inline label-light-success font-weight-bold">In progress</span>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
},
|
||||
{
|
||||
'title': `
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="symbol symbol-light-danger mr-3">
|
||||
<span class="symbol-label font-size-h4">E.K</span>
|
||||
</div>
|
||||
<div class="d-flex flex-column align-items-start">
|
||||
<span class="text-dark-50 font-weight-bold mb-1">Requirement Study</span>
|
||||
<span class="label label-inline label-light-warning font-weight-bold">Scheduled</span>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
var toDoButton = document.getElementById('addToDo');
|
||||
toDoButton.addEventListener('click', function() {
|
||||
kanban.addElement(
|
||||
'_todo', {
|
||||
'title': `
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="symbol symbol-light-primary mr-3">
|
||||
<img alt="Pic" src="assets/media/users/300_14.jpg" />
|
||||
</div>
|
||||
<div class="d-flex flex-column align-items-start">
|
||||
<span class="text-dark-50 font-weight-bold mb-1">Requirement Study</span>
|
||||
<span class="label label-inline label-light-success font-weight-bold">Scheduled</span>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
var addBoardDefault = document.getElementById('addDefault');
|
||||
addBoardDefault.addEventListener('click', function() {
|
||||
kanban.addBoards(
|
||||
[{
|
||||
'id': '_default',
|
||||
'title': 'New Board',
|
||||
'class': 'primary-light',
|
||||
'item': [{
|
||||
'title': `
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="symbol symbol-success mr-3">
|
||||
<img alt="Pic" src="assets/media/users/300_13.jpg" />
|
||||
</div>
|
||||
<div class="d-flex flex-column align-items-start">
|
||||
<span class="text-dark-50 font-weight-bold mb-1">Payment Modules</span>
|
||||
<span class="label label-inline label-light-primary font-weight-bold">In development</span>
|
||||
</div>
|
||||
</div>
|
||||
`},{
|
||||
'title': `
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="symbol symbol-success mr-3">
|
||||
<img alt="Pic" src="assets/media/users/300_12.jpg" />
|
||||
</div>
|
||||
<div class="d-flex flex-column align-items-start">
|
||||
<span class="text-dark-50 font-weight-bold mb-1">New Project</span>
|
||||
<span class="label label-inline label-light-danger font-weight-bold">Pending</span>
|
||||
</div>
|
||||
</div>
|
||||
`}
|
||||
]
|
||||
}]
|
||||
)
|
||||
});
|
||||
|
||||
var removeBoard = document.getElementById('removeBoard');
|
||||
removeBoard.addEventListener('click', function() {
|
||||
kanban.removeBoard('_done');
|
||||
});
|
||||
}
|
||||
|
||||
// Public functions
|
||||
return {
|
||||
init: function() {
|
||||
_demo1();
|
||||
_demo2();
|
||||
_demo3();
|
||||
_demo4();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
KTKanbanBoardDemo.init();
|
||||
});
|
||||
1
public/js/pages/features/miscellaneous/kanban-board.min.js
vendored
Normal file
1
public/js/pages/features/miscellaneous/kanban-board.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
22
public/js/pages/features/miscellaneous/perfect-scrollbar.js
vendored
Normal file
22
public/js/pages/features/miscellaneous/perfect-scrollbar.js
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
var KTScrollable = function () {
|
||||
|
||||
// Private functions
|
||||
|
||||
// basic demo
|
||||
var demo1 = function () {
|
||||
}
|
||||
|
||||
return {
|
||||
// public functions
|
||||
init: function() {
|
||||
demo1();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
KTScrollable.init();
|
||||
});
|
||||
1
public/js/pages/features/miscellaneous/perfect-scrollbar.min.js
vendored
Normal file
1
public/js/pages/features/miscellaneous/perfect-scrollbar.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var KTScrollable={init:function(){}};jQuery(document).ready(function(){KTScrollable.init()});
|
||||
29
public/js/pages/features/miscellaneous/session-timeout.js
vendored
Normal file
29
public/js/pages/features/miscellaneous/session-timeout.js
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
|
||||
var KTSessionTimeoutDemo = function () {
|
||||
var initDemo = function () {
|
||||
$.sessionTimeout({
|
||||
title: 'Session Timeout Notification',
|
||||
message: 'Your session is about to expire.',
|
||||
keepAliveUrl: HOST_URL + '/api//session-timeout/keepalive.php',
|
||||
redirUrl: '?p=page_user_lock_1',
|
||||
logoutUrl: '?p=page_user_login_1',
|
||||
warnAfter: 5000, //warn after 5 seconds
|
||||
redirAfter: 15000, //redirect after 15 secons,
|
||||
ignoreUserActivity: true,
|
||||
countdownMessage: 'Redirecting in {timer} seconds.',
|
||||
countdownBar: true
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
//main function to initiate the module
|
||||
init: function () {
|
||||
initDemo();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
KTSessionTimeoutDemo.init();
|
||||
});
|
||||
1
public/js/pages/features/miscellaneous/session-timeout.min.js
vendored
Normal file
1
public/js/pages/features/miscellaneous/session-timeout.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var KTSessionTimeoutDemo={init:function(){$.sessionTimeout({title:"Session Timeout Notification",message:"Your session is about to expire.",keepAliveUrl:HOST_URL+"/api//session-timeout/keepalive.php",redirUrl:"?p=page_user_lock_1",logoutUrl:"?p=page_user_login_1",warnAfter:5e3,redirAfter:15e3,ignoreUserActivity:!0,countdownMessage:"Redirecting in {timer} seconds.",countdownBar:!0})}};jQuery(document).ready(function(){KTSessionTimeoutDemo.init()});
|
||||
32
public/js/pages/features/miscellaneous/sticky-panels.js
vendored
Normal file
32
public/js/pages/features/miscellaneous/sticky-panels.js
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
// Class definition
|
||||
// Based on: https://github.com/rgalus/sticky-js
|
||||
|
||||
var KTStickyPanelsDemo = function () {
|
||||
|
||||
// Private functions
|
||||
|
||||
// Basic demo
|
||||
var demo1 = function () {
|
||||
if (KTLayoutAsideToggle && KTLayoutAsideToggle.onToggle) {
|
||||
var sticky = new Sticky('.sticky');
|
||||
|
||||
KTLayoutAsideToggle.onToggle(function() {
|
||||
setTimeout(function() {
|
||||
sticky.update(); // update sticky positions on aside toggle
|
||||
}, 500);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
// public functions
|
||||
init: function() {
|
||||
demo1();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
KTStickyPanelsDemo.init();
|
||||
});
|
||||
1
public/js/pages/features/miscellaneous/sticky-panels.min.js
vendored
Normal file
1
public/js/pages/features/miscellaneous/sticky-panels.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var KTStickyPanelsDemo={init:function(){!function(){if(KTLayoutAsideToggle&&KTLayoutAsideToggle.onToggle){var e=new Sticky(".sticky");KTLayoutAsideToggle.onToggle(function(){setTimeout(function(){e.update()},500)})}}()}};jQuery(document).ready(function(){KTStickyPanelsDemo.init()});
|
||||
175
public/js/pages/features/miscellaneous/sweetalert2.js
vendored
Normal file
175
public/js/pages/features/miscellaneous/sweetalert2.js
vendored
Normal file
@@ -0,0 +1,175 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
var KTSweetAlert2Demo = function () {
|
||||
var _init = function () {
|
||||
// Sweetalert Demo 1
|
||||
$('#kt_sweetalert_demo_1').click(function (e) {
|
||||
Swal.fire('Good job!');
|
||||
});
|
||||
|
||||
// Sweetalert Demo 2
|
||||
$('#kt_sweetalert_demo_2').click(function (e) {
|
||||
Swal.fire("Here's the title!", "...and here's the text!");
|
||||
});
|
||||
|
||||
// Sweetalert Demo 3
|
||||
$('#kt_sweetalert_demo_3_1').click(function (e) {
|
||||
Swal.fire("Good job!", "You clicked the button!", "warning");
|
||||
});
|
||||
|
||||
$('#kt_sweetalert_demo_3_2').click(function (e) {
|
||||
Swal.fire("Good job!", "You clicked the button!", "error");
|
||||
});
|
||||
|
||||
$('#kt_sweetalert_demo_3_3').click(function (e) {
|
||||
Swal.fire("Good job!", "You clicked the button!", "success");
|
||||
});
|
||||
|
||||
$('#kt_sweetalert_demo_3_4').click(function (e) {
|
||||
Swal.fire("Good job!", "You clicked the button!", "info");
|
||||
});
|
||||
|
||||
$('#kt_sweetalert_demo_3_5').click(function (e) {
|
||||
Swal.fire("Good job!", "You clicked the button!", "question");
|
||||
});
|
||||
|
||||
// Sweetalert Demo 4
|
||||
$("#kt_sweetalert_demo_4").click(function (e) {
|
||||
Swal.fire({
|
||||
title: "Good job!",
|
||||
text: "You clicked the button!",
|
||||
icon: "success",
|
||||
buttonsStyling: false,
|
||||
confirmButtonText: "Confirm me!",
|
||||
customClass: {
|
||||
confirmButton: "btn btn-primary"
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Sweetalert Demo 5
|
||||
$("#kt_sweetalert_demo_5").click(function (e) {
|
||||
Swal.fire({
|
||||
title: "Good job!",
|
||||
text: "You clicked the button!",
|
||||
icon: "success",
|
||||
buttonsStyling: false,
|
||||
confirmButtonText: "<i class='la la-headphones'></i> I am game!",
|
||||
showCancelButton: true,
|
||||
cancelButtonText: "<i class='la la-thumbs-down'></i> No, thanks",
|
||||
customClass: {
|
||||
confirmButton: "btn btn-danger",
|
||||
cancelButton: "btn btn-default"
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#kt_sweetalert_demo_6').click(function (e) {
|
||||
Swal.fire({
|
||||
position: 'top-right',
|
||||
icon: 'success',
|
||||
title: 'Your work has been saved',
|
||||
showConfirmButton: false,
|
||||
timer: 1500
|
||||
});
|
||||
});
|
||||
|
||||
$('#kt_sweetalert_demo_7').click(function (e) {
|
||||
Swal.fire({
|
||||
title: 'jQuery HTML example',
|
||||
showClass: {
|
||||
popup: 'animate__animated animate__wobble'
|
||||
},
|
||||
hideClass: {
|
||||
popup: 'animate__animated animate__swing'
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#kt_sweetalert_demo_8').click(function (e) {
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: "You won't be able to revert this!",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Yes, delete it!'
|
||||
}).then(function (result) {
|
||||
if (result.value) {
|
||||
Swal.fire(
|
||||
'Deleted!',
|
||||
'Your file has been deleted.',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#kt_sweetalert_demo_9').click(function (e) {
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: "You won't be able to revert this!",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Yes, delete it!',
|
||||
cancelButtonText: 'No, cancel!',
|
||||
reverseButtons: true
|
||||
}).then(function (result) {
|
||||
if (result.value) {
|
||||
Swal.fire(
|
||||
'Deleted!',
|
||||
'Your file has been deleted.',
|
||||
'success'
|
||||
)
|
||||
// result.dismiss can be 'cancel', 'overlay',
|
||||
// 'close', and 'timer'
|
||||
} else if (result.dismiss === 'cancel') {
|
||||
Swal.fire(
|
||||
'Cancelled',
|
||||
'Your imaginary file is safe :)',
|
||||
'error'
|
||||
)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#kt_sweetalert_demo_10').click(function (e) {
|
||||
Swal.fire({
|
||||
title: 'Sweet!',
|
||||
text: 'Modal with a custom image.',
|
||||
imageUrl: 'https://unsplash.it/400/200',
|
||||
imageWidth: 400,
|
||||
imageHeight: 200,
|
||||
imageAlt: 'Custom image',
|
||||
animation: false
|
||||
});
|
||||
});
|
||||
|
||||
$('#kt_sweetalert_demo_11').click(function (e) {
|
||||
Swal.fire({
|
||||
title: 'Auto close alert!',
|
||||
text: 'I will close in 5 seconds.',
|
||||
timer: 5000,
|
||||
onOpen: function () {
|
||||
Swal.showLoading()
|
||||
}
|
||||
}).then(function (result) {
|
||||
if (result.dismiss === 'timer') {
|
||||
console.log('I was closed by the timer')
|
||||
}
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
// Init
|
||||
init: function () {
|
||||
_init();
|
||||
},
|
||||
};
|
||||
}();
|
||||
|
||||
// Class Initialization
|
||||
jQuery(document).ready(function () {
|
||||
KTSweetAlert2Demo.init();
|
||||
});
|
||||
1
public/js/pages/features/miscellaneous/sweetalert2.min.js
vendored
Normal file
1
public/js/pages/features/miscellaneous/sweetalert2.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var KTSweetAlert2Demo={init:function(){$("#kt_sweetalert_demo_1").click(function(e){Swal.fire("Good job!")}),$("#kt_sweetalert_demo_2").click(function(e){Swal.fire("Here's the title!","...and here's the text!")}),$("#kt_sweetalert_demo_3_1").click(function(e){Swal.fire("Good job!","You clicked the button!","warning")}),$("#kt_sweetalert_demo_3_2").click(function(e){Swal.fire("Good job!","You clicked the button!","error")}),$("#kt_sweetalert_demo_3_3").click(function(e){Swal.fire("Good job!","You clicked the button!","success")}),$("#kt_sweetalert_demo_3_4").click(function(e){Swal.fire("Good job!","You clicked the button!","info")}),$("#kt_sweetalert_demo_3_5").click(function(e){Swal.fire("Good job!","You clicked the button!","question")}),$("#kt_sweetalert_demo_4").click(function(e){Swal.fire({title:"Good job!",text:"You clicked the button!",icon:"success",buttonsStyling:!1,confirmButtonText:"Confirm me!",customClass:{confirmButton:"btn btn-primary"}})}),$("#kt_sweetalert_demo_5").click(function(e){Swal.fire({title:"Good job!",text:"You clicked the button!",icon:"success",buttonsStyling:!1,confirmButtonText:"<i class='la la-headphones'></i> I am game!",showCancelButton:!0,cancelButtonText:"<i class='la la-thumbs-down'></i> No, thanks",customClass:{confirmButton:"btn btn-danger",cancelButton:"btn btn-default"}})}),$("#kt_sweetalert_demo_6").click(function(e){Swal.fire({position:"top-right",icon:"success",title:"Your work has been saved",showConfirmButton:!1,timer:1500})}),$("#kt_sweetalert_demo_7").click(function(e){Swal.fire({title:"jQuery HTML example",showClass:{popup:"animate__animated animate__wobble"},hideClass:{popup:"animate__animated animate__swing"}})}),$("#kt_sweetalert_demo_8").click(function(e){Swal.fire({title:"Are you sure?",text:"You won't be able to revert this!",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes, delete it!"}).then(function(e){e.value&&Swal.fire("Deleted!","Your file has been deleted.","success")})}),$("#kt_sweetalert_demo_9").click(function(e){Swal.fire({title:"Are you sure?",text:"You won't be able to revert this!",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes, delete it!",cancelButtonText:"No, cancel!",reverseButtons:!0}).then(function(e){e.value?Swal.fire("Deleted!","Your file has been deleted.","success"):"cancel"===e.dismiss&&Swal.fire("Cancelled","Your imaginary file is safe :)","error")})}),$("#kt_sweetalert_demo_10").click(function(e){Swal.fire({title:"Sweet!",text:"Modal with a custom image.",imageUrl:"https://unsplash.it/400/200",imageWidth:400,imageHeight:200,imageAlt:"Custom image",animation:!1})}),$("#kt_sweetalert_demo_11").click(function(e){Swal.fire({title:"Auto close alert!",text:"I will close in 5 seconds.",timer:5e3,onOpen:function(){Swal.showLoading()}}).then(function(e){"timer"===e.dismiss&&console.log("I was closed by the timer")})})}};jQuery(document).ready(function(){KTSweetAlert2Demo.init()});
|
||||
165
public/js/pages/features/miscellaneous/toastr.js
vendored
Normal file
165
public/js/pages/features/miscellaneous/toastr.js
vendored
Normal file
@@ -0,0 +1,165 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
var KTToastrDemo = function() {
|
||||
|
||||
// Private functions
|
||||
|
||||
// basic demo
|
||||
var demo = function() {
|
||||
var i = -1;
|
||||
var toastCount = 0;
|
||||
var $toastlast;
|
||||
|
||||
var getMessage = function () {
|
||||
var msgs = [
|
||||
'New order has been placed!',
|
||||
'Are you the six fingered man?',
|
||||
'Inconceivable!',
|
||||
'I do not think that means what you think it means.',
|
||||
'Have fun storming the castle!'
|
||||
];
|
||||
i++;
|
||||
if (i === msgs.length) {
|
||||
i = 0;
|
||||
}
|
||||
|
||||
return msgs[i];
|
||||
};
|
||||
|
||||
var getMessageWithClearButton = function (msg) {
|
||||
msg = msg ? msg : 'Clear itself?';
|
||||
msg += '<br /><br /><button type="button" class="btn btn-outline-light btn-sm--air--wide clear">Yes</button>';
|
||||
return msg;
|
||||
};
|
||||
|
||||
$('#showtoast').click(function () {
|
||||
var shortCutFunction = $("#toastTypeGroup input:radio:checked").val();
|
||||
var msg = $('#message').val();
|
||||
var title = $('#title').val() || '';
|
||||
var $showDuration = $('#showDuration');
|
||||
var $hideDuration = $('#hideDuration');
|
||||
var $timeOut = $('#timeOut');
|
||||
var $extendedTimeOut = $('#extendedTimeOut');
|
||||
var $showEasing = $('#showEasing');
|
||||
var $hideEasing = $('#hideEasing');
|
||||
var $showMethod = $('#showMethod');
|
||||
var $hideMethod = $('#hideMethod');
|
||||
var toastIndex = toastCount++;
|
||||
var addClear = $('#addClear').prop('checked');
|
||||
|
||||
toastr.options = {
|
||||
closeButton: $('#closeButton').prop('checked'),
|
||||
debug: $('#debugInfo').prop('checked'),
|
||||
newestOnTop: $('#newestOnTop').prop('checked'),
|
||||
progressBar: $('#progressBar').prop('checked'),
|
||||
positionClass: $('#positionGroup input:radio:checked').val() || 'toast-top-right',
|
||||
preventDuplicates: $('#preventDuplicates').prop('checked'),
|
||||
onclick: null
|
||||
};
|
||||
|
||||
if ($('#addBehaviorOnToastClick').prop('checked')) {
|
||||
toastr.options.onclick = function () {
|
||||
alert('You can perform some custom action after a toast goes away');
|
||||
};
|
||||
}
|
||||
|
||||
if ($showDuration.val().length) {
|
||||
toastr.options.showDuration = $showDuration.val();
|
||||
}
|
||||
|
||||
if ($hideDuration.val().length) {
|
||||
toastr.options.hideDuration = $hideDuration.val();
|
||||
}
|
||||
|
||||
if ($timeOut.val().length) {
|
||||
toastr.options.timeOut = addClear ? 0 : $timeOut.val();
|
||||
}
|
||||
|
||||
if ($extendedTimeOut.val().length) {
|
||||
toastr.options.extendedTimeOut = addClear ? 0 : $extendedTimeOut.val();
|
||||
}
|
||||
|
||||
if ($showEasing.val().length) {
|
||||
toastr.options.showEasing = $showEasing.val();
|
||||
}
|
||||
|
||||
if ($hideEasing.val().length) {
|
||||
toastr.options.hideEasing = $hideEasing.val();
|
||||
}
|
||||
|
||||
if ($showMethod.val().length) {
|
||||
toastr.options.showMethod = $showMethod.val();
|
||||
}
|
||||
|
||||
if ($hideMethod.val().length) {
|
||||
toastr.options.hideMethod = $hideMethod.val();
|
||||
}
|
||||
|
||||
if (addClear) {
|
||||
msg = getMessageWithClearButton(msg);
|
||||
toastr.options.tapToDismiss = false;
|
||||
}
|
||||
if (!msg) {
|
||||
msg = getMessage();
|
||||
}
|
||||
|
||||
$('#toastrOptions').text(
|
||||
'toastr.options = '
|
||||
+ JSON.stringify(toastr.options, null, 2)
|
||||
+ ';'
|
||||
+ '\n\ntoastr.'
|
||||
+ shortCutFunction
|
||||
+ '("'
|
||||
+ msg
|
||||
+ (title ? '", "' + title : '')
|
||||
+ '");'
|
||||
);
|
||||
|
||||
var $toast = toastr[shortCutFunction](msg, title); // Wire up an event handler to a button in the toast, if it exists
|
||||
$toastlast = $toast;
|
||||
|
||||
if(typeof $toast === 'undefined'){
|
||||
return;
|
||||
}
|
||||
|
||||
if ($toast.find('#okBtn').length) {
|
||||
$toast.delegate('#okBtn', 'click', function () {
|
||||
alert('you clicked me. i was toast #' + toastIndex + '. goodbye!');
|
||||
$toast.remove();
|
||||
});
|
||||
}
|
||||
if ($toast.find('#surpriseBtn').length) {
|
||||
$toast.delegate('#surpriseBtn', 'click', function () {
|
||||
alert('Surprise! you clicked me. i was toast #' + toastIndex + '. You could perform an action here.');
|
||||
});
|
||||
}
|
||||
if ($toast.find('.clear').length) {
|
||||
$toast.delegate('.clear', 'click', function () {
|
||||
toastr.clear($toast, { force: true });
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function getLastToast(){
|
||||
return $toastlast;
|
||||
}
|
||||
$('#clearlasttoast').click(function () {
|
||||
toastr.clear(getLastToast());
|
||||
});
|
||||
$('#cleartoasts').click(function () {
|
||||
toastr.clear();
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
// public functions
|
||||
init: function() {
|
||||
demo();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
KTToastrDemo.init();
|
||||
});
|
||||
1
public/js/pages/features/miscellaneous/toastr.min.js
vendored
Normal file
1
public/js/pages/features/miscellaneous/toastr.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var KTToastrDemo=function(){var t=function(){var t,o=-1,e=0;$("#showtoast").click(function(){var n,a=$("#toastTypeGroup input:radio:checked").val(),i=$("#message").val(),s=$("#title").val()||"",r=$("#showDuration"),l=$("#hideDuration"),c=$("#timeOut"),u=$("#extendedTimeOut"),p=$("#showEasing"),d=$("#hideEasing"),h=$("#showMethod"),v=$("#hideMethod"),g=e++,f=$("#addClear").prop("checked");toastr.options={closeButton:$("#closeButton").prop("checked"),debug:$("#debugInfo").prop("checked"),newestOnTop:$("#newestOnTop").prop("checked"),progressBar:$("#progressBar").prop("checked"),positionClass:$("#positionGroup input:radio:checked").val()||"toast-top-right",preventDuplicates:$("#preventDuplicates").prop("checked"),onclick:null},$("#addBehaviorOnToastClick").prop("checked")&&(toastr.options.onclick=function(){alert("You can perform some custom action after a toast goes away")}),r.val().length&&(toastr.options.showDuration=r.val()),l.val().length&&(toastr.options.hideDuration=l.val()),c.val().length&&(toastr.options.timeOut=f?0:c.val()),u.val().length&&(toastr.options.extendedTimeOut=f?0:u.val()),p.val().length&&(toastr.options.showEasing=p.val()),d.val().length&&(toastr.options.hideEasing=d.val()),h.val().length&&(toastr.options.showMethod=h.val()),v.val().length&&(toastr.options.hideMethod=v.val()),f&&(i=function(t){return t=t||"Clear itself?",t+='<br /><br /><button type="button" class="btn btn-outline-light btn-sm--air--wide clear">Yes</button>'}(i),toastr.options.tapToDismiss=!1),i||(++o===(n=["New order has been placed!","Are you the six fingered man?","Inconceivable!","I do not think that means what you think it means.","Have fun storming the castle!"]).length&&(o=0),i=n[o]),$("#toastrOptions").text("toastr.options = "+JSON.stringify(toastr.options,null,2)+";\n\ntoastr."+a+'("'+i+(s?'", "'+s:"")+'");');var k=toastr[a](i,s);t=k,void 0!==k&&(k.find("#okBtn").length&&k.delegate("#okBtn","click",function(){alert("you clicked me. i was toast #"+g+". goodbye!"),k.remove()}),k.find("#surpriseBtn").length&&k.delegate("#surpriseBtn","click",function(){alert("Surprise! you clicked me. i was toast #"+g+". You could perform an action here.")}),k.find(".clear").length&&k.delegate(".clear","click",function(){toastr.clear(k,{force:!0})}))}),$("#clearlasttoast").click(function(){toastr.clear(t)}),$("#cleartoasts").click(function(){toastr.clear()})};return{init:function(){t()}}}();jQuery(document).ready(function(){KTToastrDemo.init()});
|
||||
281
public/js/pages/features/miscellaneous/treeview.js
vendored
Normal file
281
public/js/pages/features/miscellaneous/treeview.js
vendored
Normal file
@@ -0,0 +1,281 @@
|
||||
"use strict";
|
||||
|
||||
var KTTreeview = function () {
|
||||
|
||||
var _demo1 = function () {
|
||||
$('#kt_tree_1').jstree({
|
||||
"core" : {
|
||||
"themes" : {
|
||||
"responsive": false
|
||||
}
|
||||
},
|
||||
"types" : {
|
||||
"default" : {
|
||||
"icon" : "fa fa-folder"
|
||||
},
|
||||
"file" : {
|
||||
"icon" : "fa fa-file"
|
||||
}
|
||||
},
|
||||
"plugins": ["types"]
|
||||
});
|
||||
}
|
||||
|
||||
var _demo2 = function () {
|
||||
$('#kt_tree_2').jstree({
|
||||
"core" : {
|
||||
"themes" : {
|
||||
"responsive": false
|
||||
}
|
||||
},
|
||||
"types" : {
|
||||
"default" : {
|
||||
"icon" : "fa fa-folder text-warning"
|
||||
},
|
||||
"file" : {
|
||||
"icon" : "fa fa-file text-warning"
|
||||
}
|
||||
},
|
||||
"plugins": ["types"]
|
||||
});
|
||||
|
||||
// handle link clicks in tree nodes(support target="_blank" as well)
|
||||
$('#kt_tree_2').on('select_node.jstree', function(e,data) {
|
||||
var link = $('#' + data.selected).find('a');
|
||||
if (link.attr("href") != "#" && link.attr("href") != "javascript:;" && link.attr("href") != "") {
|
||||
if (link.attr("target") == "_blank") {
|
||||
link.attr("href").target = "_blank";
|
||||
}
|
||||
document.location.href = link.attr("href");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var _demo3 = function () {
|
||||
$('#kt_tree_3').jstree({
|
||||
'plugins': ["wholerow", "checkbox", "types"],
|
||||
'core': {
|
||||
"themes" : {
|
||||
"responsive": false
|
||||
},
|
||||
'data': [{
|
||||
"text": "Same but with checkboxes",
|
||||
"children": [{
|
||||
"text": "initially selected",
|
||||
"state": {
|
||||
"selected": true
|
||||
}
|
||||
}, {
|
||||
"text": "custom icon",
|
||||
"icon": "fa fa-warning text-danger"
|
||||
}, {
|
||||
"text": "initially open",
|
||||
"icon" : "fa fa-folder text-default",
|
||||
"state": {
|
||||
"opened": true
|
||||
},
|
||||
"children": ["Another node"]
|
||||
}, {
|
||||
"text": "custom icon",
|
||||
"icon": "fa fa-warning text-waring"
|
||||
}, {
|
||||
"text": "disabled node",
|
||||
"icon": "fa fa-check text-success",
|
||||
"state": {
|
||||
"disabled": true
|
||||
}
|
||||
}]
|
||||
},
|
||||
"And wholerow selection"
|
||||
]
|
||||
},
|
||||
"types" : {
|
||||
"default" : {
|
||||
"icon" : "fa fa-folder text-warning"
|
||||
},
|
||||
"file" : {
|
||||
"icon" : "fa fa-file text-warning"
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
var _demo4 = function() {
|
||||
$("#kt_tree_4").jstree({
|
||||
"core" : {
|
||||
"themes" : {
|
||||
"responsive": false
|
||||
},
|
||||
// so that create works
|
||||
"check_callback" : true,
|
||||
'data': [{
|
||||
"text": "Parent Node",
|
||||
"children": [{
|
||||
"text": "Initially selected",
|
||||
"state": {
|
||||
"selected": true
|
||||
}
|
||||
}, {
|
||||
"text": "Custom Icon",
|
||||
"icon": "flaticon2-hourglass-1 text-danger"
|
||||
}, {
|
||||
"text": "Initially open",
|
||||
"icon" : "fa fa-folder text-success",
|
||||
"state": {
|
||||
"opened": true
|
||||
},
|
||||
"children": [
|
||||
{"text": "Another node", "icon" : "fa fa-file text-waring"}
|
||||
]
|
||||
}, {
|
||||
"text": "Another Custom Icon",
|
||||
"icon": "flaticon2-drop text-waring"
|
||||
}, {
|
||||
"text": "Disabled Node",
|
||||
"icon": "fa fa-check text-success",
|
||||
"state": {
|
||||
"disabled": true
|
||||
}
|
||||
}, {
|
||||
"text": "Sub Nodes",
|
||||
"icon": "fa fa-folder text-danger",
|
||||
"children": [
|
||||
{"text": "Item 1", "icon" : "fa fa-file text-waring"},
|
||||
{"text": "Item 2", "icon" : "fa fa-file text-success"},
|
||||
{"text": "Item 3", "icon" : "fa fa-file text-default"},
|
||||
{"text": "Item 4", "icon" : "fa fa-file text-danger"},
|
||||
{"text": "Item 5", "icon" : "fa fa-file text-info"}
|
||||
]
|
||||
}]
|
||||
},
|
||||
"Another Node"
|
||||
]
|
||||
},
|
||||
"types" : {
|
||||
"default" : {
|
||||
"icon" : "fa fa-folder text-primary"
|
||||
},
|
||||
"file" : {
|
||||
"icon" : "fa fa-file text-primary"
|
||||
}
|
||||
},
|
||||
"state" : { "key" : "demo2" },
|
||||
"plugins" : [ "contextmenu", "state", "types" ]
|
||||
});
|
||||
}
|
||||
|
||||
var _demo5 = function() {
|
||||
$("#kt_tree_5").jstree({
|
||||
"core" : {
|
||||
"themes" : {
|
||||
"responsive": false
|
||||
},
|
||||
// so that create works
|
||||
"check_callback" : true,
|
||||
'data': [{
|
||||
"text": "Parent Node",
|
||||
"children": [{
|
||||
"text": "Initially selected",
|
||||
"state": {
|
||||
"selected": true
|
||||
}
|
||||
}, {
|
||||
"text": "Custom Icon",
|
||||
"icon": "flaticon2-warning text-danger"
|
||||
}, {
|
||||
"text": "Initially open",
|
||||
"icon" : "fa fa-folder text-success",
|
||||
"state": {
|
||||
"opened": true
|
||||
},
|
||||
"children": [
|
||||
{"text": "Another node", "icon" : "fa fa-file text-waring"}
|
||||
]
|
||||
}, {
|
||||
"text": "Another Custom Icon",
|
||||
"icon": "flaticon2-bell-5 text-waring"
|
||||
}, {
|
||||
"text": "Disabled Node",
|
||||
"icon": "fa fa-check text-success",
|
||||
"state": {
|
||||
"disabled": true
|
||||
}
|
||||
}, {
|
||||
"text": "Sub Nodes",
|
||||
"icon": "fa fa-folder text-danger",
|
||||
"children": [
|
||||
{"text": "Item 1", "icon" : "fa fa-file text-waring"},
|
||||
{"text": "Item 2", "icon" : "fa fa-file text-success"},
|
||||
{"text": "Item 3", "icon" : "fa fa-file text-default"},
|
||||
{"text": "Item 4", "icon" : "fa fa-file text-danger"},
|
||||
{"text": "Item 5", "icon" : "fa fa-file text-info"}
|
||||
]
|
||||
}]
|
||||
},
|
||||
"Another Node"
|
||||
]
|
||||
},
|
||||
"types" : {
|
||||
"default" : {
|
||||
"icon" : "fa fa-folder text-success"
|
||||
},
|
||||
"file" : {
|
||||
"icon" : "fa fa-file text-success"
|
||||
}
|
||||
},
|
||||
"state" : { "key" : "demo2" },
|
||||
"plugins" : [ "dnd", "state", "types" ]
|
||||
});
|
||||
}
|
||||
|
||||
var _demo6 = function() {
|
||||
$("#kt_tree_6").jstree({
|
||||
"core": {
|
||||
"themes": {
|
||||
"responsive": false
|
||||
},
|
||||
// so that create works
|
||||
"check_callback": true,
|
||||
'data': {
|
||||
'url': function(node) {
|
||||
return HOST_URL + '/api//jstree/ajax_data.php';
|
||||
},
|
||||
'data': function(node) {
|
||||
return {
|
||||
'parent': node.id
|
||||
};
|
||||
}
|
||||
}
|
||||
},
|
||||
"types": {
|
||||
"default": {
|
||||
"icon": "fa fa-folder text-primary"
|
||||
},
|
||||
"file": {
|
||||
"icon": "fa fa-file text-primary"
|
||||
}
|
||||
},
|
||||
"state": {
|
||||
"key": "demo3"
|
||||
},
|
||||
"plugins": ["dnd", "state", "types"]
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
//main function to initiate the module
|
||||
init: function () {
|
||||
_demo1();
|
||||
_demo2();
|
||||
_demo3();
|
||||
_demo4();
|
||||
_demo5();
|
||||
_demo6();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
KTTreeview.init();
|
||||
});
|
||||
1
public/js/pages/features/miscellaneous/treeview.min.js
vendored
Normal file
1
public/js/pages/features/miscellaneous/treeview.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var KTTreeview={init:function(){$("#kt_tree_1").jstree({core:{themes:{responsive:!1}},types:{default:{icon:"fa fa-folder"},file:{icon:"fa fa-file"}},plugins:["types"]}),$("#kt_tree_2").jstree({core:{themes:{responsive:!1}},types:{default:{icon:"fa fa-folder text-warning"},file:{icon:"fa fa-file text-warning"}},plugins:["types"]}),$("#kt_tree_2").on("select_node.jstree",function(e,t){var a=$("#"+t.selected).find("a");if("#"!=a.attr("href")&&"javascript:;"!=a.attr("href")&&""!=a.attr("href"))return"_blank"==a.attr("target")&&(a.attr("href").target="_blank"),document.location.href=a.attr("href"),!1}),$("#kt_tree_3").jstree({plugins:["wholerow","checkbox","types"],core:{themes:{responsive:!1},data:[{text:"Same but with checkboxes",children:[{text:"initially selected",state:{selected:!0}},{text:"custom icon",icon:"fa fa-warning text-danger"},{text:"initially open",icon:"fa fa-folder text-default",state:{opened:!0},children:["Another node"]},{text:"custom icon",icon:"fa fa-warning text-waring"},{text:"disabled node",icon:"fa fa-check text-success",state:{disabled:!0}}]},"And wholerow selection"]},types:{default:{icon:"fa fa-folder text-warning"},file:{icon:"fa fa-file text-warning"}}}),$("#kt_tree_4").jstree({core:{themes:{responsive:!1},check_callback:!0,data:[{text:"Parent Node",children:[{text:"Initially selected",state:{selected:!0}},{text:"Custom Icon",icon:"flaticon2-hourglass-1 text-danger"},{text:"Initially open",icon:"fa fa-folder text-success",state:{opened:!0},children:[{text:"Another node",icon:"fa fa-file text-waring"}]},{text:"Another Custom Icon",icon:"flaticon2-drop text-waring"},{text:"Disabled Node",icon:"fa fa-check text-success",state:{disabled:!0}},{text:"Sub Nodes",icon:"fa fa-folder text-danger",children:[{text:"Item 1",icon:"fa fa-file text-waring"},{text:"Item 2",icon:"fa fa-file text-success"},{text:"Item 3",icon:"fa fa-file text-default"},{text:"Item 4",icon:"fa fa-file text-danger"},{text:"Item 5",icon:"fa fa-file text-info"}]}]},"Another Node"]},types:{default:{icon:"fa fa-folder text-primary"},file:{icon:"fa fa-file text-primary"}},state:{key:"demo2"},plugins:["contextmenu","state","types"]}),$("#kt_tree_5").jstree({core:{themes:{responsive:!1},check_callback:!0,data:[{text:"Parent Node",children:[{text:"Initially selected",state:{selected:!0}},{text:"Custom Icon",icon:"flaticon2-warning text-danger"},{text:"Initially open",icon:"fa fa-folder text-success",state:{opened:!0},children:[{text:"Another node",icon:"fa fa-file text-waring"}]},{text:"Another Custom Icon",icon:"flaticon2-bell-5 text-waring"},{text:"Disabled Node",icon:"fa fa-check text-success",state:{disabled:!0}},{text:"Sub Nodes",icon:"fa fa-folder text-danger",children:[{text:"Item 1",icon:"fa fa-file text-waring"},{text:"Item 2",icon:"fa fa-file text-success"},{text:"Item 3",icon:"fa fa-file text-default"},{text:"Item 4",icon:"fa fa-file text-danger"},{text:"Item 5",icon:"fa fa-file text-info"}]}]},"Another Node"]},types:{default:{icon:"fa fa-folder text-success"},file:{icon:"fa fa-file text-success"}},state:{key:"demo2"},plugins:["dnd","state","types"]}),$("#kt_tree_6").jstree({core:{themes:{responsive:!1},check_callback:!0,data:{url:function(e){return HOST_URL+"/api//jstree/ajax_data.php"},data:function(e){return{parent:e.id}}}},types:{default:{icon:"fa fa-folder text-primary"},file:{icon:"fa fa-file text-primary"}},state:{key:"demo3"},plugins:["dnd","state","types"]})}};jQuery(document).ready(function(){KTTreeview.init()});
|
||||
Reference in New Issue
Block a user