first initial
This commit is contained in:
270
public/assets/js/demo1/pages/components/extended/blockui.js
Normal file
270
public/assets/js/demo1/pages/components/extended/blockui.js
Normal file
@@ -0,0 +1,270 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
|
||||
var KTBlockUIDemo = function () {
|
||||
|
||||
// Private functions
|
||||
|
||||
// Basic demo
|
||||
var demo1 = function () {
|
||||
// default
|
||||
$('#kt_blockui_1_1').click(function() {
|
||||
KTApp.block('#kt_blockui_1_content', {});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_1_content');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_1_2').click(function() {
|
||||
KTApp.block('#kt_blockui_1_content', {
|
||||
overlayColor: '#000000',
|
||||
state: 'primary'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_1_content');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_1_3').click(function() {
|
||||
KTApp.block('#kt_blockui_1_content', {
|
||||
overlayColor: '#000000',
|
||||
type: 'v2',
|
||||
state: 'success',
|
||||
size: 'lg'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_1_content');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_1_4').click(function() {
|
||||
KTApp.block('#kt_blockui_1_content', {
|
||||
overlayColor: '#000000',
|
||||
type: 'v2',
|
||||
state: 'success',
|
||||
message: 'Please wait...'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_1_content');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_1_5').click(function() {
|
||||
KTApp.block('#kt_blockui_1_content', {
|
||||
overlayColor: '#000000',
|
||||
type: 'v2',
|
||||
state: 'primary',
|
||||
message: 'Processing...'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_1_content');
|
||||
}, 2000);
|
||||
});
|
||||
}
|
||||
|
||||
// portlet blocking
|
||||
var demo2 = function () {
|
||||
// default
|
||||
$('#kt_blockui_2_1').click(function() {
|
||||
KTApp.block('#kt_blockui_2_portlet', {});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_2_portlet');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_2_2').click(function() {
|
||||
KTApp.block('#kt_blockui_2_portlet', {
|
||||
overlayColor: '#000000',
|
||||
state: 'primary'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_2_portlet');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_2_3').click(function() {
|
||||
KTApp.block('#kt_blockui_2_portlet', {
|
||||
overlayColor: '#000000',
|
||||
type: 'v2',
|
||||
state: 'success',
|
||||
size: 'lg'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_2_portlet');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_2_4').click(function() {
|
||||
KTApp.block('#kt_blockui_2_portlet', {
|
||||
overlayColor: '#000000',
|
||||
type: 'v2',
|
||||
state: 'success',
|
||||
message: 'Please wait...'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_2_portlet');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_2_5').click(function() {
|
||||
KTApp.block('#kt_blockui_2_portlet', {
|
||||
overlayColor: '#000000',
|
||||
type: 'v2',
|
||||
state: 'primary',
|
||||
message: 'Processing...'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_2_portlet');
|
||||
}, 2000);
|
||||
});
|
||||
}
|
||||
|
||||
// page blocking
|
||||
var demo3 = function () {
|
||||
// default
|
||||
$('#kt_blockui_3_1').click(function() {
|
||||
KTApp.blockPage();
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblockPage();
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_3_2').click(function() {
|
||||
KTApp.blockPage({
|
||||
overlayColor: '#000000',
|
||||
state: 'primary'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblockPage();
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_3_3').click(function() {
|
||||
KTApp.blockPage({
|
||||
overlayColor: '#000000',
|
||||
type: 'v2',
|
||||
state: 'success',
|
||||
size: 'lg'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblockPage();
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_3_4').click(function() {
|
||||
KTApp.blockPage({
|
||||
overlayColor: '#000000',
|
||||
type: 'v2',
|
||||
state: 'success',
|
||||
message: 'Please wait...'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblockPage();
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_3_5').click(function() {
|
||||
KTApp.blockPage({
|
||||
overlayColor: '#000000',
|
||||
type: 'v2',
|
||||
state: 'primary',
|
||||
message: 'Processing...'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblockPage();
|
||||
}, 2000);
|
||||
});
|
||||
}
|
||||
|
||||
// modal blocking
|
||||
var demo4 = function () {
|
||||
// default
|
||||
$('#kt_blockui_4_1').click(function() {
|
||||
KTApp.block('#kt_blockui_4_1_modal .modal-content', {});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_4_1_modal .modal-content');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_4_2').click(function() {
|
||||
KTApp.block('#kt_blockui_4_2_modal .modal-content', {
|
||||
overlayColor: '#000000',
|
||||
state: 'primary'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_4_2_modal .modal-content');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_4_3').click(function() {
|
||||
KTApp.block('#kt_blockui_4_3_modal .modal-content', {
|
||||
overlayColor: '#000000',
|
||||
type: 'v2',
|
||||
state: 'success',
|
||||
size: 'lg'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_4_3_modal .modal-content');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_4_4').click(function() {
|
||||
KTApp.block('#kt_blockui_4_4_modal .modal-content', {
|
||||
overlayColor: '#000000',
|
||||
type: 'v2',
|
||||
state: 'success',
|
||||
message: 'Please wait...'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_4_4_modal .modal-content');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$('#kt_blockui_4_5').click(function() {
|
||||
KTApp.block('#kt_blockui_4_5_modal .modal-content', {
|
||||
overlayColor: '#000000',
|
||||
type: 'v2',
|
||||
state: 'primary',
|
||||
message: 'Processing...'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
KTApp.unblock('#kt_blockui_4_5_modal .modal-content');
|
||||
}, 2000);
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
// public functions
|
||||
init: function() {
|
||||
demo1();
|
||||
demo2();
|
||||
demo3();
|
||||
demo4();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
KTBlockUIDemo.init();
|
||||
});
|
||||
1
public/assets/js/demo1/pages/components/extended/blockui.min.js
vendored
Normal file
1
public/assets/js/demo1/pages/components/extended/blockui.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var KTBlockUIDemo={init:function(){$("#kt_blockui_1_1").click(function(){KTApp.block("#kt_blockui_1_content",{}),setTimeout(function(){KTApp.unblock("#kt_blockui_1_content")},2e3)}),$("#kt_blockui_1_2").click(function(){KTApp.block("#kt_blockui_1_content",{overlayColor:"#000000",state:"primary"}),setTimeout(function(){KTApp.unblock("#kt_blockui_1_content")},2e3)}),$("#kt_blockui_1_3").click(function(){KTApp.block("#kt_blockui_1_content",{overlayColor:"#000000",type:"v2",state:"success",size:"lg"}),setTimeout(function(){KTApp.unblock("#kt_blockui_1_content")},2e3)}),$("#kt_blockui_1_4").click(function(){KTApp.block("#kt_blockui_1_content",{overlayColor:"#000000",type:"v2",state:"success",message:"Please wait..."}),setTimeout(function(){KTApp.unblock("#kt_blockui_1_content")},2e3)}),$("#kt_blockui_1_5").click(function(){KTApp.block("#kt_blockui_1_content",{overlayColor:"#000000",type:"v2",state:"primary",message:"Processing..."}),setTimeout(function(){KTApp.unblock("#kt_blockui_1_content")},2e3)}),$("#kt_blockui_2_1").click(function(){KTApp.block("#kt_blockui_2_portlet",{}),setTimeout(function(){KTApp.unblock("#kt_blockui_2_portlet")},2e3)}),$("#kt_blockui_2_2").click(function(){KTApp.block("#kt_blockui_2_portlet",{overlayColor:"#000000",state:"primary"}),setTimeout(function(){KTApp.unblock("#kt_blockui_2_portlet")},2e3)}),$("#kt_blockui_2_3").click(function(){KTApp.block("#kt_blockui_2_portlet",{overlayColor:"#000000",type:"v2",state:"success",size:"lg"}),setTimeout(function(){KTApp.unblock("#kt_blockui_2_portlet")},2e3)}),$("#kt_blockui_2_4").click(function(){KTApp.block("#kt_blockui_2_portlet",{overlayColor:"#000000",type:"v2",state:"success",message:"Please wait..."}),setTimeout(function(){KTApp.unblock("#kt_blockui_2_portlet")},2e3)}),$("#kt_blockui_2_5").click(function(){KTApp.block("#kt_blockui_2_portlet",{overlayColor:"#000000",type:"v2",state:"primary",message:"Processing..."}),setTimeout(function(){KTApp.unblock("#kt_blockui_2_portlet")},2e3)}),$("#kt_blockui_3_1").click(function(){KTApp.blockPage(),setTimeout(function(){KTApp.unblockPage()},2e3)}),$("#kt_blockui_3_2").click(function(){KTApp.blockPage({overlayColor:"#000000",state:"primary"}),setTimeout(function(){KTApp.unblockPage()},2e3)}),$("#kt_blockui_3_3").click(function(){KTApp.blockPage({overlayColor:"#000000",type:"v2",state:"success",size:"lg"}),setTimeout(function(){KTApp.unblockPage()},2e3)}),$("#kt_blockui_3_4").click(function(){KTApp.blockPage({overlayColor:"#000000",type:"v2",state:"success",message:"Please wait..."}),setTimeout(function(){KTApp.unblockPage()},2e3)}),$("#kt_blockui_3_5").click(function(){KTApp.blockPage({overlayColor:"#000000",type:"v2",state:"primary",message:"Processing..."}),setTimeout(function(){KTApp.unblockPage()},2e3)}),$("#kt_blockui_4_1").click(function(){KTApp.block("#kt_blockui_4_1_modal .modal-content",{}),setTimeout(function(){KTApp.unblock("#kt_blockui_4_1_modal .modal-content")},2e3)}),$("#kt_blockui_4_2").click(function(){KTApp.block("#kt_blockui_4_2_modal .modal-content",{overlayColor:"#000000",state:"primary"}),setTimeout(function(){KTApp.unblock("#kt_blockui_4_2_modal .modal-content")},2e3)}),$("#kt_blockui_4_3").click(function(){KTApp.block("#kt_blockui_4_3_modal .modal-content",{overlayColor:"#000000",type:"v2",state:"success",size:"lg"}),setTimeout(function(){KTApp.unblock("#kt_blockui_4_3_modal .modal-content")},2e3)}),$("#kt_blockui_4_4").click(function(){KTApp.block("#kt_blockui_4_4_modal .modal-content",{overlayColor:"#000000",type:"v2",state:"success",message:"Please wait..."}),setTimeout(function(){KTApp.unblock("#kt_blockui_4_4_modal .modal-content")},2e3)}),$("#kt_blockui_4_5").click(function(){KTApp.block("#kt_blockui_4_5_modal .modal-content",{overlayColor:"#000000",type:"v2",state:"primary",message:"Processing..."}),setTimeout(function(){KTApp.unblock("#kt_blockui_4_5_modal .modal-content")},2e3)})}};jQuery(document).ready(function(){KTBlockUIDemo.init()});
|
||||
92
public/assets/js/demo1/pages/components/extended/bootstrap-notify.js
vendored
Normal file
92
public/assets/js/demo1/pages/components/extended/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: 'animated ' + $('#kt_notify_animate_enter').val(),
|
||||
exit: 'animated ' + $('#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/assets/js/demo1/pages/components/extended/bootstrap-notify.min.js
vendored
Normal file
1
public/assets/js/demo1/pages/components/extended/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:"animated "+$("#kt_notify_animate_enter").val(),exit:"animated "+$("#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()});
|
||||
@@ -0,0 +1,72 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
var KTDualListbox = function () {
|
||||
|
||||
// Private functions
|
||||
var initDualListbox = function () {
|
||||
// Dual Listbox
|
||||
var listBoxes = $('.kt-dual-listbox');
|
||||
|
||||
listBoxes.each(function(){
|
||||
var $this = $(this);
|
||||
var id = '#' + $this.attr('id');
|
||||
// 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();
|
||||
var selected = ($(this).is(':selected')) ? true : false;
|
||||
options.push({ text: label, value: value, selected: selected });
|
||||
});
|
||||
|
||||
// get search option
|
||||
var search = ($this.attr('data-search') != null) ? $this.attr('data-search') : "";
|
||||
|
||||
// clear duplicates
|
||||
$this.empty();
|
||||
|
||||
// init dual listbox
|
||||
var dualListBox = new DualListbox(id,{
|
||||
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();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
KTUtil.ready(function() {
|
||||
KTDualListbox.init();
|
||||
});
|
||||
1
public/assets/js/demo1/pages/components/extended/dual-listbox.min.js
vendored
Normal file
1
public/assets/js/demo1/pages/components/extended/dual-listbox.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var KTDualListbox={init:function(){$(".kt-dual-listbox").each(function(){var t=$(this),a="#"+t.attr("id"),e=null!=t.attr("data-available-title")?t.attr("data-available-title"):"Available options",l=null!=t.attr("data-selected-title")?t.attr("data-selected-title"):"Selected options",d=null!=t.attr("data-add")?t.attr("data-add"):"Add",i=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",r=[];t.children("option").each(function(){var t=$(this).val(),a=$(this).text(),e=!!$(this).is(":selected");r.push({text:a,value:t,selected:e})});var s=null!=t.attr("data-search")?t.attr("data-search"):"";t.empty();var u=new DualListbox(a,{addEvent:function(t){console.log(t)},removeEvent:function(t){console.log(t)},availableTitle:e,selectedTitle:l,addButtonText:d,removeButtonText:i,addAllButtonText:o,removeAllButtonText:n,options:r});"false"==s&&u.search.classList.add("dual-listbox__search--hidden")})}};KTUtil.ready(function(){KTDualListbox.init()});
|
||||
@@ -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/assets/js/demo1/pages/components/extended/perfect-scrollbar.min.js
vendored
Normal file
1
public/assets/js/demo1/pages/components/extended/perfect-scrollbar.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var KTScrollable={init:function(){}};jQuery(document).ready(function(){KTScrollable.init()});
|
||||
175
public/assets/js/demo1/pages/components/extended/sweetalert2.js
Normal file
175
public/assets/js/demo1/pages/components/extended/sweetalert2.js
Normal file
@@ -0,0 +1,175 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
var KTSweetAlert2Demo = function() {
|
||||
|
||||
// Demos
|
||||
var initDemos = 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!",
|
||||
type: "success",
|
||||
buttonsStyling: false,
|
||||
confirmButtonText: "Confirm me!",
|
||||
confirmButtonClass: "btn btn-brand"
|
||||
});
|
||||
});
|
||||
|
||||
// Sweetalert Demo 5
|
||||
$('#kt_sweetalert_demo_5').click(function(e) {
|
||||
swal.fire({
|
||||
title: "Good job!",
|
||||
text: "You clicked the button!",
|
||||
type: "success",
|
||||
|
||||
buttonsStyling: false,
|
||||
|
||||
confirmButtonText: "<i class='la la-headphones'></i> I am game!",
|
||||
confirmButtonClass: "btn btn-danger",
|
||||
|
||||
showCancelButton: true,
|
||||
cancelButtonText: "<i class='la la-thumbs-down'></i> No, thanks",
|
||||
cancelButtonClass: "btn btn-default"
|
||||
});
|
||||
});
|
||||
|
||||
$('#kt_sweetalert_demo_6').click(function(e) {
|
||||
swal.fire({
|
||||
position: 'top-right',
|
||||
type: 'success',
|
||||
title: 'Your work has been saved',
|
||||
showConfirmButton: false,
|
||||
timer: 1500
|
||||
});
|
||||
});
|
||||
|
||||
$('#kt_sweetalert_demo_7').click(function(e) {
|
||||
swal.fire({
|
||||
title: 'jQuery HTML example',
|
||||
html: $('<div>')
|
||||
.addClass('some-class')
|
||||
.text('jQuery is everywhere.'),
|
||||
animation: false,
|
||||
customClass: 'animated tada'
|
||||
})
|
||||
});
|
||||
|
||||
$('#kt_sweetalert_demo_8').click(function(e) {
|
||||
swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: "You won't be able to revert this!",
|
||||
type: '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!",
|
||||
type: '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() {
|
||||
initDemos();
|
||||
},
|
||||
};
|
||||
}();
|
||||
|
||||
// Class Initialization
|
||||
jQuery(document).ready(function() {
|
||||
KTSweetAlert2Demo.init();
|
||||
});
|
||||
1
public/assets/js/demo1/pages/components/extended/sweetalert2.min.js
vendored
Normal file
1
public/assets/js/demo1/pages/components/extended/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!",type:"success",buttonsStyling:!1,confirmButtonText:"Confirm me!",confirmButtonClass:"btn btn-brand"})}),$("#kt_sweetalert_demo_5").click(function(e){swal.fire({title:"Good job!",text:"You clicked the button!",type:"success",buttonsStyling:!1,confirmButtonText:"<i class='la la-headphones'></i> I am game!",confirmButtonClass:"btn btn-danger",showCancelButton:!0,cancelButtonText:"<i class='la la-thumbs-down'></i> No, thanks",cancelButtonClass:"btn btn-default"})}),$("#kt_sweetalert_demo_6").click(function(e){swal.fire({position:"top-right",type:"success",title:"Your work has been saved",showConfirmButton:!1,timer:1500})}),$("#kt_sweetalert_demo_7").click(function(e){swal.fire({title:"jQuery HTML example",html:$("<div>").addClass("some-class").text("jQuery is everywhere."),animation:!1,customClass:"animated tada"})}),$("#kt_sweetalert_demo_8").click(function(e){swal.fire({title:"Are you sure?",text:"You won't be able to revert this!",type:"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!",type:"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/assets/js/demo1/pages/components/extended/toastr.js
Normal file
165
public/assets/js/demo1/pages/components/extended/toastr.js
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/assets/js/demo1/pages/components/extended/toastr.min.js
vendored
Normal file
1
public/assets/js/demo1/pages/components/extended/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()});
|
||||
277
public/assets/js/demo1/pages/components/extended/treeview.js
Normal file
277
public/assets/js/demo1/pages/components/extended/treeview.js
Normal file
@@ -0,0 +1,277 @@
|
||||
"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 kt-font-warning"
|
||||
},
|
||||
"file" : {
|
||||
"icon" : "fa fa-file kt-font-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 kt-font-danger"
|
||||
}, {
|
||||
"text": "initially open",
|
||||
"icon" : "fa fa-folder kt-font-default",
|
||||
"state": {
|
||||
"opened": true
|
||||
},
|
||||
"children": ["Another node"]
|
||||
}, {
|
||||
"text": "custom icon",
|
||||
"icon": "fa fa-warning kt-font-waring"
|
||||
}, {
|
||||
"text": "disabled node",
|
||||
"icon": "fa fa-check kt-font-success",
|
||||
"state": {
|
||||
"disabled": true
|
||||
}
|
||||
}]
|
||||
},
|
||||
"And wholerow selection"
|
||||
]
|
||||
},
|
||||
"types" : {
|
||||
"default" : {
|
||||
"icon" : "fa fa-folder kt-font-warning"
|
||||
},
|
||||
"file" : {
|
||||
"icon" : "fa fa-file kt-font-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": "fa fa-warning kt-font-danger"
|
||||
}, {
|
||||
"text": "Initially open",
|
||||
"icon" : "fa fa-folder kt-font-success",
|
||||
"state": {
|
||||
"opened": true
|
||||
},
|
||||
"children": [
|
||||
{"text": "Another node", "icon" : "fa fa-file kt-font-waring"}
|
||||
]
|
||||
}, {
|
||||
"text": "Another Custom Icon",
|
||||
"icon": "fa fa-warning kt-font-waring"
|
||||
}, {
|
||||
"text": "Disabled Node",
|
||||
"icon": "fa fa-check kt-font-success",
|
||||
"state": {
|
||||
"disabled": true
|
||||
}
|
||||
}, {
|
||||
"text": "Sub Nodes",
|
||||
"icon": "fa fa-folder kt-font-danger",
|
||||
"children": [
|
||||
{"text": "Item 1", "icon" : "fa fa-file kt-font-waring"},
|
||||
{"text": "Item 2", "icon" : "fa fa-file kt-font-success"},
|
||||
{"text": "Item 3", "icon" : "fa fa-file kt-font-default"},
|
||||
{"text": "Item 4", "icon" : "fa fa-file kt-font-danger"},
|
||||
{"text": "Item 5", "icon" : "fa fa-file kt-font-info"}
|
||||
]
|
||||
}]
|
||||
},
|
||||
"Another Node"
|
||||
]
|
||||
},
|
||||
"types" : {
|
||||
"default" : {
|
||||
"icon" : "fa fa-folder kt-font-brand"
|
||||
},
|
||||
"file" : {
|
||||
"icon" : "fa fa-file kt-font-brand"
|
||||
}
|
||||
},
|
||||
"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": "fa fa-warning kt-font-danger"
|
||||
}, {
|
||||
"text": "Initially open",
|
||||
"icon" : "fa fa-folder kt-font-success",
|
||||
"state": {
|
||||
"opened": true
|
||||
},
|
||||
"children": [
|
||||
{"text": "Another node", "icon" : "fa fa-file kt-font-waring"}
|
||||
]
|
||||
}, {
|
||||
"text": "Another Custom Icon",
|
||||
"icon": "fa fa-warning kt-font-waring"
|
||||
}, {
|
||||
"text": "Disabled Node",
|
||||
"icon": "fa fa-check kt-font-success",
|
||||
"state": {
|
||||
"disabled": true
|
||||
}
|
||||
}, {
|
||||
"text": "Sub Nodes",
|
||||
"icon": "fa fa-folder kt-font-danger",
|
||||
"children": [
|
||||
{"text": "Item 1", "icon" : "fa fa-file kt-font-waring"},
|
||||
{"text": "Item 2", "icon" : "fa fa-file kt-font-success"},
|
||||
{"text": "Item 3", "icon" : "fa fa-file kt-font-default"},
|
||||
{"text": "Item 4", "icon" : "fa fa-file kt-font-danger"},
|
||||
{"text": "Item 5", "icon" : "fa fa-file kt-font-info"}
|
||||
]
|
||||
}]
|
||||
},
|
||||
"Another Node"
|
||||
]
|
||||
},
|
||||
"types" : {
|
||||
"default" : {
|
||||
"icon" : "fa fa-folder kt-font-success"
|
||||
},
|
||||
"file" : {
|
||||
"icon" : "fa fa-file kt-font-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 'https://keenthemes.com/metronic/themes/themes/metronic/dist/preview/inc/api/jstree/ajax_data.php';
|
||||
},
|
||||
'data' : function (node) {
|
||||
return { 'parent' : node.id };
|
||||
}
|
||||
}
|
||||
},
|
||||
"types" : {
|
||||
"default" : {
|
||||
"icon" : "fa fa-folder kt-font-brand"
|
||||
},
|
||||
"file" : {
|
||||
"icon" : "fa fa-file kt-font-brand"
|
||||
}
|
||||
},
|
||||
"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/assets/js/demo1/pages/components/extended/treeview.min.js
vendored
Normal file
1
public/assets/js/demo1/pages/components/extended/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 kt-font-warning"},file:{icon:"fa fa-file kt-font-warning"}},plugins:["types"]}),$("#kt_tree_2").on("select_node.jstree",function(e,t){var n=$("#"+t.selected).find("a");if("#"!=n.attr("href")&&"javascript:;"!=n.attr("href")&&""!=n.attr("href"))return"_blank"==n.attr("target")&&(n.attr("href").target="_blank"),document.location.href=n.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 kt-font-danger"},{text:"initially open",icon:"fa fa-folder kt-font-default",state:{opened:!0},children:["Another node"]},{text:"custom icon",icon:"fa fa-warning kt-font-waring"},{text:"disabled node",icon:"fa fa-check kt-font-success",state:{disabled:!0}}]},"And wholerow selection"]},types:{default:{icon:"fa fa-folder kt-font-warning"},file:{icon:"fa fa-file kt-font-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:"fa fa-warning kt-font-danger"},{text:"Initially open",icon:"fa fa-folder kt-font-success",state:{opened:!0},children:[{text:"Another node",icon:"fa fa-file kt-font-waring"}]},{text:"Another Custom Icon",icon:"fa fa-warning kt-font-waring"},{text:"Disabled Node",icon:"fa fa-check kt-font-success",state:{disabled:!0}},{text:"Sub Nodes",icon:"fa fa-folder kt-font-danger",children:[{text:"Item 1",icon:"fa fa-file kt-font-waring"},{text:"Item 2",icon:"fa fa-file kt-font-success"},{text:"Item 3",icon:"fa fa-file kt-font-default"},{text:"Item 4",icon:"fa fa-file kt-font-danger"},{text:"Item 5",icon:"fa fa-file kt-font-info"}]}]},"Another Node"]},types:{default:{icon:"fa fa-folder kt-font-brand"},file:{icon:"fa fa-file kt-font-brand"}},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:"fa fa-warning kt-font-danger"},{text:"Initially open",icon:"fa fa-folder kt-font-success",state:{opened:!0},children:[{text:"Another node",icon:"fa fa-file kt-font-waring"}]},{text:"Another Custom Icon",icon:"fa fa-warning kt-font-waring"},{text:"Disabled Node",icon:"fa fa-check kt-font-success",state:{disabled:!0}},{text:"Sub Nodes",icon:"fa fa-folder kt-font-danger",children:[{text:"Item 1",icon:"fa fa-file kt-font-waring"},{text:"Item 2",icon:"fa fa-file kt-font-success"},{text:"Item 3",icon:"fa fa-file kt-font-default"},{text:"Item 4",icon:"fa fa-file kt-font-danger"},{text:"Item 5",icon:"fa fa-file kt-font-info"}]}]},"Another Node"]},types:{default:{icon:"fa fa-folder kt-font-success"},file:{icon:"fa fa-file kt-font-success"}},state:{key:"demo2"},plugins:["dnd","state","types"]}),$("#kt_tree_6").jstree({core:{themes:{responsive:!1},check_callback:!0,data:{url:function(e){return"https://keenthemes.com/metronic/themes/themes/metronic/dist/preview/inc/api/jstree/ajax_data.php"},data:function(e){return{parent:e.id}}}},types:{default:{icon:"fa fa-folder kt-font-brand"},file:{icon:"fa fa-file kt-font-brand"}},state:{key:"demo3"},plugins:["dnd","state","types"]})}};jQuery(document).ready(function(){KTTreeview.init()});
|
||||
Reference in New Issue
Block a user