Commit 8ae169e3 by mushishixian

安装laraveladmin

parent 585b9d09
Showing with 4879 additions and 16 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -9,6 +9,7 @@
"license": "MIT",
"require": {
"php": "^7.2.5|^8.0",
"dcat/laravel-admin": "2.*",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^6.3.1|^7.0.1",
......
#!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../doctrine/dbal/bin/doctrine-dbal) using eval to remove the shebang if present
*
* @generated
*/
$binPath = realpath(__DIR__ . "/" . '../doctrine/dbal/bin/doctrine-dbal');
$contents = file_get_contents($binPath);
$contents = preg_replace('{^#!/.+\r?\n<\?(php)?}', '', $contents, 1, $replaced);
if ($replaced) {
$contents = strtr($contents, array(
'__FILE__' => var_export($binPath, true),
'__DIR__' => var_export(dirname($binPath), true),
));
eval($contents);
exit(0);
}
include $binPath;
@ECHO OFF
setlocal DISABLEDELAYEDEXPANSION
SET BIN_TARGET=%~dp0/../doctrine/dbal/bin/doctrine-dbal
php "%BIN_TARGET%" %*
......@@ -6,30 +6,31 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
'8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php',
'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php',
'667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
'def43f6c87e4f8dfd0c9e1b1bab14fe8' => $vendorDir . '/symfony/polyfill-iconv/bootstrap.php',
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
'2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php',
'def43f6c87e4f8dfd0c9e1b1bab14fe8' => $vendorDir . '/symfony/polyfill-iconv/bootstrap.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php',
'801c31d8ed748cfa537fa45402288c95' => $vendorDir . '/psy/psysh/src/functions.php',
'a1105708a18b76903365ca1c4aa61b02' => $vendorDir . '/symfony/translation/Resources/functions.php',
'538ca81a9a966a6716601ecf48f4eaef' => $vendorDir . '/opis/closure/functions.php',
'e39a8b23c42d4e1452234d762b03835a' => $vendorDir . '/ramsey/uuid/src/functions.php',
'f0906e6318348a765ffb6eb24e0d0938' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/helpers.php',
'58571171fd5812e6e447dce228f52f4d' => $vendorDir . '/laravel/framework/src/Illuminate/Support/helpers.php',
'b6ec61354e97f32c0ae683041c78392a' => $vendorDir . '/scrivo/highlight.php/HighlightUtilities/functions.php',
'9cdd7b9056abc3081735233ba9dd9c7f' => $vendorDir . '/facade/flare-client-php/src/helpers.php',
'b6ec61354e97f32c0ae683041c78392a' => $vendorDir . '/scrivo/highlight.php/HighlightUtilities/functions.php',
'8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php',
'ed962a97bd972bc82007176b647d4e36' => $vendorDir . '/facade/ignition/src/helpers.php',
'6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php',
'044fc72df35e84c745ee0d4120dc15d2' => $vendorDir . '/dcat/laravel-admin/src/Support/helpers.php',
);
......@@ -35,12 +35,13 @@ return array(
'Symfony\\Component\\ErrorHandler\\' => array($vendorDir . '/symfony/error-handler'),
'Symfony\\Component\\CssSelector\\' => array($vendorDir . '/symfony/css-selector'),
'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'),
'Spatie\\EloquentSortable\\' => array($vendorDir . '/spatie/eloquent-sortable/src'),
'Ramsey\\Uuid\\' => array($vendorDir . '/ramsey/uuid/src'),
'Ramsey\\Collection\\' => array($vendorDir . '/ramsey/collection/src'),
'Psy\\' => array($vendorDir . '/psy/psysh/src'),
'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src', $vendorDir . '/psr/http-factory/src'),
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'),
'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'),
'Psr\\EventDispatcher\\' => array($vendorDir . '/psr/event-dispatcher/src'),
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
......@@ -67,8 +68,13 @@ return array(
'Dotenv\\' => array($vendorDir . '/vlucas/phpdotenv/src'),
'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'),
'Doctrine\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Inflector'),
'Doctrine\\Deprecations\\' => array($vendorDir . '/doctrine/deprecations/lib/Doctrine/Deprecations'),
'Doctrine\\DBAL\\' => array($vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL'),
'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib/Doctrine/Common/Lexer'),
'Doctrine\\Common\\Cache\\' => array($vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache'),
'Doctrine\\Common\\' => array($vendorDir . '/doctrine/event-manager/lib/Doctrine/Common'),
'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'),
'Dcat\\Admin\\' => array($vendorDir . '/dcat/laravel-admin/src'),
'Cron\\' => array($vendorDir . '/dragonmantank/cron-expression/src/Cron'),
'Carbon\\' => array($vendorDir . '/nesbot/carbon/src/Carbon'),
'Brick\\Math\\' => array($vendorDir . '/brick/math/src'),
......
This diff could not be displayed because it is too large.
<?php return array(
'root' => array(
'pretty_version' => 'v7.30.1',
'version' => '7.30.1.0',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => NULL,
'reference' => '585b9d09bb0f0ae7a14ad8b57ae0052add3bf654',
'name' => 'laravel/laravel',
'dev' => true,
),
......@@ -40,6 +40,51 @@
0 => '*',
),
),
'dcat/laravel-admin' => array(
'pretty_version' => '2.2.2-beta',
'version' => '2.2.2.0-beta',
'type' => 'library',
'install_path' => __DIR__ . '/../dcat/laravel-admin',
'aliases' => array(),
'reference' => '150f46486871b5ca57992f7eed3787e0c1c49bef',
'dev_requirement' => false,
),
'doctrine/cache' => array(
'pretty_version' => '2.2.0',
'version' => '2.2.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../doctrine/cache',
'aliases' => array(),
'reference' => '1ca8f21980e770095a31456042471a57bc4c68fb',
'dev_requirement' => false,
),
'doctrine/dbal' => array(
'pretty_version' => '2.13.9',
'version' => '2.13.9.0',
'type' => 'library',
'install_path' => __DIR__ . '/../doctrine/dbal',
'aliases' => array(),
'reference' => 'c480849ca3ad6706a39c970cdfe6888fa8a058b8',
'dev_requirement' => false,
),
'doctrine/deprecations' => array(
'pretty_version' => 'v1.0.0',
'version' => '1.0.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../doctrine/deprecations',
'aliases' => array(),
'reference' => '0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de',
'dev_requirement' => false,
),
'doctrine/event-manager' => array(
'pretty_version' => '1.1.1',
'version' => '1.1.1.0',
'type' => 'library',
'install_path' => __DIR__ . '/../doctrine/event-manager',
'aliases' => array(),
'reference' => '41370af6a30faa9dc0368c4a6814d596e81aba7f',
'dev_requirement' => false,
),
'doctrine/inflector' => array(
'pretty_version' => '2.0.4',
'version' => '2.0.4.0',
......@@ -374,12 +419,12 @@
'dev_requirement' => false,
),
'laravel/laravel' => array(
'pretty_version' => 'v7.30.1',
'version' => '7.30.1.0',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => NULL,
'reference' => '585b9d09bb0f0ae7a14ad8b57ae0052add3bf654',
'dev_requirement' => false,
),
'laravel/tinker' => array(
......@@ -649,8 +694,8 @@
'psr/log-implementation' => array(
'dev_requirement' => false,
'provided' => array(
0 => '1.0|2.0',
1 => '1.0.0 || 2.0.0 || 3.0.0',
0 => '1.0.0 || 2.0.0 || 3.0.0',
1 => '1.0|2.0',
),
),
'psr/simple-cache' => array(
......@@ -821,6 +866,15 @@
'reference' => '99732be0ddb3361e16ad77b68ba41efc8e979019',
'dev_requirement' => true,
),
'spatie/eloquent-sortable' => array(
'pretty_version' => '3.8.2',
'version' => '3.8.2.0',
'type' => 'library',
'install_path' => __DIR__ . '/../spatie/eloquent-sortable',
'aliases' => array(),
'reference' => '18451ecf44b28a14ac0ed8803d0f5195a78a48a2',
'dev_requirement' => false,
),
'swiftmailer/swiftmailer' => array(
'pretty_version' => 'v6.3.0',
'version' => '6.3.0.0',
......
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
[*.{yml,yaml}]
indent_size = 2
[docker-compose.yml]
indent_size = 4
APP_NAME=Laravel
APP_ENV=testing
APP_KEY=base64:nkWw/7lEOZCPLLEaa1oWsHOgPQGxMszomZoJvgy/XHk=
APP_DEBUG=true
APP_URL=http://127.0.0.1:8300
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=123456
CODECOV_TOKEN=8124bc76-384b-4528-8875-a33ee1e1ee19
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
resources/* linguist-vendored
*.js linguist-language=php
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 180
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
- bug
- unconfirmed
- enhancement
- feature
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
name: Laravel Dusk
on:
push:
branches: [ 2.0 ]
pull_request:
branches: [ 2.0 ]
jobs:
laravel5:
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-php@b7d1d9c9a92d8d8463ce36d7f60da34d461724f8
with:
php-version: '7.2'
- uses: actions/checkout@v2
- name: Composer Update
run: composer self-update --2
- name: Setup MySQL
# You may pin to the exact commit or the version.
# uses: mirromutth/mysql-action@de1fba8b3f90ce8db80f663a7043be3cf3231248
uses: mirromutth/mysql-action@v1.1
with:
# Version of MySQL to use
mysql version: 5.7
# MYSQL_ROOT_PASSWORD - root superuser password
mysql root password: 123456
# MYSQL_DATABASE - name for the default database that is created
mysql database: laravel
# MYSQL_USER - create the specified user with superuser power for created database
mysql user: root
# MYSQL_PASSWORD - specified superuser password which user is power for created database
mysql password: 123456
- name: Install Dependencies
run: |
composer create-project --prefer-dist laravel/laravel laravel-tests 5.*
sh ./tests/bin/install-dep.sh
- name: Install Admin
run: sh ./tests/bin/install-admin.sh
# - name: Install Xvfb
# run: sudo apt-get install xvfb
- name: Start Server
run: sh ./tests/bin/start.sh
- name: Run test suite
run: cd ./laravel-tests && php artisan dusk
laravel6:
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-php@b7d1d9c9a92d8d8463ce36d7f60da34d461724f8
with:
php-version: '7.3'
- uses: actions/checkout@v2
- name: Composer Update
run: composer self-update --2
- name: Setup MySQL
# You may pin to the exact commit or the version.
# uses: mirromutth/mysql-action@de1fba8b3f90ce8db80f663a7043be3cf3231248
uses: mirromutth/mysql-action@v1.1
with:
# Version of MySQL to use
mysql version: 5.7
# MYSQL_ROOT_PASSWORD - root superuser password
mysql root password: 123456
# MYSQL_DATABASE - name for the default database that is created
mysql database: laravel
# MYSQL_USER - create the specified user with superuser power for created database
mysql user: root
# MYSQL_PASSWORD - specified superuser password which user is power for created database
mysql password: 123456
- name: Install Dependencies
run: |
composer create-project --prefer-dist laravel/laravel laravel-tests 6.*
sh ./tests/bin/install-dep.sh
- name: Install Admin
run: sh ./tests/bin/install-admin.sh
# - name: Install Xvfb
# run: sudo apt-get install xvfb
- name: Start Server
run: sh ./tests/bin/start.sh
- name: Run test suite
run: cd ./laravel-tests && php artisan dusk
laravel7:
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-php@b7d1d9c9a92d8d8463ce36d7f60da34d461724f8
with:
php-version: '7.3'
- uses: actions/checkout@v2
- name: Composer Update
run: composer self-update --2
- name: Setup MySQL
# You may pin to the exact commit or the version.
# uses: mirromutth/mysql-action@de1fba8b3f90ce8db80f663a7043be3cf3231248
uses: mirromutth/mysql-action@v1.1
with:
# Version of MySQL to use
mysql version: 5.7
# MYSQL_ROOT_PASSWORD - root superuser password
mysql root password: 123456
# MYSQL_DATABASE - name for the default database that is created
mysql database: laravel
# MYSQL_USER - create the specified user with superuser power for created database
mysql user: root
# MYSQL_PASSWORD - specified superuser password which user is power for created database
mysql password: 123456
- name: Install Dependencies
run: |
composer create-project --prefer-dist laravel/laravel laravel-tests 7.*
sh ./tests/bin/install-dep.sh
- name: Install Admin
run: sh ./tests/bin/install-admin.sh
# - name: Install Xvfb
# run: sudo apt-get install xvfb
- name: Start Server
run: sh ./tests/bin/start.sh
- name: Run test suite
run: cd ./laravel-tests && php artisan dusk
laravel8:
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-php@b7d1d9c9a92d8d8463ce36d7f60da34d461724f8
with:
php-version: '8.0'
- uses: actions/checkout@v2
- name: Composer Update
run: composer self-update --2
- name: Setup MySQL
# You may pin to the exact commit or the version.
# uses: mirromutth/mysql-action@de1fba8b3f90ce8db80f663a7043be3cf3231248
uses: mirromutth/mysql-action@v1.1
with:
# Version of MySQL to use
mysql version: 5.7
# MYSQL_ROOT_PASSWORD - root superuser password
mysql root password: 123456
# MYSQL_DATABASE - name for the default database that is created
mysql database: laravel
# MYSQL_USER - create the specified user with superuser power for created database
mysql user: root
# MYSQL_PASSWORD - specified superuser password which user is power for created database
mysql password: 123456
- name: Install Dependencies
run: |
composer create-project --prefer-dist laravel/laravel laravel-tests 8.*
sh ./tests/bin/install-dep.sh
- name: Install Admin
run: sh ./tests/bin/install-admin.sh
- name: Install Xvfb
run: sudo apt-get install xvfb
- name: Start Server
run: sh ./tests/bin/start.sh
- name: Run test suite
run: cd ./laravel-tests && php artisan dusk
laravel9:
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-php@b7d1d9c9a92d8d8463ce36d7f60da34d461724f8
with:
php-version: '8.0'
- uses: actions/checkout@v2
- name: Composer Update
run: composer self-update --2
- name: Setup MySQL
# You may pin to the exact commit or the version.
# uses: mirromutth/mysql-action@de1fba8b3f90ce8db80f663a7043be3cf3231248
uses: mirromutth/mysql-action@v1.1
with:
# Version of MySQL to use
mysql version: 5.7
# MYSQL_ROOT_PASSWORD - root superuser password
mysql root password: 123456
# MYSQL_DATABASE - name for the default database that is created
mysql database: laravel
# MYSQL_USER - create the specified user with superuser power for created database
mysql user: root
# MYSQL_PASSWORD - specified superuser password which user is power for created database
mysql password: 123456
- name: Install Dependencies
run: |
composer create-project --prefer-dist laravel/laravel laravel-tests 9.*
sh ./tests/bin/install-dep.sh
- name: Install Admin
run: sh ./tests/bin/install-admin.sh
- name: Install Xvfb
run: sudo apt-get install xvfb
- name: Start Server
run: sh ./tests/bin/start.sh
- name: Run test suite
run: cd ./laravel-tests && php artisan dusk
/vendor/
composer.lock
.idea
.php_cs.cache
/node_modules
package-lock.json
mix-manifest.json
/images/
pre-dist
/laravel-tests
*.bak.*
.DS_Store
preset: laravel
\ No newline at end of file
The MIT License (MIT)
Copyright (c) 2019 Jiang qinghua, Jens Segers
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
<div align="center">
<img src="https://cdn.learnku.com/uploads/images/202009/27/38389/WFQxJ7qZ1k.png!large" height="80">
</div>
<br>
<p align="center">
<a href="https://github.com/jqhph/dcat-admin/actions">
<img src="https://github.com/jqhph/dcat-admin/workflows/Laravel%20Dusk/badge.svg" alt="Build Status">
</a>
<a href="https://styleci.io/repos/182349597">
<img src="https://github.styleci.io/repos/182349597/shield" alt="StyleCI">
</a>
<a href="https://packagist.org/packages/dcat/laravel-admin" ><img src="https://poser.pugx.org/dcat/laravel-admin/v/stable" /></a>
<a href="https://packagist.org/packages/dcat/laravel-admin"><img src="https://img.shields.io/packagist/dt/dcat/laravel-admin.svg?color=" /></a>
<a><img src="https://img.shields.io/badge/php-7.1+-59a9f8.svg?style=flat" /></a>
<a><img src="https://img.shields.io/badge/laravel-5.5+-59a9f8.svg?style=flat" ></a>
</p>
<p align=""><code>Dcat Admin</code>是一个基于<a href="https://www.laravel-admin.org/" target="_blank">laravel-admin</a>二次开发而成的后台系统构建工具,只需很少的代码即可快速构建出一个功能完善的高颜值后台系统。内置丰富的后台常用组件,开箱即用,让开发者告别冗杂的HTML代码,对后端开发者非常友好。</p>
- [官方网站](http://www.dcatadmin.com)
- [中文文档](https://learnku.com/docs/dcat-admin)
- [English documentions](http://www.dcatadmin.com/docs/en-2.x/quick-start.html)
- [Demo / 在线演示](http://103.39.211.179:8080/admin)
- [Demo源码](https://github.com/jqhph/dcat-admin-demo)
- [Demo源码 (码云)](https://gitee.com/jqhph/dcat-admin-demo)
- [扩展](#)
![](https://cdn.learnku.com/uploads/images/202101/28/38389/YLmL7PLqH7.png!large)
### 功能特性
- [x] 简洁优雅、灵活可扩展的API
- [x] 用户管理
- [x] RBAC权限管理,支持无限极权限节点
- [x] 菜单管理
- [x] 使用pjax构建无刷新页面,支持**按需加载**静态资源,可以无限扩展组件而不影响整体性能
- [x] 松耦合的页面构建与数据操作设计,可轻松切换数据源
- [x] 自定义页面
- [x] 自定义主题配色
- [x] 多主题切换功能,内置多种主题色
- [x] 可轻松构建无菜单栏的独立页面(如可用于构建弹窗选择器等功能)
- [x] 插件功能
- [x] 可视化代码生成器,可根据数据表一键生成增删改查页面
- [x] 数据表格构建工具,内置丰富的表格常用功能(如组合表头、数据导出、搜索、快捷创建、批量操作等)
- [x] 树状表格功能构建工具,支持分页和点击加载
- [x] 数据表单构建工具,内置丰富的表单类型,支持表单异步提交
- [x] 分步表单构建工具
- [x] 弹窗表单构建工具
- [x] 数据详情页构建工具
- [x] 无限层级树状页面构建工具,支持用拖拽的方式实现数据的层级、排序等操作
- [x] 内置丰富的常用页面组件(如图表、数据统计卡片、下拉菜单、Tab卡片、提示工具等)
- [x] `Section`功能(类似`Wordpress``Filter``blade`模板的`section`标签)
- [x] 异步文件上传表单,支持分块多线程上传
- [x] 多应用
- [ ] 插件市场,只需在管理页面轻轻点击鼠标即可完成插件的安装、更新和卸载等操作
### 环境
- PHP >= 7.1.0
- Laravel 5.5.0 ~ 9.*
- Fileinfo PHP Extension
### 安装
> 如果安装过程中出现`composer`下载过慢或安装失败的情况,请运行命令`composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/`把`composer`镜像更换为阿里云镜像。
首先需要安装`laravel`框架,如已安装可以跳过此步骤。如果您是第一次使用`laravel`,请务必先阅读文档 [安装 《Laravel中文文档》](https://learnku.com/docs/laravel/8.x/installation/9354)
```bash
composer create-project --prefer-dist laravel/laravel 项目名称 7.*
# 或
composer create-project --prefer-dist laravel/laravel 项目名称
```
安装完`laravel`之后需要修改`.env`文件,设置数据库连接设置正确
```dotenv
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=dcat-admin
DB_USERNAME=root
DB_PASSWORD=
```
安装`dcat-admin`
```
cd {项目名称}
composer require dcat/laravel-admin
```
然后运行下面的命令来发布资源:
```
php artisan admin:publish
```
在该命令会生成配置文件`config/admin.php`,可以在里面修改安装的地址、数据库连接、以及表名,建议都是用默认配置不修改。
然后运行下面的命令完成安装:
> 执行这一步命令可能会报以下错误`Specified key was too long ... 767 bytes`,如果出现这个报错,请在`app/Providers/AppServiceProvider.php`文件的`boot`方法中加上代码`\Schema::defaultStringLength(191);`,然后删除掉数据库中的所有数据表,再重新运行一遍`php artisan admin:install`命令即可。
```
php artisan admin:install
```
上述步骤操作完成之后就可以配置`web`服务了,**注意需要把`web`目录指向`public`目录**!如果用的是`nginx`,还需要在配置中加上伪静态配置
```dotenv
location / {
try_files $uri $uri/ /index.php?$query_string;
}
```
启动服务后,在浏览器打开 `http://localhost/admin`,使用用户名 `admin` 和密码 `admin`登陆。
<a name="extensions"></a>
### 扩展
| 扩展 | 描述 | dcat-admin 版本 |
| ------------------------------------------------ | ---------------------------------------- |---------------------------------------- |
| [mosiboom/dcat-iframe-tab](https://github.com/mosiboom/dcat-iframe-tab) | IFRAME TAB标签切换 | 2.x |
| [super-eggs/dcat-distpicker](https://github.com/super-eggs/dcat-distpicker) | 省市区联动 | 2.x |
| [ueditor](https://github.com/jqhph/dcat-admin-ueditor) | 百度在线编辑器 | 1.x |
| [grid-sortable](https://github.com/jqhph/dcat-admin-grid-sortable) | 表格拖曳排序工具 | 1.x |
### 鸣谢
`Dcat Admin` 基于以下组件:
+ [Laravel](https://laravel.com/)
+ [Laravel Admin](https://www.laravel-admin.org/)
+ [AdminLTE3](https://github.com/ColorlibHQ/AdminLTE)
+ [bootstrap4](https://getbootstrap.com/)
+ [jQuery3](https://jquery.com/)
+ [Eonasdan Datetimepicker](https://github.com/Eonasdan/bootstrap-datetimepicker/)
+ [font-awesome](http://fontawesome.io)
+ [jquery-form](https://github.com/jquery-form/form)
+ [moment](http://momentjs.com/)
+ [webuploader](http://fex.baidu.com/webuploader/)
+ [jquery-pjax](https://github.com/defunkt/jquery-pjax)
+ [Nestable](http://dbushell.github.io/Nestable/)
+ [toastr](http://codeseven.github.io/toastr/)
+ [editor-md](https://github.com/pandao/editor.md)
+ [fontawesome-iconpicker](https://github.com/itsjavi/fontawesome-iconpicker)
+ [layer弹出层](http://layer.layui.com/)
+ [char.js](https://www.chartjs.org)
+ [nprogress](https://ricostacruz.com/nprogress/)
+ [bootstrap-validator](https://github.com/1000hz/bootstrap-validator)
+ [Google map](https://www.google.com/maps)
+ [Tencent map](http://lbs.qq.com/)
### Contributors
#### Code Contributors
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="https://github.com/jqhph/dcat-admin/graphs/contributors"><img src="https://opencollective.com/dcat-admin/contributors.svg?width=890&button=false" /></a>
### Financial Contributors
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/dcat-admin/contribute)]
#### Individuals
<a href="https://opencollective.com/dcat-admin"><img src="https://opencollective.com/dcat-admin/individuals.svg?width=890"></a>
#### Organizations
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/dcat-admin/contribute)]
<a href="https://opencollective.com/dcat-admin/organization/0/website"><img src="https://opencollective.com/dcat-admin/organization/0/avatar.svg"></a>
<a href="https://opencollective.com/dcat-admin/organization/1/website"><img src="https://opencollective.com/dcat-admin/organization/1/avatar.svg"></a>
<a href="https://opencollective.com/dcat-admin/organization/2/website"><img src="https://opencollective.com/dcat-admin/organization/2/avatar.svg"></a>
<a href="https://opencollective.com/dcat-admin/organization/3/website"><img src="https://opencollective.com/dcat-admin/organization/3/avatar.svg"></a>
<a href="https://opencollective.com/dcat-admin/organization/4/website"><img src="https://opencollective.com/dcat-admin/organization/4/avatar.svg"></a>
<a href="https://opencollective.com/dcat-admin/organization/5/website"><img src="https://opencollective.com/dcat-admin/organization/5/avatar.svg"></a>
<a href="https://opencollective.com/dcat-admin/organization/6/website"><img src="https://opencollective.com/dcat-admin/organization/6/avatar.svg"></a>
<a href="https://opencollective.com/dcat-admin/organization/7/website"><img src="https://opencollective.com/dcat-admin/organization/7/avatar.svg"></a>
<a href="https://opencollective.com/dcat-admin/organization/8/website"><img src="https://opencollective.com/dcat-admin/organization/8/avatar.svg"></a>
<a href="https://opencollective.com/dcat-admin/organization/9/website"><img src="https://opencollective.com/dcat-admin/organization/9/avatar.svg"></a>
### License
------------
`dcat-admin` is licensed under [The MIT License (MIT)](LICENSE).
{
"name": "dcat/laravel-admin",
"description": "dcat admin",
"type": "library",
"keywords": ["dcat", "laravel", "admin", "grid", "form", "laravel admin"],
"homepage": "https://github.com/jqhph/dcat-admin",
"license": "MIT",
"authors": [
{
"name": "jqh",
"email": "841324345@qq.com"
}
],
"require": {
"php": ">=7.1.0",
"laravel/framework": "~5.5|~6.0|~7.0|~8.0|~9.0",
"spatie/eloquent-sortable": "3.*|4.*",
"doctrine/dbal": "^2.6|^3.0"
},
"require-dev": {
"laravel/dusk": "~5.9|~6",
"phpstan/phpstan": "^0.12.0",
"phpunit/phpunit": "^7.5|~9",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0"
},
"autoload": {
"psr-4": {
"Dcat\\Admin\\": "src/"
},
"files": [
"src/Support/helpers.php"
]
},
"autoload-dev": {
"psr-4": {
"Dcat\\Admin\\Tests\\": "tests/"
}
},
"scripts": {
"phpstan": "vendor/bin/phpstan analyse",
"test": "vendor/bin/phpunit"
},
"extra": {
"laravel": {
"providers": [
"Dcat\\Admin\\AdminServiceProvider"
]
}
}
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAdminTables extends Migration
{
public function getConnection()
{
return $this->config('database.connection') ?: config('database.default');
}
public function config($key)
{
return config('admin.'.$key);
}
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create($this->config('database.users_table'), function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('username', 120)->unique();
$table->string('password', 80);
$table->string('name');
$table->string('avatar')->nullable();
$table->string('remember_token', 100)->nullable();
$table->timestamps();
});
Schema::create($this->config('database.roles_table'), function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name', 50);
$table->string('slug', 50)->unique();
$table->timestamps();
});
Schema::create($this->config('database.permissions_table'), function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name', 50);
$table->string('slug', 50)->unique();
$table->string('http_method')->nullable();
$table->text('http_path')->nullable();
$table->integer('order')->default(0);
$table->bigInteger('parent_id')->default(0);
$table->timestamps();
});
Schema::create($this->config('database.menu_table'), function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('parent_id')->default(0);
$table->integer('order')->default(0);
$table->string('title', 50);
$table->string('icon', 50)->nullable();
$table->string('uri', 50)->nullable();
$table->timestamps();
});
Schema::create($this->config('database.role_users_table'), function (Blueprint $table) {
$table->bigInteger('role_id');
$table->bigInteger('user_id');
$table->unique(['role_id', 'user_id']);
$table->timestamps();
});
Schema::create($this->config('database.role_permissions_table'), function (Blueprint $table) {
$table->bigInteger('role_id');
$table->bigInteger('permission_id');
$table->unique(['role_id', 'permission_id']);
$table->timestamps();
});
Schema::create($this->config('database.role_menu_table'), function (Blueprint $table) {
$table->bigInteger('role_id');
$table->bigInteger('menu_id');
$table->unique(['role_id', 'menu_id']);
$table->timestamps();
});
Schema::create($this->config('database.permission_menu_table'), function (Blueprint $table) {
$table->bigInteger('permission_id');
$table->bigInteger('menu_id');
$table->unique(['permission_id', 'menu_id']);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists($this->config('database.users_table'));
Schema::dropIfExists($this->config('database.roles_table'));
Schema::dropIfExists($this->config('database.permissions_table'));
Schema::dropIfExists($this->config('database.menu_table'));
Schema::dropIfExists($this->config('database.role_users_table'));
Schema::dropIfExists($this->config('database.role_permissions_table'));
Schema::dropIfExists($this->config('database.role_menu_table'));
Schema::dropIfExists($this->config('database.permission_menu_table'));
}
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAdminSettingsTable extends Migration
{
public function getConnection()
{
return $this->config('database.connection') ?: config('database.default');
}
public function config($key)
{
return config('admin.'.$key);
}
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create($this->config('database.settings_table') ?: 'admin_settings', function (Blueprint $table) {
$table->string('slug', 100)->primary();
$table->longText('value');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists($this->config('database.settings_table') ?: 'admin_settings');
}
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAdminExtensionsTable extends Migration
{
public function getConnection()
{
return $this->config('database.connection') ?: config('database.default');
}
public function config($key)
{
return config('admin.'.$key);
}
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create($this->config('database.extensions_table') ?: 'admin_extensions', function (Blueprint $table) {
$table->increments('id')->unsigned();
$table->string('name', 100)->unique();
$table->string('version', 20)->default('');
$table->tinyInteger('is_enabled')->default(0);
$table->text('options')->nullable();
$table->timestamps();
$table->engine = 'InnoDB';
});
Schema::create($this->config('database.extension_histories_table') ?: 'admin_extension_histories', function (Blueprint $table) {
$table->bigIncrements('id')->unsigned();
$table->string('name', 100);
$table->tinyInteger('type')->default(1);
$table->string('version', 20)->default(0);
$table->text('detail')->nullable();
$table->index('name');
$table->timestamps();
$table->engine = 'InnoDB';
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists($this->config('database.extensions_table') ?: 'admin_extensions');
Schema::dropIfExists($this->config('database.extension_histories_table') ?: 'admin_extension_histories');
}
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateAdminMenuTable extends Migration
{
public function getConnection()
{
return $this->config('database.connection') ?: config('database.default');
}
public function config($key)
{
return config('admin.'.$key);
}
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table($this->config('database.menu_table'), function (Blueprint $table) {
$table->tinyInteger('show')->default(1)->after('uri');
$table->string('extension', 50)->default('')->after('uri');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table($this->config('database.menu_table'), function (Blueprint $table) {
$table->dropColumn('show');
$table->dropColumn('extension');
});
}
}
- Laravel Version: #.#.#
- PHP Version: #.#.#
- Dcat Admin Version: #.#.#
### Description:
### Steps To Reproduce:
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"cross-env": "^5.2.1",
"laravel-mix": "^4.1.4",
"lodash": "^4.17.15",
"resolve-url-loader": "^2.3.1",
"rtlcss": "^2.4.0",
"sass": "^1.22.12",
"sass-loader": "^7.3.1",
"vue-template-compiler": "^2.6.12",
"webpack-cli": "^3.3.5"
}
}
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Browser Test Suite">
<directory suffix="Test.php">./tests/Browser</directory>
</testsuite>
<testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./app</directory>
</whitelist>
</filter>
</phpunit>
{
"esnext": true,
"verbose": true,
"disallowEmptyBlocks": true,
"disallowKeywords": ["with"],
"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineStrings": true,
"disallowMultipleVarDecl": true,
"disallowQuotedKeysInObjects": "allButReserved",
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowSpaceBeforeBinaryOperators": [","],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
"disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
"disallowSpacesInsideArrayBrackets": true,
"disallowSpacesInsideParentheses": true,
"disallowTrailingComma": true,
"disallowTrailingWhitespace": true,
"requireCamelCaseOrUpperCaseIdentifiers": true,
"requireCapitalizedConstructors": true,
"requireCommaBeforeLineBreak": true,
"requireDollarBeforejQueryAssignment": true,
"requireDotNotation": true,
"requireLineFeedAtFileEnd": true,
"requirePaddingNewLinesAfterUseStrict": true,
"requirePaddingNewLinesBeforeExport": true,
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
"requireSpaceAfterLineComment": true,
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
"requireSpaceBetweenArguments": true,
"requireSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true, "beforeOpeningRoundBrace": true, "allExcept": ["shorthand"] },
"requireSpacesInConditionalExpression": true,
"requireSpacesInForStatement": true,
"requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
"requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
"requireSpacesInsideObjectBrackets": "allButNested",
"validateAlignedFunctionParameters": true,
"validateIndentation": 2,
"validateLineBreaks": "LF",
"validateNewlineAfterArrayElements": true,
"validateQuoteMarks": "'"
}
import ControlSidebar from './ControlSidebar'
import Layout from './Layout'
import PushMenu from './PushMenu'
import Treeview from './Treeview'
import DirectChat from './DirectChat'
import TodoList from './TodoList'
import CardWidget from './CardWidget'
import CardRefresh from './CardRefresh'
import Dropdown from './Dropdown'
import Toasts from './Toasts'
export {
ControlSidebar,
Layout,
PushMenu,
Treeview,
DirectChat,
TodoList,
CardWidget,
CardRefresh,
Dropdown,
Toasts
}
/**
* --------------------------------------------
* AdminLTE CardRefresh.js
* License MIT
* --------------------------------------------
*/
const CardRefresh = (($) => {
/**
* Constants
* ====================================================
*/
const NAME = 'CardRefresh'
const DATA_KEY = 'lte.cardrefresh'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
const Event = {
LOADED: `loaded${EVENT_KEY}`,
OVERLAY_ADDED: `overlay.added${EVENT_KEY}`,
OVERLAY_REMOVED: `overlay.removed${EVENT_KEY}`,
}
const ClassName = {
CARD: 'card',
}
const Selector = {
CARD: `.${ClassName.CARD}`,
DATA_REFRESH: '[data-card-widget="card-refresh"]',
}
const Default = {
source: '',
sourceSelector: '',
params: {},
trigger: Selector.DATA_REFRESH,
content: '.card-body',
loadInContent: true,
loadOnInit: true,
responseType: '',
overlayTemplate: '<div class="overlay"><i class="fas fa-2x fa-sync-alt fa-spin"></i></div>',
onLoadStart: function () {
},
onLoadDone: function (response) {
return response;
}
}
class CardRefresh {
constructor(element, settings) {
this._element = element
this._parent = element.parents(Selector.CARD).first()
this._settings = $.extend({}, Default, settings)
this._overlay = $(this._settings.overlayTemplate)
if (element.hasClass(ClassName.CARD)) {
this._parent = element
}
if (this._settings.source === '') {
throw new Error('Source url was not defined. Please specify a url in your CardRefresh source option.');
}
}
load() {
this._addOverlay()
this._settings.onLoadStart.call($(this))
$.get(this._settings.source, this._settings.params, function (response) {
if (this._settings.loadInContent) {
if (this._settings.sourceSelector != '') {
response = $(response).find(this._settings.sourceSelector).html()
}
this._parent.find(this._settings.content).html(response)
}
this._settings.onLoadDone.call($(this), response)
this._removeOverlay();
}.bind(this), this._settings.responseType !== '' && this._settings.responseType)
const loadedEvent = $.Event(Event.LOADED)
$(this._element).trigger(loadedEvent)
}
_addOverlay() {
this._parent.append(this._overlay)
const overlayAddedEvent = $.Event(Event.OVERLAY_ADDED)
$(this._element).trigger(overlayAddedEvent)
};
_removeOverlay() {
this._parent.find(this._overlay).remove()
const overlayRemovedEvent = $.Event(Event.OVERLAY_REMOVED)
$(this._element).trigger(overlayRemovedEvent)
};
// Private
_init(card) {
$(this).find(this._settings.trigger).on('click', () => {
this.load()
})
if (this._settings.loadOnInit) {
this.load()
}
}
// Static
static _jQueryInterface(config) {
let data = $(this).data(DATA_KEY)
const _options = $.extend({}, Default, $(this).data())
if (!data) {
data = new CardRefresh($(this), _options)
$(this).data(DATA_KEY, typeof config === 'string' ? data: config)
}
if (typeof config === 'string' && config.match(/load/)) {
data[config]()
} else {
data._init($(this))
}
}
}
/**
* Data API
* ====================================================
*/
$(document).on('click', Selector.DATA_REFRESH, function (event) {
if (event) {
event.preventDefault()
}
CardRefresh._jQueryInterface.call($(this), 'load')
})
$(document).ready(function () {
$(Selector.DATA_REFRESH).each(function() {
CardRefresh._jQueryInterface.call($(this))
})
})
/**
* jQuery API
* ====================================================
*/
$.fn[NAME] = CardRefresh._jQueryInterface
$.fn[NAME].Constructor = CardRefresh
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT
return CardRefresh._jQueryInterface
}
return CardRefresh
})(jQuery)
export default CardRefresh
/**
* --------------------------------------------
* AdminLTE CardWidget.js
* License MIT
* --------------------------------------------
*/
const CardWidget = (($) => {
/**
* Constants
* ====================================================
*/
const NAME = 'CardWidget'
const DATA_KEY = 'lte.cardwidget'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
const Event = {
EXPANDED: `expanded${EVENT_KEY}`,
COLLAPSED: `collapsed${EVENT_KEY}`,
MAXIMIZED: `maximized${EVENT_KEY}`,
MINIMIZED: `minimized${EVENT_KEY}`,
REMOVED: `removed${EVENT_KEY}`
}
const ClassName = {
CARD: 'card',
COLLAPSED: 'collapsed-card',
COLLAPSING: 'collapsing-card',
EXPANDING: 'expanding-card',
WAS_COLLAPSED: 'was-collapsed',
MAXIMIZED: 'maximized-card',
}
const Selector = {
DATA_REMOVE: '[data-card-widget="remove"]',
DATA_COLLAPSE: '[data-card-widget="collapse"]',
DATA_MAXIMIZE: '[data-card-widget="maximize"]',
CARD: `.${ClassName.CARD}`,
CARD_HEADER: '.card-header',
CARD_BODY: '.card-body',
CARD_FOOTER: '.card-footer',
COLLAPSED: `.${ClassName.COLLAPSED}`,
}
const Default = {
animationSpeed: 'normal',
collapseTrigger: Selector.DATA_COLLAPSE,
removeTrigger: Selector.DATA_REMOVE,
maximizeTrigger: Selector.DATA_MAXIMIZE,
collapseIcon: 'fa-minus',
expandIcon: 'fa-plus',
maximizeIcon: 'fa-expand',
minimizeIcon: 'fa-compress',
}
class CardWidget {
constructor(element, settings) {
this._element = element
this._parent = element.parents(Selector.CARD).first()
if (element.hasClass(ClassName.CARD)) {
this._parent = element
}
this._settings = $.extend({}, Default, settings)
}
collapse() {
this._parent.addClass(ClassName.COLLAPSING).children(`${Selector.CARD_BODY}, ${Selector.CARD_FOOTER}`)
.slideUp(this._settings.animationSpeed, () => {
this._parent.addClass(ClassName.COLLAPSED).removeClass(ClassName.COLLAPSING)
})
this._parent.find('> ' + Selector.CARD_HEADER + ' ' + this._settings.collapseTrigger + ' .' + this._settings.collapseIcon)
.addClass(this._settings.expandIcon)
.removeClass(this._settings.collapseIcon)
const collapsed = $.Event(Event.COLLAPSED)
this._element.trigger(collapsed, this._parent)
}
expand() {
this._parent.addClass(ClassName.EXPANDING).children(`${Selector.CARD_BODY}, ${Selector.CARD_FOOTER}`)
.slideDown(this._settings.animationSpeed, () => {
this._parent.removeClass(ClassName.COLLAPSED).removeClass(ClassName.EXPANDING)
})
this._parent.find('> ' + Selector.CARD_HEADER + ' ' + this._settings.collapseTrigger + ' .' + this._settings.expandIcon)
.addClass(this._settings.collapseIcon)
.removeClass(this._settings.expandIcon)
const expanded = $.Event(Event.EXPANDED)
this._element.trigger(expanded, this._parent)
}
remove() {
this._parent.slideUp()
const removed = $.Event(Event.REMOVED)
this._element.trigger(removed, this._parent)
}
toggle() {
if (this._parent.hasClass(ClassName.COLLAPSED)) {
this.expand()
return
}
this.collapse()
}
maximize() {
this._parent.find(this._settings.maximizeTrigger + ' .' + this._settings.maximizeIcon)
.addClass(this._settings.minimizeIcon)
.removeClass(this._settings.maximizeIcon)
this._parent.css({
'height': this._parent.height(),
'width': this._parent.width(),
'transition': 'all .15s'
}).delay(150).queue(function(){
$(this).addClass(ClassName.MAXIMIZED)
$('html').addClass(ClassName.MAXIMIZED)
if ($(this).hasClass(ClassName.COLLAPSED)) {
$(this).addClass(ClassName.WAS_COLLAPSED)
}
$(this).dequeue()
})
const maximized = $.Event(Event.MAXIMIZED)
this._element.trigger(maximized, this._parent)
}
minimize() {
this._parent.find(this._settings.maximizeTrigger + ' .' + this._settings.minimizeIcon)
.addClass(this._settings.maximizeIcon)
.removeClass(this._settings.minimizeIcon)
this._parent.css('cssText', 'height:' + this._parent[0].style.height + ' !important;' +
'width:' + this._parent[0].style.width + ' !important; transition: all .15s;'
).delay(10).queue(function(){
$(this).removeClass(ClassName.MAXIMIZED)
$('html').removeClass(ClassName.MAXIMIZED)
$(this).css({
'height': 'inherit',
'width': 'inherit'
})
if ($(this).hasClass(ClassName.WAS_COLLAPSED)) {
$(this).removeClass(ClassName.WAS_COLLAPSED)
}
$(this).dequeue()
})
const MINIMIZED = $.Event(Event.MINIMIZED)
this._element.trigger(MINIMIZED, this._parent)
}
toggleMaximize() {
if (this._parent.hasClass(ClassName.MAXIMIZED)) {
this.minimize()
return
}
this.maximize()
}
// Private
_init(card) {
this._parent = card
$(this).find(this._settings.collapseTrigger).click(() => {
this.toggle()
})
$(this).find(this._settings.maximizeTrigger).click(() => {
this.toggleMaximize()
})
$(this).find(this._settings.removeTrigger).click(() => {
this.remove()
})
}
// Static
static _jQueryInterface(config) {
let data = $(this).data(DATA_KEY)
const _options = $.extend({}, Default, $(this).data())
if (!data) {
data = new CardWidget($(this), _options)
$(this).data(DATA_KEY, typeof config === 'string' ? data: config)
}
if (typeof config === 'string' && config.match(/collapse|expand|remove|toggle|maximize|minimize|toggleMaximize/)) {
data[config]()
} else if (typeof config === 'object') {
data._init($(this))
}
}
}
/**
* Data API
* ====================================================
*/
$(document).on('click', Selector.DATA_COLLAPSE, function (event) {
if (event) {
event.preventDefault()
}
CardWidget._jQueryInterface.call($(this), 'toggle')
})
$(document).on('click', Selector.DATA_REMOVE, function (event) {
if (event) {
event.preventDefault()
}
CardWidget._jQueryInterface.call($(this), 'remove')
})
$(document).on('click', Selector.DATA_MAXIMIZE, function (event) {
if (event) {
event.preventDefault()
}
CardWidget._jQueryInterface.call($(this), 'toggleMaximize')
})
/**
* jQuery API
* ====================================================
*/
$.fn[NAME] = CardWidget._jQueryInterface
$.fn[NAME].Constructor = CardWidget
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT
return CardWidget._jQueryInterface
}
return CardWidget
})(jQuery)
export default CardWidget
/**
* --------------------------------------------
* AdminLTE ControlSidebar.js
* License MIT
* --------------------------------------------
*/
const ControlSidebar = (($) => {
/**
* Constants
* ====================================================
*/
const NAME = 'ControlSidebar'
const DATA_KEY = 'lte.controlsidebar'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
const DATA_API_KEY = '.data-api'
const Event = {
COLLAPSED: `collapsed${EVENT_KEY}`,
EXPANDED: `expanded${EVENT_KEY}`,
}
const Selector = {
CONTROL_SIDEBAR: '.control-sidebar',
CONTROL_SIDEBAR_CONTENT: '.control-sidebar-content',
DATA_TOGGLE: '[data-widget="control-sidebar"]',
CONTENT: '.content-wrapper',
HEADER: '.main-header',
FOOTER: '.main-footer',
}
const ClassName = {
CONTROL_SIDEBAR_ANIMATE: 'control-sidebar-animate',
CONTROL_SIDEBAR_OPEN: 'control-sidebar-open',
CONTROL_SIDEBAR_SLIDE: 'control-sidebar-slide-open',
LAYOUT_FIXED: 'layout-fixed',
NAVBAR_FIXED: 'layout-navbar-fixed',
NAVBAR_SM_FIXED: 'layout-sm-navbar-fixed',
NAVBAR_MD_FIXED: 'layout-md-navbar-fixed',
NAVBAR_LG_FIXED: 'layout-lg-navbar-fixed',
NAVBAR_XL_FIXED: 'layout-xl-navbar-fixed',
FOOTER_FIXED: 'layout-footer-fixed',
FOOTER_SM_FIXED: 'layout-sm-footer-fixed',
FOOTER_MD_FIXED: 'layout-md-footer-fixed',
FOOTER_LG_FIXED: 'layout-lg-footer-fixed',
FOOTER_XL_FIXED: 'layout-xl-footer-fixed',
}
const Default = {
controlsidebarSlide: true,
scrollbarTheme : 'os-theme-light',
scrollbarAutoHide: 'l',
}
/**
* Class Definition
* ====================================================
*/
class ControlSidebar {
constructor(element, config) {
this._element = element
this._config = config
this._init()
}
// Public
collapse() {
// Show the control sidebar
if (this._config.controlsidebarSlide) {
$('html').addClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
$('body').removeClass(ClassName.CONTROL_SIDEBAR_SLIDE).delay(300).queue(function(){
$(Selector.CONTROL_SIDEBAR).hide()
$('html').removeClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
$(this).dequeue()
})
} else {
$('body').removeClass(ClassName.CONTROL_SIDEBAR_OPEN)
}
const collapsedEvent = $.Event(Event.COLLAPSED)
$(this._element).trigger(collapsedEvent)
}
show() {
// Collapse the control sidebar
if (this._config.controlsidebarSlide) {
$('html').addClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
$(Selector.CONTROL_SIDEBAR).show().delay(10).queue(function(){
$('body').addClass(ClassName.CONTROL_SIDEBAR_SLIDE).delay(300).queue(function(){
$('html').removeClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
$(this).dequeue()
})
$(this).dequeue()
})
} else {
$('body').addClass(ClassName.CONTROL_SIDEBAR_OPEN)
}
const expandedEvent = $.Event(Event.EXPANDED)
$(this._element).trigger(expandedEvent)
}
toggle() {
const shouldClose = $('body').hasClass(ClassName.CONTROL_SIDEBAR_OPEN) || $('body')
.hasClass(ClassName.CONTROL_SIDEBAR_SLIDE)
if (shouldClose) {
// Close the control sidebar
this.collapse()
} else {
// Open the control sidebar
this.show()
}
}
// Private
_init() {
this._fixHeight()
this._fixScrollHeight()
$(window).resize(() => {
this._fixHeight()
this._fixScrollHeight()
})
$(window).scroll(() => {
if ($('body').hasClass(ClassName.CONTROL_SIDEBAR_OPEN) || $('body').hasClass(ClassName.CONTROL_SIDEBAR_SLIDE)) {
this._fixScrollHeight()
}
})
}
_fixScrollHeight() {
const heights = {
scroll: $(document).height(),
window: $(window).height(),
header: $(Selector.HEADER).outerHeight(),
footer: $(Selector.FOOTER).outerHeight(),
}
const positions = {
bottom: Math.abs((heights.window + $(window).scrollTop()) - heights.scroll),
top: $(window).scrollTop(),
}
let navbarFixed = false;
let footerFixed = false;
if ($('body').hasClass(ClassName.LAYOUT_FIXED)) {
if (
$('body').hasClass(ClassName.NAVBAR_FIXED)
|| $('body').hasClass(ClassName.NAVBAR_SM_FIXED)
|| $('body').hasClass(ClassName.NAVBAR_MD_FIXED)
|| $('body').hasClass(ClassName.NAVBAR_LG_FIXED)
|| $('body').hasClass(ClassName.NAVBAR_XL_FIXED)
) {
if ($(Selector.HEADER).css("position") === "fixed") {
navbarFixed = true;
}
}
if (
$('body').hasClass(ClassName.FOOTER_FIXED)
|| $('body').hasClass(ClassName.FOOTER_SM_FIXED)
|| $('body').hasClass(ClassName.FOOTER_MD_FIXED)
|| $('body').hasClass(ClassName.FOOTER_LG_FIXED)
|| $('body').hasClass(ClassName.FOOTER_XL_FIXED)
) {
if ($(Selector.FOOTER).css("position") === "fixed") {
footerFixed = true;
}
}
if (positions.top === 0 && positions.bottom === 0) {
$(Selector.CONTROL_SIDEBAR).css('bottom', heights.footer);
$(Selector.CONTROL_SIDEBAR).css('top', heights.header);
$(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window - (heights.header + heights.footer))
} else if (positions.bottom <= heights.footer) {
if (footerFixed === false) {
$(Selector.CONTROL_SIDEBAR).css('bottom', heights.footer - positions.bottom);
$(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window - (heights.footer - positions.bottom))
} else {
$(Selector.CONTROL_SIDEBAR).css('bottom', heights.footer);
}
} else if (positions.top <= heights.header) {
if (navbarFixed === false) {
$(Selector.CONTROL_SIDEBAR).css('top', heights.header - positions.top);
$(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window - (heights.header - positions.top))
} else {
$(Selector.CONTROL_SIDEBAR).css('top', heights.header);
}
} else {
if (navbarFixed === false) {
$(Selector.CONTROL_SIDEBAR).css('top', 0);
$(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window)
} else {
$(Selector.CONTROL_SIDEBAR).css('top', heights.header);
}
}
}
}
_fixHeight() {
const heights = {
window: $(window).height(),
header: $(Selector.HEADER).outerHeight(),
footer: $(Selector.FOOTER).outerHeight(),
}
if ($('body').hasClass(ClassName.LAYOUT_FIXED)) {
let sidebarHeight = heights.window - heights.header;
if (
$('body').hasClass(ClassName.FOOTER_FIXED)
|| $('body').hasClass(ClassName.FOOTER_SM_FIXED)
|| $('body').hasClass(ClassName.FOOTER_MD_FIXED)
|| $('body').hasClass(ClassName.FOOTER_LG_FIXED)
|| $('body').hasClass(ClassName.FOOTER_XL_FIXED)
) {
if ($(Selector.FOOTER).css("position") === "fixed") {
sidebarHeight = heights.window - heights.header - heights.footer;
}
}
$(Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', sidebarHeight)
if (typeof $.fn.overlayScrollbars !== 'undefined') {
$(Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).overlayScrollbars({
className : this._config.scrollbarTheme,
sizeAutoCapable : true,
scrollbars : {
autoHide: this._config.scrollbarAutoHide,
clickScrolling : true
}
})
}
}
}
// Static
static _jQueryInterface(operation) {
return this.each(function () {
let data = $(this).data(DATA_KEY)
const _options = $.extend({}, Default, $(this).data())
if (!data) {
data = new ControlSidebar(this, _options)
$(this).data(DATA_KEY, data)
}
if (data[operation] === 'undefined') {
throw new Error(`${operation} is not a function`)
}
data[operation]()
})
}
}
/**
*
* Data Api implementation
* ====================================================
*/
$(document).on('click', Selector.DATA_TOGGLE, function (event) {
event.preventDefault()
ControlSidebar._jQueryInterface.call($(this), 'toggle')
})
/**
* jQuery API
* ====================================================
*/
$.fn[NAME] = ControlSidebar._jQueryInterface
$.fn[NAME].Constructor = ControlSidebar
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT
return ControlSidebar._jQueryInterface
}
return ControlSidebar
})(jQuery)
export default ControlSidebar
/**
* --------------------------------------------
* AdminLTE DirectChat.js
* License MIT
* --------------------------------------------
*/
const DirectChat = (($) => {
/**
* Constants
* ====================================================
*/
const NAME = 'DirectChat'
const DATA_KEY = 'lte.directchat'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
const DATA_API_KEY = '.data-api'
const Event = {
TOGGLED: `toggled{EVENT_KEY}`
}
const Selector = {
DATA_TOGGLE: '[data-widget="chat-pane-toggle"]',
DIRECT_CHAT: '.direct-chat'
};
const ClassName = {
DIRECT_CHAT_OPEN: 'direct-chat-contacts-open'
};
/**
* Class Definition
* ====================================================
*/
class DirectChat {
constructor(element, config) {
this._element = element
}
toggle() {
$(this._element).parents(Selector.DIRECT_CHAT).first().toggleClass(ClassName.DIRECT_CHAT_OPEN);
const toggledEvent = $.Event(Event.TOGGLED)
$(this._element).trigger(toggledEvent)
}
// Static
static _jQueryInterface(config) {
return this.each(function () {
let data = $(this).data(DATA_KEY)
if (!data) {
data = new DirectChat($(this))
$(this).data(DATA_KEY, data)
}
data[config]()
})
}
}
/**
*
* Data Api implementation
* ====================================================
*/
$(document).on('click', Selector.DATA_TOGGLE, function (event) {
if (event) event.preventDefault();
DirectChat._jQueryInterface.call($(this), 'toggle');
});
/**
* jQuery API
* ====================================================
*/
$.fn[NAME] = DirectChat._jQueryInterface
$.fn[NAME].Constructor = DirectChat
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT
return DirectChat._jQueryInterface
}
return DirectChat
})(jQuery)
export default DirectChat
/**
* --------------------------------------------
* AdminLTE Dropdown.js
* License MIT
* --------------------------------------------
*/
const Dropdown = (($) => {
/**
* Constants
* ====================================================
*/
const NAME = 'Dropdown'
const DATA_KEY = 'lte.dropdown'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
const Selector = {
NAVBAR: '.navbar',
DROPDOWN_MENU: '.dropdown-menu',
DROPDOWN_MENU_ACTIVE: '.dropdown-menu.show',
DROPDOWN_TOGGLE: '[data-toggle="dropdown"]',
}
const ClassName = {
DROPDOWN_HOVER: 'dropdown-hover',
DROPDOWN_RIGHT: 'dropdown-menu-right'
}
const Default = {
}
/**
* Class Definition
* ====================================================
*/
class Dropdown {
constructor(element, config) {
this._config = config
this._element = element
}
// Public
toggleSubmenu() {
this._element.siblings().toggleClass("show")
if (! this._element.next().hasClass('show')) {
this._element.parents('.dropdown-menu').first().find('.show').removeClass("show")
}
this._element.parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function(e) {
$('.dropdown-submenu .show').removeClass("show")
})
}
fixPosition() {
let elm = $(Selector.DROPDOWN_MENU_ACTIVE)
if (elm.length !== 0) {
if (elm.hasClass(ClassName.DROPDOWN_RIGHT)) {
elm.css('left', 'inherit')
elm.css('right', 0)
} else {
elm.css('left', 0)
elm.css('right', 'inherit')
}
let offset = elm.offset()
let width = elm.width()
let windowWidth = $(window).width()
let visiblePart = windowWidth - offset.left
if (offset.left < 0) {
elm.css('left', 'inherit')
elm.css('right', (offset.left - 5))
} else {
if (visiblePart < width) {
elm.css('left', 'inherit')
elm.css('right', 0)
}
}
}
}
// Static
static _jQueryInterface(config) {
return this.each(function () {
let data = $(this).data(DATA_KEY)
const _config = $.extend({}, Default, $(this).data())
if (!data) {
data = new Dropdown($(this), _config)
$(this).data(DATA_KEY, data)
}
if (config === 'toggleSubmenu' || config == 'fixPosition') {
data[config]()
}
})
}
}
/**
* Data API
* ====================================================
*/
// $(Selector.DROPDOWN_TOGGLE).on("click", function(event) {
// event.preventDefault()
// event.stopPropagation()
//
// Dropdown._jQueryInterface.call($(this), 'toggleSubmenu')
// });
//
// $(Selector.DROPDOWN_TOGGLE).on("click", function(event) {
// event.preventDefault()
//
// setTimeout(function() {
// Dropdown._jQueryInterface.call($(this), 'fixPosition')
// }, 1)
// });
/**
* jQuery API
* ====================================================
*/
$.fn[NAME] = Dropdown._jQueryInterface
$.fn[NAME].Constructor = Dropdown
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT
return Dropdown._jQueryInterface
}
return Dropdown
})(jQuery)
export default Dropdown
/**
* --------------------------------------------
* AdminLTE Layout.js
* License MIT
* --------------------------------------------
*/
const Layout = (($) => {
/**
* Constants
* ====================================================
*/
const NAME = 'Layout'
const DATA_KEY = 'lte.layout'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
const Event = {
SIDEBAR: 'sidebar'
}
const Selector = {
HEADER : '.main-header',
MAIN_SIDEBAR : '.main-sidebar',
SIDEBAR : '.main-sidebar .sidebar',
CONTENT : '.content-wrapper',
BRAND : '.brand-link',
CONTENT_HEADER : '.content-header',
WRAPPER : '.wrapper',
CONTROL_SIDEBAR: '.control-sidebar',
CONTROL_SIDEBAR_CONTENT: '.control-sidebar-content',
CONTROL_SIDEBAR_BTN: '[data-widget="control-sidebar"]',
LAYOUT_FIXED : '.layout-fixed',
FOOTER : '.main-footer',
PUSHMENU_BTN : '[data-widget="pushmenu"]',
LOGIN_BOX : '.login-box',
REGISTER_BOX : '.register-box'
}
const ClassName = {
HOLD : 'hold-transition',
SIDEBAR : 'main-sidebar',
CONTENT_FIXED : 'content-fixed',
SIDEBAR_FOCUSED: 'sidebar-focused',
LAYOUT_FIXED : 'layout-fixed',
NAVBAR_FIXED : 'layout-navbar-fixed',
FOOTER_FIXED : 'layout-footer-fixed',
LOGIN_PAGE : 'login-page',
REGISTER_PAGE : 'register-page',
CONTROL_SIDEBAR_SLIDE_OPEN: 'control-sidebar-slide-open',
CONTROL_SIDEBAR_OPEN: 'control-sidebar-open',
}
const Default = {
scrollbarTheme : 'os-theme-light',
scrollbarAutoHide: 'l',
panelAutoHeight: true,
loginRegisterAutoHeight: true,
}
/**
* Class Definition
* ====================================================
*/
class Layout {
constructor(element, config) {
this._config = config
this._element = element
this._init()
}
// Public
fixLayoutHeight(extra = null) {
let control_sidebar = 0
if ($('body').hasClass(ClassName.CONTROL_SIDEBAR_SLIDE_OPEN) || $('body').hasClass(ClassName.CONTROL_SIDEBAR_OPEN) || extra == 'control_sidebar') {
control_sidebar = $(Selector.CONTROL_SIDEBAR_CONTENT).height()
}
const heights = {
window: $(window).height(),
header: $(Selector.HEADER).length !== 0 ? $(Selector.HEADER).outerHeight() : 0,
footer: $(Selector.FOOTER).length !== 0 ? $(Selector.FOOTER).outerHeight() : 0,
sidebar: $(Selector.SIDEBAR).length !== 0 ? $(Selector.SIDEBAR).height() : 0,
control_sidebar: control_sidebar,
}
const max = this._max(heights)
let offset = this._config.panelAutoHeight
if (offset === true) {
offset = 0;
}
if (offset !== false) {
if (max == heights.control_sidebar) {
$(Selector.CONTENT).css('min-height', (max + offset))
} else if (max == heights.window) {
$(Selector.CONTENT).css('min-height', (max + offset) - heights.header - heights.footer)
} else {
$(Selector.CONTENT).css('min-height', (max + offset) - heights.header)
}
}
if ($('body').hasClass(ClassName.LAYOUT_FIXED)) {
if (offset !== false) {
$(Selector.CONTENT).css('min-height', (max + offset) - heights.header - heights.footer)
}
if (typeof $.fn.overlayScrollbars !== 'undefined') {
$(Selector.SIDEBAR).overlayScrollbars({
className : this._config.scrollbarTheme,
sizeAutoCapable : true,
scrollbars : {
autoHide: this._config.scrollbarAutoHide,
clickScrolling : true
}
})
}
}
}
fixLoginRegisterHeight() {
if ($(Selector.LOGIN_BOX + ', ' + Selector.REGISTER_BOX).length === 0) {
$('body, html').css('height', 'auto')
} else if ($(Selector.LOGIN_BOX + ', ' + Selector.REGISTER_BOX).length !== 0) {
let box_height = $(Selector.LOGIN_BOX + ', ' + Selector.REGISTER_BOX).height()
if ($('body').css('min-height') !== box_height) {
$('body').css('min-height', box_height)
}
}
}
// Private
_init() {
// Activate layout height watcher
this.fixLayoutHeight()
if (this._config.loginRegisterAutoHeight === true) {
this.fixLoginRegisterHeight()
} else if (Number.isInteger(this._config.loginRegisterAutoHeight)) {
setInterval(this.fixLoginRegisterHeight, this._config.loginRegisterAutoHeight);
}
$(Selector.SIDEBAR)
.on('collapsed.lte.treeview expanded.lte.treeview', () => {
this.fixLayoutHeight()
})
$(Selector.PUSHMENU_BTN)
.on('collapsed.lte.pushmenu shown.lte.pushmenu', () => {
this.fixLayoutHeight()
})
$(Selector.CONTROL_SIDEBAR_BTN)
.on('collapsed.lte.controlsidebar', () => {
this.fixLayoutHeight()
})
.on('expanded.lte.controlsidebar', () => {
this.fixLayoutHeight('control_sidebar')
})
$(window).resize(() => {
this.fixLayoutHeight()
})
$('body.hold-transition').removeClass('hold-transition')
}
_max(numbers) {
// Calculate the maximum number in a list
let max = 0
Object.keys(numbers).forEach((key) => {
if (numbers[key] > max) {
max = numbers[key]
}
})
return max
}
// Static
static _jQueryInterface(config = '') {
return this.each(function () {
let data = $(this).data(DATA_KEY)
const _options = $.extend({}, Default, $(this).data())
if (!data) {
data = new Layout($(this), _options)
$(this).data(DATA_KEY, data)
}
if (config === 'init' || config === '') {
data['_init']()
} else if (config === 'fixLayoutHeight' || config === 'fixLoginRegisterHeight') {
data[config]()
}
})
}
}
/**
* Data API
* ====================================================
*/
$(window).on('load', () => {
Layout._jQueryInterface.call($('body'))
})
$(Selector.SIDEBAR + ' a').on('focusin', () => {
$(Selector.MAIN_SIDEBAR).addClass(ClassName.SIDEBAR_FOCUSED);
})
$(Selector.SIDEBAR + ' a').on('focusout', () => {
$(Selector.MAIN_SIDEBAR).removeClass(ClassName.SIDEBAR_FOCUSED);
})
/**
* jQuery API
* ====================================================
*/
$.fn[NAME] = Layout._jQueryInterface
$.fn[NAME].Constructor = Layout
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT
return Layout._jQueryInterface
}
return Layout
})(jQuery)
export default Layout
/**
* --------------------------------------------
* AdminLTE PushMenu.js
* License MIT
* --------------------------------------------
*/
const PushMenu = (($) => {
/**
* Constants
* ====================================================
*/
const NAME = 'PushMenu'
const DATA_KEY = 'lte.pushmenu'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
const Event = {
COLLAPSED: `collapsed${EVENT_KEY}`,
SHOWN: `shown${EVENT_KEY}`
}
const Default = {
autoCollapseSize: 992,
enableRemember: false,
noTransitionAfterReload: true
}
const Selector = {
TOGGLE_BUTTON: '[data-widget="pushmenu"]',
SIDEBAR_MINI: '.sidebar-mini',
SIDEBAR_COLLAPSED: '.sidebar-collapse',
BODY: 'body',
OVERLAY: '#sidebar-overlay',
WRAPPER: '.wrapper'
}
const ClassName = {
COLLAPSED: 'sidebar-collapse',
OPEN: 'sidebar-open',
CLOSED: 'sidebar-closed'
}
/**
* Class Definition
* ====================================================
*/
class PushMenu {
constructor(element, options) {
this._element = element
this._options = $.extend({}, Default, options)
if (!$(Selector.OVERLAY).length) {
this._addOverlay()
}
this._init()
}
// Public
expand() {
if (this._options.autoCollapseSize) {
if ($(window).width() <= this._options.autoCollapseSize) {
$(Selector.BODY).addClass(ClassName.OPEN)
}
}
$(Selector.BODY).removeClass(ClassName.COLLAPSED).removeClass(ClassName.CLOSED)
if(this._options.enableRemember) {
localStorage.setItem(`remember${EVENT_KEY}`, ClassName.OPEN)
}
const shownEvent = $.Event(Event.SHOWN)
$(this._element).trigger(shownEvent)
}
collapse() {
if (this._options.autoCollapseSize) {
if ($(window).width() <= this._options.autoCollapseSize) {
$(Selector.BODY).removeClass(ClassName.OPEN).addClass(ClassName.CLOSED)
}
}
$(Selector.BODY).addClass(ClassName.COLLAPSED)
if(this._options.enableRemember) {
localStorage.setItem(`remember${EVENT_KEY}`, ClassName.COLLAPSED)
}
const collapsedEvent = $.Event(Event.COLLAPSED)
$(this._element).trigger(collapsedEvent)
}
toggle() {
if (!$(Selector.BODY).hasClass(ClassName.COLLAPSED)) {
this.collapse()
} else {
this.expand()
}
}
autoCollapse(resize = false) {
if (this._options.autoCollapseSize) {
if ($(window).width() <= this._options.autoCollapseSize) {
if (!$(Selector.BODY).hasClass(ClassName.OPEN)) {
this.collapse()
}
} else if (resize == true) {
if ($(Selector.BODY).hasClass(ClassName.OPEN)) {
$(Selector.BODY).removeClass(ClassName.OPEN)
} else if($(Selector.BODY).hasClass(ClassName.CLOSED)) {
this.expand()
}
}
}
}
remember() {
if(this._options.enableRemember) {
let toggleState = localStorage.getItem(`remember${EVENT_KEY}`)
if (toggleState == ClassName.COLLAPSED){
if (this._options.noTransitionAfterReload) {
$("body").addClass('hold-transition').addClass(ClassName.COLLAPSED).delay(50).queue(function() {
$(this).removeClass('hold-transition')
$(this).dequeue()
})
} else {
$("body").addClass(ClassName.COLLAPSED)
}
} else {
if (this._options.noTransitionAfterReload) {
$("body").addClass('hold-transition').removeClass(ClassName.COLLAPSED).delay(50).queue(function() {
$(this).removeClass('hold-transition')
$(this).dequeue()
})
} else {
$("body").removeClass(ClassName.COLLAPSED)
}
}
}
}
// Private
_init() {
this.remember()
this.autoCollapse()
$(window).resize(() => {
this.autoCollapse(true)
})
}
_addOverlay() {
const overlay = $('<div />', {
id: 'sidebar-overlay'
})
overlay.on('click', () => {
this.collapse()
})
$(Selector.WRAPPER).append(overlay)
}
// Static
static _jQueryInterface(operation) {
return this.each(function () {
let data = $(this).data(DATA_KEY)
const _options = $.extend({}, Default, $(this).data())
if (!data) {
data = new PushMenu(this, _options)
$(this).data(DATA_KEY, data)
}
if (typeof operation === 'string' && operation.match(/collapse|expand|toggle/)) {
data[operation]()
}
})
}
}
/**
* Data API
* ====================================================
*/
$(document).on('click', Selector.TOGGLE_BUTTON, (event) => {
event.preventDefault()
let button = event.currentTarget
if ($(button).data('widget') !== 'pushmenu') {
button = $(button).closest(Selector.TOGGLE_BUTTON)
}
PushMenu._jQueryInterface.call($(button), 'toggle')
})
$(window).on('load', () => {
PushMenu._jQueryInterface.call($(Selector.TOGGLE_BUTTON))
})
/**
* jQuery API
* ====================================================
*/
$.fn[NAME] = PushMenu._jQueryInterface
$.fn[NAME].Constructor = PushMenu
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT
return PushMenu._jQueryInterface
}
return PushMenu
})(jQuery)
export default PushMenu
/**
* --------------------------------------------
* AdminLTE SiteSearch.js
* License MIT
* --------------------------------------------
*/
const SiteSearch = (($) => {
/**
* Constants
* ====================================================
*/
const NAME = 'SiteSearch'
const DATA_KEY = 'lte.site-search'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
const Event = {}
const Selector = {
TOGGLE_BUTTON : '[data-widget="site-search"]',
SEARCH_BLOCK : '.site-search-block',
SEARCH_BACKDROP: '.site-search-backdrop',
SEARCH_INPUT : '.site-search-block .form-control'
}
const ClassName = {
OPEN: 'site-search-open'
}
const Default = {
transitionSpeed: 300
}
/**
* Class Definition
* ====================================================
*/
class SiteSearch {
constructor(_element, _options) {
this.element = _element
this.options = $.extend({}, Default, _options)
}
// Public
open() {
$(Selector.SEARCH_BLOCK).slideDown(this.options.transitionSpeed)
$(Selector.SEARCH_BACKDROP).show(0)
$(Selector.SEARCH_INPUT).focus()
$(Selector.SEARCH_BLOCK).addClass(ClassName.OPEN)
}
close() {
$(Selector.SEARCH_BLOCK).slideUp(this.options.transitionSpeed)
$(Selector.SEARCH_BACKDROP).hide(0)
$(Selector.SEARCH_BLOCK).removeClass(ClassName.OPEN)
}
toggle() {
if ($(Selector.SEARCH_BLOCK).hasClass(ClassName.OPEN)) {
this.close()
} else {
this.open()
}
}
// Static
static _jQueryInterface(options) {
return this.each(function () {
let data = $(this).data(DATA_KEY)
if (!data) {
data = new SiteSearch(this, options)
$(this).data(DATA_KEY, data)
}
if (!/toggle|close/.test(options)) {
throw Error(`Undefined method ${options}`)
}
data[options]()
})
}
}
/**
* Data API
* ====================================================
*/
$(document).on('click', Selector.TOGGLE_BUTTON, (event) => {
event.preventDefault()
let button = $(event.currentTarget)
if (button.data('widget') !== 'site-search') {
button = button.closest(Selector.TOGGLE_BUTTON)
}
SiteSearch._jQueryInterface.call(button, 'toggle')
})
$(document).on('click', Selector.SEARCH_BACKDROP, (event) => {
const backdrop = $(event.currentTarget)
SiteSearch._jQueryInterface.call(backdrop, 'close')
})
/**
* jQuery API
* ====================================================
*/
$.fn[NAME] = SiteSearch._jQueryInterface
$.fn[NAME].Constructor = SiteSearch
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT
return SiteSearch._jQueryInterface
}
return SiteSearch
})(jQuery)
export default SiteSearch
/**
* --------------------------------------------
* AdminLTE Toasts.js
* License MIT
* --------------------------------------------
*/
const Toasts = (($) => {
/**
* Constants
* ====================================================
*/
const NAME = 'Toasts'
const DATA_KEY = 'lte.toasts'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
const Event = {
INIT: `init${EVENT_KEY}`,
CREATED: `created${EVENT_KEY}`,
REMOVED: `removed${EVENT_KEY}`,
}
const Selector = {
BODY: 'toast-body',
CONTAINER_TOP_RIGHT: '#toastsContainerTopRight',
CONTAINER_TOP_LEFT: '#toastsContainerTopLeft',
CONTAINER_BOTTOM_RIGHT: '#toastsContainerBottomRight',
CONTAINER_BOTTOM_LEFT: '#toastsContainerBottomLeft',
}
const ClassName = {
TOP_RIGHT: 'toasts-top-right',
TOP_LEFT: 'toasts-top-left',
BOTTOM_RIGHT: 'toasts-bottom-right',
BOTTOM_LEFT: 'toasts-bottom-left',
FADE: 'fade',
}
const Position = {
TOP_RIGHT: 'topRight',
TOP_LEFT: 'topLeft',
BOTTOM_RIGHT: 'bottomRight',
BOTTOM_LEFT: 'bottomLeft',
}
const Id = {
CONTAINER_TOP_RIGHT: 'toastsContainerTopRight',
CONTAINER_TOP_LEFT: 'toastsContainerTopLeft',
CONTAINER_BOTTOM_RIGHT: 'toastsContainerBottomRight',
CONTAINER_BOTTOM_LEFT: 'toastsContainerBottomLeft',
}
const Default = {
position: Position.TOP_RIGHT,
fixed: true,
autohide: false,
autoremove: true,
delay: 1000,
fade: true,
icon: null,
image: null,
imageAlt: null,
imageHeight: '25px',
title: null,
subtitle: null,
close: true,
body: null,
class: null,
}
/**
* Class Definition
* ====================================================
*/
class Toasts {
constructor(element, config) {
this._config = config
this._prepareContainer();
const initEvent = $.Event(Event.INIT)
$('body').trigger(initEvent)
}
// Public
create() {
var toast = $('<div class="toast" role="alert" aria-live="assertive" aria-atomic="true"/>')
toast.data('autohide', this._config.autohide)
toast.data('animation', this._config.fade)
if (this._config.class) {
toast.addClass(this._config.class)
}
if (this._config.delay && this._config.delay != 500) {
toast.data('delay', this._config.delay)
}
var toast_header = $('<div class="toast-header">')
if (this._config.image != null) {
var toast_image = $('<img />').addClass('rounded mr-2').attr('src', this._config.image).attr('alt', this._config.imageAlt)
if (this._config.imageHeight != null) {
toast_image.height(this._config.imageHeight).width('auto')
}
toast_header.append(toast_image)
}
if (this._config.icon != null) {
toast_header.append($('<i />').addClass('mr-2').addClass(this._config.icon))
}
if (this._config.title != null) {
toast_header.append($('<strong />').addClass('mr-auto').html(this._config.title))
}
if (this._config.subtitle != null) {
toast_header.append($('<small />').html(this._config.subtitle))
}
if (this._config.close == true) {
var toast_close = $('<button data-dismiss="toast" />').attr('type', 'button').addClass('ml-2 mb-1 close').attr('aria-label', 'Close').append('<span aria-hidden="true">&times;</span>')
if (this._config.title == null) {
toast_close.toggleClass('ml-2 ml-auto')
}
toast_header.append(toast_close)
}
toast.append(toast_header)
if (this._config.body != null) {
toast.append($('<div class="toast-body" />').html(this._config.body))
}
$(this._getContainerId()).prepend(toast)
const createdEvent = $.Event(Event.CREATED)
$('body').trigger(createdEvent)
toast.toast('show')
if (this._config.autoremove) {
toast.on('hidden.bs.toast', function () {
$(this).delay(200).remove();
const removedEvent = $.Event(Event.REMOVED)
$('body').trigger(removedEvent)
})
}
}
// Static
_getContainerId() {
if (this._config.position == Position.TOP_RIGHT) {
return Selector.CONTAINER_TOP_RIGHT;
} else if (this._config.position == Position.TOP_LEFT) {
return Selector.CONTAINER_TOP_LEFT;
} else if (this._config.position == Position.BOTTOM_RIGHT) {
return Selector.CONTAINER_BOTTOM_RIGHT;
} else if (this._config.position == Position.BOTTOM_LEFT) {
return Selector.CONTAINER_BOTTOM_LEFT;
}
}
_prepareContainer() {
if ($(this._getContainerId()).length === 0) {
var container = $('<div />').attr('id', this._getContainerId().replace('#', ''))
if (this._config.position == Position.TOP_RIGHT) {
container.addClass(ClassName.TOP_RIGHT)
} else if (this._config.position == Position.TOP_LEFT) {
container.addClass(ClassName.TOP_LEFT)
} else if (this._config.position == Position.BOTTOM_RIGHT) {
container.addClass(ClassName.BOTTOM_RIGHT)
} else if (this._config.position == Position.BOTTOM_LEFT) {
container.addClass(ClassName.BOTTOM_LEFT)
}
$('body').append(container)
}
if (this._config.fixed) {
$(this._getContainerId()).addClass('fixed')
} else {
$(this._getContainerId()).removeClass('fixed')
}
}
// Static
static _jQueryInterface(option, config) {
return this.each(function () {
const _options = $.extend({}, Default, config)
var toast = new Toasts($(this), _options)
if (option === 'create') {
toast[option]()
}
})
}
}
/**
* jQuery API
* ====================================================
*/
$.fn[NAME] = Toasts._jQueryInterface
$.fn[NAME].Constructor = Toasts
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT
return Toasts._jQueryInterface
}
return Toasts
})(jQuery)
export default Toasts
/**
* --------------------------------------------
* AdminLTE TodoList.js
* License MIT
* --------------------------------------------
*/
const TodoList = (($) => {
/**
* Constants
* ====================================================
*/
const NAME = 'TodoList'
const DATA_KEY = 'lte.todolist'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
const Selector = {
DATA_TOGGLE: '[data-widget="todo-list"]'
}
const ClassName = {
TODO_LIST_DONE: 'done'
}
const Default = {
onCheck: function (item) {
return item;
},
onUnCheck: function (item) {
return item;
}
}
/**
* Class Definition
* ====================================================
*/
class TodoList {
constructor(element, config) {
this._config = config
this._element = element
this._init()
}
// Public
toggle(item) {
item.parents('li').toggleClass(ClassName.TODO_LIST_DONE);
if (! $(item).prop('checked')) {
this.unCheck($(item));
return;
}
this.check(item);
}
check (item) {
this._config.onCheck.call(item);
}
unCheck (item) {
this._config.onUnCheck.call(item);
}
// Private
_init() {
var that = this
$(Selector.DATA_TOGGLE).find('input:checkbox:checked').parents('li').toggleClass(ClassName.TODO_LIST_DONE)
$(Selector.DATA_TOGGLE).on('change', 'input:checkbox', (event) => {
that.toggle($(event.target))
})
}
// Static
static _jQueryInterface(config) {
return this.each(function () {
let data = $(this).data(DATA_KEY)
const _options = $.extend({}, Default, $(this).data())
if (!data) {
data = new TodoList($(this), _options)
$(this).data(DATA_KEY, data)
}
if (config === 'init') {
data[config]()
}
})
}
}
/**
* Data API
* ====================================================
*/
$(window).on('load', () => {
TodoList._jQueryInterface.call($(Selector.DATA_TOGGLE))
})
/**
* jQuery API
* ====================================================
*/
$.fn[NAME] = TodoList._jQueryInterface
$.fn[NAME].Constructor = TodoList
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT
return TodoList._jQueryInterface
}
return TodoList
})(jQuery)
export default TodoList
/**
* --------------------------------------------
* AdminLTE Treeview.js
* License MIT
* --------------------------------------------
*/
const Treeview = (($) => {
/**
* Constants
* ====================================================
*/
const NAME = 'Treeview'
const DATA_KEY = 'lte.treeview'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
const Event = {
SELECTED : `selected${EVENT_KEY}`,
EXPANDED : `expanded${EVENT_KEY}`,
COLLAPSED : `collapsed${EVENT_KEY}`,
LOAD_DATA_API: `load${EVENT_KEY}`
}
const Selector = {
LI : '.nav-item',
LINK : '.nav-link',
TREEVIEW_MENU: '.nav-treeview',
OPEN : '.menu-open',
DATA_WIDGET : '[data-widget="treeview"]'
}
const ClassName = {
LI : 'nav-item',
LINK : 'nav-link',
TREEVIEW_MENU : 'nav-treeview',
OPEN : 'menu-open',
SIDEBAR_COLLAPSED: 'sidebar-collapse'
}
const Default = {
trigger : `${Selector.DATA_WIDGET} ${Selector.LINK}`,
animationSpeed : 300,
accordion : true,
expandSidebar : false,
sidebarButtonSelector: '[data-widget="pushmenu"]'
}
/**
* Class Definition
* ====================================================
*/
class Treeview {
constructor(element, config) {
this._config = config
this._element = element
}
// Public
init() {
this._setupListeners()
}
expand(treeviewMenu, parentLi) {
const expandedEvent = $.Event(Event.EXPANDED)
if (this._config.accordion) {
const openMenuLi = parentLi.siblings(Selector.OPEN).first()
const openTreeview = openMenuLi.find(Selector.TREEVIEW_MENU).first()
this.collapse(openTreeview, openMenuLi)
}
treeviewMenu.stop().slideDown(this._config.animationSpeed, () => {
parentLi.addClass(ClassName.OPEN)
$(this._element).trigger(expandedEvent)
})
if (this._config.expandSidebar) {
this._expandSidebar()
}
}
collapse(treeviewMenu, parentLi) {
const collapsedEvent = $.Event(Event.COLLAPSED)
treeviewMenu.stop().slideUp(this._config.animationSpeed, () => {
parentLi.removeClass(ClassName.OPEN)
$(this._element).trigger(collapsedEvent)
treeviewMenu.find(`${Selector.OPEN} > ${Selector.TREEVIEW_MENU}`).slideUp()
treeviewMenu.find(Selector.OPEN).removeClass(ClassName.OPEN)
})
}
toggle(event) {
const $relativeTarget = $(event.currentTarget)
const $parent = $relativeTarget.parent()
let treeviewMenu = $parent.find('> ' + Selector.TREEVIEW_MENU)
if (!treeviewMenu.is(Selector.TREEVIEW_MENU)) {
if (!$parent.is(Selector.LI)) {
treeviewMenu = $parent.parent().find('> ' + Selector.TREEVIEW_MENU)
}
if (!treeviewMenu.is(Selector.TREEVIEW_MENU)) {
return
}
}
event.preventDefault()
const parentLi = $relativeTarget.parents(Selector.LI).first()
const isOpen = parentLi.hasClass(ClassName.OPEN)
if (isOpen) {
this.collapse($(treeviewMenu), parentLi)
} else {
this.expand($(treeviewMenu), parentLi)
}
}
// Private
_setupListeners() {
$(document).on('click', this._config.trigger, (event) => {
this.toggle(event)
})
}
_expandSidebar() {
if ($('body').hasClass(ClassName.SIDEBAR_COLLAPSED)) {
$(this._config.sidebarButtonSelector).PushMenu('expand')
}
}
// Static
static _jQueryInterface(config) {
return this.each(function () {
let data = $(this).data(DATA_KEY)
const _options = $.extend({}, Default, $(this).data())
if (!data) {
data = new Treeview($(this), _options)
$(this).data(DATA_KEY, data)
}
if (config === 'init') {
data[config]()
}
})
}
}
/**
* Data API
* ====================================================
*/
$(window).on(Event.LOAD_DATA_API, () => {
$(Selector.DATA_WIDGET).each(function () {
Treeview._jQueryInterface.call($(this), 'init')
})
})
/**
* jQuery API
* ====================================================
*/
$.fn[NAME] = Treeview._jQueryInterface
$.fn[NAME].Constructor = Treeview
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT
return Treeview._jQueryInterface
}
return Treeview
})(jQuery)
export default Treeview
{
"adjoining-classes": false,
"box-sizing": false,
"box-model": false,
"compatible-vendor-prefixes": false,
"floats": false,
"font-sizes": false,
"gradients": false,
"important": false,
"known-properties": false,
"outline-none": false,
"qualified-headings": false,
"regex-selectors": false,
"shorthand": false,
"text-indent": false,
"unique-headings": false,
"universal-selector": false,
"unqualified-attributes": false,
"ids": false,
"fallback-colors": false,
"vendor-prefix": false,
"import": false
}
\ No newline at end of file
/*!
* AdminLTE v3.0.4
* Only Components
* Author: Colorlib
* Website: AdminLTE.io <http://adminlte.io>
* License: Open source - MIT <http://opensource.org/licenses/MIT>
*/
// Bootstrap
// ---------------------------------------------------
@import '~bootstrap/scss/functions';
@import 'bootstrap-variables';
@import '~bootstrap/scss/mixins';
// @import '~bootstrap/scss/bootstrap';
// Variables and Mixins
// ---------------------------------------------------
@import 'variables';
@import 'mixins';
@import 'parts/components';
/*!
* AdminLTE v3.0.4
* Only Core
* Author: Colorlib
* Website: AdminLTE.io <http://adminlte.io>
* License: Open source - MIT <http://opensource.org/licenses/MIT>
*/
// Bootstrap
// ---------------------------------------------------
@import '~bootstrap/scss/functions';
@import 'bootstrap-variables';
@import '~bootstrap/scss/bootstrap';
// Variables and Mixins
// ---------------------------------------------------
@import 'variables';
@import 'mixins';
@import 'parts/core';
@import 'parts/miscellaneous';
/*!
* AdminLTE v3.0.4
* Only Extra Components
* Author: Colorlib
* Website: AdminLTE.io <http://adminlte.io>
* License: Open source - MIT <http://opensource.org/licenses/MIT>
*/
// Bootstrap
// ---------------------------------------------------
@import '~bootstrap/scss/functions';
@import 'bootstrap-variables';
@import '~bootstrap/scss/mixins';
// @import '~bootstrap/scss/bootstrap';
// Variables and Mixins
// ---------------------------------------------------
@import 'variables';
@import 'mixins';
@import 'parts/extra-components';
/*!
* AdminLTE v3.0.4
* Only Pages
* Author: Colorlib
* Website: AdminLTE.io <http://adminlte.io>
* License: Open source - MIT <http://opensource.org/licenses/MIT>
*/
// Bootstrap
// ---------------------------------------------------
@import '~bootstrap/scss/functions';
@import 'bootstrap-variables';
@import '~bootstrap/scss/mixins';
@import '~bootstrap/scss/close';
// Variables and Mixins
// ---------------------------------------------------
@import 'variables';
@import 'mixins';
@import 'parts/pages';
/*!
* AdminLTE v3.0.4
* Only Plugins
* Author: Colorlib
* Website: AdminLTE.io <http://adminlte.io>
* License: Open source - MIT <http://opensource.org/licenses/MIT>
*/
// Bootstrap
// ---------------------------------------------------
@import '~bootstrap/scss/functions';
@import 'bootstrap-variables';
@import '~bootstrap/scss/mixins';
// @import '~bootstrap/scss/bootstrap';
// Variables and Mixins
// ---------------------------------------------------
@import 'variables';
@import 'mixins';
@import 'parts/plugins';
/*!
* AdminLTE v3.0.4
* Author: Colorlib
* Website: AdminLTE.io <http://adminlte.io>
* License: Open source - MIT <http://opensource.org/licenses/MIT>
*/
//
// ------------------------------------------------------------------
// This file is to be included in your custom SCSS. Before importing
// this file, you should include your custom AdminLTE and Bootstrap
// variables followed by bootstrap.scss and then this file. It's
// ok to import this file without custom variables too!
// NOTE: be sure to keep the license notice in the generated css.
// ------------------------------------------------------------------
//
// Variables and Mixins
// ---------------------------------------------------
@import 'bootstrap-variables';
@import 'variables';
@import 'mixins';
@import 'parts/core';
@import 'parts/components';
@import 'parts/extra-components';
@import 'parts/pages';
@import 'parts/plugins';
@import 'parts/miscellaneous';
/*!
* AdminLTE v3.0.4
* Author: Colorlib
* Website: AdminLTE.io <http://adminlte.io>
* License: Open source - MIT <http://opensource.org/licenses/MIT>
*/
// Bootstrap
// ---------------------------------------------------
@import '../../dcat/sass/variables/variables';
@import '../../sass/bootstrap';
@import '../../sass/bootstrap-extended';
// Variables and Mixins
// ---------------------------------------------------
@import 'variables';
@import 'mixins';
@import 'parts/core';
@import 'parts/components';
@import 'parts/extra-components';
@import 'parts/pages';
@import 'parts/plugins';
@import 'parts/miscellaneous';
//
// Component: Alert
//
.alert {
.icon {
margin-right: 10px;
}
.close {
color: $black;
opacity: .2;
&:hover {
opacity: .5;
}
}
a {
color: $white;
text-decoration: underline;
}
}
//Alert Variants
@each $color, $value in $theme-colors {
.alert-#{$color} {
color: color-yiq($value);
background: $value;
border-color: darken($value, 5%);
}
.alert-default-#{$color} {
@include alert-variant(theme-color-level($color, $alert-bg-level), theme-color-level($color, $alert-border-level), theme-color-level($color, $alert-color-level));
}
}
//
// Component: Brand
//
.brand-link {
$brand-link-padding-y: $navbar-brand-padding-y + $navbar-padding-y;
display: block;
font-size: $navbar-brand-font-size;
line-height: $line-height-lg;
padding: $brand-link-padding-y $sidebar-padding-x;
transition: width $transition-speed $transition-fn;
white-space: nowrap;
&:hover {
color: $white;
text-decoration: none;
}
.text-sm & {
font-size: inherit;
}
[class*='sidebar-dark'] & {
border-bottom: 0;
color: rgba($white, .8);
}
[class*='sidebar-light'] & {
border-bottom: 0;
color: rgba($black, .8);
}
.brand-image {
float: left;
line-height: .8;
margin-left: .8rem;
margin-right: .5rem;
margin-top: -3px;
max-height: 33px;
width: auto;
}
.brand-image-xs {
float: left;
line-height: .8;
margin-top: -.1rem;
max-height: 33px;
width: auto;
}
.brand-image-xl {
line-height: .8;
max-height: 40px;
width: auto;
}
&.text-sm,
.text-sm & {
.brand-image {
height: 29px;
margin-bottom: -.25rem;
margin-left: .95rem;
margin-top: -.25rem;
}
.brand-image-xs {
margin-top: -.2rem;
max-height: 29px;
}
.brand-image-xl {
margin-top: -.225rem;
max-height: 38px;
}
}
}
//
// Component: Button
//
.btn {
border-width: 1px;
&.disabled,
&:disabled {
cursor: not-allowed;
}
// Flat buttons
&.btn-flat {
@include border-radius(0);
border-width: 1px;
box-shadow: none;
}
// input file btn
&.btn-file {
overflow: hidden;
position: relative;
> input[type='file'] {
background: $white;
cursor: inherit;
display: block;
font-size: 100px;
min-height: 100%;
min-width: 100%;
opacity: 0;
outline: none;
position: absolute;
right: 0;
text-align: right;
top: 0;
}
}
.text-sm & {
font-size: $font-size-sm !important;
}
}
// Button color variations
.btn-default {
background-color: $button-default-background-color;
border-color: $button-default-background-color;
color: $button-default-color;
&:hover,
&:active,
&.hover {
background-color: darken($button-default-background-color, 5%);
color: darken($button-default-color, 10%);
}
}
// Application buttons
.btn-app {
@include border-radius(3px);
background-color: $button-default-background-color;
border: 1px solid $button-default-border-color;
color: $gray-600;
font-size: 12px;
height: 60px;
margin: 0 0 10px 10px;
min-width: 80px;
padding: 15px 5px;
position: relative;
text-align: center;
// Icons within the btn
> .fa,
> .fas,
> .far,
> .fab,
> .glyphicon,
> .ion {
display: block;
font-size: 20px;
}
&:hover {
background: $button-default-background-color;
border-color: darken($button-default-border-color, 20%);
color: $button-default-color;
}
&:active,
&:focus {
@include box-shadow(inset 0 3px 5px rgba($black, 0.125));
}
// The badge
> .badge {
font-size: 10px;
font-weight: 400;
position: absolute;
right: -10px;
top: -3px;
}
}
// Extra Button Size
.btn-xs {
@include button-size($button-padding-y-xs, $button-padding-x-xs, $button-font-size-xs, $button-line-height-xs, $button-border-radius-xs);
}
//
// Component: Callout
//
// Base styles (regardless of theme)
.callout {
@if $enable-rounded {
@include border-radius($border-radius);
}
@if $enable-shadows {
box-shadow: map-get($elevations, 1);
} @else {
border: 1px solid $gray-300;
}
background-color: $white;
border-left: 5px solid $gray-200;
margin-bottom: map-get($spacers, 3);
padding: 1rem;
a {
color: $gray-700;
text-decoration: underline;
&:hover {
color: $gray-200;
}
}
p:last-child {
margin-bottom: 0;
}
// Themes for different contexts
&.callout-danger {
border-left-color: darken(theme-color('danger'), 10%);
}
&.callout-warning {
border-left-color: darken(theme-color('warning'), 10%);
}
&.callout-info {
border-left-color: darken(theme-color('info'), 10%);
}
&.callout-success {
border-left-color: darken(theme-color('success'), 10%);
}
}
//
// Component: Cards
//
// Color variants
@each $name, $color in $theme-colors {
@include cards-variant($name, $color);
}
@each $name, $color in $colors {
@include cards-variant($name, $color);
}
.card {
@include box-shadow($card-shadow);
margin-bottom: map-get($spacers, 3);
border: 0;
&.bg-dark {
.card-header {
border-color: $card-dark-border-color;
}
&,
.card-body {
color: $white;
}
}
&.maximized-card {
height: 100% !important;
left: 0;
max-height: 100% !important;
max-width: 100% !important;
position: fixed;
top: 0;
width: 100% !important;
z-index: 9999;
&.was-collapsed .card-body {
display: block !important;
}
[data-widget='collapse'] {
display: none;
}
.card-header,
.card-footer {
@include border-radius(0 !important);
}
}
// collapsed mode
&.collapsed-card {
.card-body,
.card-footer {
display: none;
}
}
.nav.flex-column {
> li {
border-bottom: 1px solid $card-border-color;
margin: 0;
&:last-of-type {
border-bottom: 0;
}
}
}
// fixed height to 300px
&.height-control {
.card-body {
max-height: 300px;
overflow: auto;
}
}
.border-right {
border-right: 1px solid $card-border-color;
}
.border-left {
border-left: 1px solid $card-border-color;
}
&.card-tabs {
&:not(.card-outline) {
& > .card-header {
border-bottom: 0;
.nav-item {
&:first-child .nav-link {
margin-left: -1px;
}
}
}
}
&.card-outline {
.nav-item {
border-bottom: 0;
&:first-child .nav-link {
border-left: 0;
margin-left: 0;
}
}
}
.card-tools {
margin: .3rem .5rem;
}
&:not(.expanding-card).collapsed-card {
.card-header {
border-bottom: 0;
.nav-tabs {
border-bottom: 0;
.nav-item {
margin-bottom: 0;
}
}
}
}
&.expanding-card {
.card-header {
.nav-tabs {
.nav-item {
margin-bottom: -1px;
}
}
}
}
}
&.card-outline-tabs {
border-top: 0;
.card-header {
.nav-item {
&:first-child .nav-link {
border-left: 0;
margin-left: 0;
}
}
a {
border-top: 3px solid transparent;
&:hover {
border-top: 3px solid $nav-tabs-border-color;
}
&.active {
&:hover {
margin-top: 0;
}
}
}
}
.card-tools {
margin: .5rem .5rem .3rem;
}
&:not(.expanding-card).collapsed-card .card-header {
border-bottom: 0;
.nav-tabs {
border-bottom: 0;
.nav-item {
margin-bottom: 0;
}
}
}
&.expanding-card {
.card-header {
.nav-tabs {
.nav-item {
margin-bottom: -1px;
}
}
}
}
}
}
// Maximized Card Body Scroll fix
html.maximized-card {
overflow: hidden;
}
// Add clearfix to header, body and footer
//.card-header,
//.card-body,
//.card-footer {
// @include clearfix;
//}
// Box header
.card-header {
background-color: transparent;
border-bottom: 0;
padding: (($card-spacer-y / 2) * 2) $card-spacer-x;
position: relative;
@if $enable-rounded {
@include border-top-radius($border-radius);
}
.collapsed-card & {
border-bottom: 0;
}
> .card-tools {
float: right;
margin-right: -$card-spacer-x / 2;
.input-group,
.nav,
.pagination {
margin-bottom: -$card-spacer-y / 2.5;
margin-top: -$card-spacer-y / 2.5;
}
[data-toggle='tooltip'] {
position: relative;
}
}
}
.card-title {
float: left;
font-size: $card-title-font-size;
font-weight: $card-title-font-weight;
margin: 0;
}
.card-text {
clear: both;
}
// Box Tools Buttons
.btn-tool {
background: transparent;
color: $gray-500;
font-size: $font-size-sm;
margin: -(($card-spacer-y / 2) * 2) 0;
padding: .25rem .5rem;
.btn-group.show &,
&:hover {
color: $gray-700;
}
.show &,
&:focus {
box-shadow: none !important;
}
}
.text-sm {
.card-title {
font-size: $card-title-font-size-sm;
}
.nav-link {
padding: $card-nav-link-padding-sm-y $card-nav-link-padding-sm-x;
}
}
// Box Body
.card-body {
// @include border-radius-sides(0, 0, $border-radius, $border-radius);
// .no-header & {
// @include border-top-radius($border-radius);
// }
// Tables within the box body
> .table {
margin-bottom: 0;
> thead > tr > th,
> thead > tr > td {
border-top-width: 0;
}
}
// Calendar within the box body
.fc {
margin-top: 5px;
}
.full-width-chart {
margin: -19px;
}
&.p-0 .full-width-chart {
margin: -9px;
}
}
.chart-legend {
@include list-unstyled;
margin: 10px 0;
> li {
@media (max-width: map-get($grid-breakpoints, sm)) {
float: left;
margin-right: 10px;
}
}
}
// Comment Box
.card-comments {
background: $gray-100;
.card-comment {
@include clearfix;
border-bottom: 1px solid $gray-200;
padding: 8px 0;
&:last-of-type {
border-bottom: 0;
}
&:first-of-type {
padding-top: 0;
}
img {
height: $card-img-size;
width: $card-img-size;
float: left;
}
}
.comment-text {
color: lighten($gray-700, 20%);
margin-left: 40px;
}
.username {
color: $gray-700;
display: block;
font-weight: 600;
}
.text-muted {
font-size: 12px;
font-weight: 400;
}
}
// Widgets
//-----------
// Widget: TODO LIST
.todo-list {
list-style: none;
margin: 0;
overflow: auto;
padding: 0;
// Todo list element
> li {
@include border-radius(2px);
background: $gray-100;
border-left: 2px solid $gray-200;
color: $gray-700;
margin-bottom: 2px;
padding: 10px;
&:last-of-type {
margin-bottom: 0;
}
> input[type='checkbox'] {
margin: 0 10px 0 5px;
}
.text {
display: inline-block;
font-weight: 600;
margin-left: 5px;
}
// Time labels
.badge {
font-size: .7rem;
margin-left: 10px;
}
// Tools and options box
.tools {
color: theme-color('danger');
display: none;
float: right;
// icons
> .fa,
> .fas,
> .far,
> .fab,
> .glyphicon,
> .ion {
cursor: pointer;
margin-right: 5px;
}
}
&:hover .tools {
display: inline-block;
}
&.done {
color: darken($gray-500, 25%);
.text {
font-weight: 500;
text-decoration: line-through;
}
.badge {
background: $gray-500 !important;
}
}
}
// Color variants
@each $name, $color in $theme-colors {
.#{$name} {
border-left-color: $color;
}
}
@each $name, $color in $colors {
.#{$name} {
border-left-color: $color;
}
}
.handle {
cursor: move;
display: inline-block;
margin: 0 5px;
}
}
// END TODO WIDGET
// Input in box
.card-input {
max-width: 200px;
}
// Nav Tabs override
.card-default {
.nav-item {
&:first-child .nav-link {
border-left: 0;
}
}
}
//
// Component: Carousel
//
.carousel-control {
&.left,
&.right {
background-image: none;
}
> .fa,
> .fas,
> .far,
> .fab,
> .glyphicon,
> .ion {
display: inline-block;
font-size: 40px;
margin-top: -20px;
position: absolute;
top: 50%;
z-index: 5;
}
}
//
// Misc: Colors
//
// Background colors (theme colors)
@each $name, $color in $theme-colors {
@include background-variant($name, $color);
}
// Background colors (colors)
@each $name, $color in $colors {
@include background-variant($name, $color);
}
.bg-gray {
background-color: $gray-500;
color: color-yiq($gray-500);
}
.bg-gray-light {
background-color: lighten($gray-200, 3%);
color: color-yiq(lighten($gray-200, 3%)) !important;
}
.bg-black {
background-color: $black;
color: color-yiq($black) !important;
}
.bg-white {
background-color: $white;
color: color-yiq($white) !important;
}
// Gradient Background colors (theme colors)
@each $name, $color in $theme-colors {
@include background-gradient-variant($name, $color);
}
// Gradient Background colors (colors)
@each $name, $color in $colors {
@include background-gradient-variant($name, $color);
}
// Backgrund Color Disabled
[class^='bg-'].disabled {
opacity: .65;
}
// Text muted hover
a.text-muted:hover {
color: theme-color(primary) !important;
}
// Link Styles
.link-muted {
color: darken($gray-500, 30%);
&:hover,
&:focus {
color: darken($gray-500, 40%);
}
}
.link-black {
color: $gray-600;
&:hover,
&:focus {
color: lighten($gray-500, 20%);
}
}
// Accent colors (theme colors)
@each $name, $color in $theme-colors {
@include accent-variant($name, $color);
}
// Accent colors (colors)
@each $name, $color in $colors {
@include accent-variant($name, $color);
}
// Accent button override fix
[class*="accent-"] {
@each $name, $color in $theme-colors {
a.btn-#{$name} {
color: color-yiq($color);
}
}
}
//
// Component: Control Sidebar
//
html.control-sidebar-animate {
overflow-x: hidden;
}
.control-sidebar {
bottom: $main-footer-height;
position: absolute;
top: $main-header-height;
z-index: $zindex-control-sidebar;
&,
&::before {
bottom: $main-footer-height;
display: none;
right: -$control-sidebar-width;
width: $control-sidebar-width;
@include transition(right $transition-speed $transition-fn, display $transition-speed $transition-fn);
}
&::before {
content: '';
display: block;
position: fixed;
top: 0;
z-index: -1;
}
}
body.text-sm {
.control-sidebar {
bottom: $main-footer-height-sm;
top: $main-header-height-sm;
}
}
.main-header.text-sm ~ .control-sidebar {
top: $main-header-height-sm;
}
.main-footer.text-sm ~ .control-sidebar {
bottom: $main-footer-height-sm;
}
.control-sidebar-push-slide {
.content-wrapper,
.main-footer {
@include transition(margin-right $transition-speed $transition-fn);
}
}
// Control sidebar open state
.control-sidebar-open {
.control-sidebar {
display: block;
&,
&::before {
right: 0;
}
}
&.control-sidebar-push,
&.control-sidebar-push-slide {
.content-wrapper,
.main-footer {
margin-right: $control-sidebar-width;
}
}
}
// Control sidebar slide over content state
.control-sidebar-slide-open {
.control-sidebar {
display: block;
&,
&::before {
right: 0;
@include transition(right $transition-speed $transition-fn, display $transition-speed $transition-fn);
}
}
&.control-sidebar-push,
&.control-sidebar-push-slide {
.content-wrapper,
.main-footer {
margin-right: $control-sidebar-width;
}
}
}
// Dark skin
.control-sidebar-dark {
&,
a,
.nav-link {
color: $sidebar-dark-color;
}
// Background
& {
background: $sidebar-dark-bg;
}
a:hover {
color: $sidebar-dark-hover-color;
}
// Headers and labels
h1,
h2,
h3,
h4,
h5,
h6,
label {
color: $sidebar-dark-hover-color;
}
// Tabs
.nav-tabs {
background-color: $sidebar-dark-hover-bg;
border-bottom: 0;
margin-bottom: 5px;
.nav-item {
margin: 0;
}
.nav-link {
border-radius: 0;
padding: 10px 20px;
position: relative;
text-align: center;
&,
&:hover,
&:active,
&:focus,
&.active {
border: 0;
}
&:hover,
&:active,
&:focus,
&.active {
border-bottom-color: transparent;
border-left-color: transparent;
border-top-color: transparent;
color: $sidebar-dark-hover-color;
}
&.active {
background-color: $sidebar-dark-bg;
}
}
}
.tab-pane {
padding: 10px 15px;
}
}
// Light skin
.control-sidebar-light {
color: lighten($sidebar-light-color, 10%);
// Background
& {
background: $sidebar-light-bg;
border-left: $main-header-bottom-border;
}
}
//
// Component: Direct Chat
//
.direct-chat {
.card-body {
overflow-x: hidden;
padding: 0;
position: relative;
}
&.chat-pane-open {
.direct-chat-contacts {
@include translate(0, 0);
}
}
&.timestamp-light {
.direct-chat-timestamp {
color: lighten(color-yiq($yiq-text-light), 10%);
}
}
&.timestamp-dark {
.direct-chat-timestamp {
color: darken(color-yiq($yiq-text-dark), 20%);
}
}
}
.direct-chat-messages {
@include translate(0, 0);
height: 250px;
overflow: auto;
padding: 10px;
}
.direct-chat-msg,
.direct-chat-text {
display: block;
}
.direct-chat-msg {
@include clearfix;
margin-bottom: 10px;
}
.direct-chat-messages,
.direct-chat-contacts {
transition: transform .5s ease-in-out;
}
.direct-chat-text {
@if $enable-rounded {
@include border-radius($border-radius-lg);
}
background: $direct-chat-default-msg-bg;
border: 1px solid $direct-chat-default-msg-border-color;
color: $direct-chat-default-font-color;
margin: 5px 0 0 50px;
padding: 5px 10px;
position: relative;
//Create the arrow
&::after,
&::before {
border: solid transparent;
border-right-color: $direct-chat-default-msg-border-color;
content: ' ';
height: 0;
pointer-events: none;
position: absolute;
right: 100%;
top: 15px;
width: 0;
}
&::after {
border-width: 5px;
margin-top: -5px;
}
&::before {
border-width: 6px;
margin-top: -6px;
}
.right & {
margin-left: 0;
margin-right: 50px;
&::after,
&::before {
border-left-color: $direct-chat-default-msg-border-color;
border-right-color: transparent;
left: 100%;
right: auto;
}
}
}
.direct-chat-img {
@include border-radius(50%);
float: left;
height: 40px;
width: 40px;
.right & {
float: right;
}
}
.direct-chat-infos {
display: block;
font-size: $font-size-sm;
margin-bottom: 2px;
}
.direct-chat-name {
font-weight: 600;
}
.direct-chat-timestamp {
color: darken($gray-500, 25%);
}
//Direct chat contacts pane
.direct-chat-contacts-open {
.direct-chat-contacts {
@include translate(0, 0);
}
}
.direct-chat-contacts {
@include translate(101%, 0);
background: $dark;
bottom: 0;
color: $white;
height: 250px;
overflow: auto;
position: absolute;
top: 0;
width: 100%;
}
.direct-chat-contacts-light {
background: $light;
.contacts-list-name {
color: $gray-700;
}
.contacts-list-date {
color: $gray-600;
}
.contacts-list-msg {
color: darken($gray-600, 10%);
}
}
//Contacts list -- for displaying contacts in direct chat contacts pane
.contacts-list {
@include list-unstyled;
> li {
@include clearfix;
border-bottom: 1px solid rgba($black, 0.2);
margin: 0;
padding: 10px;
&:last-of-type {
border-bottom: 0;
}
}
}
.contacts-list-img {
@include border-radius(50%);
float: left;
width: 40px;
}
.contacts-list-info {
color: $white;
margin-left: 45px;
}
.contacts-list-name,
.contacts-list-status {
display: block;
}
.contacts-list-name {
font-weight: 600;
}
.contacts-list-status {
font-size: $font-size-sm;
}
.contacts-list-date {
color: $gray-400;
font-weight: normal;
}
.contacts-list-msg {
color: darken($gray-400, 10%);
}
// Color variants
@each $name, $color in $theme-colors {
.direct-chat-#{$name} {
@include direct-chat-variant($color);
}
}
@each $name, $color in $colors {
.direct-chat-#{$name} {
@include direct-chat-variant($color);
}
}
//
// Component: Dropdown
//
// General Dropdown Rules
//.dropdown-item {
// &:first-of-type {
// @include border-top-radius($border-radius);
// }
// &:last-of-type {
// @include border-bottom-radius($border-radius);
// }
//}
.text-sm {
.dropdown-menu {
font-size: $font-size-sm !important;
}
.dropdown-toggle::after {
vertical-align: .2rem
}
}
.dropdown-item-title {
font-size: $font-size-base;
margin: 0;
}
.dropdown-icon {
&::after {
margin-left: 0;
}
}
// Dropdown Sizes
.dropdown-menu-lg {
max-width: 300px;
min-width: 280px;
padding: 0;
.dropdown-divider {
margin: 0;
}
.dropdown-item {
padding: $dropdown-padding-y $dropdown-item-padding-x;
}
p {
margin: 0;
white-space: normal;
}
}
// Dropdown Submenu
.dropdown-submenu {
position: relative;
& > a:after {
@include caret-right;
float: right;
margin-left: .5rem;
margin-top: .5rem;
}
& > .dropdown-menu {
left: 100%;
margin-left: 0px;
margin-top: 0px;
top: 0;
}
}
// Dropdown Hover
.dropdown-hover {
&:hover,
&.nav-item.dropdown:hover,
.dropdown-submenu:hover,
&.dropdown-submenu:hover {
> .dropdown-menu {
display: block;
}
}
}
// Dropdown Sizes
.dropdown-menu-xl {
max-width: 420px;
min-width: 360px;
padding: 0;
.dropdown-divider {
margin: 0;
}
.dropdown-item {
padding: $dropdown-padding-y $dropdown-item-padding-x;
}
p {
margin: 0;
white-space: normal;
}
}
// Dropdown header and footer
.dropdown-footer,
.dropdown-header {
display: block;
font-size: $font-size-sm;
padding: .5rem $dropdown-item-padding-x;
text-align: center;
}
// Add fade animation to dropdown menus by appending
// the class .animated-dropdown-menu to the .dropdown-menu ul (or ol)
.open:not(.dropup) > .animated-dropdown-menu {
@include animation(flipInX .7s both);
backface-visibility: visible !important;
}
@keyframes flipInX {
0% {
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
transition-timing-function: ease-in;
opacity: 0;
}
40% {
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
transition-timing-function: ease-in;
}
60% {
transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
opacity: 1;
}
80% {
transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
}
100% {
transform: perspective(400px);
}
}
// Fix dropdown menu in navbars
.navbar-custom-menu > .navbar-nav {
> li {
position: relative;
> .dropdown-menu {
position: absolute;
right: 0;
left: auto;
}
}
}
@include media-breakpoint-down(sm) {
.navbar-custom-menu > .navbar-nav {
float: right;
> li {
position: static;
> .dropdown-menu {
position: absolute;
right: 5%;
left: auto;
border: 1px solid #ddd;
background: $white;
}
}
}
}
// User Menu
.navbar-nav > .user-menu {
> .nav-link:after {
content:none;
}
> .dropdown-menu {
@include border-top-radius(0);
padding: 0;
width: 280px;
&,
> .user-body {
@include border-bottom-radius(4px);
}
// Header menu
> li.user-header {
height: 175px;
padding: 10px;
text-align: center;
// User image
> img {
z-index: 5;
height: 90px;
width: 90px;
border: 3px solid;
border-color: transparent;
border-color: rgba(255, 255, 255, 0.2);
}
> p {
z-index: 5;
font-size: 17px;
//text-shadow: 2px 2px 3px #333333;
margin-top: 10px;
> small {
display: block;
font-size: 12px;
}
}
}
// Menu Body
> .user-body {
@include clearfix;
border-bottom: 1px solid $gray-700;
border-top: 1px solid $gray-300;
padding: 15px;
a {
@include media-breakpoint-up(sm) {
background: $white !important;
color: $gray-700 !important;
}
}
}
// Menu Footer
> .user-footer {
@include clearfix;
background-color: $gray-100;
padding: 10px;
.btn-default {
color: $gray-600;
&:hover {
@include media-breakpoint-up(sm) {
background-color: $gray-100;
}
}
}
}
}
.user-image {
@include media-breakpoint-up(sm) {
float: none;
line-height: 10px;
margin-right: .4rem;
margin-top: -8px;
}
border-radius: 50%;
float: left;
height: $sidebar-user-image-width;
margin-right: 10px;
margin-top: -2px;
width: $sidebar-user-image-width;
}
}
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment