update to metronic v8.2.0
@ -25,7 +25,7 @@ class BootstrapDefault
|
||||
public function initAssets()
|
||||
{
|
||||
# Include global vendors
|
||||
addVendors(['datatables', 'fullcalendar']);
|
||||
addVendors(['datatables']);
|
||||
|
||||
# Include global javascript files
|
||||
addJavascriptFile('assets/js/custom/widgets.js');
|
||||
|
@ -231,7 +231,7 @@ class Theme
|
||||
function extendCssFilename($path)
|
||||
{
|
||||
if ($this->isRtlDirection()) {
|
||||
$path = str_replace('.css', '.rtl.css');
|
||||
$path = str_replace('.css', '.rtl.css', $path);
|
||||
}
|
||||
|
||||
return $path;
|
||||
@ -280,8 +280,9 @@ class Theme
|
||||
*/
|
||||
function getGlobalAssets($type = 'js')
|
||||
{
|
||||
// $this->extendCssFilename()
|
||||
return config('settings.KT_THEME_ASSETS.global.'.$type);
|
||||
return array_map(function($path) {
|
||||
return $this->extendCssFilename($path);
|
||||
}, config('settings.KT_THEME_ASSETS.global.'.$type));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -391,12 +392,10 @@ class Theme
|
||||
return self::$htmlAttributes[$scope][$attribute] ?? [];
|
||||
}
|
||||
|
||||
function getIcon($name, $class = '', $type = '')
|
||||
function getIcon($name, $class = '', $type = '', $tag = 'span')
|
||||
{
|
||||
$type = config('settings.KT_THEME_ICONS', 'duotone');
|
||||
|
||||
$tag = 'span';
|
||||
|
||||
if ($type === 'duotone') {
|
||||
$icons = cache()->remember('duotone-icons', 3600, function () {
|
||||
return json_decode(file_get_contents(public_path('icons.json')), true);
|
||||
|
@ -131,6 +131,7 @@
|
||||
*/
|
||||
function setModeSwitch($flag)
|
||||
{
|
||||
theme()->setModeSwitch($flag);
|
||||
}
|
||||
}
|
||||
|
||||
@ -143,6 +144,7 @@
|
||||
*/
|
||||
function isModeSwitchEnabled()
|
||||
{
|
||||
return theme()->isModeSwitchEnabled();
|
||||
}
|
||||
}
|
||||
|
||||
@ -157,6 +159,7 @@
|
||||
*/
|
||||
function setModeDefault($mode)
|
||||
{
|
||||
theme()->setModeDefault($mode);
|
||||
}
|
||||
}
|
||||
|
||||
@ -169,6 +172,7 @@
|
||||
*/
|
||||
function getModeDefault()
|
||||
{
|
||||
return theme()->getModeDefault();
|
||||
}
|
||||
}
|
||||
|
||||
@ -183,6 +187,7 @@
|
||||
*/
|
||||
function setDirection($direction)
|
||||
{
|
||||
theme()->setDirection($direction);
|
||||
}
|
||||
}
|
||||
|
||||
@ -195,6 +200,7 @@
|
||||
*/
|
||||
function getDirection()
|
||||
{
|
||||
return theme()->getDirection();
|
||||
}
|
||||
}
|
||||
|
||||
@ -207,6 +213,7 @@
|
||||
*/
|
||||
function isRtlDirection()
|
||||
{
|
||||
return theme()->isRtlDirection();
|
||||
}
|
||||
}
|
||||
|
||||
@ -221,6 +228,7 @@
|
||||
*/
|
||||
function extendCssFilename($path)
|
||||
{
|
||||
return theme()->extendCssFilename($path);
|
||||
}
|
||||
}
|
||||
|
||||
@ -421,12 +429,13 @@
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function getIcon($name, $class = '', $type = '')
|
||||
function getIcon($name, $class = '', $type = '', $tag = 'span')
|
||||
{
|
||||
return theme()->getIcon($name, $class, $type);
|
||||
return theme()->getIcon($name, $class, $type, $tag);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!function_exists('get_user')) {
|
||||
/**
|
||||
* Get icon
|
||||
@ -441,6 +450,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!function_exists('get_status')) {
|
||||
/**
|
||||
* Get icon
|
||||
@ -461,20 +471,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!function_exists('verify_user')) {
|
||||
function verify_user($id, $passwd, $SERVER_ADDR, $IPUserManager, $portUserManager, $appId)
|
||||
{
|
||||
|
||||
$USERMANPROG = "user_verification.php";
|
||||
$sock = fsockopen("tcp://" . $IPUserManager, $portUserManager, $errno, $errstr, 30);
|
||||
|
||||
|
||||
if (!$sock) die("$errstr ($errno)\n");
|
||||
|
||||
if (!$sock)
|
||||
die("$errstr ($errno)\n");
|
||||
$data = "appsid=" . urlencode($appId) . "&loginid=" . urlencode($id) . "&passwd=" . urlencode($passwd) . "&addr=" . $SERVER_ADDR . "&version=2";
|
||||
|
||||
//echo "data: $data <BR>";
|
||||
|
||||
fwrite($sock, "POST /user_verification_dev.php HTTP/1.0\r\n");
|
||||
fwrite($sock, "Host: $IPUserManager\r\n");
|
||||
fwrite($sock, "Content-type: application/x-www-form-urlencoded\r\n");
|
||||
@ -483,24 +488,21 @@
|
||||
fwrite($sock, "\r\n");
|
||||
fwrite($sock, "$data\r\n");
|
||||
fwrite($sock, "\r\n");
|
||||
|
||||
$headers = "";
|
||||
while ($str = trim(fgets($sock, 4096))) $headers .= "$str\n";
|
||||
|
||||
while ($str = trim(fgets($sock, 4096)))
|
||||
$headers .= "$str\n";
|
||||
$body = "";
|
||||
while (!feof($sock)) $body .= fgets($sock, 4096);
|
||||
|
||||
|
||||
while (!feof($sock))
|
||||
$body .= fgets($sock, 4096);
|
||||
fclose($sock);
|
||||
|
||||
return decompress($body);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!function_exists('getAllowableScript')) {
|
||||
function getAllowableScript($sessionMenu)
|
||||
{
|
||||
//$sessionMenu = $_SESSION['MENU'];
|
||||
|
||||
if (!empty($sessionMenu)) {
|
||||
$tempMenuArrayLine = explode('-', $sessionMenu);
|
||||
//print_r($tempMenuArrayLine);
|
||||
@ -522,7 +524,9 @@
|
||||
}
|
||||
return $SCRIPT_ALLOW;
|
||||
}
|
||||
}
|
||||
|
||||
if(!function_exists('decompress')) {
|
||||
function decompress($data)
|
||||
{
|
||||
$text = '';
|
||||
@ -530,10 +534,12 @@
|
||||
for ($j = 0; $j < $total; $j = $j + 2) {
|
||||
$text .= chr(hexdec(substr($data, $j, 2)));
|
||||
}
|
||||
|
||||
return $text;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!function_exists('compress')) {
|
||||
function compress($data)
|
||||
{
|
||||
$text = '';
|
||||
@ -545,11 +551,11 @@
|
||||
}
|
||||
$text .= $temp;
|
||||
}
|
||||
|
||||
|
||||
return $text;
|
||||
}
|
||||
}
|
||||
|
||||
if(!function_exists('jsonToView')) {
|
||||
function jsonToView($jsonText = '')
|
||||
{
|
||||
$arr = json_decode($jsonText, true);
|
||||
@ -559,7 +565,9 @@
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
|
||||
if(!function_exists('_arrayToHtmlTableRecursive')) {
|
||||
function _arrayToHtmlTableRecursive($arr)
|
||||
{
|
||||
$str = "<table><tbody>";
|
||||
@ -577,13 +585,17 @@
|
||||
$str .= "</td></tr>";
|
||||
}
|
||||
$str .= "</tbody></table>";
|
||||
|
||||
return $str;
|
||||
}
|
||||
}
|
||||
|
||||
function _countDocumentOnCardboard($cardboard_id){
|
||||
|
||||
if(!function_exists('_countDocumentOnCardboard')) {
|
||||
function _countDocumentOnCardboard($cardboard_id)
|
||||
{
|
||||
$cardboard = Cardboard::with(['cardboard_detail'])->find($cardboard_id);
|
||||
$document_id = $cardboard->cardboard_detail->pluck('document_id')->toArray();
|
||||
|
||||
return count($document_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ class Kernel extends HttpKernel
|
||||
],
|
||||
|
||||
'api' => [
|
||||
\Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
|
||||
// \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
|
||||
'throttle:api',
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
|
@ -13,5 +13,6 @@ class VerifyCsrfToken extends Middleware
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
'login'
|
||||
];
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Core\KTBootstrap;
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
@ -26,5 +27,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
// Update defaultStringLength
|
||||
Builder::defaultStringLength(191);
|
||||
|
||||
KTBootstrap::init();
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,8 @@
|
||||
*
|
||||
* @var array<class-string, class-string>
|
||||
*/
|
||||
protected $policies = [// 'App\Models\Model' => 'App\Policies\ModelPolicy',
|
||||
protected $policies = [
|
||||
// 'App\Models\Model' => 'App\Policies\ModelPolicy',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -24,7 +24,6 @@
|
||||
"laravelcollective/html": "^6.4",
|
||||
"laravolt/avatar": "^5.0",
|
||||
"nwidart/laravel-modules": "^10.0",
|
||||
"putrakuningan/cetaklabel-module": "dev-sit",
|
||||
"putrakuningan/logs-module": "dev-master",
|
||||
"putrakuningan/usermanager-module": "dev-sit",
|
||||
"simplesoftwareio/simple-qrcode": "^4.2",
|
||||
@ -32,7 +31,11 @@
|
||||
"spatie/laravel-permission": "^5.10",
|
||||
"wildside/userstamps": "^2.3",
|
||||
"yajra/laravel-datatables": "^10.0",
|
||||
"yajra/laravel-datatables-oracle": "^10.3.1"
|
||||
"yajra/laravel-datatables-oracle": "^10.3.1",
|
||||
|
||||
"diglactic/laravel-breadcrumbs": "^8.1",
|
||||
"laravel/socialite": "^5.6",
|
||||
"livewire/livewire": "^2.12"
|
||||
},
|
||||
"require-dev": {
|
||||
"fakerphp/faker": "^1.9.1",
|
||||
@ -43,6 +46,7 @@
|
||||
"nunomaduro/collision": "^7.0",
|
||||
"phpunit/phpunit": "^10.0",
|
||||
"spatie/laravel-ignition": "^2.0"
|
||||
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@ -60,7 +64,8 @@
|
||||
"scripts": {
|
||||
"post-autoload-dump": [
|
||||
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||
"@php artisan package:discover --ansi"
|
||||
"@php artisan package:discover --ansi",
|
||||
"@php artisan vendor:publish --force --tag=livewire:assets --ansi"
|
||||
],
|
||||
"post-update-cmd": [
|
||||
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
|
||||
@ -98,11 +103,6 @@
|
||||
"name": "putrakuningan/usermanager-module",
|
||||
"type": "vcs",
|
||||
"url": "https://git.putrakuningan.com/putrakuningan/Usermanager"
|
||||
},
|
||||
{
|
||||
"name": "putrakuningan/cetaklabel-module",
|
||||
"type": "vcs",
|
||||
"url": "https://git.putrakuningan.com/putrakuningan/Cetaklabel"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -181,6 +181,7 @@
|
||||
Illuminate\Translation\TranslationServiceProvider::class,
|
||||
Illuminate\Validation\ValidationServiceProvider::class,
|
||||
Illuminate\View\ViewServiceProvider::class,
|
||||
|
||||
/*
|
||||
* Package Service Providers...
|
||||
*/
|
||||
@ -190,14 +191,13 @@
|
||||
*/
|
||||
App\Providers\HelperServiceProvider::class,
|
||||
App\Providers\AppServiceProvider::class,
|
||||
\App\Providers\AuthServiceProvider::class,
|
||||
App\Providers\AuthServiceProvider::class,
|
||||
// App\Providers\BroadcastServiceProvider::class,
|
||||
App\Providers\EventServiceProvider::class,
|
||||
App\Providers\RouteServiceProvider::class,
|
||||
|
||||
Yajra\DataTables\DataTablesServiceProvider::class,
|
||||
Jackiedo\LogReader\LogReaderServiceProvider::class,
|
||||
|
||||
Spatie\Permission\PermissionServiceProvider::class,
|
||||
|
||||
],
|
||||
|
@ -31,4 +31,15 @@ return [
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
],
|
||||
|
||||
'google' => [
|
||||
'client_id' => env('GOOGLE_CLIENT_ID'),
|
||||
'client_secret' => env('GOOGLE_CLIENT_SECRET'),
|
||||
'redirect' => env('GOOGLE_CALLBACK_URL'),
|
||||
],
|
||||
|
||||
'facebook' => [
|
||||
'client_id' => env('FACEBOOK_CLIENT_ID'),
|
||||
'client_secret' => env('FACEBOOK_CLIENT_SECRET'),
|
||||
'redirect' => '/auth/redirect/facebook',
|
||||
],
|
||||
];
|
||||
|
@ -1,15 +1,11 @@
|
||||
<?php
|
||||
|
||||
use App\Core\Bootstrap\BootstrapAuth;
|
||||
use App\Core\Bootstrap\BootstrapDefault;
|
||||
use App\Core\Bootstrap\BootstrapSystem;
|
||||
|
||||
return [
|
||||
|
||||
'KT_THEME_BOOTSTRAP' => [
|
||||
'default' => BootstrapDefault::class,
|
||||
'auth' => BootstrapAuth::class,
|
||||
'system' => BootstrapSystem::class,
|
||||
'default' => \App\Core\Bootstrap\BootstrapDefault::class,
|
||||
'auth' => \App\Core\Bootstrap\BootstrapAuth::class,
|
||||
'system' => \App\Core\Bootstrap\BootstrapSystem::class,
|
||||
],
|
||||
|
||||
'KT_THEME' => 'metronic',
|
||||
@ -237,74 +233,5 @@
|
||||
],
|
||||
],
|
||||
],
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Settings Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default settings store that gets used while
|
||||
| using this settings library.
|
||||
|
|
||||
| Supported: "json", "database"
|
||||
|
|
||||
*/
|
||||
'store' => 'database',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JSON Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If the store is set to "json", settings are stored in the defined
|
||||
| file path in JSON format. Use full path to file.
|
||||
|
|
||||
*/
|
||||
'path' => storage_path() . '/settings.json',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Database Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The settings are stored in the defined file path in JSON format.
|
||||
| Use full path to JSON file.
|
||||
|
|
||||
*/
|
||||
// If set to null, the default connection will be used.
|
||||
'connection' => null,
|
||||
// Name of the table used.
|
||||
'table' => 'settings',
|
||||
// If you want to use custom column names in database store you could
|
||||
// set them in this configuration
|
||||
'keyColumn' => 'key',
|
||||
'valueColumn' => 'value',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you want all setting calls to go through Laravel's cache system.
|
||||
|
|
||||
*/
|
||||
'enableCache' => false,
|
||||
// Whether to reset the cache when changing a setting.
|
||||
'forgetCacheByWrite' => true,
|
||||
// TTL in seconds.
|
||||
'cacheTtl' => 15,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Define all default settings that will be used before any settings are set,
|
||||
| this avoids all settings being set to false to begin with and avoids
|
||||
| hardcoding the same defaults in all 'Settings::get()' calls
|
||||
|
|
||||
*/
|
||||
'defaults' => [
|
||||
'foo' => 'bar',
|
||||
]
|
||||
|
||||
];
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Modules\Usermanager\Database\Seeders\UsersSeeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
@ -15,6 +14,16 @@
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$this->call([
|
||||
UsersSeeder::class,
|
||||
RolesPermissionsSeeder::class,
|
||||
]);
|
||||
|
||||
\App\Models\User::factory(10)->create();
|
||||
|
||||
// \App\Models\User::factory()->create([
|
||||
// 'name' => 'Test User',
|
||||
// 'email' => 'test@example.com',
|
||||
// ]);
|
||||
}
|
||||
}
|
||||
|
78
package.json
@ -10,22 +10,22 @@
|
||||
"production": "mix --production"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ckeditor/ckeditor5-alignment": "^35.2.1",
|
||||
"@ckeditor/ckeditor5-build-balloon": "^35.2.1",
|
||||
"@ckeditor/ckeditor5-build-balloon-block": "^35.2.1",
|
||||
"@ckeditor/ckeditor5-build-classic": "^35.2.1",
|
||||
"@ckeditor/ckeditor5-build-decoupled-document": "^35.2.1",
|
||||
"@ckeditor/ckeditor5-build-inline": "^35.2.1",
|
||||
"@eonasdan/tempus-dominus": "^6.2.10",
|
||||
"@fortawesome/fontawesome-free": "^6.1.1",
|
||||
"@popperjs/core": "2.11.6",
|
||||
"@ckeditor/ckeditor5-alignment": "^38.1.0",
|
||||
"@ckeditor/ckeditor5-build-balloon": "^38.1.0",
|
||||
"@ckeditor/ckeditor5-build-balloon-block": "^38.1.0",
|
||||
"@ckeditor/ckeditor5-build-classic": "^38.1.0",
|
||||
"@ckeditor/ckeditor5-build-decoupled-document": "^38.1.0",
|
||||
"@ckeditor/ckeditor5-build-inline": "^38.1.0",
|
||||
"@eonasdan/tempus-dominus": "^6.7.7",
|
||||
"@fortawesome/fontawesome-free": "^6.4.0",
|
||||
"@popperjs/core": "2.11.8",
|
||||
"@shopify/draggable": "^1.0.0-beta.12",
|
||||
"@yaireo/tagify": "^4.9.2",
|
||||
"acorn": "^8.0.4",
|
||||
"apexcharts": "^3.36.3",
|
||||
"autosize": "^5.0.1",
|
||||
"axios": "^0.21.1",
|
||||
"bootstrap": "5.3.0-alpha1",
|
||||
"@yaireo/tagify": "^4.17.8",
|
||||
"acorn": "^8.9.0",
|
||||
"apexcharts": "3.41.0",
|
||||
"autosize": "^6.0.1",
|
||||
"axios": "^1.4.0",
|
||||
"bootstrap": "5.3.0",
|
||||
"bootstrap-cookie-alert": "^1.2.1",
|
||||
"bootstrap-daterangepicker": "^3.1.0",
|
||||
"bootstrap-icons": "^1.5.0",
|
||||
@ -36,28 +36,28 @@
|
||||
"clipboard": "^2.0.8",
|
||||
"countup.js": "^2.0.7",
|
||||
"cropperjs": "^1.5.12",
|
||||
"datatables.net": "^1.12.1",
|
||||
"datatables.net-bs5": "^1.12.1",
|
||||
"datatables.net-buttons": "^2.2.3",
|
||||
"datatables.net-buttons-bs5": "^2.2.3",
|
||||
"datatables.net-colreorder": "^1.5.6",
|
||||
"datatables.net-colreorder-bs5": "^1.5.6",
|
||||
"datatables.net-datetime": "^1.1.2",
|
||||
"datatables.net-fixedcolumns": "^4.1.0",
|
||||
"datatables.net-fixedcolumns-bs5": "^4.1.0",
|
||||
"datatables.net-fixedheader": "^3.2.3",
|
||||
"datatables.net-fixedheader-bs5": "^3.2.3",
|
||||
"datatables.net-plugins": "^1.11.5",
|
||||
"datatables.net-responsive": "^2.3.0",
|
||||
"datatables.net-responsive-bs5": "^2.3.0",
|
||||
"datatables.net-rowgroup": "^1.2.0",
|
||||
"datatables.net-rowgroup-bs5": "^1.2.0",
|
||||
"datatables.net-rowreorder": "^1.2.8",
|
||||
"datatables.net-rowreorder-bs5": "^1.2.8",
|
||||
"datatables.net-scroller": "^2.0.6",
|
||||
"datatables.net-scroller-bs5": "^2.0.6",
|
||||
"datatables.net-select": "^1.4.0",
|
||||
"datatables.net-select-bs5": "^1.4.0",
|
||||
"datatables.net": "^1.13.4",
|
||||
"datatables.net-bs5": "^1.13.4",
|
||||
"datatables.net-buttons": "^2.3.6",
|
||||
"datatables.net-buttons-bs5": "^2.3.6",
|
||||
"datatables.net-colreorder": "^1.6.2",
|
||||
"datatables.net-colreorder-bs5": "^1.6.2",
|
||||
"datatables.net-datetime": "^1.4.1",
|
||||
"datatables.net-fixedcolumns": "^4.2.2",
|
||||
"datatables.net-fixedcolumns-bs5": "^4.2.2",
|
||||
"datatables.net-fixedheader": "^3.3.2",
|
||||
"datatables.net-fixedheader-bs5": "^3.3.2",
|
||||
"datatables.net-plugins": "^1.13.4",
|
||||
"datatables.net-responsive": "^2.4.1",
|
||||
"datatables.net-responsive-bs5": "^2.4.1",
|
||||
"datatables.net-rowgroup": "^1.3.1",
|
||||
"datatables.net-rowgroup-bs5": "^1.3.1",
|
||||
"datatables.net-rowreorder": "^1.3.3",
|
||||
"datatables.net-rowreorder-bs5": "^1.3.3",
|
||||
"datatables.net-scroller": "^2.1.1",
|
||||
"datatables.net-scroller-bs5": "^2.1.1",
|
||||
"datatables.net-select": "^1.6.2",
|
||||
"datatables.net-select-bs5": "^1.6.2",
|
||||
"dropzone": "^5.9.2",
|
||||
"es6-promise": "^4.2.8",
|
||||
"es6-promise-polyfill": "^1.2.0",
|
||||
@ -92,15 +92,15 @@
|
||||
"tiny-slider": "^2.9.3",
|
||||
"tinymce": "^5.8.2",
|
||||
"toastr": "^2.1.4",
|
||||
"typed.js": "2.0.12",
|
||||
"typed.js": "2.0.16",
|
||||
"vis-timeline": "^7.4.9",
|
||||
"wnumb": "^1.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"alpinejs": "^3.7.1",
|
||||
"autoprefixer": "^10.4.2",
|
||||
"axios": "^1.1.3",
|
||||
"del": "^6.0.0",
|
||||
"laravel-datatables-vite": "^0.5.2",
|
||||
"laravel-mix": "^6.0.39",
|
||||
"laravel-mix-purgecss": "^6.0.0",
|
||||
"lodash": "^4.17.19",
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 18 KiB |
@ -243,27 +243,30 @@ var KTApp = function () {
|
||||
|
||||
$(element).select2(options);
|
||||
|
||||
// Handle Select2's KTMenu parent case
|
||||
if (element.hasAttribute('data-dropdown-parent') && element.hasAttribute('multiple')) {
|
||||
var parentEl = document.querySelector(element.getAttribute('data-dropdown-parent'));
|
||||
|
||||
if (parentEl && parentEl.hasAttribute("data-kt-menu")) {
|
||||
var menu = new KTMenu(parentEl);
|
||||
|
||||
if (menu) {
|
||||
$(element).on('select2:unselect', function (e) {
|
||||
element.setAttribute("data-multiple-unselect", "1");
|
||||
});
|
||||
|
||||
menu.on("kt.menu.dropdown.hide", function(item) {
|
||||
if (element.getAttribute("data-multiple-unselect") === "1") {
|
||||
element.removeAttribute("data-multiple-unselect");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
element.setAttribute("data-kt-initialized", "1");
|
||||
});
|
||||
|
||||
/*
|
||||
* Hacky fix for a bug in select2 with jQuery 3.6.0's new nested-focus "protection"
|
||||
* see: https://github.com/select2/select2/issues/5993
|
||||
* see: https://github.com/jquery/jquery/issues/4382
|
||||
*
|
||||
* TODO: Recheck with the select2 GH issue and remove once this is fixed on their side
|
||||
*/
|
||||
|
||||
if (select2FocusFixInitialized === false) {
|
||||
select2FocusFixInitialized = true;
|
||||
|
||||
$(document).on('select2:open', function(e) {
|
||||
var elements = document.querySelectorAll('.select2-container--open .select2-search__field');
|
||||
if (elements.length > 0) {
|
||||
elements[elements.length - 1].focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var createAutosize = function () {
|
||||
@ -529,7 +532,7 @@ var KTApp = function () {
|
||||
const modalEl = document.querySelector(this.getAttribute("data-bs-stacked-modal"));
|
||||
|
||||
if (modalEl) {
|
||||
const modal = new bootstrap.Modal(modalEl);
|
||||
const modal = new bootstrap.Modal(modalEl, {backdrop: false});
|
||||
modal.show();
|
||||
}
|
||||
});
|
||||
|
@ -407,6 +407,29 @@ KTDrawer.handleShow = function() {
|
||||
});
|
||||
}
|
||||
|
||||
// Handle escape key press
|
||||
KTDrawer.handleEscapeKey = function() {
|
||||
document.addEventListener('keydown', (event) => {
|
||||
if (event.key === 'Escape') {
|
||||
//if esc key was not pressed in combination with ctrl or alt or shift
|
||||
const isNotCombinedKey = !(event.ctrlKey || event.altKey || event.shiftKey);
|
||||
if (isNotCombinedKey) {
|
||||
var elements = document.querySelectorAll('.drawer-on[data-kt-drawer="true"]:not([data-kt-drawer-escape="false"])');
|
||||
var drawer;
|
||||
|
||||
if ( elements && elements.length > 0 ) {
|
||||
for (var i = 0, len = elements.length; i < len; i++) {
|
||||
drawer = KTDrawer.getInstance(elements[i]);
|
||||
if (drawer.isShown()) {
|
||||
drawer.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Dismiss instances
|
||||
KTDrawer.handleDismiss = function() {
|
||||
// External drawer toggle handler
|
||||
@ -452,6 +475,7 @@ KTDrawer.init = function() {
|
||||
KTDrawer.handleResize();
|
||||
KTDrawer.handleShow();
|
||||
KTDrawer.handleDismiss();
|
||||
KTDrawer.handleEscapeKey();
|
||||
|
||||
KTDrawerHandlersInitialized = true;
|
||||
}
|
||||
|
@ -362,7 +362,7 @@ var KTMenu = function(element, options) {
|
||||
}
|
||||
|
||||
// Item is parent of element
|
||||
if ( (item = element.closest('.menu-item[data-kt-menu-trigger]')) ) {
|
||||
if ( (item = element.closest('.menu-item')) ) {
|
||||
return item;
|
||||
}
|
||||
|
||||
@ -689,6 +689,11 @@ var KTMenu = function(element, options) {
|
||||
|
||||
var _setActiveLink = function(link) {
|
||||
var item = _getItemElement(link);
|
||||
|
||||
if (!item) {
|
||||
return;
|
||||
}
|
||||
|
||||
var parentItems = _getItemParentElements(item);
|
||||
var parentTabPane = link.closest('.tab-pane');
|
||||
|
||||
@ -738,7 +743,7 @@ var KTMenu = function(element, options) {
|
||||
}
|
||||
|
||||
var _getLinkByAttribute = function(value, name = "href") {
|
||||
var link = the.element.querySelector('a[' + name + '="' + value + '"]');
|
||||
var link = the.element.querySelector('.menu-link[' + name + '="' + value + '"]');
|
||||
|
||||
if (link) {
|
||||
return link;
|
||||
|
@ -68,6 +68,7 @@ var KTSticky = function(element, options) {
|
||||
|
||||
// Exit if false
|
||||
if ( offset === false ) {
|
||||
_disable();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -65,6 +65,15 @@ var KTAuthNewPassword = function() {
|
||||
}
|
||||
);
|
||||
|
||||
form.querySelector('input[name="password"]').addEventListener('input', function() {
|
||||
if (this.value.length > 0) {
|
||||
validator.updateFieldStatus('password', 'NotValidated');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var handleSubmitDemo = function (e) {
|
||||
submitButton.addEventListener('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
@ -124,15 +133,91 @@ var KTAuthNewPassword = function() {
|
||||
});
|
||||
});
|
||||
|
||||
form.querySelector('input[name="password"]').addEventListener('input', function() {
|
||||
if (this.value.length > 0) {
|
||||
validator.updateFieldStatus('password', 'NotValidated');
|
||||
}
|
||||
|
||||
var handleSubmitAjax = function (e) {
|
||||
// Handle form submit
|
||||
submitButton.addEventListener('click', function (e) {
|
||||
// Prevent button default action
|
||||
e.preventDefault();
|
||||
|
||||
validator.revalidateField('password');
|
||||
|
||||
// Validate form
|
||||
validator.validate().then(function (status) {
|
||||
if (status == 'Valid') {
|
||||
// Show loading indication
|
||||
submitButton.setAttribute('data-kt-indicator', 'on');
|
||||
|
||||
// Disable button to avoid multiple click
|
||||
submitButton.disabled = true;
|
||||
|
||||
// Check axios library docs: https://axios-http.com/docs/intro
|
||||
axios.post(submitButton.closest('form').getAttribute('action'), new FormData(form)).then(function (response) {
|
||||
if (response) {
|
||||
form.reset();
|
||||
|
||||
const redirectUrl = form.getAttribute('data-kt-redirect-url');
|
||||
|
||||
if (redirectUrl) {
|
||||
location.href = redirectUrl;
|
||||
}
|
||||
} else {
|
||||
// Show error popup. For more info check the plugin's official documentation: https://sweetalert2.github.io/
|
||||
Swal.fire({
|
||||
text: "Sorry, the email is incorrect, please try again.",
|
||||
icon: "error",
|
||||
buttonsStyling: false,
|
||||
confirmButtonText: "Ok, got it!",
|
||||
customClass: {
|
||||
confirmButton: "btn btn-primary"
|
||||
}
|
||||
});
|
||||
}
|
||||
}).catch(function (error) {
|
||||
Swal.fire({
|
||||
text: "Sorry, looks like there are some errors detected, please try again.",
|
||||
icon: "error",
|
||||
buttonsStyling: false,
|
||||
confirmButtonText: "Ok, got it!",
|
||||
customClass: {
|
||||
confirmButton: "btn btn-primary"
|
||||
}
|
||||
});
|
||||
}).then(() => {
|
||||
// Hide loading indication
|
||||
submitButton.removeAttribute('data-kt-indicator');
|
||||
|
||||
// Enable button
|
||||
submitButton.disabled = false;
|
||||
});
|
||||
} else {
|
||||
// Show error popup. For more info check the plugin's official documentation: https://sweetalert2.github.io/
|
||||
Swal.fire({
|
||||
text: "Sorry, looks like there are some errors detected, please try again.",
|
||||
icon: "error",
|
||||
buttonsStyling: false,
|
||||
confirmButtonText: "Ok, got it!",
|
||||
customClass: {
|
||||
confirmButton: "btn btn-primary"
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
var validatePassword = function() {
|
||||
return (passwordMeter.getScore() === 100);
|
||||
return (passwordMeter.getScore() > 50);
|
||||
}
|
||||
|
||||
var isValidUrl = function(url) {
|
||||
try {
|
||||
new URL(url);
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Public Functions
|
||||
@ -144,6 +229,12 @@ var KTAuthNewPassword = function() {
|
||||
passwordMeter = KTPasswordMeter.getInstance(form.querySelector('[data-kt-password-meter="true"]'));
|
||||
|
||||
handleForm();
|
||||
|
||||
if (isValidUrl(form.getAttribute('action'))) {
|
||||
handleSubmitAjax(); // use for ajax submit
|
||||
} else {
|
||||
handleSubmitDemo(); // used for demo purposes only
|
||||
}
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
@ -36,6 +36,9 @@ var KTAuthResetPassword = function() {
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
var handleSubmitDemo = function (e) {
|
||||
submitButton.addEventListener('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
@ -93,6 +96,96 @@ var KTAuthResetPassword = function() {
|
||||
});
|
||||
}
|
||||
|
||||
var handleSubmitAjax = function (e) {
|
||||
// Handle form submit
|
||||
submitButton.addEventListener('click', function (e) {
|
||||
// Prevent button default action
|
||||
e.preventDefault();
|
||||
|
||||
// Validate form
|
||||
validator.validate().then(function (status) {
|
||||
if (status == 'Valid') {
|
||||
// Show loading indication
|
||||
submitButton.setAttribute('data-kt-indicator', 'on');
|
||||
|
||||
// Disable button to avoid multiple click
|
||||
submitButton.disabled = true;
|
||||
|
||||
// Check axios library docs: https://axios-http.com/docs/intro
|
||||
axios.post(submitButton.closest('form').getAttribute('action'), new FormData(form)).then(function (response) {
|
||||
if (response) {
|
||||
form.reset();
|
||||
|
||||
// Show message popup. For more info check the plugin's official documentation: https://sweetalert2.github.io/
|
||||
Swal.fire({
|
||||
text: "We have send a password reset link to your email.",
|
||||
icon: "success",
|
||||
buttonsStyling: false,
|
||||
confirmButtonText: "Ok, got it!",
|
||||
customClass: {
|
||||
confirmButton: "btn btn-primary"
|
||||
}
|
||||
});
|
||||
|
||||
const redirectUrl = form.getAttribute('data-kt-redirect-url');
|
||||
|
||||
if (redirectUrl) {
|
||||
location.href = redirectUrl;
|
||||
}
|
||||
} else {
|
||||
// Show error popup. For more info check the plugin's official documentation: https://sweetalert2.github.io/
|
||||
Swal.fire({
|
||||
text: "Sorry, the email is incorrect, please try again.",
|
||||
icon: "error",
|
||||
buttonsStyling: false,
|
||||
confirmButtonText: "Ok, got it!",
|
||||
customClass: {
|
||||
confirmButton: "btn btn-primary"
|
||||
}
|
||||
});
|
||||
}
|
||||
}).catch(function (error) {
|
||||
Swal.fire({
|
||||
text: "Sorry, looks like there are some errors detected, please try again.",
|
||||
icon: "error",
|
||||
buttonsStyling: false,
|
||||
confirmButtonText: "Ok, got it!",
|
||||
customClass: {
|
||||
confirmButton: "btn btn-primary"
|
||||
}
|
||||
});
|
||||
}).then(() => {
|
||||
// Hide loading indication
|
||||
submitButton.removeAttribute('data-kt-indicator');
|
||||
|
||||
// Enable button
|
||||
submitButton.disabled = false;
|
||||
});
|
||||
} else {
|
||||
// Show error popup. For more info check the plugin's official documentation: https://sweetalert2.github.io/
|
||||
Swal.fire({
|
||||
text: "Sorry, looks like there are some errors detected, please try again.",
|
||||
icon: "error",
|
||||
buttonsStyling: false,
|
||||
confirmButtonText: "Ok, got it!",
|
||||
customClass: {
|
||||
confirmButton: "btn btn-primary"
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
var isValidUrl = function(url) {
|
||||
try {
|
||||
new URL(url);
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Public Functions
|
||||
return {
|
||||
// public functions
|
||||
@ -101,6 +194,12 @@ var KTAuthResetPassword = function() {
|
||||
submitButton = document.querySelector('#kt_password_reset_submit');
|
||||
|
||||
handleForm();
|
||||
|
||||
if (isValidUrl(form.getAttribute('action'))) {
|
||||
handleSubmitAjax(); // use for ajax submit
|
||||
} else {
|
||||
handleSubmitDemo(); // used for demo purposes only
|
||||
}
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
@ -116,20 +116,27 @@ var KTSigninGeneral = function() {
|
||||
// Validate form
|
||||
validator.validate().then(function (status) {
|
||||
if (status == 'Valid') {
|
||||
// Hide loading indication
|
||||
submitButton.removeAttribute('data-kt-indicator');
|
||||
// Show loading indication
|
||||
submitButton.setAttribute('data-kt-indicator', 'on');
|
||||
|
||||
// Enable button
|
||||
submitButton.disabled = false;
|
||||
// Disable button to avoid multiple click
|
||||
submitButton.disabled = true;
|
||||
|
||||
// Check axios library docs: https://axios-http.com/docs/intro
|
||||
axios.post('/your/ajax/login/url', {
|
||||
email: form.querySelector('[name="email"]').value,
|
||||
password: form.querySelector('[name="password"]').value
|
||||
}).then(function (response) {
|
||||
axios.post(submitButton.closest('form').getAttribute('action'), new FormData(form)).then(function (response) {
|
||||
if (response) {
|
||||
form.querySelector('[name="email"]').value= "";
|
||||
form.querySelector('[name="password"]').value= "";
|
||||
form.reset();
|
||||
|
||||
// Show message popup. For more info check the plugin's official documentation: https://sweetalert2.github.io/
|
||||
Swal.fire({
|
||||
text: "You have successfully logged in!",
|
||||
icon: "success",
|
||||
buttonsStyling: false,
|
||||
confirmButtonText: "Ok, got it!",
|
||||
customClass: {
|
||||
confirmButton: "btn btn-primary"
|
||||
}
|
||||
});
|
||||
|
||||
const redirectUrl = form.getAttribute('data-kt-redirect-url');
|
||||
|
||||
@ -158,6 +165,12 @@ var KTSigninGeneral = function() {
|
||||
confirmButton: "btn btn-primary"
|
||||
}
|
||||
});
|
||||
}).then(() => {
|
||||
// Hide loading indication
|
||||
submitButton.removeAttribute('data-kt-indicator');
|
||||
|
||||
// Enable button
|
||||
submitButton.disabled = false;
|
||||
});
|
||||
} else {
|
||||
// Show error popup. For more info check the plugin's official documentation: https://sweetalert2.github.io/
|
||||
@ -175,6 +188,15 @@ var KTSigninGeneral = function() {
|
||||
});
|
||||
}
|
||||
|
||||
var isValidUrl = function(url) {
|
||||
try {
|
||||
new URL(url);
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Public functions
|
||||
return {
|
||||
// Initialization
|
||||
@ -183,8 +205,12 @@ var KTSigninGeneral = function() {
|
||||
submitButton = document.querySelector('#kt_sign_in_submit');
|
||||
|
||||
handleValidation();
|
||||
handleSubmitDemo(); // used for demo purposes only, if you use the below ajax version you can uncomment this one
|
||||
//handleSubmitAjax(); // use for ajax submit
|
||||
|
||||
if (isValidUrl(submitButton.closest('form').getAttribute('action'))) {
|
||||
handleSubmitAjax(); // use for ajax submit
|
||||
} else {
|
||||
handleSubmitDemo(); // used for demo purposes only
|
||||
}
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
@ -144,7 +144,7 @@ var KTSignupFreeTrial = function() {
|
||||
|
||||
// Password input validation
|
||||
var validatePassword = function() {
|
||||
return (passwordMeter.getScore() === 100);
|
||||
return (passwordMeter.getScore() > 50);
|
||||
}
|
||||
|
||||
// Public functions
|
||||
|
@ -159,9 +159,174 @@ var KTSignupGeneral = function() {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Handle form ajax
|
||||
var handleFormAjax = function (e) {
|
||||
// Init form validation rules. For more info check the FormValidation plugin's official documentation:https://formvalidation.io/
|
||||
validator = FormValidation.formValidation(
|
||||
form,
|
||||
{
|
||||
fields: {
|
||||
'name': {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'Name is required'
|
||||
}
|
||||
}
|
||||
},
|
||||
'email': {
|
||||
validators: {
|
||||
regexp: {
|
||||
regexp: /^[^\s@]+@[^\s@]+\.[^\s@]+$/,
|
||||
message: 'The value is not a valid email address',
|
||||
},
|
||||
notEmpty: {
|
||||
message: 'Email address is required'
|
||||
}
|
||||
}
|
||||
},
|
||||
'password': {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'The password is required'
|
||||
},
|
||||
callback: {
|
||||
message: 'Please enter valid password',
|
||||
callback: function (input) {
|
||||
if (input.value.length > 0) {
|
||||
return validatePassword();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
'password_confirmation': {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'The password confirmation is required'
|
||||
},
|
||||
identical: {
|
||||
compare: function () {
|
||||
return form.querySelector('[name="password"]').value;
|
||||
},
|
||||
message: 'The password and its confirm are not the same'
|
||||
}
|
||||
}
|
||||
},
|
||||
'toc': {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'You must accept the terms and conditions'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
trigger: new FormValidation.plugins.Trigger({
|
||||
event: {
|
||||
password: false
|
||||
}
|
||||
}),
|
||||
bootstrap: new FormValidation.plugins.Bootstrap5({
|
||||
rowSelector: '.fv-row',
|
||||
eleInvalidClass: '', // comment to enable invalid state icons
|
||||
eleValidClass: '' // comment to enable valid state icons
|
||||
})
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// Handle form submit
|
||||
submitButton.addEventListener('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
validator.revalidateField('password');
|
||||
|
||||
validator.validate().then(function (status) {
|
||||
if (status == 'Valid') {
|
||||
// Show loading indication
|
||||
submitButton.setAttribute('data-kt-indicator', 'on');
|
||||
|
||||
// Disable button to avoid multiple click
|
||||
submitButton.disabled = true;
|
||||
|
||||
|
||||
// Check axios library docs: https://axios-http.com/docs/intro
|
||||
axios.post(submitButton.closest('form').getAttribute('action'), new FormData(form)).then(function (response) {
|
||||
if (response) {
|
||||
form.reset();
|
||||
|
||||
const redirectUrl = form.getAttribute('data-kt-redirect-url');
|
||||
|
||||
if (redirectUrl) {
|
||||
location.href = redirectUrl;
|
||||
}
|
||||
} else {
|
||||
// Show error popup. For more info check the plugin's official documentation: https://sweetalert2.github.io/
|
||||
Swal.fire({
|
||||
text: "Sorry, looks like there are some errors detected, please try again.",
|
||||
icon: "error",
|
||||
buttonsStyling: false,
|
||||
confirmButtonText: "Ok, got it!",
|
||||
customClass: {
|
||||
confirmButton: "btn btn-primary"
|
||||
}
|
||||
});
|
||||
}
|
||||
}).catch(function (error) {
|
||||
Swal.fire({
|
||||
text: "Sorry, looks like there are some errors detected, please try again.",
|
||||
icon: "error",
|
||||
buttonsStyling: false,
|
||||
confirmButtonText: "Ok, got it!",
|
||||
customClass: {
|
||||
confirmButton: "btn btn-primary"
|
||||
}
|
||||
});
|
||||
}).then(() => {
|
||||
// Hide loading indication
|
||||
submitButton.removeAttribute('data-kt-indicator');
|
||||
|
||||
// Enable button
|
||||
submitButton.disabled = false;
|
||||
});
|
||||
|
||||
} else {
|
||||
// Show error popup. For more info check the plugin's official documentation: https://sweetalert2.github.io/
|
||||
Swal.fire({
|
||||
text: "Sorry, looks like there are some errors detected, please try again.",
|
||||
icon: "error",
|
||||
buttonsStyling: false,
|
||||
confirmButtonText: "Ok, got it!",
|
||||
customClass: {
|
||||
confirmButton: "btn btn-primary"
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Handle password input
|
||||
form.querySelector('input[name="password"]').addEventListener('input', function () {
|
||||
if (this.value.length > 0) {
|
||||
validator.updateFieldStatus('password', 'NotValidated');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Password input validation
|
||||
var validatePassword = function () {
|
||||
return (passwordMeter.getScore() === 100);
|
||||
return (passwordMeter.getScore() > 50);
|
||||
}
|
||||
|
||||
var isValidUrl = function(url) {
|
||||
try {
|
||||
new URL(url);
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Public functions
|
||||
@ -173,8 +338,12 @@ var KTSignupGeneral = function() {
|
||||
submitButton = document.querySelector('#kt_sign_up_submit');
|
||||
passwordMeter = KTPasswordMeter.getInstance(form.querySelector('[data-kt-password-meter="true"]'));
|
||||
|
||||
if (isValidUrl(submitButton.closest('form').getAttribute('action'))) {
|
||||
handleFormAjax();
|
||||
} else {
|
||||
handleForm();
|
||||
}
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
|
@ -87,35 +87,38 @@ var KTLayoutSearch = function() {
|
||||
|
||||
var handlePreferences = function() {
|
||||
// Preference show handler
|
||||
if (preferencesShowElement) {
|
||||
preferencesShowElement.addEventListener('click', function() {
|
||||
wrapperElement.classList.add('d-none');
|
||||
preferencesElement.classList.remove('d-none');
|
||||
});
|
||||
}
|
||||
|
||||
// Preference dismiss handler
|
||||
if (preferencesDismissElement) {
|
||||
preferencesDismissElement.addEventListener('click', function() {
|
||||
wrapperElement.classList.remove('d-none');
|
||||
preferencesElement.classList.add('d-none');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var handleAdvancedOptionsForm = function() {
|
||||
// Show
|
||||
if (advancedOptionsFormShowElement) {
|
||||
advancedOptionsFormShowElement.addEventListener('click', function() {
|
||||
wrapperElement.classList.add('d-none');
|
||||
advancedOptionsFormElement.classList.remove('d-none');
|
||||
});
|
||||
}
|
||||
|
||||
// Cancel
|
||||
if (advancedOptionsFormCancelElement) {
|
||||
advancedOptionsFormCancelElement.addEventListener('click', function() {
|
||||
wrapperElement.classList.remove('d-none');
|
||||
advancedOptionsFormElement.classList.add('d-none');
|
||||
});
|
||||
|
||||
// Search
|
||||
advancedOptionsFormSearchElement.addEventListener('click', function() {
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Public methods
|
||||
@ -156,9 +159,14 @@ var KTLayoutSearch = function() {
|
||||
searchObject.on('kt.search.clear', clear);
|
||||
|
||||
// Custom handlers
|
||||
if (preferencesElement) {
|
||||
handlePreferences();
|
||||
}
|
||||
|
||||
if (advancedOptionsFormElement) {
|
||||
handleAdvancedOptionsForm();
|
||||
}
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
|
@ -7,7 +7,7 @@ var KTAppSidebar = function () {
|
||||
var sidebar;
|
||||
var headerMenu;
|
||||
var menuDashboardsCollapse;
|
||||
var menuWrapper;
|
||||
var menuScroll;
|
||||
var toggle;
|
||||
|
||||
// Private functions
|
||||
@ -56,7 +56,7 @@ var KTAppSidebar = function () {
|
||||
// Handle dashboards menu items collapse mode
|
||||
var handleShowMore = function() {
|
||||
menuDashboardsCollapse.addEventListener('hide.bs.collapse', event => {
|
||||
menuWrapper.scrollTo({
|
||||
menuScroll.scrollTo({
|
||||
top: 0,
|
||||
behavior: 'instant'
|
||||
});
|
||||
@ -64,18 +64,18 @@ var KTAppSidebar = function () {
|
||||
}
|
||||
|
||||
var handleMenuScroll = function() {
|
||||
var menuActiveItem = menuWrapper.querySelector(".menu-link.active");
|
||||
var menuActiveItem = menuScroll.querySelector(".menu-link.active");
|
||||
|
||||
if ( !menuActiveItem ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( KTUtil.isVisibleInContainer(menuActiveItem, menuWrapper) === true) {
|
||||
if ( KTUtil.isVisibleInContainer(menuActiveItem, menuScroll) === true) {
|
||||
return;
|
||||
}
|
||||
|
||||
menuWrapper.scroll({
|
||||
top: KTUtil.getRelativeTopPosition(menuActiveItem, menuWrapper),
|
||||
menuScroll.scroll({
|
||||
top: KTUtil.getRelativeTopPosition(menuActiveItem, menuScroll),
|
||||
behavior: 'smooth'
|
||||
});
|
||||
}
|
||||
@ -88,7 +88,7 @@ var KTAppSidebar = function () {
|
||||
toggle = document.querySelector('#kt_app_sidebar_toggle');
|
||||
headerMenu = document.querySelector('#kt_app_header_menu');
|
||||
menuDashboardsCollapse = document.querySelector('#kt_app_sidebar_menu_dashboards_collapse');
|
||||
menuWrapper = document.querySelector('#kt_app_sidebar_menu_wrapper');
|
||||
menuScroll = document.querySelector('#kt_app_sidebar_menu_scroll');
|
||||
|
||||
if ( sidebar === null ) {
|
||||
return;
|
||||
@ -98,7 +98,7 @@ var KTAppSidebar = function () {
|
||||
handleToggle();
|
||||
}
|
||||
|
||||
if ( menuWrapper ) {
|
||||
if ( menuScroll ) {
|
||||
handleMenuScroll();
|
||||
}
|
||||
|
||||
|
@ -168,7 +168,7 @@ var KTTablesWidget4 = function () {
|
||||
|
||||
// Populate elements with data
|
||||
const imageSrc = image.getAttribute('data-kt-src-path');
|
||||
image.setAttribute('src', imageSrc + d.image + '.gif');
|
||||
image.setAttribute('src', imageSrc + d.image + '.png');
|
||||
name.innerText = d.name;
|
||||
description.innerText = d.description;
|
||||
cost.innerText = d.cost;
|
||||
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 280 KiB After Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 213 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 233 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 233 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 215 KiB After Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 167 KiB After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 177 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 278 KiB After Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 211 KiB After Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 139 KiB After Width: | Height: | Size: 93 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 183 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 19 KiB |