Add project files.

This commit is contained in:
2025-07-23 18:54:59 +03:30
parent 429fe73799
commit a0852dd7d8
3356 changed files with 1632271 additions and 0 deletions

View 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: 'لطفا صبر کنید...'
});
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: 'در حال پردازش...'
});
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: 'لطفا صبر کنید...'
});
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: 'در حال پردازش...'
});
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: 'لطفا صبر کنید...'
});
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: 'در حال پردازش...'
});
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: 'لطفا صبر کنید...'
});
setTimeout(function() {
KTApp.unblockPage();
}, 2000);
});
$('#kt_blockui_page_custom_text_2').click(function() {
KTApp.blockPage({
overlayColor: '#000000',
state: 'primary',
message: 'در حال پردازش...'
});
setTimeout(function() {
KTApp.unblockPage();
}, 2000);
});
}
return {
// public functions
init: function() {
_demo1();
_demo2();
_demo3();
_demo4();
}
};
}();
jQuery(document).ready(function() {
KTBlockUIDemo.init();
});

View 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 = 'سفارش جدید درج شده است';
if ($('#kt_notify_title').prop('checked')) {
content.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>ذخیره سازی</strong> اطلاعات.');
notify.update('type', 'primary');
notify.update('progress', 20);
}, 1000);
setTimeout(function() {
notify.update('message', '<strong>ذخیره سازی</strong> اطلاعات کاربر.');
notify.update('type', 'warning');
notify.update('progress', 40);
}, 2000);
setTimeout(function() {
notify.update('message', '<strong>ذخیره سازی</strong> اطلاعات پروفایل.');
notify.update('type', 'danger');
notify.update('progress', 65);
}, 3000);
setTimeout(function() {
notify.update('message', '<strong>بررسی</strong> خطاها.');
notify.update('type', 'success');
notify.update('progress', 100);
}, 4000);
}
});
}
return {
// public functions
init: function() {
demo();
}
};
}();
jQuery(document).ready(function() {
KTBootstrapNotifyDemo.init();
});

View 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();
});

View 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') : 'گزینه های موجود';
var selectedTitle = ($this.attr('data-selected-title') != null) ? $this.attr('data-selected-title') : 'انتخاب گزینه ها';
// get button labels
var addLabel = ($this.attr('data-add') != null) ? $this.attr('data-add') : 'افزودن';
var removeLabel = ($this.attr('data-remove') != null) ? $this.attr('data-remove') : 'حذف';
var addAllLabel = ($this.attr('data-add-all') != null) ? $this.attr('data-add-all') : 'افزودن همه';
var removeAllLabel = ($this.attr('data-remove-all') != null) ? $this.attr('data-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();
});

View 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();
});

View 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': 'در جریان',
'item': [{
'title': '<span class="font-weight-bold">می تونید من رو درگ کنید</span>'
},
{
'title': '<span class="font-weight-bold">خرید</span>'
}
]
}, {
'id': '_working',
'title': 'کار کردن',
'item': [{
'title': '<span class="font-weight-bold">کاری بکنید!</span>'
},
{
'title': '<span class="font-weight-bold">اجرا کردن</span>'
}
]
}, {
'id': '_done',
'title': 'انجام شده',
'item': [{
'title': '<span class="font-weight-bold">خیلی خوب</span>'
},
{
'title': '<span class="font-weight-bold">اکی</span>'
}
]
}
]
});
}
var _demo2 = function() {
var kanban = new jKanban({
element: '#kt_kanban_2',
gutter: '0',
widthBoard: '250px',
boards: [{
'id': '_inprocess',
'title': 'در جریان',
'class': 'primary',
'item': [{
'title': '<span class="font-weight-bold">می تونید من رو درگ کنید</span>',
'class': 'light-primary',
},
{
'title': '<span class="font-weight-bold">خرید</span>',
'class': 'light-primary',
}
]
}, {
'id': '_working',
'title': 'کار کردن',
'class': 'success',
'item': [{
'title': '<span class="font-weight-bold">کاری بکنید!</span>',
'class': 'light-success',
},
{
'title': '<span class="font-weight-bold">اجرا کردن</span>',
'class': 'light-success',
}
]
}, {
'id': '_done',
'title': 'انجام شده',
'class': 'danger',
'item': [{
'title': '<span class="font-weight-bold">خیلی خوب</span>',
'class': 'light-danger',
},
{
'title': '<span class="font-weight-bold">اکی</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': 'انجام بده',
'class': 'light-primary',
'dragTo': ['_working'],
'item': [{
'title': 'انجام وظیفه',
'class': 'primary'
},
{
'title': 'خرید',
'class': 'primary'
}
]
},
{
'id': '_working',
'title': 'کار کردن',
'class': 'light-warning',
'item': [{
'title': 'کاری بکنید!',
'class': 'warning'
},
{
'title': 'اجرا کردن',
'class': 'warning'
}
]
},
{
'id': '_done',
'title': 'انجام شده',
'class': 'light-success',
'dragTo': ['_working'],
'item': [{
'title': 'خیلی خوب',
'class': 'success'
},
{
'title': 'اکی',
'class': 'success'
}
]
},
{
'id': '_notes',
'title': 'نکات',
'class': 'light-danger',
'item': [{
'title': 'دست نزن',
'class': 'danger'
},
{
'title': 'وارد نشوید',
'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': 'جمع شدن',
'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">بهینه سازی سئو</span>
<span class="label label-inline label-light-success font-weight-bold">در حال پردازش</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">حسابرس</span>
<span class="label label-inline label-light-danger font-weight-bold">در حال انجام</span>
</div>
</div>
`,
}
]
},
{
'id': '_todo',
'title': 'انجام بده',
'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">راه اندازی سرور</span>
<span class="label label-inline label-light-dark font-weight-bold">تکمیل شده</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">گزارشگر</span>
<span class="label label-inline label-light-warning font-weight-bold">خبر</span>
</div>
</div>
`,
}
]
},
{
'id': '_working',
'title': 'کار کردن',
'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">بازاریابی</span>
<span class="label label-inline label-light-danger font-weight-bold">نقشه ها</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">حسابرس</span>
<span class="label label-inline label-light-primary font-weight-bold">انجام شده</span>
</div>
</div>
`,
}
]
},
{
'id': '_done',
'title': 'انجام شده',
'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">بهینه سازی سئو</span>
<span class="label label-inline label-light-success font-weight-bold">در حال پردازش</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">مدیر تیم</span>
<span class="label label-inline label-light-danger font-weight-bold">در حال پردازش</span>
</div>
</div>
`,
}
]
},
{
'id': '_deploy',
'title': 'استقرار',
'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">بهینه سازی سئو</span>
<span class="label label-inline label-light-success font-weight-bold">در حال پردازش</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">مطالعه </span>
<span class="label label-inline label-light-warning font-weight-bold">برنامه ریزی شده</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">مطالعه </span>
<span class="label label-inline label-light-success font-weight-bold">برنامه ریزی شده</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">در حال انجام</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();
});

View 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();
});

View File

@ -0,0 +1,29 @@
"use strict";
var KTSessionTimeoutDemo = function () {
var initDemo = function () {
$.sessionTimeout({
title: 'اعلان ریدایرکت',
message: 'منقضی شدن سشن.',
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: 'ریدایرکت {timer} ثانیه.',
countdownBar: true
});
}
return {
//main function to initiate the module
init: function () {
initDemo();
}
};
}();
jQuery(document).ready(function() {
KTSessionTimeoutDemo.init();
});

View 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();
});

View File

@ -0,0 +1,177 @@
"use strict";
// Class definition
var KTSweetAlert2Demo = function () {
var _init = function () {
// Sweetalert Demo 1
$('#kt_sweetalert_demo_1').click(function (e) {
Swal.fire('آفرین!');
});
// Sweetalert Demo 2
$('#kt_sweetalert_demo_2').click(function (e) {
Swal.fire("عنوان اینجا قرار میگیره", "و اینجا می تونید متن اصلی رو قرار بدید");
});
// Sweetalert Demo 3
$('#kt_sweetalert_demo_3_1').click(function (e) {
Swal.fire("آفرین!", "کلیک کنید روی دکمه!", "warning");
});
$('#kt_sweetalert_demo_3_2').click(function (e) {
Swal.fire("آفرین!", "کلیک کنید روی دکمه!", "error");
});
$('#kt_sweetalert_demo_3_3').click(function (e) {
Swal.fire("آفرین!", "کلیک کنید روی دکمه!", "success");
});
$('#kt_sweetalert_demo_3_4').click(function (e) {
Swal.fire("آفرین!", "کلیک کنید روی دکمه!", "info");
});
$('#kt_sweetalert_demo_3_5').click(function (e) {
Swal.fire("آفرین!", "کلیک کنید روی دکمه!", "question");
});
// Sweetalert Demo 4
$("#kt_sweetalert_demo_4").click(function (e) {
Swal.fire({
title: "آفرین!",
text: "کلیک کنید روی دکمه!",
icon: "success",
buttonsStyling: false,
confirmButtonText: "تایید کنید!",
customClass: {
confirmButton: "btn btn-primary"
}
});
});
// Sweetalert Demo 5
$("#kt_sweetalert_demo_5").click(function (e) {
Swal.fire({
title: "آفرین!",
text: "کلیک کنید روی دکمه!",
icon: "success",
buttonsStyling: false,
confirmButtonText: "<i class='la la-headphones'></i> من هستم!",
showCancelButton: true,
cancelButtonText: "<i class='la la-thumbs-down'></i>نه ممنون",
customClass: {
confirmButton: "btn btn-danger",
cancelButton: "btn btn-default"
}
});
});
$('#kt_sweetalert_demo_6').click(function (e) {
Swal.fire({
position: 'top-right',
icon: 'success',
title: 'کار شما ذخیره شده است',
showConfirmButton: false,
timer: 1500
});
});
$('#kt_sweetalert_demo_7').click(function (e) {
Swal.fire({
title: 'نمونه اچ تی ام ال',
showClass: {
popup: 'animate__animated animate__wobble'
},
hideClass: {
popup: 'animate__animated animate__swing'
}
});
});
$('#kt_sweetalert_demo_8').click(function (e) {
Swal.fire({
title: 'آیا مطمئن هستید؟',
text: "شما نمی توانید این را برگردانید!",
icon: 'warning',
showCancelButton: true,
confirmButtonText: 'بله حذف کن'
}).then(function (result) {
if (result.value) {
Swal.fire(
'حذف شد!',
'فایل شما با موفقیت حذف شد.',
'success'
)
}
});
});
$('#kt_sweetalert_demo_9').click(function (e) {
Swal.fire({
title: 'آیا مطمئن هستید؟',
text: "شما نمی توانید این را برگردانید!",
icon: 'warning',
showCancelButton: true,
confirmButtonText: 'بله حذف کن',
cancelButtonText: 'نه کنسل کن',
reverseButtons: true
}).then(function (result) {
if (result.value) {
Swal.fire(
'حذف شده!',
'فایل شما حذف شد.',
'success'
)
// result.dismiss can be 'cancel', 'overlay',
// 'close', and 'timer'
} else if (result.dismiss === 'cancel') {
Swal.fire(
'لغو شده',
'فایل شما حذف نشد :)',
'error'
)
}
});
});
$('#kt_sweetalert_demo_10').click(function (e) {
Swal.fire({
title: 'اسویت!',
text: 'با یک عکس سفارشی.',
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: 'بسته شدن خودکار!',
text: 'بسته شدن در 5 ثانیه',
timer: 5000,
onOpen: function () {
Swal.showLoading()
}
}).then(function (result) {
if (result.dismiss === 'timer') {
console.log('من بسته شدم توسط تایمر خودکار')
}
})
});
};
return {
// Init
init: function () {
_init();
},
};
}();
// Class Initialization
jQuery(document).ready(function () {
KTSweetAlert2Demo.init();
});

View 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 = [
'یک سفارش جدید دارید.',
'آیا مطمئن هستید؟',
'چگونه ممکن هست!',
'با کمی تامل و فکر می توانید این مشکل را حل کنید!',
'از تفریح در قلعه لذت ببرید!'
];
i++;
if (i === msgs.length) {
i = 0;
}
return msgs[i];
};
var getMessageWithClearButton = function (msg) {
msg = msg ? msg : 'حذف خودش؟';
msg += '<br /><br /><button type="button" class="btn btn-outline-light btn-sm--air--wide clear">بله</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('بعد از حذف توئستر می توانید یک سری عملیات های سفارش را اجرا کنید');
};
}
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('کلیک کنید روی توئستر #' + toastIndex + '. خداحافظ');
$toast.remove();
});
}
if ($toast.find('#surpriseBtn').length) {
$toast.delegate('#surpriseBtn', 'click', function () {
alert('سوپرایز! با کلیک کردن #' + toastIndex + '. می توانید کلیک کنید و مشاهده کنید عملیات را.');
});
}
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();
});

View 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": "با قابلیت چک باکس",
"children": [{
"text": "انتخاب شده",
"state": {
"selected": true
}
}, {
"text": "آیکون سفارشی",
"icon": "fa fa-warning text-danger"
}, {
"text": "باز شده",
"icon" : "fa fa-folder text-default",
"state": {
"opened": true
},
"children": ["گره دیگر"]
}, {
"text": "آیکون سفارشی",
"icon": "fa fa-warning text-waring"
}, {
"text": "گره غیرفعال",
"icon": "fa fa-check text-success",
"state": {
"disabled": true
}
}]
},
"انتخاب"
]
},
"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": "گره والد",
"children": [{
"text": "انتخاب شده",
"state": {
"selected": true
}
}, {
"text": "آیکون سفارشی",
"icon": "flaticon2-hourglass-1 text-danger"
}, {
"text": "باز شده",
"icon" : "fa fa-folder text-success",
"state": {
"opened": true
},
"children": [
{"text": "گره دیگر", "icon" : "fa fa-file text-waring"}
]
}, {
"text": "دیگر آیکون سفارشی",
"icon": "flaticon2-drop text-waring"
}, {
"text": "گره غیرفعال",
"icon": "fa fa-check text-success",
"state": {
"disabled": true
}
}, {
"text": "زیر گره",
"icon": "fa fa-folder text-danger",
"children": [
{"text": "آیتم 1", "icon" : "fa fa-file text-waring"},
{"text": "آیتم 2", "icon" : "fa fa-file text-success"},
{"text": "آیتم 3", "icon" : "fa fa-file text-default"},
{"text": "آیتم 4", "icon" : "fa fa-file text-danger"},
{"text": "آیتم 5", "icon" : "fa fa-file text-info"}
]
}]
},
"گره دیگر"
]
},
"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": "گره والد",
"children": [{
"text": "انتخاب شده",
"state": {
"selected": true
}
}, {
"text": "آیکون سفارشی",
"icon": "flaticon2-warning text-danger"
}, {
"text": "باز شده",
"icon" : "fa fa-folder text-success",
"state": {
"opened": true
},
"children": [
{"text": "گره دیگر", "icon" : "fa fa-file text-waring"}
]
}, {
"text": "دیگر آیکون سفارشی",
"icon": "flaticon2-bell-5 text-waring"
}, {
"text": "گره غیرفعال",
"icon": "fa fa-check text-success",
"state": {
"disabled": true
}
}, {
"text": "زیر گره",
"icon": "fa fa-folder text-danger",
"children": [
{"text": "آیتم 1", "icon" : "fa fa-file text-waring"},
{"text": "آیتم 2", "icon" : "fa fa-file text-success"},
{"text": "آیتم 3", "icon" : "fa fa-file text-default"},
{"text": "آیتم 4", "icon" : "fa fa-file text-danger"},
{"text": "آیتم 5", "icon" : "fa fa-file text-info"}
]
}]
},
"گره دیگر"
]
},
"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();
});