Compare commits
245 Commits
v3
...
v2.4.0-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7cfbe94b7e | ||
|
|
187dcfae4d | ||
|
|
f4ee8fba68 | ||
|
|
fbbc450c41 | ||
|
|
4b0d73bab9 | ||
|
|
41d3db21ed | ||
|
|
6f77ce584e | ||
|
|
87209a984a | ||
|
|
406cda26d9 | ||
|
|
c6b45cdfa0 | ||
|
|
a60df9f050 | ||
|
|
4169db0857 | ||
|
|
342a0ac17f | ||
|
|
ec245fd46e | ||
|
|
ccb00ccdad | ||
|
|
7089f63213 | ||
|
|
bf174bfcb0 | ||
|
|
1f797fd5f7 | ||
|
|
b12cc7d9e4 | ||
|
|
26a56938ce | ||
|
|
4c25d55149 | ||
|
|
eb782d743b | ||
|
|
b7da81b3d3 | ||
|
|
6f754362f5 | ||
|
|
d1dd9b8013 | ||
|
|
936302b847 | ||
|
|
a0475e08ae | ||
|
|
235481d1d6 | ||
|
|
37c8bbb019 | ||
|
|
890ccbdb09 | ||
|
|
30324f4f33 | ||
|
|
324bca9f14 | ||
|
|
2c372a2ce2 | ||
|
|
b04a99466d | ||
|
|
201d482066 | ||
|
|
b5f4bba4e6 | ||
|
|
a1f6bb07d3 | ||
|
|
024e3faa9d | ||
|
|
436513ac24 | ||
|
|
d2d63c857a | ||
|
|
57c62f4222 | ||
|
|
af4ece9a80 | ||
|
|
3f5abdbfca | ||
|
|
383d685a5f | ||
|
|
075fe294ed | ||
|
|
9f870d0fad | ||
|
|
3c672fe9aa | ||
|
|
a7d49bd656 | ||
|
|
f02c61eb0e | ||
|
|
469e9cd136 | ||
|
|
84ca9cdc24 | ||
|
|
01b4740d93 | ||
|
|
17c9366f4b | ||
|
|
7cecd1922d | ||
|
|
d10ba04ec9 | ||
|
|
51142e7fc9 | ||
|
|
28c75ef8a0 | ||
|
|
cdc2e7e3d0 | ||
|
|
b5e67488e7 | ||
|
|
178adf5dc0 | ||
|
|
6683ab7303 | ||
|
|
7aa9f44d66 | ||
|
|
bfbccf9bf7 | ||
|
|
61cd9ca7b0 | ||
|
|
aa945e6e6f | ||
|
|
d73be88861 | ||
|
|
f46e5198b7 | ||
|
|
be0a0b17b0 | ||
|
|
074d1ca039 | ||
|
|
fcc14dcff7 | ||
|
|
bd3799eb7c | ||
|
|
082ffa3d41 | ||
|
|
09c91313a0 | ||
|
|
1273f93e67 | ||
|
|
74c27f7f11 | ||
|
|
501448ad6f | ||
|
|
cdcf40edc0 | ||
|
|
8747e8be04 | ||
|
|
2be703222a | ||
|
|
95d377eabc | ||
|
|
194f92be3a | ||
|
|
0c4ca8c4db | ||
|
|
2f3d9ca953 | ||
|
|
02efe00fc9 | ||
|
|
4758ab5216 | ||
|
|
b621ed77f2 | ||
|
|
76e1d899d5 | ||
|
|
b016468ab2 | ||
|
|
a527b7fe99 | ||
|
|
8410b2fdc1 | ||
|
|
e73de15f31 | ||
|
|
96174a1ada | ||
|
|
1817e83917 | ||
|
|
fff97052cc | ||
|
|
7ec1e072d9 | ||
|
|
3d4acd72d9 | ||
|
|
bb61097fea | ||
|
|
5ecdce9813 | ||
|
|
508e4f0815 | ||
|
|
70b95bbf6f | ||
|
|
dc83709196 | ||
|
|
09651c1d0c | ||
|
|
eec8a98901 | ||
|
|
e736df9f64 | ||
|
|
12ea7168fb | ||
|
|
90e62c2af0 | ||
|
|
e499f26f76 | ||
|
|
53b904d946 | ||
|
|
7ec587b75b | ||
|
|
0159d06b24 | ||
|
|
51bf7c4a80 | ||
|
|
6e2f5b0708 | ||
|
|
8a7b80c64c | ||
|
|
ced14b133d | ||
|
|
1fe157ae77 | ||
|
|
3cbb6273e0 | ||
|
|
7e011ed4b5 | ||
|
|
e3d93f7e1d | ||
|
|
797b65b3ca | ||
|
|
5b14053e35 | ||
|
|
4de79841b4 | ||
|
|
8d21b84474 | ||
|
|
7561213185 | ||
|
|
1a89a2feab | ||
|
|
060f79063e | ||
|
|
159887612e | ||
|
|
e207c9c0c8 | ||
|
|
be18803032 | ||
|
|
821a3bc063 | ||
|
|
79bd17075e | ||
|
|
30f9916802 | ||
|
|
5170c4f8ea | ||
|
|
09a8974ab7 | ||
|
|
e989db685e | ||
|
|
87cba5d352 | ||
|
|
8f0a652055 | ||
|
|
be11566d95 | ||
|
|
d4877677ab | ||
|
|
98400d1498 | ||
|
|
1bffa9fd44 | ||
|
|
7d78453e8a | ||
|
|
0e601c1463 | ||
|
|
b8ea25e8eb | ||
|
|
16bb613abe | ||
|
|
0ab2eb7f38 | ||
|
|
665514209b | ||
|
|
13f3036479 | ||
|
|
2de98d7b70 | ||
|
|
140c350c5c | ||
|
|
68e473db43 | ||
|
|
64a91f7b56 | ||
|
|
8e278e1145 | ||
|
|
bca8e8ec66 | ||
|
|
db51bd8b98 | ||
|
|
1a29b58111 | ||
|
|
35dacb3f97 | ||
|
|
688631379b | ||
|
|
05f0528552 | ||
|
|
20cd83d204 | ||
|
|
9d6c25d7b2 | ||
|
|
6ed3a7bfc4 | ||
|
|
476653811a | ||
|
|
84ad18c3e8 | ||
|
|
59c8ea100a | ||
|
|
493bdb6580 | ||
|
|
abe80a0e92 | ||
|
|
0dc992837e | ||
|
|
ec2e31079b | ||
|
|
d003040ddc | ||
|
|
b07ef01535 | ||
|
|
b4f1c53713 | ||
|
|
bcd808d203 | ||
|
|
9b80592460 | ||
|
|
8438a30eaa | ||
|
|
da310983fd | ||
|
|
04e4fcb934 | ||
|
|
1c243550e4 | ||
|
|
b71926e6ac | ||
|
|
f9a3f8b5ff | ||
|
|
0c4ebb13c2 | ||
|
|
198e91c64a | ||
|
|
9b77655eb3 | ||
|
|
c9dcc7c1dd | ||
|
|
e5e0c53b0c | ||
|
|
6eab94926c | ||
|
|
a0addfa177 | ||
|
|
cb6ac64ac4 | ||
|
|
e61eb404d2 | ||
|
|
ea7823b72c | ||
|
|
88b4e3d8b6 | ||
|
|
446b1cec52 | ||
|
|
d73cf99666 | ||
|
|
139b4604c5 | ||
|
|
af4360260c | ||
|
|
0050e298a2 | ||
|
|
d051696b4b | ||
|
|
a49aaf581b | ||
|
|
8db9797950 | ||
|
|
497ca6d7e6 | ||
|
|
034c31e089 | ||
|
|
bdec7573df | ||
|
|
f3b2f0d46c | ||
|
|
c2bc22698c | ||
|
|
bd61a3b66b | ||
|
|
fe147c9b21 | ||
|
|
faa724a692 | ||
|
|
dbfd0322c0 | ||
|
|
720c036708 | ||
|
|
2f64568f4c | ||
|
|
18b882dd3f | ||
|
|
4fbef59be1 | ||
|
|
9c28589ad6 | ||
|
|
bd36febbc0 | ||
|
|
2b73a99716 | ||
|
|
be82cd2d05 | ||
|
|
bc696b82cc | ||
|
|
fe3382b879 | ||
|
|
525f1e62fe | ||
|
|
10e1f7fc2d | ||
|
|
f284016fa8 | ||
|
|
93e99de603 | ||
|
|
6a45ff52d0 | ||
|
|
45b64a9739 | ||
|
|
74428d3ec4 | ||
|
|
e6318e7386 | ||
|
|
41d18400ba | ||
|
|
fceb5eebe6 | ||
|
|
f741eec73c | ||
|
|
b1e8da631e | ||
|
|
732d6bbd59 | ||
|
|
5482534db4 | ||
|
|
65904edd76 | ||
|
|
93f2ad2fef | ||
|
|
e92b9acd19 | ||
|
|
03ff6f5d9f | ||
|
|
d30707611d | ||
|
|
d7189ad95c | ||
|
|
34ce040105 | ||
|
|
c174dc7b63 | ||
|
|
2681b8bd2e | ||
|
|
dce8dd7070 | ||
|
|
12bf734658 | ||
|
|
ff6ce09d39 | ||
|
|
9c15693784 | ||
|
|
20eba516a4 |
13
.babelrc.js
13
.babelrc.js
@@ -1,13 +0,0 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
loose: true,
|
||||
bugfixes: true,
|
||||
modules: false,
|
||||
exclude: ['transform-typeof-symbol']
|
||||
}
|
||||
]
|
||||
]
|
||||
};
|
||||
@@ -1,10 +0,0 @@
|
||||
# https://github.com/browserslist/browserslist#readme
|
||||
|
||||
>= 0.2%
|
||||
last 2 major versions
|
||||
not dead
|
||||
Firefox ESR
|
||||
Edge >= 16
|
||||
Explorer >= 10
|
||||
iOS >= 9
|
||||
Safari >= 9
|
||||
@@ -1,68 +0,0 @@
|
||||
{
|
||||
"files": [
|
||||
{
|
||||
"path": "./dist/css/adminlte.css",
|
||||
"maxSize": "128.3 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/adminlte.min.css",
|
||||
"maxSize": "121.5 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/alt/adminlte.components.css",
|
||||
"maxSize": "28.6 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/alt/adminlte.components.min.css",
|
||||
"maxSize": "27.8 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/alt/adminlte.core.css",
|
||||
"maxSize": "72.2 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/alt/adminlte.core.min.css",
|
||||
"maxSize": "69.4 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/alt/adminlte.extra-components.css",
|
||||
"maxSize": "4.6 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/alt/adminlte.extra-components.min.css",
|
||||
"maxSize": "4.5 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/alt/adminlte.light.css",
|
||||
"maxSize": "94 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/alt/adminlte.light.min.css",
|
||||
"maxSize": "89 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/alt/adminlte.pages.css",
|
||||
"maxSize": "3.5 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/alt/adminlte.pages.min.css",
|
||||
"maxSize": "3.1 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/alt/adminlte.plugins.css",
|
||||
"maxSize": "22.2 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/alt/adminlte.plugins.min.css",
|
||||
"maxSize": "21.5 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/js/adminlte.js",
|
||||
"maxSize": "16.4 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/js/adminlte.min.js",
|
||||
"maxSize": "10.9 kB"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
.git
|
||||
*Dockerfile*
|
||||
*docker-compose*
|
||||
node_modules
|
||||
@@ -1,14 +0,0 @@
|
||||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
@@ -1,5 +0,0 @@
|
||||
**/*.min.js
|
||||
**/plugins/
|
||||
/dist/js/adminlte.js
|
||||
/docs/
|
||||
/docs_html/
|
||||
@@ -1,78 +0,0 @@
|
||||
{
|
||||
"root": true,
|
||||
"extends": [
|
||||
"plugin:compat/recommended",
|
||||
"plugin:import/errors",
|
||||
"plugin:import/warnings",
|
||||
"plugin:unicorn/recommended",
|
||||
"xo",
|
||||
"xo/browser"
|
||||
],
|
||||
"env": {
|
||||
"jquery": true
|
||||
},
|
||||
"rules": {
|
||||
"arrow-body-style": "off",
|
||||
"capitalized-comments": "off",
|
||||
"comma-dangle": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"eqeqeq": "off",
|
||||
"indent": [
|
||||
"error",
|
||||
2,
|
||||
{
|
||||
"MemberExpression": "off",
|
||||
"SwitchCase": 1
|
||||
}
|
||||
],
|
||||
"multiline-ternary": [
|
||||
"error",
|
||||
"always-multiline"
|
||||
],
|
||||
"new-cap": [
|
||||
"error",
|
||||
{
|
||||
"properties": false
|
||||
}
|
||||
],
|
||||
"no-eq-null": "off",
|
||||
"no-negated-condition": "off",
|
||||
"no-console": "error",
|
||||
"object-curly-spacing": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"operator-linebreak": [
|
||||
"error",
|
||||
"after"
|
||||
],
|
||||
"prefer-template": "error",
|
||||
"prefer-named-capture-group": "off",
|
||||
|
||||
"semi": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"unicorn/filename-case": "off",
|
||||
"unicorn/consistent-destructuring": "off",
|
||||
"unicorn/no-array-callback-reference": "off",
|
||||
"unicorn/no-array-for-each": "off",
|
||||
"unicorn/no-for-loop": "off",
|
||||
"unicorn/no-negated-condition": "off",
|
||||
"unicorn/no-null": "off",
|
||||
"unicorn/no-typeof-undefined": "off",
|
||||
"unicorn/no-unused-properties": "error",
|
||||
"unicorn/prefer-dom-node-append": "off",
|
||||
"unicorn/prefer-dom-node-dataset": "off",
|
||||
"unicorn/prefer-dom-node-remove": "off",
|
||||
"unicorn/prefer-export-from": "off",
|
||||
"unicorn/prefer-includes": "off",
|
||||
"unicorn/prefer-number-properties": "off",
|
||||
"unicorn/prefer-optional-catch-binding": "off",
|
||||
"unicorn/prefer-query-selector": "off",
|
||||
"unicorn/prefer-set-has": "off",
|
||||
"unicorn/prevent-abbreviations": "off"
|
||||
}
|
||||
}
|
||||
6
.gitattributes
vendored
6
.gitattributes
vendored
@@ -1,6 +0,0 @@
|
||||
# Enforce Unix newlines
|
||||
* text=auto eol=lf
|
||||
|
||||
# Ignores for analysis is used to produce the language stats bar which displays the languages percentages
|
||||
plugins/* linguist-vendored=true
|
||||
docs/* linguist-vendored=true
|
||||
37
.github/CONTRIBUTING.md
vendored
37
.github/CONTRIBUTING.md
vendored
@@ -1,37 +0,0 @@
|
||||
|
||||
# Contributing to AdminLTE
|
||||
|
||||
Contributions are always **welcome and recommended**! Here is how for beginner's: [Get started with open source click here](https://youtu.be/GbqSvJs-6W4)
|
||||
|
||||
1. Contribution Requirements :
|
||||
* When you contribute, you agree to give a non-exclusive license to AdminLTE.io to use that contribution in any context as we (AdminLTE.io) see appropriate.
|
||||
* If you use content provided by another party, it must be appropriately licensed using an [open source](https://opensource.org/licenses) license.
|
||||
* Contributions are only accepted through GitHub pull requests.
|
||||
* Finally, contributed code must work in all supported browsers (see above for browser support).
|
||||
2. Installation :
|
||||
* Fork the repository ([here is the guide](https://help.github.com/articles/fork-a-repo/)).
|
||||
* Clone to your machine
|
||||
|
||||
```bash
|
||||
git clone https://github.com/YOUR_USERNAME/AdminLTE.git
|
||||
```
|
||||
* Create a new branch
|
||||
3. Compile dist files (Development) :
|
||||
* To compile the dist files you need Node.js 14 or higher/npm (node package manager)
|
||||
* Delete ./package-lock.json file
|
||||
* `npm install` (install npm deps)
|
||||
* `npm run dev` (developer mode, autocompile with browsersync support for live demo)
|
||||
* Make your changes only in ./build Folder OR package.json OR ./dist/js/demo.js OR package-lock.json OR ./dist/js/pages/ OR ./docs OR in any html files which are necessary for contribution
|
||||
* Do not make changes in ./dist/css/ AND ./dist/js/ AND ./plugins Because it contains compiled files and do not include in PR (Pull Request)
|
||||
* `npm run production` (compile css/js files and test all pages are perfectly working fine, before creating a pull request)
|
||||
4. Create a pull request
|
||||
|
||||
## Online one-click setup for contributing
|
||||
|
||||
You can use Gitpod(an online IDE which is free for Open Source) for working on issues or making PRs (Pull Requests). With a single click it will launch a workspace and automatically:
|
||||
|
||||
- clone the `AdminLTE` repo.
|
||||
- install the dependencies.
|
||||
- run `npm run dev` to start the server.
|
||||
|
||||
[](https://gitpod.io/from-referrer/)
|
||||
@@ -1,32 +0,0 @@
|
||||
---
|
||||
name: Bug report for AdminLTE v3.x
|
||||
about: Create a report to help us improve AdminLTE v3.x
|
||||
title: "[BUG]"
|
||||
labels: type:bug, version:3.1.x
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Environment (please complete the following information):**
|
||||
- AdminLTE Version: [e.g. v3.0.0]
|
||||
- Operating System: [e.g. macOS Catalina]
|
||||
- Browser (Version): [e.g. Chrome (Latest)]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
name: Feature request for AdminLTE v4.x
|
||||
about: Suggest an idea for this project
|
||||
title: "[FEATURE]"
|
||||
labels: type:enhancement, version:4.x
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
5
.github/codeql/codeql-config.yml
vendored
5
.github/codeql/codeql-config.yml
vendored
@@ -1,5 +0,0 @@
|
||||
name: "CodeQL config"
|
||||
|
||||
paths-ignore:
|
||||
- docs/assets/plugins/
|
||||
- plugins/
|
||||
24
.github/dependabot.yml
vendored
24
.github/dependabot.yml
vendored
@@ -1,24 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
# for v4-dev branch
|
||||
- package-ecosystem: npm
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: tuesday
|
||||
time: "03:00"
|
||||
open-pull-requests-limit: 10
|
||||
target-branch: "v4-dev"
|
||||
labels:
|
||||
- dependencies
|
||||
- version:4.x
|
||||
versioning-strategy: increase
|
||||
rebase-strategy: disabled
|
||||
|
||||
# for github actions
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: tuesday
|
||||
time: "03:00"
|
||||
63
.github/workflows/ci.yml
vendored
63
.github/workflows/ci.yml
vendored
@@ -1,63 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- v4-dev
|
||||
pull_request:
|
||||
branches:
|
||||
- "**"
|
||||
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node:
|
||||
- "14.x"
|
||||
- "16.x"
|
||||
os:
|
||||
- "ubuntu-latest"
|
||||
- "macos-latest"
|
||||
- "windows-latest"
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Use Node.js ${{ matrix.node }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
|
||||
- name: Get npm cache directory
|
||||
id: npm-cache
|
||||
run: |
|
||||
echo "::set-output name=dir::$(npm config get cache)"
|
||||
|
||||
- name: Set up npm cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.npm-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
${{ runner.os }}-node-v${{ matrix.node }}-
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build files
|
||||
run: npm run compile
|
||||
|
||||
- name: Run bundlewatch
|
||||
run: npm run bundlewatch
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.node, '16')
|
||||
env:
|
||||
BUNDLEWATCH_GITHUB_TOKEN: "${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}"
|
||||
36
.github/workflows/codeql.yml
vendored
36
.github/workflows/codeql.yml
vendored
@@ -1,36 +0,0 @@
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- v4-dev
|
||||
- "!dependabot/**"
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches:
|
||||
- master
|
||||
schedule:
|
||||
- cron: "0 0 * * 0"
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: "javascript"
|
||||
config-file: ./.github/codeql/codeql-config.yml
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
60
.github/workflows/docs.yml
vendored
60
.github/workflows/docs.yml
vendored
@@ -1,60 +0,0 @@
|
||||
name: Docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- v4-dev
|
||||
pull_request:
|
||||
branches:
|
||||
- "**"
|
||||
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
NODE: 16.x
|
||||
RUBY: 2.7
|
||||
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: "${{ env.RUBY }}"
|
||||
bundler-cache: true
|
||||
working-directory: docs
|
||||
|
||||
- name: Version info
|
||||
run: |
|
||||
ruby --version
|
||||
gem --version
|
||||
bundle --version
|
||||
java -version
|
||||
|
||||
- name: Set up npm cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
${{ runner.os }}-node-v${{ env.NODE }}-
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build docs
|
||||
run: npm run docs-compile
|
||||
|
||||
- name: Run HTML validator
|
||||
run: npm run docs-lint
|
||||
42
.github/workflows/lint.yml
vendored
42
.github/workflows/lint.yml
vendored
@@ -1,42 +0,0 @@
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- v4-dev
|
||||
pull_request:
|
||||
branches:
|
||||
- "**"
|
||||
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
NODE: 16.x
|
||||
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
|
||||
- name: Set up npm cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
${{ runner.os }}-node-v${{ env.NODE }}-
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Run lint
|
||||
run: npm run lint
|
||||
71
.gitignore
vendored
71
.gitignore
vendored
@@ -1,71 +1,12 @@
|
||||
# System / Log files
|
||||
*.DS_Store
|
||||
*.log
|
||||
|
||||
# Archives
|
||||
*.zip
|
||||
|
||||
# Sass Cache
|
||||
.sass-cache
|
||||
|
||||
# Project files
|
||||
.idea
|
||||
nbproject
|
||||
nbproject/private
|
||||
.vscode/
|
||||
.vs/
|
||||
|
||||
# Node / Bower
|
||||
node_modules/
|
||||
bower_components/
|
||||
|
||||
# Plugins
|
||||
/plugins/**/*.html
|
||||
/plugins/**/*.less
|
||||
/plugins/**/*.md
|
||||
/plugins/**/*.scss
|
||||
/plugins/**/*.ts
|
||||
/plugins/**/bower.json
|
||||
/plugins/**/package.json
|
||||
/plugins/**/webpack.config.js
|
||||
/plugins/**/demo/
|
||||
/plugins/**/demos/
|
||||
/plugins/**/dev/
|
||||
/plugins/**/example/
|
||||
/plugins/**/examples/
|
||||
/plugins/**/less/
|
||||
/plugins/**/test/
|
||||
/plugins/**/tests/
|
||||
/plugins/daterangepicker/website/
|
||||
/plugins/daterangepicker/drp.png
|
||||
/plugins/daterangepicker/moment.min.js
|
||||
/plugins/daterangepicker/package.js
|
||||
/plugins/daterangepicker/website.css
|
||||
/plugins/daterangepicker/website.js
|
||||
/plugins/jquery-ui/AUTHORS.txt
|
||||
/plugins/jquery-ui/external/jquery/jquery.js
|
||||
/plugins/inputmask/bindings/
|
||||
/plugins/flot/plugins/jquery*.js
|
||||
!/plugins/flot/plugins/jquery.flot.*.js
|
||||
!/plugins/**/LICENSE.md
|
||||
!/plugins/**/LICENSE.txt
|
||||
!/plugins/**/license.md
|
||||
!/plugins/**/license.txt
|
||||
!/plugins/**/LICENSE
|
||||
!/plugins/**/license
|
||||
!/plugins/**/COPYING
|
||||
|
||||
|
||||
# Docs
|
||||
/docs/_site/
|
||||
/docs/vendor/
|
||||
/docs/.bundle/
|
||||
/docs_html/
|
||||
.jekyll-cache/
|
||||
.jekyll-metadata
|
||||
|
||||
# ETC
|
||||
.sass-cache/
|
||||
/nbproject/
|
||||
/nbproject/private/
|
||||
/node_modules/
|
||||
/bower_components/
|
||||
ad.js
|
||||
TODO
|
||||
test.html
|
||||
ad.js
|
||||
/.cache/
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
tasks:
|
||||
- init: npm install
|
||||
command: npm run dev
|
||||
ports:
|
||||
- port: 3000
|
||||
onOpen: open-preview
|
||||
15
.lgtm.yml
15
.lgtm.yml
@@ -1,15 +0,0 @@
|
||||
# https://lgtm.com/help/lgtm/customizing-file-classification
|
||||
path_classifiers:
|
||||
plugins:
|
||||
- plugins/
|
||||
|
||||
extraction:
|
||||
javascript:
|
||||
# https://lgtm.com/help/lgtm/javascript-extraction#customizing-index
|
||||
# The `index` step extracts information from the files in the codebase.
|
||||
index:
|
||||
# Specify a list of files and folders to exclude from extraction.
|
||||
exclude:
|
||||
- bower_components/
|
||||
- docs/assets/js/plugins/
|
||||
- plugins/
|
||||
@@ -1,6 +1,3 @@
|
||||
/docs/
|
||||
/docs_html/
|
||||
/plugins/*
|
||||
!/plugins/flot-old/
|
||||
/.github/
|
||||
/.lgtm.yml
|
||||
bower_components/
|
||||
documentation/
|
||||
composer.json
|
||||
@@ -1,6 +0,0 @@
|
||||
**/*.html
|
||||
**/*.md
|
||||
**/*.min.css
|
||||
**/dist/
|
||||
**/docs_html/
|
||||
**/plugins/
|
||||
16
.stylelintrc
16
.stylelintrc
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"extends": [
|
||||
"stylelint-config-twbs-bootstrap"
|
||||
],
|
||||
"rules": {
|
||||
"declaration-no-important": null,
|
||||
"order/properties-order": null,
|
||||
"selector-max-class": null,
|
||||
"selector-max-combinators": null,
|
||||
"selector-max-compound-selectors": null,
|
||||
"selector-max-id": null,
|
||||
"selector-max-specificity": null,
|
||||
"selector-max-type": null,
|
||||
"selector-no-qualifying-type": null
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
- Using welcoming and inclusive language
|
||||
- Being respectful of differing viewpoints and experiences
|
||||
- Gracefully accepting constructive criticism
|
||||
- Focusing on what is best for the community
|
||||
- Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
- The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
- Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at https://colorlib.com/wp/contact-us/. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 1.4, available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct/>
|
||||
12
Dockerfile
12
Dockerfile
@@ -1,12 +0,0 @@
|
||||
FROM node:14
|
||||
|
||||
WORKDIR /code
|
||||
|
||||
COPY package.json /code/package.json
|
||||
COPY package-lock.json /code/package-lock.json
|
||||
|
||||
RUN npm install
|
||||
|
||||
COPY . /code
|
||||
|
||||
CMD ["npm", "run", "dev"]
|
||||
281
Gruntfile.js
Normal file
281
Gruntfile.js
Normal file
@@ -0,0 +1,281 @@
|
||||
// AdminLTE Gruntfile
|
||||
module.exports = function (grunt) { // jshint ignore:line
|
||||
|
||||
'use strict'
|
||||
|
||||
grunt.initConfig({
|
||||
pkg : grunt.file.readJSON('package.json'),
|
||||
watch : {
|
||||
less : {
|
||||
// Compiles less files upon saving
|
||||
files: ['build/less/*.less'],
|
||||
tasks: ['less:development', 'less:production']
|
||||
},
|
||||
js : {
|
||||
// Compile js files upon saving
|
||||
files: ['build/js/*.js', 'dist/js/app.js'],
|
||||
tasks: ['js']
|
||||
},
|
||||
skins: {
|
||||
// Compile any skin less files upon saving
|
||||
files: ['build/less/skins/*.less'],
|
||||
tasks: ['less:skins', 'less:minifiedSkins']
|
||||
}
|
||||
},
|
||||
notify: {
|
||||
less : {
|
||||
title : 'LESS Compiler',
|
||||
message: 'LESS finished running'
|
||||
},
|
||||
uglify: {
|
||||
options: {
|
||||
title : 'JS Compiler',
|
||||
message: 'JS bundler finished running'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 'less'-task configuration
|
||||
// This task will compile all less files upon saving to create both AdminLTE.css and AdminLTE.min.css
|
||||
less : {
|
||||
// Development not compressed
|
||||
development : {
|
||||
files: {
|
||||
// compilation.css : source.less
|
||||
'dist/css/AdminLTE.css' : 'build/less/AdminLTE.less',
|
||||
// AdminLTE without plugins
|
||||
'dist/css/alt/AdminLTE-without-plugins.css' : 'build/less/AdminLTE-without-plugins.less',
|
||||
// Separate plugins
|
||||
'dist/css/alt/AdminLTE-select2.css' : 'build/less/select2.less',
|
||||
'dist/css/alt/AdminLTE-fullcalendar.css' : 'build/less/fullcalendar.less',
|
||||
'dist/css/alt/AdminLTE-bootstrap-social.css': 'build/less/bootstrap-social.less'
|
||||
}
|
||||
},
|
||||
// Production compressed version
|
||||
production : {
|
||||
options: {
|
||||
compress: true
|
||||
},
|
||||
files : {
|
||||
// compilation.css : source.less
|
||||
'dist/css/AdminLTE.min.css' : 'build/less/AdminLTE.less',
|
||||
// AdminLTE without plugins
|
||||
'dist/css/alt/AdminLTE-without-plugins.min.css' : 'build/less/AdminLTE-without-plugins.less',
|
||||
// Separate plugins
|
||||
'dist/css/alt/AdminLTE-select2.min.css' : 'build/less/select2.less',
|
||||
'dist/css/alt/AdminLTE-fullcalendar.min.css' : 'build/less/fullcalendar.less',
|
||||
'dist/css/alt/AdminLTE-bootstrap-social.min.css': 'build/less/bootstrap-social.less'
|
||||
}
|
||||
},
|
||||
// Non minified skin files
|
||||
skins : {
|
||||
files: {
|
||||
'dist/css/skins/skin-blue.css' : 'build/less/skins/skin-blue.less',
|
||||
'dist/css/skins/skin-black.css' : 'build/less/skins/skin-black.less',
|
||||
'dist/css/skins/skin-yellow.css' : 'build/less/skins/skin-yellow.less',
|
||||
'dist/css/skins/skin-green.css' : 'build/less/skins/skin-green.less',
|
||||
'dist/css/skins/skin-red.css' : 'build/less/skins/skin-red.less',
|
||||
'dist/css/skins/skin-purple.css' : 'build/less/skins/skin-purple.less',
|
||||
'dist/css/skins/skin-blue-light.css' : 'build/less/skins/skin-blue-light.less',
|
||||
'dist/css/skins/skin-black-light.css' : 'build/less/skins/skin-black-light.less',
|
||||
'dist/css/skins/skin-yellow-light.css': 'build/less/skins/skin-yellow-light.less',
|
||||
'dist/css/skins/skin-green-light.css' : 'build/less/skins/skin-green-light.less',
|
||||
'dist/css/skins/skin-red-light.css' : 'build/less/skins/skin-red-light.less',
|
||||
'dist/css/skins/skin-purple-light.css': 'build/less/skins/skin-purple-light.less',
|
||||
'dist/css/skins/_all-skins.css' : 'build/less/skins/_all-skins.less'
|
||||
}
|
||||
},
|
||||
// Skins minified
|
||||
minifiedSkins: {
|
||||
options: {
|
||||
compress: true
|
||||
},
|
||||
files : {
|
||||
'dist/css/skins/skin-blue.min.css' : 'build/less/skins/skin-blue.less',
|
||||
'dist/css/skins/skin-black.min.css' : 'build/less/skins/skin-black.less',
|
||||
'dist/css/skins/skin-yellow.min.css' : 'build/less/skins/skin-yellow.less',
|
||||
'dist/css/skins/skin-green.min.css' : 'build/less/skins/skin-green.less',
|
||||
'dist/css/skins/skin-red.min.css' : 'build/less/skins/skin-red.less',
|
||||
'dist/css/skins/skin-purple.min.css' : 'build/less/skins/skin-purple.less',
|
||||
'dist/css/skins/skin-blue-light.min.css' : 'build/less/skins/skin-blue-light.less',
|
||||
'dist/css/skins/skin-black-light.min.css' : 'build/less/skins/skin-black-light.less',
|
||||
'dist/css/skins/skin-yellow-light.min.css': 'build/less/skins/skin-yellow-light.less',
|
||||
'dist/css/skins/skin-green-light.min.css' : 'build/less/skins/skin-green-light.less',
|
||||
'dist/css/skins/skin-red-light.min.css' : 'build/less/skins/skin-red-light.less',
|
||||
'dist/css/skins/skin-purple-light.min.css': 'build/less/skins/skin-purple-light.less',
|
||||
'dist/css/skins/_all-skins.min.css' : 'build/less/skins/_all-skins.less'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Uglify task info. Compress the js files.
|
||||
uglify: {
|
||||
options : {
|
||||
mangle : true,
|
||||
preserveComments: 'some'
|
||||
},
|
||||
production: {
|
||||
files: {
|
||||
'dist/js/app.min.js' : ['dist/js/app.js'],
|
||||
'dist/js/adminlte.min.js': ['dist/js/adminlte.js']
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Concatenate JS Files
|
||||
concat: {
|
||||
options: {
|
||||
separator: '\n\n',
|
||||
banner : '/*! AdminLTE app.js\n'
|
||||
+ '* ================\n'
|
||||
+ '* Main JS application file for AdminLTE v2. This file\n'
|
||||
+ '* should be included in all pages. It controls some layout\n'
|
||||
+ '* options and implements exclusive AdminLTE plugins.\n'
|
||||
+ '*\n'
|
||||
+ '* @Author Almsaeed Studio\n'
|
||||
+ '* @Support <https://www.almsaeedstudio.com>\n'
|
||||
+ '* @Email <abdullah@almsaeedstudio.com>\n'
|
||||
+ '* @version <%= pkg.version %>\n'
|
||||
+ '* @repository <%= pkg.repository.url %>\n'
|
||||
+ '* @license MIT <http://opensource.org/licenses/MIT>\n'
|
||||
+ '*/\n\n'
|
||||
+ '// Make sure jQuery has been loaded\n'
|
||||
+ 'if (typeof jQuery === \'undefined\') {\n'
|
||||
+ 'throw new Error(\'AdminLTE requires jQuery\')\n'
|
||||
+ '}\n\n'
|
||||
},
|
||||
dist : {
|
||||
src : [
|
||||
'build/js/Layout.js',
|
||||
'build/js/PushMenu.js',
|
||||
'build/js/Tree.js',
|
||||
'build/js/ControlSidebar.js',
|
||||
'build/js/BoxWidget.js',
|
||||
'build/js/TodoList.js',
|
||||
'build/js/DirectChat.js'
|
||||
],
|
||||
dest: 'dist/js/adminlte.js'
|
||||
}
|
||||
},
|
||||
|
||||
// Build the documentation files
|
||||
includes: {
|
||||
build: {
|
||||
src : ['*.html'], // Source files
|
||||
dest : 'documentation/', // Destination directory
|
||||
flatten: true,
|
||||
cwd : 'documentation/build',
|
||||
options: {
|
||||
silent : true,
|
||||
includePath: 'documentation/build/include'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Optimize images
|
||||
image: {
|
||||
dynamic: {
|
||||
files: [
|
||||
{
|
||||
expand: true,
|
||||
cwd : 'build/img/',
|
||||
src : ['**/*.{png,jpg,gif,svg,jpeg}'],
|
||||
dest : 'dist/img/'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
// Validate JS code
|
||||
jshint: {
|
||||
options: {
|
||||
jshintrc: 'build/js/.jshintrc'
|
||||
},
|
||||
grunt : {
|
||||
options: {
|
||||
jshintrc: 'build/grunt/.jshintrc'
|
||||
},
|
||||
src : 'Gruntfile.js'
|
||||
},
|
||||
core : {
|
||||
src: 'build/js/*.js'
|
||||
},
|
||||
demo : {
|
||||
src: 'dist/js/demo.js'
|
||||
},
|
||||
pages : {
|
||||
src: 'dist/js/pages/*.js'
|
||||
}
|
||||
},
|
||||
|
||||
jscs: {
|
||||
options: {
|
||||
config: 'build/js/.jscsrc'
|
||||
},
|
||||
core : {
|
||||
src: '<%= jshint.core.src %>'
|
||||
},
|
||||
pages : {
|
||||
src: '<%= jshint.pages.src %>'
|
||||
}
|
||||
},
|
||||
|
||||
// Validate CSS files
|
||||
csslint: {
|
||||
options: {
|
||||
csslintrc: 'build/less/.csslintrc'
|
||||
},
|
||||
dist : [
|
||||
'dist/css/AdminLTE.css'
|
||||
]
|
||||
},
|
||||
|
||||
// Validate Bootstrap HTML
|
||||
bootlint: {
|
||||
options: {
|
||||
relaxerror: ['W005']
|
||||
},
|
||||
files : ['pages/**/*.html', '*.html']
|
||||
},
|
||||
|
||||
// Delete images in build directory
|
||||
// After compressing the images in the build/img dir, there is no need
|
||||
// for them
|
||||
clean: {
|
||||
build: ['build/img/*']
|
||||
}
|
||||
})
|
||||
|
||||
// Load all grunt tasks
|
||||
|
||||
// LESS Compiler
|
||||
grunt.loadNpmTasks('grunt-contrib-less')
|
||||
// Watch File Changes
|
||||
grunt.loadNpmTasks('grunt-contrib-watch')
|
||||
// Compress JS Files
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify')
|
||||
// Include Files Within HTML
|
||||
grunt.loadNpmTasks('grunt-includes')
|
||||
// Optimize images
|
||||
grunt.loadNpmTasks('grunt-image')
|
||||
// Validate JS code
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint')
|
||||
grunt.loadNpmTasks('grunt-jscs')
|
||||
// Delete not needed files
|
||||
grunt.loadNpmTasks('grunt-contrib-clean')
|
||||
// Lint CSS
|
||||
grunt.loadNpmTasks('grunt-contrib-csslint')
|
||||
// Lint Bootstrap
|
||||
grunt.loadNpmTasks('grunt-bootlint')
|
||||
// Concatenate JS files
|
||||
grunt.loadNpmTasks('grunt-contrib-concat')
|
||||
// Notify
|
||||
grunt.loadNpmTasks('grunt-notify')
|
||||
|
||||
// Linting task
|
||||
grunt.registerTask('lint', ['jshint', 'csslint', 'bootlint'])
|
||||
// JS task
|
||||
grunt.registerTask('js', ['concat', 'uglify'])
|
||||
|
||||
// The default task (running 'grunt' in console) is 'watch'
|
||||
grunt.registerTask('default', ['watch'])
|
||||
}
|
||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2021 ColorlibHQ
|
||||
Copyright (c) 2014-2017 Abdullah Almsaeed
|
||||
|
||||
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
|
||||
|
||||
126
README.md
126
README.md
@@ -1,105 +1,57 @@
|
||||
# [AdminLTE - Bootstrap 4 Admin Dashboard](https://adminlte.io)
|
||||
Introduction
|
||||
============
|
||||
|
||||
[](https://www.npmjs.com/package/admin-lte)
|
||||

|
||||
[](https://www.npmjs.com/package/admin-lte)
|
||||
[](https://packagist.org/packages/almasaeed2010/adminlte)
|
||||
[](https://www.jsdelivr.com/package/npm/admin-lte)
|
||||
[](https://gitpod.io/from-referrer/)
|
||||
[](https://open.vscode.dev/ColorlibHQ/AdminLTE)
|
||||
[](https://discord.gg/jfdvjwFqfz)
|
||||
[](https://cdnjs.com/libraries/admin-lte)
|
||||
|
||||
**AdminLTE** is a fully responsive administration template. Based on **[Bootstrap 4.6](https://getbootstrap.com/)** framework and also the JS/jQuery plugin.
|
||||
Highly customizable and easy to use. Fits many screen resolutions from small mobile devices to large desktops.
|
||||
**AdminLTE** -- is a fully responsive admin template. Based on **[Bootstrap 3](https://github.com/twbs/bootstrap)** framework. Highly customizable and easy to use. Fits many screen resolutions from small mobile devices to large desktops. Check out the live preview now and see for yourself.
|
||||
|
||||
**Preview on [AdminLTE.io](https://adminlte.io/themes/v3)**
|
||||
**Download & Preview on [AdminLTE.IO](https://adminlte.io)**
|
||||
|
||||
## Looking for Premium Templates?
|
||||
### Looking for Premium Templates?
|
||||
**AdminLTE.IO just opened a new premium templates website. Hand picked to ensure the best quality and the most affordable prices. Visit https://themequarry.com for more information.**
|
||||
|
||||
AdminLTE.io just opened a new premium templates page. Hand picked to ensure the best quality and the most affordable
|
||||
prices. Visit <https://adminlte.io/premium> for more information.
|
||||
## Documentation & Installation Guide
|
||||
Visit the [online documentation](https://adminlte.io/docs) for the most
|
||||
updated guide.
|
||||
|
||||

|
||||

|
||||
|
||||
**AdminLTE** has been carefully coded with clear comments in all of its JS, SCSS and HTML files.
|
||||
SCSS has been used to increase code customizability.
|
||||
### Contribution
|
||||
Contribution are always **welcome and recommended**! Here is how:
|
||||
|
||||
## Quick start
|
||||
There are multiple ways to install AdminLTE.
|
||||
- Fork the repository ([here is the guide](https://help.github.com/articles/fork-a-repo/)).
|
||||
- Clone to your machine ```git clone https://github.com/YOUR_USERNAME/AdminLTE.git```
|
||||
- Make your changes
|
||||
- Create a pull request
|
||||
|
||||
### Download & Changelog:
|
||||
Always Recommended to download from GitHub latest release [AdminLTE 3](https://github.com/ColorlibHQ/AdminLTE/releases/latest) for bug free and latest features.\
|
||||
Visit the [releases](https://github.com/ColorlibHQ/AdminLTE/releases) page to view the changelog.\
|
||||
Legacy Releases are [AdminLTE 2](https://github.com/ColorlibHQ/AdminLTE/releases/tag/v2.4.18) / [AdminLTE 1](https://github.com/ColorlibHQ/AdminLTE/releases/tag/1.3.1).
|
||||
#### Contribution Requirements:
|
||||
|
||||
## Stable release
|
||||
### Grab from [jsdelivr](https://www.jsdelivr.com/package/npm/admin-lte) CDN:
|
||||
_**Important Note**: You needed to add separately cdn links for plugins in your project._
|
||||
```html
|
||||
<script src="https://cdn.jsdelivr.net/npm/admin-lte@3.2/dist/js/adminlte.min.js"></script>
|
||||
```
|
||||
```html
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/admin-lte@3.2/dist/css/adminlte.min.css">
|
||||
```
|
||||
### Using The Command Line:
|
||||
_**Important Note**: To install it via npm/Yarn, you need at least Node.js 14 or higher._
|
||||
#### Via npm
|
||||
```bash
|
||||
npm install admin-lte@^3.2 --save
|
||||
```
|
||||
#### Via Yarn
|
||||
```bash
|
||||
yarn add admin-lte@^3.2
|
||||
```
|
||||
#### Via Composer
|
||||
```bash
|
||||
composer require "almasaeed2010/adminlte=~3.2"
|
||||
```
|
||||
#### Via Git
|
||||
```bash
|
||||
git clone https://github.com/ColorlibHQ/AdminLTE.git
|
||||
```
|
||||
- When you contribute, you agree to give a non-exclusive license to AdminLTE.IO to use that contribution in any context as we (AdminLTE.IO) see appropriate.
|
||||
- If you use content provided by another party, it must be appropriately licensed using an [open source](http://opensource.org/licenses) license.
|
||||
- Contributions are only accepted through Github pull requests.
|
||||
- Finally, contributed code must work in all supported browsers (see above for browser support).
|
||||
|
||||
## Documentation
|
||||
### License
|
||||
AdminLTE is an open source project by [AdminLTE.IO](https://adminlte.io) that is licensed under [MIT](http://opensource.org/licenses/MIT). AdminLTE.IO
|
||||
reserves the right to change the license of future releases. Wondering what you can or can't do? View the [license guide](https://adminlte.io/docs/license).
|
||||
|
||||
Visit the [online documentation](https://adminlte.io/docs/3.2/) for the most
|
||||
updated guide. Information will be added on a weekly basis.
|
||||
### Legacy Releases
|
||||
AdminLTE 1.x can be easily upgraded to 2.x using [this guide](https://adminlte.io/themes/AdminLTE/documentation/index.html#upgrade), but if you intend to keep using AdminLTE 1.x, you can download the latest release from the [releases](https://github.com/almasaeed2010/AdminLTE/releases) section above.
|
||||
|
||||
## Browsers support
|
||||
|
||||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari-ios/safari-ios_48x48.png" alt="iOS Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>iOS Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/samsung-internet/samsung-internet_48x48.png" alt="Samsung" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Samsung | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Opera | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/vivaldi/vivaldi_48x48.png" alt="Vivaldi" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Vivaldi | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png" alt="Electron" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Electron |
|
||||
| --------- | --------- | --------- | --------- | --------- | --------- | --------- | --------- | --------- |
|
||||
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions| last 2 versions| last 2 versions| last 2 versions| last 2 versions| last 2 versions
|
||||
|
||||
## Light Mode (Only Dark Mode Removed)
|
||||
You can use light-mode-only version, if you are not using dark mode and also file size less without dark-mode.
|
||||
|
||||
File Location `./dist/css/alt/adminlte.light.css`
|
||||
|
||||
|
||||
## Compile dist files
|
||||
|
||||
To compile the dist files you need Node.js/npm, clone/download the repo then:
|
||||
|
||||
1. `npm install` (install npm deps)
|
||||
2. _Optional:_ `npm run dev` (developer mode, autocompile with browsersync support for live demo)
|
||||
3. `npm run production` (compile css/js files)
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
Please read through our [contributing guidelines](https://github.com/ColorlibHQ/AdminLTE/tree/master/.github/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
|
||||
|
||||
Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/main/.editorconfig) for easy use in common text editors. Read more and download plugins at <https://editorconfig.org/>.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
AdminLTE is an open source project by [AdminLTE.io](https://adminlte.io) that is licensed under [MIT](https://opensource.org/licenses/MIT).
|
||||
AdminLTE.io reserves the right to change the license of future releases.
|
||||
|
||||
## Image Credits
|
||||
### Change log
|
||||
**For the most recent change log, visit the [releases page](https://github.com/almasaeed2010/AdminLTE/releases) or the [changelog file](https://github.com/almasaeed2010/AdminLTE/blob/master/changelog.md).** We will add a detailed release notes to each new release.
|
||||
|
||||
### Image Credits
|
||||
- [Pixeden](http://www.pixeden.com/psd-web-elements/flat-responsive-showcase-psd)
|
||||
- [Graphicsfuel](https://www.graphicsfuel.com/2013/02/13-high-resolution-blur-backgrounds/)
|
||||
- [Pickaface](https://pickaface.net/)
|
||||
- [Graphicsfuel](http://www.graphicsfuel.com/2013/02/13-high-resolution-blur-backgrounds/)
|
||||
- [Pickaface](http://pickaface.net/)
|
||||
- [Unsplash](https://unsplash.com/)
|
||||
- [Uifaces](http://uifaces.com/)
|
||||
|
||||
### Donations
|
||||
Donations are **greatly appreciated!**
|
||||
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=629XCUSXBHCBC "Donate")
|
||||
|
||||
61
bower.json
Normal file
61
bower.json
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"name": "admin-lte",
|
||||
"homepage": "https://adminlte.io",
|
||||
"authors": [
|
||||
"Abdullah Almsaeed <abdullah@almsaeedstudio.com>"
|
||||
],
|
||||
"description": "Admin dashboard and control panel template",
|
||||
"main": [
|
||||
"index2.html",
|
||||
"dist/css/AdminLTE.css",
|
||||
"dist/js/app.js",
|
||||
"build/less/AdminLTE.less"
|
||||
],
|
||||
"keywords": [
|
||||
"css",
|
||||
"js",
|
||||
"html",
|
||||
"template",
|
||||
"admin",
|
||||
"bootstrap",
|
||||
"theme",
|
||||
"backend",
|
||||
"responsive"
|
||||
],
|
||||
"license": "MIT",
|
||||
"ignore": [
|
||||
"/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"composer.json",
|
||||
"documentation"
|
||||
],
|
||||
"dependencies": {
|
||||
"bootstrap-slider": "*",
|
||||
"chart.js": "^1.0.*",
|
||||
"ckeditor": "^4.7.0",
|
||||
"bootstrap-colorpicker": "^2.5.1",
|
||||
"bootstrap": "^3.3.7",
|
||||
"jquery": "^3.2.1",
|
||||
"datatables.net": "^1.10.15",
|
||||
"datatables.net-bs": "^2.1.1",
|
||||
"bootstrap-datepicker": "^1.7.0",
|
||||
"bootstrap-daterangepicker": "^2.1.25",
|
||||
"moment": "^2.18.1",
|
||||
"fastclick": "^1.0.6",
|
||||
"Flot": "flot#^0.8.3",
|
||||
"fullcalendar": "^3.4.0",
|
||||
"inputmask": "jquery.inputmask#^3.3.7",
|
||||
"ion.rangeSlider": "ionrangeslider#^2.2.0",
|
||||
"jvectormap": "^2.0.4",
|
||||
"jquery-knob": "^1.2.13",
|
||||
"morris.js": "^0.5.1",
|
||||
"PACE": "pace#^1.0.2",
|
||||
"select2": "^4.0.3",
|
||||
"jquery-slimscroll": "slimscroll#^1.3.8",
|
||||
"bootstrap-timepicker": "^0.5.2",
|
||||
"jquery-sparkline": "^2.1.3",
|
||||
"font-awesome": "^4.7.0",
|
||||
"Ionicons": "ionicons#^2.0.1"
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": false,
|
||||
"node": true
|
||||
},
|
||||
"parserOptions": {
|
||||
"sourceType": "script"
|
||||
},
|
||||
"extends": "../../.eslintrc.json",
|
||||
"rules": {
|
||||
"no-console": "off",
|
||||
"strict": "error",
|
||||
"unicorn/prefer-module": "off"
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = {
|
||||
map: {
|
||||
inline: false,
|
||||
annotation: true,
|
||||
sourcesContent: true
|
||||
},
|
||||
plugins: [
|
||||
require('autoprefixer')({
|
||||
cascade: false
|
||||
})
|
||||
]
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
'use strict'
|
||||
|
||||
const { babel } = require('@rollup/plugin-babel')
|
||||
|
||||
const pkg = require('../../package')
|
||||
const year = new Date().getFullYear()
|
||||
const banner = `/*!
|
||||
* AdminLTE v${pkg.version} (${pkg.homepage})
|
||||
* Copyright 2014-${year} ${pkg.author}
|
||||
* Licensed under MIT (https://github.com/ColorlibHQ/AdminLTE/blob/master/LICENSE)
|
||||
*/`
|
||||
|
||||
module.exports = {
|
||||
input: 'build/js/AdminLTE.js',
|
||||
output: {
|
||||
banner,
|
||||
file: 'dist/js/adminlte.js',
|
||||
format: 'umd',
|
||||
globals: {
|
||||
jquery: 'jQuery'
|
||||
},
|
||||
name: 'adminlte'
|
||||
},
|
||||
external: ['jquery'],
|
||||
plugins: [
|
||||
babel({
|
||||
exclude: 'node_modules/**',
|
||||
// Include the helpers in the bundle, at most one copy of each
|
||||
babelHelpers: 'bundled'
|
||||
})
|
||||
]
|
||||
}
|
||||
7
build/grunt/.jshintrc
Normal file
7
build/grunt/.jshintrc
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"extends" : "../js/.jshintrc",
|
||||
"asi" : false,
|
||||
"browser" : false,
|
||||
"es3" : false,
|
||||
"node" : true
|
||||
}
|
||||
42
build/js/.jscsrc
Normal file
42
build/js/.jscsrc
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"disallowEmptyBlocks": true,
|
||||
"disallowKeywords": ["with"],
|
||||
"disallowMixedSpacesAndTabs": true,
|
||||
"disallowMultipleLineStrings": true,
|
||||
"disallowMultipleVarDecl": true,
|
||||
"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 },
|
||||
"requireSpacesInConditionalExpression": true,
|
||||
"requireSpacesInForStatement": true,
|
||||
"requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
|
||||
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
|
||||
"requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
|
||||
"requireSpacesInsideObjectBrackets": "allButNested",
|
||||
"validateAlignedFunctionParameters": true,
|
||||
"validateIndentation": 2,
|
||||
"validateLineBreaks": "LF",
|
||||
"validateNewlineAfterArrayElements": true,
|
||||
"validateQuoteMarks": "'",
|
||||
"maxErrors": "3000"
|
||||
}
|
||||
17
build/js/.jshintrc
Normal file
17
build/js/.jshintrc
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"asi" : true,
|
||||
"browser" : true,
|
||||
"eqeqeq" : false,
|
||||
"eqnull" : true,
|
||||
"es3" : true,
|
||||
"expr" : true,
|
||||
"jquery" : true,
|
||||
"latedef" : true,
|
||||
"laxbreak" : true,
|
||||
"nonbsp" : true,
|
||||
"strict" : true,
|
||||
"undef" : true,
|
||||
"unused" : true,
|
||||
// External variabls and plugins
|
||||
"predef": [ "AdminLTEOptions", "FastClick", "moment", "Morris", "Chart" ]
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
import CardRefresh from './CardRefresh'
|
||||
import CardWidget from './CardWidget'
|
||||
import ControlSidebar from './ControlSidebar'
|
||||
import DirectChat from './DirectChat'
|
||||
import Dropdown from './Dropdown'
|
||||
import ExpandableTable from './ExpandableTable'
|
||||
import Fullscreen from './Fullscreen'
|
||||
import IFrame from './IFrame'
|
||||
import Layout from './Layout'
|
||||
import PushMenu from './PushMenu'
|
||||
import SidebarSearch from './SidebarSearch'
|
||||
import NavbarSearch from './NavbarSearch'
|
||||
import Toasts from './Toasts'
|
||||
import TodoList from './TodoList'
|
||||
import Treeview from './Treeview'
|
||||
|
||||
export {
|
||||
CardRefresh,
|
||||
CardWidget,
|
||||
ControlSidebar,
|
||||
DirectChat,
|
||||
Dropdown,
|
||||
ExpandableTable,
|
||||
Fullscreen,
|
||||
IFrame,
|
||||
Layout,
|
||||
PushMenu,
|
||||
SidebarSearch,
|
||||
NavbarSearch,
|
||||
Toasts,
|
||||
TodoList,
|
||||
Treeview
|
||||
}
|
||||
119
build/js/BoxRefresh.js
Normal file
119
build/js/BoxRefresh.js
Normal file
@@ -0,0 +1,119 @@
|
||||
/* BoxRefresh()
|
||||
* =========
|
||||
* Adds AJAX content control to a box.
|
||||
*
|
||||
* @Usage: $('#my-box').boxRefresh(options)
|
||||
* or add [data-widget="box-refresh"] to the box element
|
||||
* Pass any option as data-option="value"
|
||||
*/
|
||||
+function ($) {
|
||||
'use strict'
|
||||
|
||||
var DataKey = 'lte.boxrefresh'
|
||||
|
||||
var Default = {
|
||||
source : '',
|
||||
params : {},
|
||||
trigger : '.refresh-btn',
|
||||
content : '.box-body',
|
||||
loadInContent : true,
|
||||
responseType : '',
|
||||
overlayTemplate: '<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>',
|
||||
onLoadStart : function () {
|
||||
},
|
||||
onLoadDone : function (response) {
|
||||
return response
|
||||
}
|
||||
}
|
||||
|
||||
var Selector = {
|
||||
data: '[data-widget="box-refresh"]'
|
||||
}
|
||||
|
||||
// BoxRefresh Class Definition
|
||||
// =========================
|
||||
var BoxRefresh = function (element, options) {
|
||||
this.element = element
|
||||
this.options = options
|
||||
this.$overlay = $(options.overlay)
|
||||
|
||||
if (options.source === '') {
|
||||
throw new Error('Source url was not defined. Please specify a url in your BoxRefresh source option.')
|
||||
}
|
||||
|
||||
this._setUpListeners()
|
||||
this.load()
|
||||
}
|
||||
|
||||
BoxRefresh.prototype.load = function () {
|
||||
this._addOverlay()
|
||||
this.options.onLoadStart.call($(this))
|
||||
|
||||
$.get(this.options.source, this.options.params, function (response) {
|
||||
if (this.options.loadInContent) {
|
||||
$(this.options.content).html(response)
|
||||
}
|
||||
this.options.onLoadDone.call($(this), response)
|
||||
this._removeOverlay()
|
||||
}.bind(this), this.options.responseType !== '' && this.options.responseType)
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
BoxRefresh.prototype._setUpListeners = function () {
|
||||
$(this.element).on('click', Selector.trigger, function (event) {
|
||||
if (event) event.preventDefault()
|
||||
this.load()
|
||||
}.bind(this))
|
||||
}
|
||||
|
||||
BoxRefresh.prototype._addOverlay = function () {
|
||||
$(this.element).append(this.$overlay)
|
||||
}
|
||||
|
||||
BoxRefresh.prototype._removeOverlay = function () {
|
||||
$(this.element).remove(this.$overlay)
|
||||
}
|
||||
|
||||
// Plugin Definition
|
||||
// =================
|
||||
function Plugin(option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
var data = $this.data(DataKey)
|
||||
|
||||
if (!data) {
|
||||
var options = $.extend({}, Default, $this.data(), typeof option == 'object' && option)
|
||||
$this.data(DataKey, (data = new BoxRefresh($this, options)))
|
||||
}
|
||||
|
||||
if (typeof data == 'string') {
|
||||
if (typeof data[option] == 'undefined') {
|
||||
throw new Error('No method named ' + option)
|
||||
}
|
||||
data[option]()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
var old = $.fn.boxRefresh
|
||||
|
||||
$.fn.boxRefresh = Plugin
|
||||
$.fn.boxRefresh.Constructor = BoxRefresh
|
||||
|
||||
// No Conflict Mode
|
||||
// ================
|
||||
$.fn.boxRefresh.noConflict = function () {
|
||||
$.fn.boxRefresh = old
|
||||
return this
|
||||
}
|
||||
|
||||
// BoxRefresh Data API
|
||||
// =================
|
||||
$(window).on('load', function () {
|
||||
$(Selector.data).each(function () {
|
||||
Plugin.call($(this))
|
||||
})
|
||||
})
|
||||
|
||||
}(jQuery)
|
||||
161
build/js/BoxWidget.js
Normal file
161
build/js/BoxWidget.js
Normal file
@@ -0,0 +1,161 @@
|
||||
/* BoxWidget()
|
||||
* ======
|
||||
* Adds box widget functions to boxes.
|
||||
*
|
||||
* @Usage: $('.my-box').boxWidget(options)
|
||||
* or add [data-widget="box-widget"] to the ul element
|
||||
* Pass any option as data-option="value"
|
||||
*/
|
||||
+function ($) {
|
||||
'use strict'
|
||||
|
||||
var DataKey = 'lte.boxwidget'
|
||||
|
||||
var Default = {
|
||||
animationSpeed : 500,
|
||||
collapseTrigger: '[data-widget="collapse"]',
|
||||
removeTrigger : '[data-widget="remove"]',
|
||||
collapseIcon : 'fa-minus',
|
||||
expandIcon : 'fa-plus',
|
||||
removeIcon : 'fa-times'
|
||||
}
|
||||
|
||||
var Selector = {
|
||||
data : '.box',
|
||||
collapsed: '.collapsed-box',
|
||||
body : '.box-body',
|
||||
footer : '.box-footer',
|
||||
tools : '.box-tools'
|
||||
}
|
||||
|
||||
var ClassName = {
|
||||
collapsed: 'collapsed-box'
|
||||
}
|
||||
|
||||
var Event = {
|
||||
collapsed: 'collapsed.boxwidget',
|
||||
expanded : 'expanded.boxwidget',
|
||||
removed : 'removed.boxwidget'
|
||||
}
|
||||
|
||||
// BoxWidget Class Definition
|
||||
// =====================
|
||||
var BoxWidget = function (element, options) {
|
||||
this.element = element
|
||||
this.options = options
|
||||
|
||||
this._setUpListeners()
|
||||
}
|
||||
|
||||
BoxWidget.prototype.toggle = function () {
|
||||
var isOpen = !$(this.element).is(Selector.collapsed)
|
||||
|
||||
if (isOpen) {
|
||||
this.collapse()
|
||||
} else {
|
||||
this.expand()
|
||||
}
|
||||
}
|
||||
|
||||
BoxWidget.prototype.expand = function () {
|
||||
var expandedEvent = $.Event(Event.expanded)
|
||||
var collapseIcon = this.options.collapseIcon
|
||||
var expandIcon = this.options.expandIcon
|
||||
|
||||
$(this.element).removeClass(ClassName.collapsed)
|
||||
|
||||
$(Selector.tools)
|
||||
.find('.' + expandIcon)
|
||||
.removeClass(expandIcon)
|
||||
.addClass(collapseIcon)
|
||||
|
||||
$(this.element).find(Selector.body + ', ' + Selector.footer)
|
||||
.slideDown(this.options.animationSpeed, function () {
|
||||
$(this.element).trigger(expandedEvent)
|
||||
}.bind(this))
|
||||
}
|
||||
|
||||
BoxWidget.prototype.collapse = function () {
|
||||
var collapsedEvent = $.Event(Event.collapsed)
|
||||
var collapseIcon = this.options.collapseIcon
|
||||
var expandIcon = this.options.expandIcon
|
||||
|
||||
$(Selector.tools)
|
||||
.find('.' + collapseIcon)
|
||||
.removeClass(collapseIcon)
|
||||
.addClass(expandIcon)
|
||||
|
||||
$(this.element).find(Selector.body + ', ' + Selector.footer)
|
||||
.slideUp(this.options.animationSpeed, function () {
|
||||
$(this.element).addClass(ClassName.collapsed)
|
||||
$(this.element).trigger(collapsedEvent)
|
||||
}.bind(this))
|
||||
}
|
||||
|
||||
BoxWidget.prototype.remove = function () {
|
||||
var removedEvent = $.Event(Event.removed)
|
||||
|
||||
$(this.element).slideUp(this.options.animationSpeed, function () {
|
||||
$(this.element).trigger(removedEvent)
|
||||
$(this.element).remove()
|
||||
}.bind(this))
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
BoxWidget.prototype._setUpListeners = function () {
|
||||
var that = this
|
||||
|
||||
$(this.element).on('click', this.options.collapseTrigger, function (event) {
|
||||
if (event) event.preventDefault()
|
||||
that.toggle($(this))
|
||||
})
|
||||
|
||||
$(this.element).on('click', this.options.removeTrigger, function (event) {
|
||||
if (event) event.preventDefault()
|
||||
that.remove($(this))
|
||||
})
|
||||
}
|
||||
|
||||
// Plugin Definition
|
||||
// =================
|
||||
function Plugin(option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
var data = $this.data(DataKey)
|
||||
|
||||
if (!data) {
|
||||
var options = $.extend({}, Default, $this.data(), typeof option == 'object' && option)
|
||||
$this.data(DataKey, (data = new BoxWidget($this, options)))
|
||||
}
|
||||
|
||||
if (typeof option == 'string') {
|
||||
if (typeof data[option] == 'undefined') {
|
||||
throw new Error('No method named ' + option)
|
||||
}
|
||||
data[option]()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
var old = $.fn.boxWidget
|
||||
|
||||
$.fn.boxWidget = Plugin
|
||||
$.fn.boxWidget.Constructor = BoxWidget
|
||||
|
||||
// No Conflict Mode
|
||||
// ================
|
||||
$.fn.boxWidget.noConflict = function () {
|
||||
$.fn.boxWidget = old
|
||||
return this
|
||||
}
|
||||
|
||||
// BoxWidget Data API
|
||||
// ==================
|
||||
$(window).on('load', function () {
|
||||
$(Selector.data).each(function () {
|
||||
Plugin.call($(this))
|
||||
})
|
||||
})
|
||||
|
||||
}(jQuery)
|
||||
@@ -1,170 +0,0 @@
|
||||
/**
|
||||
* --------------------------------------------
|
||||
* AdminLTE CardRefresh.js
|
||||
* License MIT
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
|
||||
/**
|
||||
* 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}`
|
||||
const EVENT_OVERLAY_ADDED = `overlay.added${EVENT_KEY}`
|
||||
const EVENT_OVERLAY_REMOVED = `overlay.removed${EVENT_KEY}`
|
||||
|
||||
const CLASS_NAME_CARD = 'card'
|
||||
|
||||
const SELECTOR_CARD = `.${CLASS_NAME_CARD}`
|
||||
const SELECTOR_DATA_REFRESH = '[data-card-widget="card-refresh"]'
|
||||
|
||||
const Default = {
|
||||
source: '',
|
||||
sourceSelector: '',
|
||||
params: {},
|
||||
trigger: SELECTOR_DATA_REFRESH,
|
||||
content: '.card-body',
|
||||
loadInContent: true,
|
||||
loadOnInit: true,
|
||||
loadErrorTemplate: true,
|
||||
responseType: '',
|
||||
overlayTemplate: '<div class="overlay"><i class="fas fa-2x fa-sync-alt fa-spin"></i></div>',
|
||||
errorTemplate: '<span class="text-danger"></span>',
|
||||
onLoadStart() {},
|
||||
onLoadDone(response) {
|
||||
return response
|
||||
},
|
||||
onLoadFail(_jqXHR, _textStatus, _errorThrown) {}
|
||||
}
|
||||
|
||||
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(CLASS_NAME_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, 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()
|
||||
}, this._settings.responseType !== '' && this._settings.responseType)
|
||||
.fail((jqXHR, textStatus, errorThrown) => {
|
||||
this._removeOverlay()
|
||||
|
||||
if (this._settings.loadErrorTemplate) {
|
||||
const msg = $(this._settings.errorTemplate).text(errorThrown)
|
||||
this._parent.find(this._settings.content).empty().append(msg)
|
||||
}
|
||||
|
||||
this._settings.onLoadFail.call($(this), jqXHR, textStatus, errorThrown)
|
||||
})
|
||||
|
||||
$(this._element).trigger($.Event(EVENT_LOADED))
|
||||
}
|
||||
|
||||
_addOverlay() {
|
||||
this._parent.append(this._overlay)
|
||||
$(this._element).trigger($.Event(EVENT_OVERLAY_ADDED))
|
||||
}
|
||||
|
||||
_removeOverlay() {
|
||||
this._parent.find(this._overlay).remove()
|
||||
$(this._element).trigger($.Event(EVENT_OVERLAY_REMOVED))
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_init() {
|
||||
$(this).find(this._settings.trigger).on('click', () => {
|
||||
this.load()
|
||||
})
|
||||
|
||||
if (this._settings.loadOnInit) {
|
||||
this.load()
|
||||
}
|
||||
}
|
||||
|
||||
// Static
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = $.extend({}, Default, typeof config === 'object' ? config : $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new CardRefresh($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
data._init()
|
||||
} else if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
data[config]()
|
||||
} else if (typeof config === 'undefined') {
|
||||
data._init()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$(document).on('click', SELECTOR_DATA_REFRESH, function (event) {
|
||||
if (event) {
|
||||
event.preventDefault()
|
||||
}
|
||||
|
||||
CardRefresh._jQueryInterface.call($(this), 'load')
|
||||
})
|
||||
|
||||
$(() => {
|
||||
$(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
|
||||
}
|
||||
|
||||
export default CardRefresh
|
||||
@@ -1,238 +0,0 @@
|
||||
/**
|
||||
* --------------------------------------------
|
||||
* AdminLTE CardWidget.js
|
||||
* License MIT
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
|
||||
/**
|
||||
* 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}`
|
||||
const EVENT_COLLAPSED = `collapsed${EVENT_KEY}`
|
||||
const EVENT_MAXIMIZED = `maximized${EVENT_KEY}`
|
||||
const EVENT_MINIMIZED = `minimized${EVENT_KEY}`
|
||||
const EVENT_REMOVED = `removed${EVENT_KEY}`
|
||||
|
||||
const CLASS_NAME_CARD = 'card'
|
||||
const CLASS_NAME_COLLAPSED = 'collapsed-card'
|
||||
const CLASS_NAME_COLLAPSING = 'collapsing-card'
|
||||
const CLASS_NAME_EXPANDING = 'expanding-card'
|
||||
const CLASS_NAME_WAS_COLLAPSED = 'was-collapsed'
|
||||
const CLASS_NAME_MAXIMIZED = 'maximized-card'
|
||||
|
||||
const SELECTOR_DATA_REMOVE = '[data-card-widget="remove"]'
|
||||
const SELECTOR_DATA_COLLAPSE = '[data-card-widget="collapse"]'
|
||||
const SELECTOR_DATA_MAXIMIZE = '[data-card-widget="maximize"]'
|
||||
const SELECTOR_CARD = `.${CLASS_NAME_CARD}`
|
||||
const SELECTOR_CARD_HEADER = '.card-header'
|
||||
const SELECTOR_CARD_BODY = '.card-body'
|
||||
const SELECTOR_CARD_FOOTER = '.card-footer'
|
||||
|
||||
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(CLASS_NAME_CARD)) {
|
||||
this._parent = element
|
||||
}
|
||||
|
||||
this._settings = $.extend({}, Default, settings)
|
||||
}
|
||||
|
||||
collapse() {
|
||||
this._parent.addClass(CLASS_NAME_COLLAPSING).children(`${SELECTOR_CARD_BODY}, ${SELECTOR_CARD_FOOTER}`)
|
||||
.slideUp(this._settings.animationSpeed, () => {
|
||||
this._parent.addClass(CLASS_NAME_COLLAPSED).removeClass(CLASS_NAME_COLLAPSING)
|
||||
})
|
||||
|
||||
this._parent.find(`> ${SELECTOR_CARD_HEADER} ${this._settings.collapseTrigger} .${this._settings.collapseIcon}`)
|
||||
.addClass(this._settings.expandIcon)
|
||||
.removeClass(this._settings.collapseIcon)
|
||||
|
||||
this._element.trigger($.Event(EVENT_COLLAPSED), this._parent)
|
||||
}
|
||||
|
||||
expand() {
|
||||
this._parent.addClass(CLASS_NAME_EXPANDING).children(`${SELECTOR_CARD_BODY}, ${SELECTOR_CARD_FOOTER}`)
|
||||
.slideDown(this._settings.animationSpeed, () => {
|
||||
this._parent.removeClass(CLASS_NAME_COLLAPSED).removeClass(CLASS_NAME_EXPANDING)
|
||||
})
|
||||
|
||||
this._parent.find(`> ${SELECTOR_CARD_HEADER} ${this._settings.collapseTrigger} .${this._settings.expandIcon}`)
|
||||
.addClass(this._settings.collapseIcon)
|
||||
.removeClass(this._settings.expandIcon)
|
||||
|
||||
this._element.trigger($.Event(EVENT_EXPANDED), this._parent)
|
||||
}
|
||||
|
||||
remove() {
|
||||
this._parent.slideUp()
|
||||
this._element.trigger($.Event(EVENT_REMOVED), this._parent)
|
||||
}
|
||||
|
||||
toggle() {
|
||||
if (this._parent.hasClass(CLASS_NAME_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(),
|
||||
position: 'fixed',
|
||||
transition: 'all .15s'
|
||||
}).delay(150).queue(function () {
|
||||
const $element = $(this)
|
||||
|
||||
$element.addClass(CLASS_NAME_MAXIMIZED)
|
||||
$('html').addClass(CLASS_NAME_MAXIMIZED)
|
||||
if ($element.hasClass(CLASS_NAME_COLLAPSED)) {
|
||||
$element.addClass(CLASS_NAME_WAS_COLLAPSED)
|
||||
}
|
||||
|
||||
$element.dequeue()
|
||||
})
|
||||
|
||||
this._element.trigger($.Event(EVENT_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 () {
|
||||
const $element = $(this)
|
||||
|
||||
$element.removeClass(CLASS_NAME_MAXIMIZED)
|
||||
$('html').removeClass(CLASS_NAME_MAXIMIZED)
|
||||
$element.css({
|
||||
height: 'inherit',
|
||||
width: 'inherit'
|
||||
})
|
||||
if ($element.hasClass(CLASS_NAME_WAS_COLLAPSED)) {
|
||||
$element.removeClass(CLASS_NAME_WAS_COLLAPSED)
|
||||
}
|
||||
|
||||
$element.dequeue()
|
||||
})
|
||||
|
||||
this._element.trigger($.Event(EVENT_MINIMIZED), this._parent)
|
||||
}
|
||||
|
||||
toggleMaximize() {
|
||||
if (this._parent.hasClass(CLASS_NAME_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 _config = $.extend({}, Default, $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new CardWidget($(this), _config)
|
||||
$(this).data(DATA_KEY, typeof config === 'string' ? data : config)
|
||||
}
|
||||
|
||||
if (typeof config === 'string' && /collapse|expand|remove|toggle|maximize|minimize|toggleMaximize/.test(config)) {
|
||||
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
|
||||
}
|
||||
|
||||
export default CardWidget
|
||||
@@ -1,338 +1,138 @@
|
||||
/**
|
||||
* --------------------------------------------
|
||||
* AdminLTE ControlSidebar.js
|
||||
* License MIT
|
||||
* --------------------------------------------
|
||||
/* ControlSidebar()
|
||||
* ===============
|
||||
* Toggles the state of the control sidebar
|
||||
*
|
||||
* @Usage: $('#control-sidebar-trigger').controlSidebar(options)
|
||||
* or add [data-toggle="control-sidebar"] to the trigger
|
||||
* Pass any option as data-option="value"
|
||||
*/
|
||||
+function ($) {
|
||||
'use strict'
|
||||
|
||||
import $ from 'jquery'
|
||||
var DataKey = 'lte.controlsidebar'
|
||||
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'ControlSidebar'
|
||||
const DATA_KEY = 'lte.controlsidebar'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const EVENT_COLLAPSED = `collapsed${EVENT_KEY}`
|
||||
const EVENT_COLLAPSED_DONE = `collapsed-done${EVENT_KEY}`
|
||||
const EVENT_EXPANDED = `expanded${EVENT_KEY}`
|
||||
|
||||
const SELECTOR_CONTROL_SIDEBAR = '.control-sidebar'
|
||||
const SELECTOR_CONTROL_SIDEBAR_CONTENT = '.control-sidebar-content'
|
||||
const SELECTOR_DATA_TOGGLE = '[data-widget="control-sidebar"]'
|
||||
const SELECTOR_HEADER = '.main-header'
|
||||
const SELECTOR_FOOTER = '.main-footer'
|
||||
|
||||
const CLASS_NAME_CONTROL_SIDEBAR_ANIMATE = 'control-sidebar-animate'
|
||||
const CLASS_NAME_CONTROL_SIDEBAR_OPEN = 'control-sidebar-open'
|
||||
const CLASS_NAME_CONTROL_SIDEBAR_SLIDE = 'control-sidebar-slide-open'
|
||||
const CLASS_NAME_LAYOUT_FIXED = 'layout-fixed'
|
||||
const CLASS_NAME_NAVBAR_FIXED = 'layout-navbar-fixed'
|
||||
const CLASS_NAME_NAVBAR_SM_FIXED = 'layout-sm-navbar-fixed'
|
||||
const CLASS_NAME_NAVBAR_MD_FIXED = 'layout-md-navbar-fixed'
|
||||
const CLASS_NAME_NAVBAR_LG_FIXED = 'layout-lg-navbar-fixed'
|
||||
const CLASS_NAME_NAVBAR_XL_FIXED = 'layout-xl-navbar-fixed'
|
||||
const CLASS_NAME_FOOTER_FIXED = 'layout-footer-fixed'
|
||||
const CLASS_NAME_FOOTER_SM_FIXED = 'layout-sm-footer-fixed'
|
||||
const CLASS_NAME_FOOTER_MD_FIXED = 'layout-md-footer-fixed'
|
||||
const CLASS_NAME_FOOTER_LG_FIXED = 'layout-lg-footer-fixed'
|
||||
const CLASS_NAME_FOOTER_XL_FIXED = 'layout-xl-footer-fixed'
|
||||
|
||||
const Default = {
|
||||
controlsidebarSlide: true,
|
||||
scrollbarTheme: 'os-theme-light',
|
||||
scrollbarAutoHide: 'l',
|
||||
target: SELECTOR_CONTROL_SIDEBAR,
|
||||
animationSpeed: 300
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class ControlSidebar {
|
||||
constructor(element, config) {
|
||||
this._element = element
|
||||
this._config = config
|
||||
var Default = {
|
||||
slide: true
|
||||
}
|
||||
|
||||
// Public
|
||||
var Selector = {
|
||||
sidebar: '.control-sidebar',
|
||||
data : '[data-toggle="control-sidebar"]',
|
||||
open : '.control-sidebar-open',
|
||||
bg : '.control-sidebar-bg',
|
||||
wrapper: '.wrapper',
|
||||
content: '.content-wrapper',
|
||||
boxed : '.layout-boxed'
|
||||
}
|
||||
|
||||
collapse() {
|
||||
const $body = $('body')
|
||||
const $html = $('html')
|
||||
var ClassName = {
|
||||
open : 'control-sidebar-open',
|
||||
fixed: 'fixed'
|
||||
}
|
||||
|
||||
// Show the control sidebar
|
||||
if (this._config.controlsidebarSlide) {
|
||||
$html.addClass(CLASS_NAME_CONTROL_SIDEBAR_ANIMATE)
|
||||
$body.removeClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE).delay(300).queue(function () {
|
||||
$(SELECTOR_CONTROL_SIDEBAR).hide()
|
||||
$html.removeClass(CLASS_NAME_CONTROL_SIDEBAR_ANIMATE)
|
||||
$(this).dequeue()
|
||||
})
|
||||
var Event = {
|
||||
collapsed: 'collapsed.controlsidebar',
|
||||
expanded : 'expanded.controlsidebar'
|
||||
}
|
||||
|
||||
// ControlSidebar Class Definition
|
||||
// ===============================
|
||||
var ControlSidebar = function (element, options) {
|
||||
this.element = element
|
||||
this.options = options
|
||||
this.hasBindedResize = false
|
||||
|
||||
this.init()
|
||||
}
|
||||
|
||||
ControlSidebar.prototype.init = function () {
|
||||
// Add click listener if the element hasn't been
|
||||
// initialized using the data API
|
||||
if (!$(this.element).is(Selector.data)) {
|
||||
$(this).on('click', this.toggle)
|
||||
}
|
||||
|
||||
this.fix()
|
||||
$(window).resize(function () {
|
||||
this.fix()
|
||||
}.bind(this))
|
||||
}
|
||||
|
||||
ControlSidebar.prototype.toggle = function (event) {
|
||||
if (event) event.preventDefault()
|
||||
|
||||
this.fix()
|
||||
|
||||
if (!$(Selector.sidebar).is(Selector.open) && !$('body').is(Selector.open)) {
|
||||
this.expand()
|
||||
} else {
|
||||
$body.removeClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN)
|
||||
}
|
||||
|
||||
$(this._element).trigger($.Event(EVENT_COLLAPSED))
|
||||
|
||||
setTimeout(() => {
|
||||
$(this._element).trigger($.Event(EVENT_COLLAPSED_DONE))
|
||||
}, this._config.animationSpeed)
|
||||
}
|
||||
|
||||
show(toggle = false) {
|
||||
const $body = $('body')
|
||||
const $html = $('html')
|
||||
|
||||
if (toggle) {
|
||||
$(SELECTOR_CONTROL_SIDEBAR).hide()
|
||||
}
|
||||
|
||||
// Collapse the control sidebar
|
||||
if (this._config.controlsidebarSlide) {
|
||||
$html.addClass(CLASS_NAME_CONTROL_SIDEBAR_ANIMATE)
|
||||
$(this._config.target).show().delay(10).queue(function () {
|
||||
$body.addClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE).delay(300).queue(function () {
|
||||
$html.removeClass(CLASS_NAME_CONTROL_SIDEBAR_ANIMATE)
|
||||
$(this).dequeue()
|
||||
})
|
||||
$(this).dequeue()
|
||||
})
|
||||
} else {
|
||||
$body.addClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN)
|
||||
}
|
||||
|
||||
this._fixHeight()
|
||||
this._fixScrollHeight()
|
||||
|
||||
$(this._element).trigger($.Event(EVENT_EXPANDED))
|
||||
}
|
||||
|
||||
toggle() {
|
||||
const $body = $('body')
|
||||
const { target } = this._config
|
||||
|
||||
const notVisible = !$(target).is(':visible')
|
||||
const shouldClose = ($body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN) ||
|
||||
$body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE))
|
||||
const shouldToggle = notVisible && ($body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN) ||
|
||||
$body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE))
|
||||
|
||||
if (notVisible || shouldToggle) {
|
||||
// Open the control sidebar
|
||||
this.show(notVisible)
|
||||
} else if (shouldClose) {
|
||||
// Close the control sidebar
|
||||
this.collapse()
|
||||
}
|
||||
}
|
||||
|
||||
ControlSidebar.prototype.expand = function () {
|
||||
if (!this.options.slide) {
|
||||
$('body').addClass(ClassName.open)
|
||||
} else {
|
||||
$(Selector.sidebar).addClass(ClassName.open)
|
||||
}
|
||||
|
||||
$(this.element).trigger($.Event(Event.expanded))
|
||||
}
|
||||
|
||||
ControlSidebar.prototype.collapse = function () {
|
||||
$('body, ' + Selector.sidebar).removeClass(ClassName.open)
|
||||
$(this.element).trigger($.Event(Event.collapsed))
|
||||
}
|
||||
|
||||
ControlSidebar.prototype.fix = function () {
|
||||
if ($('body').is(Selector.boxed)) {
|
||||
this._fixForBoxed($(Selector.bg))
|
||||
}
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_init() {
|
||||
const $body = $('body')
|
||||
const shouldNotHideAll = $body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN) ||
|
||||
$body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE)
|
||||
|
||||
if (shouldNotHideAll) {
|
||||
$(SELECTOR_CONTROL_SIDEBAR).not(this._config.target).hide()
|
||||
$(this._config.target).css('display', 'block')
|
||||
} else {
|
||||
$(SELECTOR_CONTROL_SIDEBAR).hide()
|
||||
}
|
||||
|
||||
this._fixHeight()
|
||||
this._fixScrollHeight()
|
||||
|
||||
$(window).resize(() => {
|
||||
this._fixHeight()
|
||||
this._fixScrollHeight()
|
||||
})
|
||||
|
||||
$(window).scroll(() => {
|
||||
const $body = $('body')
|
||||
const shouldFixHeight = $body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN) ||
|
||||
$body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE)
|
||||
|
||||
if (shouldFixHeight) {
|
||||
this._fixScrollHeight()
|
||||
}
|
||||
ControlSidebar.prototype._fixForBoxed = function (bg) {
|
||||
bg.css({
|
||||
position: 'absolute',
|
||||
height : $(Selector.wrapper).height()
|
||||
})
|
||||
}
|
||||
|
||||
_isNavbarFixed() {
|
||||
const $body = $('body')
|
||||
return (
|
||||
$body.hasClass(CLASS_NAME_NAVBAR_FIXED) ||
|
||||
$body.hasClass(CLASS_NAME_NAVBAR_SM_FIXED) ||
|
||||
$body.hasClass(CLASS_NAME_NAVBAR_MD_FIXED) ||
|
||||
$body.hasClass(CLASS_NAME_NAVBAR_LG_FIXED) ||
|
||||
$body.hasClass(CLASS_NAME_NAVBAR_XL_FIXED)
|
||||
)
|
||||
}
|
||||
|
||||
_isFooterFixed() {
|
||||
const $body = $('body')
|
||||
return (
|
||||
$body.hasClass(CLASS_NAME_FOOTER_FIXED) ||
|
||||
$body.hasClass(CLASS_NAME_FOOTER_SM_FIXED) ||
|
||||
$body.hasClass(CLASS_NAME_FOOTER_MD_FIXED) ||
|
||||
$body.hasClass(CLASS_NAME_FOOTER_LG_FIXED) ||
|
||||
$body.hasClass(CLASS_NAME_FOOTER_XL_FIXED)
|
||||
)
|
||||
}
|
||||
|
||||
_fixScrollHeight() {
|
||||
const $body = $('body')
|
||||
const $controlSidebar = $(this._config.target)
|
||||
|
||||
if (!$body.hasClass(CLASS_NAME_LAYOUT_FIXED)) {
|
||||
return
|
||||
}
|
||||
|
||||
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()
|
||||
}
|
||||
|
||||
const navbarFixed = this._isNavbarFixed() && $(SELECTOR_HEADER).css('position') === 'fixed'
|
||||
|
||||
const footerFixed = this._isFooterFixed() && $(SELECTOR_FOOTER).css('position') === 'fixed'
|
||||
|
||||
const $controlsidebarContent = $(`${this._config.target}, ${this._config.target} ${SELECTOR_CONTROL_SIDEBAR_CONTENT}`)
|
||||
|
||||
if (positions.top === 0 && positions.bottom === 0) {
|
||||
$controlSidebar.css({
|
||||
bottom: heights.footer,
|
||||
top: heights.header
|
||||
})
|
||||
$controlsidebarContent.css('height', heights.window - (heights.header + heights.footer))
|
||||
} else if (positions.bottom <= heights.footer) {
|
||||
if (footerFixed === false) {
|
||||
const top = heights.header - positions.top
|
||||
$controlSidebar.css('bottom', heights.footer - positions.bottom).css('top', top >= 0 ? top : 0)
|
||||
$controlsidebarContent.css('height', heights.window - (heights.footer - positions.bottom))
|
||||
} else {
|
||||
$controlSidebar.css('bottom', heights.footer)
|
||||
}
|
||||
} else if (positions.top <= heights.header) {
|
||||
if (navbarFixed === false) {
|
||||
$controlSidebar.css('top', heights.header - positions.top)
|
||||
$controlsidebarContent.css('height', heights.window - (heights.header - positions.top))
|
||||
} else {
|
||||
$controlSidebar.css('top', heights.header)
|
||||
}
|
||||
} else if (navbarFixed === false) {
|
||||
$controlSidebar.css('top', 0)
|
||||
$controlsidebarContent.css('height', heights.window)
|
||||
} else {
|
||||
$controlSidebar.css('top', heights.header)
|
||||
}
|
||||
|
||||
if (footerFixed && navbarFixed) {
|
||||
$controlsidebarContent.css('height', '100%')
|
||||
$controlSidebar.css('height', '')
|
||||
} else if (footerFixed || navbarFixed) {
|
||||
$controlsidebarContent.css('height', '100%')
|
||||
$controlsidebarContent.css('height', '')
|
||||
}
|
||||
}
|
||||
|
||||
_fixHeight() {
|
||||
const $body = $('body')
|
||||
const $controlSidebar = $(`${this._config.target} ${SELECTOR_CONTROL_SIDEBAR_CONTENT}`)
|
||||
|
||||
if (!$body.hasClass(CLASS_NAME_LAYOUT_FIXED)) {
|
||||
$controlSidebar.attr('style', '')
|
||||
return
|
||||
}
|
||||
|
||||
const heights = {
|
||||
window: $(window).height(),
|
||||
header: $(SELECTOR_HEADER).outerHeight(),
|
||||
footer: $(SELECTOR_FOOTER).outerHeight()
|
||||
}
|
||||
|
||||
let sidebarHeight = heights.window - heights.header
|
||||
|
||||
if (this._isFooterFixed() && $(SELECTOR_FOOTER).css('position') === 'fixed') {
|
||||
sidebarHeight = heights.window - heights.header - heights.footer
|
||||
}
|
||||
|
||||
$controlSidebar.css('height', sidebarHeight)
|
||||
|
||||
if (typeof $.fn.overlayScrollbars !== 'undefined') {
|
||||
$controlSidebar.overlayScrollbars({
|
||||
className: this._config.scrollbarTheme,
|
||||
sizeAutoCapable: true,
|
||||
scrollbars: {
|
||||
autoHide: this._config.scrollbarAutoHide,
|
||||
clickScrolling: true
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Static
|
||||
static _jQueryInterface(config) {
|
||||
// Plugin Definition
|
||||
// =================
|
||||
function Plugin(option) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = $.extend({}, Default, typeof config === 'object' ? config : $(this).data())
|
||||
var $this = $(this)
|
||||
var data = $this.data(DataKey)
|
||||
|
||||
if (!data) {
|
||||
data = new ControlSidebar($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
data._init()
|
||||
} else if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
data[config]()
|
||||
} else if (typeof config === 'undefined') {
|
||||
data._init()
|
||||
var options = $.extend({}, Default, $this.data(), typeof option == 'object' && option)
|
||||
$this.data(DataKey, (data = new ControlSidebar($this, options)))
|
||||
}
|
||||
|
||||
if (typeof option == 'string') data.toggle()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Data Api implementation
|
||||
* ====================================================
|
||||
*/
|
||||
$(document).on('click', SELECTOR_DATA_TOGGLE, function (event) {
|
||||
event.preventDefault()
|
||||
var old = $.fn.controlSidebar
|
||||
|
||||
ControlSidebar._jQueryInterface.call($(this), 'toggle')
|
||||
})
|
||||
$.fn.controlSidebar = Plugin
|
||||
$.fn.controlSidebar.Constructor = ControlSidebar
|
||||
|
||||
$(document).ready(() => {
|
||||
ControlSidebar._jQueryInterface.call($(SELECTOR_DATA_TOGGLE), '_init')
|
||||
})
|
||||
// No Conflict Mode
|
||||
// ================
|
||||
$.fn.controlSidebar.noConflict = function () {
|
||||
$.fn.controlSidebar = old
|
||||
return this
|
||||
}
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
// ControlSidebar Data API
|
||||
// =======================
|
||||
$(document).on('click', Selector.data, function (event) {
|
||||
if (event) event.preventDefault()
|
||||
Plugin.call($(this), 'toggle')
|
||||
})
|
||||
|
||||
$.fn[NAME] = ControlSidebar._jQueryInterface
|
||||
$.fn[NAME].Constructor = ControlSidebar
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return ControlSidebar._jQueryInterface
|
||||
}
|
||||
|
||||
export default ControlSidebar
|
||||
}(jQuery)
|
||||
|
||||
@@ -1,89 +1,66 @@
|
||||
/**
|
||||
* --------------------------------------------
|
||||
* AdminLTE DirectChat.js
|
||||
* License MIT
|
||||
* --------------------------------------------
|
||||
/* DirectChat()
|
||||
* ===============
|
||||
* Toggles the state of the control sidebar
|
||||
*
|
||||
* @Usage: $('#my-chat-box').directChat()
|
||||
* or add [data-widget="direct-chat"] to the trigger
|
||||
*/
|
||||
+function ($) {
|
||||
'use strict'
|
||||
|
||||
import $ from 'jquery'
|
||||
var DataKey = 'lte.directchat'
|
||||
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'DirectChat'
|
||||
const DATA_KEY = 'lte.directchat'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const EVENT_TOGGLED = `toggled${EVENT_KEY}`
|
||||
|
||||
const SELECTOR_DATA_TOGGLE = '[data-widget="chat-pane-toggle"]'
|
||||
const SELECTOR_DIRECT_CHAT = '.direct-chat'
|
||||
|
||||
const CLASS_NAME_DIRECT_CHAT_OPEN = 'direct-chat-contacts-open'
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class DirectChat {
|
||||
constructor(element) {
|
||||
this._element = element
|
||||
var Selector = {
|
||||
data: '[data-widget="chat-pane-toggle"]',
|
||||
box : '.direct-chat'
|
||||
}
|
||||
|
||||
toggle() {
|
||||
$(this._element).parents(SELECTOR_DIRECT_CHAT).first().toggleClass(CLASS_NAME_DIRECT_CHAT_OPEN)
|
||||
$(this._element).trigger($.Event(EVENT_TOGGLED))
|
||||
var ClassName = {
|
||||
open: 'direct-chat-contacts-open'
|
||||
}
|
||||
|
||||
// Static
|
||||
static _jQueryInterface(config) {
|
||||
// DirectChat Class Definition
|
||||
// ===========================
|
||||
var DirectChat = function (element) {
|
||||
this.element = element
|
||||
}
|
||||
|
||||
DirectChat.prototype.toggle = function ($trigger) {
|
||||
$trigger.parents(Selector.box).first().toggleClass(ClassName.open)
|
||||
}
|
||||
|
||||
// Plugin Definition
|
||||
// =================
|
||||
function Plugin(option) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
var $this = $(this)
|
||||
var data = $this.data(DataKey)
|
||||
|
||||
if (!data) {
|
||||
data = new DirectChat($(this))
|
||||
$(this).data(DATA_KEY, data)
|
||||
} else if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
data[config]()
|
||||
} else if (typeof config === 'undefined') {
|
||||
data._init()
|
||||
$this.data(DataKey, (data = new DirectChat($this)))
|
||||
}
|
||||
|
||||
if (typeof option == 'string') data.toggle($this)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Data Api implementation
|
||||
* ====================================================
|
||||
*/
|
||||
var old = $.fn.directChat
|
||||
|
||||
$(document).on('click', SELECTOR_DATA_TOGGLE, function (event) {
|
||||
if (event) {
|
||||
event.preventDefault()
|
||||
$.fn.directChat = Plugin
|
||||
$.fn.directChat.Constructor = DirectChat
|
||||
|
||||
// No Conflict Mode
|
||||
// ================
|
||||
$.fn.directChat.noConflict = function () {
|
||||
$.fn.directChat = old
|
||||
return this
|
||||
}
|
||||
|
||||
DirectChat._jQueryInterface.call($(this), 'toggle')
|
||||
})
|
||||
// DirectChat Data API
|
||||
// ===================
|
||||
$(document).on('click', Selector.data, function (event) {
|
||||
if (event) event.preventDefault()
|
||||
Plugin.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
|
||||
}
|
||||
|
||||
export default DirectChat
|
||||
}(jQuery)
|
||||
|
||||
@@ -1,147 +0,0 @@
|
||||
/**
|
||||
* --------------------------------------------
|
||||
* AdminLTE Dropdown.js
|
||||
* License MIT
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'Dropdown'
|
||||
const DATA_KEY = 'lte.dropdown'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const SELECTOR_NAVBAR = '.navbar'
|
||||
const SELECTOR_DROPDOWN_MENU = '.dropdown-menu'
|
||||
const SELECTOR_DROPDOWN_MENU_ACTIVE = '.dropdown-menu.show'
|
||||
const SELECTOR_DROPDOWN_TOGGLE = '[data-toggle="dropdown"]'
|
||||
|
||||
const CLASS_NAME_DROPDOWN_RIGHT = 'dropdown-menu-right'
|
||||
const CLASS_NAME_DROPDOWN_SUBMENU = 'dropdown-submenu'
|
||||
|
||||
// TODO: this is unused; should be removed along with the extend?
|
||||
const Default = {}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class Dropdown {
|
||||
constructor(element, config) {
|
||||
this._config = config
|
||||
this._element = element
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
toggleSubmenu() {
|
||||
this._element.siblings().show().toggleClass('show')
|
||||
|
||||
if (!this._element.next().hasClass('show')) {
|
||||
this._element.parents(SELECTOR_DROPDOWN_MENU).first().find('.show').removeClass('show').hide()
|
||||
}
|
||||
|
||||
this._element.parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', () => {
|
||||
$('.dropdown-submenu .show').removeClass('show').hide()
|
||||
})
|
||||
}
|
||||
|
||||
fixPosition() {
|
||||
const $element = $(SELECTOR_DROPDOWN_MENU_ACTIVE)
|
||||
|
||||
if ($element.length === 0) {
|
||||
return
|
||||
}
|
||||
|
||||
if ($element.hasClass(CLASS_NAME_DROPDOWN_RIGHT)) {
|
||||
$element.css({
|
||||
left: 'inherit',
|
||||
right: 0
|
||||
})
|
||||
} else {
|
||||
$element.css({
|
||||
left: 0,
|
||||
right: 'inherit'
|
||||
})
|
||||
}
|
||||
|
||||
const offset = $element.offset()
|
||||
const width = $element.width()
|
||||
const visiblePart = $(window).width() - offset.left
|
||||
|
||||
if (offset.left < 0) {
|
||||
$element.css({
|
||||
left: 'inherit',
|
||||
right: offset.left - 5
|
||||
})
|
||||
} else if (visiblePart < width) {
|
||||
$element.css({
|
||||
left: 'inherit',
|
||||
right: 0
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Static
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = $.extend({}, Default, typeof config === 'object' ? config : $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new Dropdown($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
} else if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
data[config]()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$(`${SELECTOR_DROPDOWN_MENU} ${SELECTOR_DROPDOWN_TOGGLE}`).on('click', function (event) {
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
|
||||
Dropdown._jQueryInterface.call($(this), 'toggleSubmenu')
|
||||
})
|
||||
|
||||
$(`${SELECTOR_NAVBAR} ${SELECTOR_DROPDOWN_TOGGLE}`).on('click', event => {
|
||||
event.preventDefault()
|
||||
|
||||
if ($(event.target).parent().hasClass(CLASS_NAME_DROPDOWN_SUBMENU)) {
|
||||
return
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
export default Dropdown
|
||||
@@ -1,122 +0,0 @@
|
||||
/**
|
||||
* --------------------------------------------
|
||||
* AdminLTE ExpandableTable.js
|
||||
* License MIT
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'ExpandableTable'
|
||||
const DATA_KEY = 'lte.expandableTable'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const EVENT_EXPANDED = `expanded${EVENT_KEY}`
|
||||
const EVENT_COLLAPSED = `collapsed${EVENT_KEY}`
|
||||
|
||||
const SELECTOR_TABLE = '.expandable-table'
|
||||
const SELECTOR_EXPANDABLE_BODY = '.expandable-body'
|
||||
const SELECTOR_DATA_TOGGLE = '[data-widget="expandable-table"]'
|
||||
const SELECTOR_ARIA_ATTR = 'aria-expanded'
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
class ExpandableTable {
|
||||
constructor(element) {
|
||||
this._element = element
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
_init() {
|
||||
$(SELECTOR_DATA_TOGGLE).each((_, $header) => {
|
||||
const $type = $($header).attr(SELECTOR_ARIA_ATTR)
|
||||
const $body = $($header).next(SELECTOR_EXPANDABLE_BODY).children().first().children()
|
||||
if ($type === 'true') {
|
||||
$body.show()
|
||||
} else if ($type === 'false') {
|
||||
$body.hide()
|
||||
$body.parent().parent().addClass('d-none')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
toggleRow() {
|
||||
let $element = this._element
|
||||
|
||||
if ($element[0].nodeName !== 'TR') {
|
||||
$element = $element.parent()
|
||||
if ($element[0].nodeName !== 'TR') {
|
||||
$element = $element.parent()
|
||||
}
|
||||
}
|
||||
|
||||
const time = 500
|
||||
const $type = $element.attr(SELECTOR_ARIA_ATTR)
|
||||
const $body = $element.next(SELECTOR_EXPANDABLE_BODY).children().first().children()
|
||||
|
||||
$body.stop()
|
||||
if ($type === 'true') {
|
||||
$body.slideUp(time, () => {
|
||||
$element.next(SELECTOR_EXPANDABLE_BODY).addClass('d-none')
|
||||
})
|
||||
$element.attr(SELECTOR_ARIA_ATTR, 'false')
|
||||
$element.trigger($.Event(EVENT_COLLAPSED))
|
||||
} else if ($type === 'false') {
|
||||
$element.next(SELECTOR_EXPANDABLE_BODY).removeClass('d-none')
|
||||
$body.slideDown(time)
|
||||
$element.attr(SELECTOR_ARIA_ATTR, 'true')
|
||||
$element.trigger($.Event(EVENT_EXPANDED))
|
||||
}
|
||||
}
|
||||
|
||||
// Static
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
|
||||
if (!data) {
|
||||
data = new ExpandableTable($(this))
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (typeof config === 'string' && /init|toggleRow/.test(config)) {
|
||||
data[config]()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
$(SELECTOR_TABLE).ready(function () {
|
||||
ExpandableTable._jQueryInterface.call($(this), '_init')
|
||||
})
|
||||
|
||||
$(document).on('click', SELECTOR_DATA_TOGGLE, function () {
|
||||
ExpandableTable._jQueryInterface.call($(this), 'toggleRow')
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = ExpandableTable._jQueryInterface
|
||||
$.fn[NAME].Constructor = ExpandableTable
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return ExpandableTable._jQueryInterface
|
||||
}
|
||||
|
||||
export default ExpandableTable
|
||||
@@ -1,128 +0,0 @@
|
||||
/**
|
||||
* --------------------------------------------
|
||||
* AdminLTE Fullscreen.js
|
||||
* License MIT
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'Fullscreen'
|
||||
const DATA_KEY = 'lte.fullscreen'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const SELECTOR_DATA_WIDGET = '[data-widget="fullscreen"]'
|
||||
const SELECTOR_ICON = `${SELECTOR_DATA_WIDGET} i`
|
||||
|
||||
const EVENT_FULLSCREEN_CHANGE = 'webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange'
|
||||
|
||||
const Default = {
|
||||
minimizeIcon: 'fa-compress-arrows-alt',
|
||||
maximizeIcon: 'fa-expand-arrows-alt'
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class Fullscreen {
|
||||
constructor(_element, _options) {
|
||||
this.element = _element
|
||||
this.options = _options
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
toggle() {
|
||||
if (document.fullscreenElement ||
|
||||
document.mozFullScreenElement ||
|
||||
document.webkitFullscreenElement ||
|
||||
document.msFullscreenElement) {
|
||||
this.windowed()
|
||||
} else {
|
||||
this.fullscreen()
|
||||
}
|
||||
}
|
||||
|
||||
toggleIcon() {
|
||||
if (document.fullscreenElement ||
|
||||
document.mozFullScreenElement ||
|
||||
document.webkitFullscreenElement ||
|
||||
document.msFullscreenElement) {
|
||||
$(SELECTOR_ICON).removeClass(this.options.maximizeIcon).addClass(this.options.minimizeIcon)
|
||||
} else {
|
||||
$(SELECTOR_ICON).removeClass(this.options.minimizeIcon).addClass(this.options.maximizeIcon)
|
||||
}
|
||||
}
|
||||
|
||||
fullscreen() {
|
||||
if (document.documentElement.requestFullscreen) {
|
||||
document.documentElement.requestFullscreen()
|
||||
} else if (document.documentElement.webkitRequestFullscreen) {
|
||||
document.documentElement.webkitRequestFullscreen()
|
||||
} else if (document.documentElement.msRequestFullscreen) {
|
||||
document.documentElement.msRequestFullscreen()
|
||||
}
|
||||
}
|
||||
|
||||
windowed() {
|
||||
if (document.exitFullscreen) {
|
||||
document.exitFullscreen()
|
||||
} else if (document.webkitExitFullscreen) {
|
||||
document.webkitExitFullscreen()
|
||||
} else if (document.msExitFullscreen) {
|
||||
document.msExitFullscreen()
|
||||
}
|
||||
}
|
||||
|
||||
// Static
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = $.extend({}, Default, typeof config === 'object' ? config : $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new Fullscreen($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
} else if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
data[config]()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
$(document).on('click', SELECTOR_DATA_WIDGET, function () {
|
||||
Fullscreen._jQueryInterface.call($(this), 'toggle')
|
||||
})
|
||||
|
||||
$(document).on(EVENT_FULLSCREEN_CHANGE, () => {
|
||||
Fullscreen._jQueryInterface.call($(SELECTOR_DATA_WIDGET), 'toggleIcon')
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Fullscreen._jQueryInterface
|
||||
$.fn[NAME].Constructor = Fullscreen
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Fullscreen._jQueryInterface
|
||||
}
|
||||
|
||||
export default Fullscreen
|
||||
@@ -1,462 +0,0 @@
|
||||
// noinspection EqualityComparisonWithCoercionJS
|
||||
|
||||
/**
|
||||
* --------------------------------------------
|
||||
* AdminLTE IFrame.js
|
||||
* License MIT
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'IFrame'
|
||||
const DATA_KEY = 'lte.iframe'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const SELECTOR_DATA_TOGGLE = '[data-widget="iframe"]'
|
||||
const SELECTOR_DATA_TOGGLE_CLOSE = '[data-widget="iframe-close"]'
|
||||
const SELECTOR_DATA_TOGGLE_SCROLL_LEFT = '[data-widget="iframe-scrollleft"]'
|
||||
const SELECTOR_DATA_TOGGLE_SCROLL_RIGHT = '[data-widget="iframe-scrollright"]'
|
||||
const SELECTOR_DATA_TOGGLE_FULLSCREEN = '[data-widget="iframe-fullscreen"]'
|
||||
const SELECTOR_CONTENT_WRAPPER = '.content-wrapper'
|
||||
const SELECTOR_CONTENT_IFRAME = `${SELECTOR_CONTENT_WRAPPER} iframe`
|
||||
const SELECTOR_TAB_NAV = `${SELECTOR_CONTENT_WRAPPER}.iframe-mode .nav`
|
||||
const SELECTOR_TAB_NAVBAR_NAV = `${SELECTOR_CONTENT_WRAPPER}.iframe-mode .navbar-nav`
|
||||
const SELECTOR_TAB_NAVBAR_NAV_ITEM = `${SELECTOR_TAB_NAVBAR_NAV} .nav-item`
|
||||
const SELECTOR_TAB_NAVBAR_NAV_LINK = `${SELECTOR_TAB_NAVBAR_NAV} .nav-link`
|
||||
const SELECTOR_TAB_CONTENT = `${SELECTOR_CONTENT_WRAPPER}.iframe-mode .tab-content`
|
||||
const SELECTOR_TAB_EMPTY = `${SELECTOR_TAB_CONTENT} .tab-empty`
|
||||
const SELECTOR_TAB_LOADING = `${SELECTOR_TAB_CONTENT} .tab-loading`
|
||||
const SELECTOR_TAB_PANE = `${SELECTOR_TAB_CONTENT} .tab-pane`
|
||||
const SELECTOR_SIDEBAR_MENU_ITEM = '.main-sidebar .nav-item > a.nav-link'
|
||||
const SELECTOR_SIDEBAR_SEARCH_ITEM = '.sidebar-search-results .list-group-item'
|
||||
const SELECTOR_HEADER_MENU_ITEM = '.main-header .nav-item a.nav-link'
|
||||
const SELECTOR_HEADER_DROPDOWN_ITEM = '.main-header a.dropdown-item'
|
||||
const CLASS_NAME_IFRAME_MODE = 'iframe-mode'
|
||||
const CLASS_NAME_FULLSCREEN_MODE = 'iframe-mode-fullscreen'
|
||||
|
||||
const Default = {
|
||||
onTabClick(item) {
|
||||
return item
|
||||
},
|
||||
onTabChanged(item) {
|
||||
return item
|
||||
},
|
||||
onTabCreated(item) {
|
||||
return item
|
||||
},
|
||||
autoIframeMode: true,
|
||||
autoItemActive: true,
|
||||
autoShowNewTab: true,
|
||||
autoDarkMode: false,
|
||||
allowDuplicates: false,
|
||||
allowReload: true,
|
||||
loadingScreen: true,
|
||||
useNavbarItems: true,
|
||||
scrollOffset: 40,
|
||||
scrollBehaviorSwap: false,
|
||||
iconMaximize: 'fa-expand',
|
||||
iconMinimize: 'fa-compress'
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class IFrame {
|
||||
constructor(element, config) {
|
||||
this._config = config
|
||||
this._element = element
|
||||
this._init()
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
onTabClick(item) {
|
||||
this._config.onTabClick(item)
|
||||
}
|
||||
|
||||
onTabChanged(item) {
|
||||
this._config.onTabChanged(item)
|
||||
}
|
||||
|
||||
onTabCreated(item) {
|
||||
this._config.onTabCreated(item)
|
||||
}
|
||||
|
||||
createTab(title, link, uniqueName, autoOpen) {
|
||||
let tabId = `panel-${uniqueName}`
|
||||
let navId = `tab-${uniqueName}`
|
||||
|
||||
if (this._config.allowDuplicates) {
|
||||
tabId += `-${Math.floor(Math.random() * 1000)}`
|
||||
navId += `-${Math.floor(Math.random() * 1000)}`
|
||||
}
|
||||
|
||||
const newNavItem = `<li class="nav-item" role="presentation"><a href="#" class="btn-iframe-close" data-widget="iframe-close" data-type="only-this"><i class="fas fa-times"></i></a><a class="nav-link" data-toggle="row" id="${navId}" href="#${tabId}" role="tab" aria-controls="${tabId}" aria-selected="false">${title}</a></li>`
|
||||
$(SELECTOR_TAB_NAVBAR_NAV).append(unescape(escape(newNavItem)))
|
||||
|
||||
const newTabItem = `<div class="tab-pane fade" id="${tabId}" role="tabpanel" aria-labelledby="${navId}"><iframe src="${link}"></iframe></div>`
|
||||
$(SELECTOR_TAB_CONTENT).append(unescape(escape(newTabItem)))
|
||||
|
||||
if (autoOpen) {
|
||||
if (this._config.loadingScreen) {
|
||||
const $loadingScreen = $(SELECTOR_TAB_LOADING)
|
||||
|
||||
if (!$loadingScreen.is(':animated')) {
|
||||
$loadingScreen.fadeIn()
|
||||
}
|
||||
|
||||
$(`${tabId} iframe`).ready(() => {
|
||||
if (typeof this._config.loadingScreen === 'number') {
|
||||
this.switchTab(`#${navId}`)
|
||||
setTimeout(() => {
|
||||
$loadingScreen.fadeOut()
|
||||
}, this._config.loadingScreen)
|
||||
} else {
|
||||
this.switchTab(`#${navId}`)
|
||||
$loadingScreen.fadeOut()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.switchTab(`#${navId}`)
|
||||
}
|
||||
}
|
||||
|
||||
this.onTabCreated($(`#${navId}`))
|
||||
}
|
||||
|
||||
openTabSidebar(item, autoOpen = this._config.autoShowNewTab) {
|
||||
let $item = $(item).clone()
|
||||
if ($item.attr('href') === undefined) {
|
||||
$item = $(item).parent('a').clone()
|
||||
}
|
||||
|
||||
$item.find('.right, .search-path').remove()
|
||||
let title = $item.find('p').text()
|
||||
if (title === '') {
|
||||
title = $item.text()
|
||||
}
|
||||
|
||||
const link = $item.attr('href')
|
||||
if (link === '#' || link === '' || link === undefined) {
|
||||
return
|
||||
}
|
||||
|
||||
const uniqueName = unescape(link).replace('./', '').replace(/["#&'./:=?[\]]/gi, '-').replace(/(--)/gi, '')
|
||||
const navId = `tab-${uniqueName}`
|
||||
|
||||
if (!this._config.allowDuplicates && $(`#${navId}`).length > 0) {
|
||||
return this.switchTab(`#${navId}`, this._config.allowReload)
|
||||
}
|
||||
|
||||
if ((!this._config.allowDuplicates && $(`#${navId}`).length === 0) || this._config.allowDuplicates) {
|
||||
this.createTab(title, link, uniqueName, autoOpen)
|
||||
}
|
||||
}
|
||||
|
||||
switchTab(item, reload = false) {
|
||||
const $item = $(item)
|
||||
const tabId = $item.attr('href')
|
||||
|
||||
$(SELECTOR_TAB_EMPTY).hide()
|
||||
|
||||
if (reload) {
|
||||
const $loadingScreen = $(SELECTOR_TAB_LOADING)
|
||||
if (this._config.loadingScreen) {
|
||||
$loadingScreen.show(0, () => {
|
||||
$(`${tabId} iframe`).attr('src', $(`${tabId} iframe`).attr('src')).ready(() => {
|
||||
if (this._config.loadingScreen) {
|
||||
if (typeof this._config.loadingScreen === 'number') {
|
||||
setTimeout(() => {
|
||||
$loadingScreen.fadeOut()
|
||||
}, this._config.loadingScreen)
|
||||
} else {
|
||||
$loadingScreen.fadeOut()
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
$(`${tabId} iframe`).attr('src', $(`${tabId} iframe`).attr('src'))
|
||||
}
|
||||
}
|
||||
|
||||
$(`${SELECTOR_TAB_NAVBAR_NAV} .active`).tab('dispose').removeClass('active')
|
||||
|
||||
this._fixHeight()
|
||||
|
||||
$item.tab('show')
|
||||
$item.parents('li').addClass('active')
|
||||
this.onTabChanged($item)
|
||||
|
||||
if (this._config.autoItemActive) {
|
||||
this._setItemActive($(`${tabId} iframe`).attr('src'))
|
||||
}
|
||||
}
|
||||
|
||||
removeActiveTab(type, element) {
|
||||
if (type == 'all') {
|
||||
$(SELECTOR_TAB_NAVBAR_NAV_ITEM).remove()
|
||||
$(SELECTOR_TAB_PANE).remove()
|
||||
$(SELECTOR_TAB_EMPTY).show()
|
||||
} else if (type == 'all-other') {
|
||||
$(`${SELECTOR_TAB_NAVBAR_NAV_ITEM}:not(.active)`).remove()
|
||||
$(`${SELECTOR_TAB_PANE}:not(.active)`).remove()
|
||||
} else if (type == 'only-this') {
|
||||
const $navClose = $(element)
|
||||
const $navItem = $navClose.parent('.nav-item')
|
||||
const $navItemParent = $navItem.parent()
|
||||
const navItemIndex = $navItem.index()
|
||||
const tabId = $navClose.siblings('.nav-link').attr('aria-controls')
|
||||
$navItem.remove()
|
||||
$(`#${tabId}`).remove()
|
||||
if ($(SELECTOR_TAB_CONTENT).children().length == $(`${SELECTOR_TAB_EMPTY}, ${SELECTOR_TAB_LOADING}`).length) {
|
||||
$(SELECTOR_TAB_EMPTY).show()
|
||||
} else {
|
||||
const prevNavItemIndex = navItemIndex - 1
|
||||
this.switchTab($navItemParent.children().eq(prevNavItemIndex).find('a.nav-link'))
|
||||
}
|
||||
} else {
|
||||
const $navItem = $(`${SELECTOR_TAB_NAVBAR_NAV_ITEM}.active`)
|
||||
const $navItemParent = $navItem.parent()
|
||||
const navItemIndex = $navItem.index()
|
||||
$navItem.remove()
|
||||
$(`${SELECTOR_TAB_PANE}.active`).remove()
|
||||
if ($(SELECTOR_TAB_CONTENT).children().length == $(`${SELECTOR_TAB_EMPTY}, ${SELECTOR_TAB_LOADING}`).length) {
|
||||
$(SELECTOR_TAB_EMPTY).show()
|
||||
} else {
|
||||
const prevNavItemIndex = navItemIndex - 1
|
||||
this.switchTab($navItemParent.children().eq(prevNavItemIndex).find('a.nav-link'))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
toggleFullscreen() {
|
||||
if ($('body').hasClass(CLASS_NAME_FULLSCREEN_MODE)) {
|
||||
$(`${SELECTOR_DATA_TOGGLE_FULLSCREEN} i`).removeClass(this._config.iconMinimize).addClass(this._config.iconMaximize)
|
||||
$('body').removeClass(CLASS_NAME_FULLSCREEN_MODE)
|
||||
$(`${SELECTOR_TAB_EMPTY}, ${SELECTOR_TAB_LOADING}`).height('100%')
|
||||
$(SELECTOR_CONTENT_WRAPPER).height('100%')
|
||||
$(SELECTOR_CONTENT_IFRAME).height('100%')
|
||||
} else {
|
||||
$(`${SELECTOR_DATA_TOGGLE_FULLSCREEN} i`).removeClass(this._config.iconMaximize).addClass(this._config.iconMinimize)
|
||||
$('body').addClass(CLASS_NAME_FULLSCREEN_MODE)
|
||||
}
|
||||
|
||||
$(window).trigger('resize')
|
||||
this._fixHeight(true)
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_init() {
|
||||
const usingDefTab = ($(SELECTOR_TAB_CONTENT).children().length > 2)
|
||||
|
||||
this._setupListeners()
|
||||
this._fixHeight(true)
|
||||
|
||||
if (usingDefTab) {
|
||||
const $el = $(`${SELECTOR_TAB_PANE}`).first()
|
||||
const uniqueName = $el.attr('id').replace('panel-', '')
|
||||
const navId = `#tab-${uniqueName}`
|
||||
|
||||
this.switchTab(navId, true)
|
||||
}
|
||||
}
|
||||
|
||||
_initFrameElement() {
|
||||
if (window.frameElement && this._config?.autoIframeMode) {
|
||||
const $body = $('body')
|
||||
$body.addClass(CLASS_NAME_IFRAME_MODE)
|
||||
|
||||
if (this._config.autoDarkMode) {
|
||||
$body.addClass('dark-mode')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_navScroll(offset) {
|
||||
const leftPos = $(SELECTOR_TAB_NAVBAR_NAV).scrollLeft()
|
||||
$(SELECTOR_TAB_NAVBAR_NAV).animate({ scrollLeft: (leftPos + offset) }, 250, 'linear')
|
||||
}
|
||||
|
||||
_setupListeners() {
|
||||
$(window).on('resize', () => {
|
||||
setTimeout(() => {
|
||||
this._fixHeight()
|
||||
}, 1)
|
||||
})
|
||||
if ($(SELECTOR_CONTENT_WRAPPER).hasClass(CLASS_NAME_IFRAME_MODE)) {
|
||||
$(document).on('click', `${SELECTOR_SIDEBAR_MENU_ITEM}, ${SELECTOR_SIDEBAR_SEARCH_ITEM}`, e => {
|
||||
e.preventDefault()
|
||||
this.openTabSidebar(e.target)
|
||||
})
|
||||
if (this._config.useNavbarItems) {
|
||||
$(document).on('click', `${SELECTOR_HEADER_MENU_ITEM}, ${SELECTOR_HEADER_DROPDOWN_ITEM}`, e => {
|
||||
e.preventDefault()
|
||||
this.openTabSidebar(e.target)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on('click', SELECTOR_TAB_NAVBAR_NAV_LINK, e => {
|
||||
e.preventDefault()
|
||||
this.onTabClick(e.target)
|
||||
this.switchTab(e.target)
|
||||
})
|
||||
$(document).on('click', SELECTOR_TAB_NAVBAR_NAV_LINK, e => {
|
||||
e.preventDefault()
|
||||
this.onTabClick(e.target)
|
||||
this.switchTab(e.target)
|
||||
})
|
||||
$(document).on('click', SELECTOR_DATA_TOGGLE_CLOSE, e => {
|
||||
e.preventDefault()
|
||||
let { target } = e
|
||||
|
||||
if (target.nodeName === 'I') {
|
||||
target = e.target.offsetParent
|
||||
}
|
||||
|
||||
this.removeActiveTab(target.attributes['data-type'] ? target.attributes['data-type'].nodeValue : null, target)
|
||||
})
|
||||
$(document).on('click', SELECTOR_DATA_TOGGLE_FULLSCREEN, e => {
|
||||
e.preventDefault()
|
||||
this.toggleFullscreen()
|
||||
})
|
||||
let mousedown = false
|
||||
let mousedownInterval = null
|
||||
$(document).on('mousedown', SELECTOR_DATA_TOGGLE_SCROLL_LEFT, e => {
|
||||
e.preventDefault()
|
||||
clearInterval(mousedownInterval)
|
||||
|
||||
let { scrollOffset } = this._config
|
||||
|
||||
if (!this._config.scrollBehaviorSwap) {
|
||||
scrollOffset = -scrollOffset
|
||||
}
|
||||
|
||||
mousedown = true
|
||||
this._navScroll(scrollOffset)
|
||||
|
||||
mousedownInterval = setInterval(() => {
|
||||
this._navScroll(scrollOffset)
|
||||
}, 250)
|
||||
})
|
||||
$(document).on('mousedown', SELECTOR_DATA_TOGGLE_SCROLL_RIGHT, e => {
|
||||
e.preventDefault()
|
||||
clearInterval(mousedownInterval)
|
||||
|
||||
let { scrollOffset } = this._config
|
||||
|
||||
if (this._config.scrollBehaviorSwap) {
|
||||
scrollOffset = -scrollOffset
|
||||
}
|
||||
|
||||
mousedown = true
|
||||
this._navScroll(scrollOffset)
|
||||
|
||||
mousedownInterval = setInterval(() => {
|
||||
this._navScroll(scrollOffset)
|
||||
}, 250)
|
||||
})
|
||||
$(document).on('mouseup', () => {
|
||||
if (mousedown) {
|
||||
mousedown = false
|
||||
clearInterval(mousedownInterval)
|
||||
mousedownInterval = null
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
_setItemActive(href) {
|
||||
$(`${SELECTOR_SIDEBAR_MENU_ITEM}, ${SELECTOR_HEADER_DROPDOWN_ITEM}`).removeClass('active')
|
||||
$(SELECTOR_HEADER_MENU_ITEM).parent().removeClass('active')
|
||||
|
||||
const $headerMenuItem = $(`${SELECTOR_HEADER_MENU_ITEM}[href$="${href}"]`)
|
||||
const $headerDropdownItem = $(`${SELECTOR_HEADER_DROPDOWN_ITEM}[href$="${href}"]`)
|
||||
const $sidebarMenuItem = $(`${SELECTOR_SIDEBAR_MENU_ITEM}[href$="${href}"]`)
|
||||
|
||||
$headerMenuItem.each((i, e) => {
|
||||
$(e).parent().addClass('active')
|
||||
})
|
||||
$headerDropdownItem.each((i, e) => {
|
||||
$(e).addClass('active')
|
||||
})
|
||||
$sidebarMenuItem.each((i, e) => {
|
||||
$(e).addClass('active')
|
||||
$(e).parents('.nav-treeview').prevAll('.nav-link').addClass('active')
|
||||
})
|
||||
}
|
||||
|
||||
_fixHeight(tabEmpty = false) {
|
||||
if ($('body').hasClass(CLASS_NAME_FULLSCREEN_MODE)) {
|
||||
const windowHeight = $(window).height()
|
||||
const navbarHeight = $(SELECTOR_TAB_NAV).outerHeight()
|
||||
$(`${SELECTOR_TAB_EMPTY}, ${SELECTOR_TAB_LOADING}, ${SELECTOR_CONTENT_IFRAME}`).height(windowHeight - navbarHeight)
|
||||
$(SELECTOR_CONTENT_WRAPPER).height(windowHeight)
|
||||
} else {
|
||||
const contentWrapperHeight = parseFloat($(SELECTOR_CONTENT_WRAPPER).css('height'))
|
||||
const navbarHeight = $(SELECTOR_TAB_NAV).outerHeight()
|
||||
if (tabEmpty == true) {
|
||||
setTimeout(() => {
|
||||
$(`${SELECTOR_TAB_EMPTY}, ${SELECTOR_TAB_LOADING}`).height(contentWrapperHeight - navbarHeight)
|
||||
}, 50)
|
||||
} else {
|
||||
$(SELECTOR_CONTENT_IFRAME).height(contentWrapperHeight - navbarHeight)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Static
|
||||
// eslint-disable-next-line max-params
|
||||
static _jQueryInterface(config, name, link, id, reload) {
|
||||
if ($(SELECTOR_DATA_TOGGLE).length > 0) {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
|
||||
if (!data) {
|
||||
data = $(this).data()
|
||||
}
|
||||
|
||||
const _options = $.extend({}, Default, typeof config === 'object' ? config : data)
|
||||
localStorage.setItem('AdminLTE:IFrame:Options', JSON.stringify(_options))
|
||||
const plugin = new IFrame($(this), _options)
|
||||
window.iFrameInstance = plugin
|
||||
$(this).data(DATA_KEY, typeof config === 'object' ? config : { link, name, id, reload, ...data })
|
||||
if (typeof config === 'string' && /createTab|openTabSidebar|switchTab|removeActiveTab/.test(config)) {
|
||||
plugin[config](name, link, id, reload)
|
||||
}
|
||||
} else {
|
||||
window.iFrameInstance = new IFrame($(this), JSON.parse(localStorage.getItem('AdminLTE:IFrame:Options')))._initFrameElement()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$(window).on('load', () => {
|
||||
IFrame._jQueryInterface.call($(SELECTOR_DATA_TOGGLE))
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = IFrame._jQueryInterface
|
||||
$.fn[NAME].Constructor = IFrame
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return IFrame._jQueryInterface
|
||||
}
|
||||
|
||||
export default IFrame
|
||||
@@ -1,264 +1,179 @@
|
||||
/**
|
||||
* --------------------------------------------
|
||||
* AdminLTE Layout.js
|
||||
* License MIT
|
||||
* --------------------------------------------
|
||||
/* Layout()
|
||||
* ========
|
||||
* Implements AdminLTE layout.
|
||||
* Fixes the layout height in case min-height fails.
|
||||
*
|
||||
* @usage activated automatically upon window load.
|
||||
* Configure any options by passing data-option="value"
|
||||
* to the body tag.
|
||||
*/
|
||||
+function ($) {
|
||||
'use strict'
|
||||
|
||||
import $ from 'jquery'
|
||||
var DataKey = 'lte.layout'
|
||||
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'Layout'
|
||||
const DATA_KEY = 'lte.layout'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const SELECTOR_HEADER = '.main-header'
|
||||
const SELECTOR_MAIN_SIDEBAR = '.main-sidebar'
|
||||
const SELECTOR_SIDEBAR = '.main-sidebar .sidebar'
|
||||
const SELECTOR_CONTENT = '.content-wrapper'
|
||||
const SELECTOR_CONTROL_SIDEBAR_CONTENT = '.control-sidebar-content'
|
||||
const SELECTOR_CONTROL_SIDEBAR_BTN = '[data-widget="control-sidebar"]'
|
||||
const SELECTOR_FOOTER = '.main-footer'
|
||||
const SELECTOR_PUSHMENU_BTN = '[data-widget="pushmenu"]'
|
||||
const SELECTOR_LOGIN_BOX = '.login-box'
|
||||
const SELECTOR_REGISTER_BOX = '.register-box'
|
||||
const SELECTOR_PRELOADER = '.preloader'
|
||||
|
||||
const CLASS_NAME_SIDEBAR_COLLAPSED = 'sidebar-collapse'
|
||||
const CLASS_NAME_SIDEBAR_FOCUSED = 'sidebar-focused'
|
||||
const CLASS_NAME_LAYOUT_FIXED = 'layout-fixed'
|
||||
const CLASS_NAME_CONTROL_SIDEBAR_SLIDE_OPEN = 'control-sidebar-slide-open'
|
||||
const CLASS_NAME_CONTROL_SIDEBAR_OPEN = 'control-sidebar-open'
|
||||
const CLASS_NAME_IFRAME_MODE = 'iframe-mode'
|
||||
|
||||
const Default = {
|
||||
scrollbarTheme: 'os-theme-light',
|
||||
scrollbarAutoHide: 'l',
|
||||
panelAutoHeight: true,
|
||||
panelAutoHeightMode: 'min-height',
|
||||
preloadDuration: 200,
|
||||
loginRegisterAutoHeight: true
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class Layout {
|
||||
constructor(element, config) {
|
||||
this._config = config
|
||||
this._element = element
|
||||
var Default = {
|
||||
slimscroll : true,
|
||||
resetHeight: true
|
||||
}
|
||||
|
||||
// Public
|
||||
var Selector = {
|
||||
wrapper : '.wrapper',
|
||||
contentWrapper: '.content-wrapper',
|
||||
layoutBoxed : '.layout-boxed',
|
||||
mainFooter : '.main-footer',
|
||||
mainHeader : '.main-header',
|
||||
sidebar : '.sidebar',
|
||||
controlSidebar: '.control-sidebar',
|
||||
fixed : '.fixed',
|
||||
sidebarMenu : '.sidebar-menu',
|
||||
logo : '.main-header .logo'
|
||||
}
|
||||
|
||||
fixLayoutHeight(extra = null) {
|
||||
const $body = $('body')
|
||||
let controlSidebar = 0
|
||||
var ClassName = {
|
||||
fixed : 'fixed',
|
||||
holdTransition: 'hold-transition'
|
||||
}
|
||||
|
||||
if ($body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE_OPEN) || $body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN) || extra === 'control_sidebar') {
|
||||
controlSidebar = $(SELECTOR_CONTROL_SIDEBAR_CONTENT).outerHeight()
|
||||
var Layout = function (options) {
|
||||
this.options = options
|
||||
this.bindedResize = false
|
||||
this.activate()
|
||||
}
|
||||
|
||||
Layout.prototype.activate = function () {
|
||||
this.fix()
|
||||
this.fixSidebar()
|
||||
|
||||
$('body').removeClass(ClassName.holdTransition)
|
||||
|
||||
if (this.options.resetHeight) {
|
||||
$('body, html, ' + Selector.wrapper).css({
|
||||
'height' : 'auto',
|
||||
'min-height': '100%'
|
||||
})
|
||||
}
|
||||
|
||||
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,
|
||||
controlSidebar
|
||||
if (!this.bindedResize) {
|
||||
$(window).resize(function () {
|
||||
this.fix()
|
||||
this.fixSidebar()
|
||||
|
||||
$(Selector.logo + ', ' + Selector.sidebar).one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function () {
|
||||
this.fix()
|
||||
this.fixSidebar()
|
||||
}.bind(this))
|
||||
}.bind(this))
|
||||
|
||||
this.bindedResize = true
|
||||
}
|
||||
|
||||
const max = this._max(heights)
|
||||
let offset = this._config.panelAutoHeight
|
||||
$(Selector.sidebarMenu).on('expanded.tree', function () {
|
||||
this.fix()
|
||||
this.fixSidebar()
|
||||
}.bind(this))
|
||||
|
||||
if (offset === true) {
|
||||
offset = 0
|
||||
}
|
||||
$(Selector.sidebarMenu).on('collapsed.tree', function () {
|
||||
this.fix()
|
||||
this.fixSidebar()
|
||||
}.bind(this))
|
||||
}
|
||||
|
||||
const $contentSelector = $(SELECTOR_CONTENT)
|
||||
Layout.prototype.fix = function () {
|
||||
// Remove overflow from .wrapper if layout-boxed exists
|
||||
$(Selector.layoutBoxed + ' > ' + Selector.wrapper).css('overflow', 'hidden')
|
||||
|
||||
if (offset !== false) {
|
||||
if (max === heights.controlSidebar) {
|
||||
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset))
|
||||
} else if (max === heights.window) {
|
||||
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset) - heights.header - heights.footer)
|
||||
// Get window height and the wrapper height
|
||||
var footerHeight = $(Selector.mainFooter).outerHeight() || 0
|
||||
var neg = $(Selector.mainHeader).outerHeight() + footerHeight
|
||||
var windowHeight = $(window).height()
|
||||
var sidebarHeight = $(Selector.sidebar).height() || 0
|
||||
|
||||
// Set the min-height of the content and sidebar based on
|
||||
// the height of the document.
|
||||
if ($('body').hasClass(ClassName.fixed)) {
|
||||
$(Selector.contentWrapper).css('min-height', windowHeight - footerHeight)
|
||||
} else {
|
||||
var postSetHeight
|
||||
|
||||
if (windowHeight >= sidebarHeight) {
|
||||
$(Selector.contentWrapper).css('min-height', windowHeight - neg)
|
||||
postSetHeight = windowHeight - neg
|
||||
} else {
|
||||
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset) - heights.header)
|
||||
$(Selector.contentWrapper).css('min-height', sidebarHeight)
|
||||
postSetHeight = sidebarHeight
|
||||
}
|
||||
|
||||
if (this._isFooterFixed()) {
|
||||
$contentSelector.css(this._config.panelAutoHeightMode, parseFloat($contentSelector.css(this._config.panelAutoHeightMode)) + heights.footer)
|
||||
// Fix for the control sidebar height
|
||||
var $controlSidebar = $(Selector.controlSidebar)
|
||||
if (typeof $controlSidebar !== 'undefined') {
|
||||
if ($controlSidebar.height() > postSetHeight)
|
||||
$(Selector.contentWrapper).css('min-height', $controlSidebar.height())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$body.hasClass(CLASS_NAME_LAYOUT_FIXED)) {
|
||||
Layout.prototype.fixSidebar = function () {
|
||||
// Make sure the body tag has the .fixed class
|
||||
if (!$('body').hasClass(ClassName.fixed)) {
|
||||
if (typeof $.fn.slimScroll !== 'undefined') {
|
||||
$(Selector.sidebar).slimScroll({ destroy: true }).height('auto')
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if (typeof $.fn.overlayScrollbars !== 'undefined') {
|
||||
$(SELECTOR_SIDEBAR).overlayScrollbars({
|
||||
className: this._config.scrollbarTheme,
|
||||
sizeAutoCapable: true,
|
||||
scrollbars: {
|
||||
autoHide: this._config.scrollbarAutoHide,
|
||||
clickScrolling: true
|
||||
}
|
||||
})
|
||||
} else {
|
||||
$(SELECTOR_SIDEBAR).css('overflow-y', 'auto')
|
||||
}
|
||||
}
|
||||
// Enable slimscroll for fixed layout
|
||||
if (this.options.slimscroll) {
|
||||
if (typeof $.fn.slimScroll !== 'undefined') {
|
||||
// Destroy if it exists
|
||||
$(Selector.sidebar).slimScroll({ destroy: true }).height('auto')
|
||||
|
||||
fixLoginRegisterHeight() {
|
||||
const $body = $('body')
|
||||
const $selector = $(`${SELECTOR_LOGIN_BOX}, ${SELECTOR_REGISTER_BOX}`)
|
||||
|
||||
if ($body.hasClass(CLASS_NAME_IFRAME_MODE)) {
|
||||
$body.css('height', '100%')
|
||||
$('.wrapper').css('height', '100%')
|
||||
$('html').css('height', '100%')
|
||||
} else if ($selector.length === 0) {
|
||||
$body.css('height', 'auto')
|
||||
$('html').css('height', 'auto')
|
||||
} else {
|
||||
const boxHeight = $selector.height()
|
||||
|
||||
if ($body.css(this._config.panelAutoHeightMode) !== boxHeight) {
|
||||
$body.css(this._config.panelAutoHeightMode, boxHeight)
|
||||
// Add slimscroll
|
||||
$(Selector.sidebar).slimScroll({
|
||||
height: ($(window).height() - $(Selector.mainHeader).height()) + 'px',
|
||||
color : 'rgba(0,0,0,0.2)',
|
||||
size : '3px'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_init() {
|
||||
// Activate layout height watcher
|
||||
this.fixLayoutHeight()
|
||||
|
||||
if (this._config.loginRegisterAutoHeight === true) {
|
||||
this.fixLoginRegisterHeight()
|
||||
} else if (this._config.loginRegisterAutoHeight === parseInt(this._config.loginRegisterAutoHeight, 10)) {
|
||||
setInterval(this.fixLoginRegisterHeight, this._config.loginRegisterAutoHeight)
|
||||
}
|
||||
|
||||
$(SELECTOR_SIDEBAR)
|
||||
.on('collapsed.lte.treeview expanded.lte.treeview', () => {
|
||||
this.fixLayoutHeight()
|
||||
})
|
||||
|
||||
$(SELECTOR_MAIN_SIDEBAR)
|
||||
.on('mouseenter mouseleave', () => {
|
||||
if ($('body').hasClass(CLASS_NAME_SIDEBAR_COLLAPSED)) {
|
||||
this.fixLayoutHeight()
|
||||
}
|
||||
})
|
||||
|
||||
$(SELECTOR_PUSHMENU_BTN)
|
||||
.on('collapsed.lte.pushmenu shown.lte.pushmenu', () => {
|
||||
setTimeout(() => {
|
||||
this.fixLayoutHeight()
|
||||
}, 300)
|
||||
})
|
||||
|
||||
$(SELECTOR_CONTROL_SIDEBAR_BTN)
|
||||
.on('collapsed.lte.controlsidebar', () => {
|
||||
this.fixLayoutHeight()
|
||||
})
|
||||
.on('expanded.lte.controlsidebar', () => {
|
||||
this.fixLayoutHeight('control_sidebar')
|
||||
})
|
||||
|
||||
$(window).resize(() => {
|
||||
this.fixLayoutHeight()
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
$('body.hold-transition').removeClass('hold-transition')
|
||||
}, 50)
|
||||
|
||||
setTimeout(() => {
|
||||
const $preloader = $(SELECTOR_PRELOADER)
|
||||
if ($preloader) {
|
||||
$preloader.css('height', 0)
|
||||
setTimeout(() => {
|
||||
$preloader.children().hide()
|
||||
}, 200)
|
||||
}
|
||||
}, this._config.preloadDuration)
|
||||
}
|
||||
|
||||
_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
|
||||
}
|
||||
|
||||
_isFooterFixed() {
|
||||
return $(SELECTOR_FOOTER).css('position') === 'fixed'
|
||||
}
|
||||
|
||||
// Static
|
||||
static _jQueryInterface(config) {
|
||||
// Plugin Definition
|
||||
// =================
|
||||
function Plugin(option) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = $.extend({}, Default, typeof config === 'object' ? config : $(this).data())
|
||||
var $this = $(this)
|
||||
var data = $this.data(DataKey)
|
||||
|
||||
if (!data) {
|
||||
data = new Layout($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
data._init()
|
||||
} else if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
var options = $.extend({}, Default, $this.data(), typeof option === 'object' && option)
|
||||
$this.data(DataKey, (data = new Layout(options)))
|
||||
}
|
||||
|
||||
data[config]()
|
||||
} else if (typeof config === 'undefined') {
|
||||
data._init()
|
||||
if (typeof option === 'string') {
|
||||
if (typeof data[option] === 'undefined') {
|
||||
throw new Error('No method named ' + option)
|
||||
}
|
||||
data[option]()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
var old = $.fn.layout
|
||||
|
||||
$(window).on('load', () => {
|
||||
Layout._jQueryInterface.call($('body'))
|
||||
})
|
||||
$.fn.layout = Plugin
|
||||
$.fn.layout.Constuctor = Layout
|
||||
|
||||
$(`${SELECTOR_SIDEBAR} a`)
|
||||
.on('focusin', () => {
|
||||
$(SELECTOR_MAIN_SIDEBAR).addClass(CLASS_NAME_SIDEBAR_FOCUSED)
|
||||
// No conflict mode
|
||||
// ================
|
||||
$.fn.layout.noConflict = function () {
|
||||
$.fn.layout = old
|
||||
return this
|
||||
}
|
||||
|
||||
// Layout DATA-API
|
||||
// ===============
|
||||
$(window).on('load', function () {
|
||||
Plugin.call($('body'))
|
||||
})
|
||||
.on('focusout', () => {
|
||||
$(SELECTOR_MAIN_SIDEBAR).removeClass(CLASS_NAME_SIDEBAR_FOCUSED)
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Layout._jQueryInterface
|
||||
$.fn[NAME].Constructor = Layout
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Layout._jQueryInterface
|
||||
}
|
||||
|
||||
export default Layout
|
||||
}(jQuery)
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
/**
|
||||
* --------------------------------------------
|
||||
* AdminLTE NavbarSearch.js
|
||||
* License MIT
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'NavbarSearch'
|
||||
const DATA_KEY = 'lte.navbar-search'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const SELECTOR_TOGGLE_BUTTON = '[data-widget="navbar-search"]'
|
||||
const SELECTOR_SEARCH_BLOCK = '.navbar-search-block'
|
||||
const SELECTOR_SEARCH_INPUT = '.form-control'
|
||||
|
||||
const CLASS_NAME_OPEN = 'navbar-search-open'
|
||||
|
||||
const Default = {
|
||||
resetOnClose: true,
|
||||
target: SELECTOR_SEARCH_BLOCK
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class NavbarSearch {
|
||||
constructor(_element, _options) {
|
||||
this._element = _element
|
||||
this._config = _options
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
open() {
|
||||
$(this._config.target).css('display', 'flex').hide().fadeIn().addClass(CLASS_NAME_OPEN)
|
||||
$(`${this._config.target} ${SELECTOR_SEARCH_INPUT}`).focus()
|
||||
}
|
||||
|
||||
close() {
|
||||
$(this._config.target).fadeOut().removeClass(CLASS_NAME_OPEN)
|
||||
|
||||
if (this._config.resetOnClose) {
|
||||
$(`${this._config.target} ${SELECTOR_SEARCH_INPUT}`).val('')
|
||||
}
|
||||
}
|
||||
|
||||
toggle() {
|
||||
if ($(this._config.target).hasClass(CLASS_NAME_OPEN)) {
|
||||
this.close()
|
||||
} else {
|
||||
this.open()
|
||||
}
|
||||
}
|
||||
|
||||
// Static
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = $.extend({}, Default, typeof config === 'object' ? config : $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new NavbarSearch($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
} else if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
data[config]()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
$(document).on('click', SELECTOR_TOGGLE_BUTTON, event => {
|
||||
event.preventDefault()
|
||||
|
||||
let button = $(event.currentTarget)
|
||||
|
||||
if (button.data('widget') !== 'navbar-search') {
|
||||
button = button.closest(SELECTOR_TOGGLE_BUTTON)
|
||||
}
|
||||
|
||||
NavbarSearch._jQueryInterface.call(button, 'toggle')
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = NavbarSearch._jQueryInterface
|
||||
$.fn[NAME].Constructor = NavbarSearch
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return NavbarSearch._jQueryInterface
|
||||
}
|
||||
|
||||
export default NavbarSearch
|
||||
@@ -1,233 +1,176 @@
|
||||
/**
|
||||
* --------------------------------------------
|
||||
* AdminLTE PushMenu.js
|
||||
* License MIT
|
||||
* --------------------------------------------
|
||||
/* PushMenu()
|
||||
* ==========
|
||||
* Adds the push menu functionality to the sidebar.
|
||||
*
|
||||
* @usage: $('.btn').pushMenu(options)
|
||||
* or add [data-toggle="push-menu"] to any toggle button
|
||||
* Pass any option as data-option="value"
|
||||
*/
|
||||
+function ($) {
|
||||
'use strict'
|
||||
|
||||
import $ from 'jquery'
|
||||
var DataKey = 'lte.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}`
|
||||
const EVENT_COLLAPSED_DONE = `collapsed-done${EVENT_KEY}`
|
||||
const EVENT_SHOWN = `shown${EVENT_KEY}`
|
||||
|
||||
const SELECTOR_TOGGLE_BUTTON = '[data-widget="pushmenu"]'
|
||||
const SELECTOR_BODY = 'body'
|
||||
const SELECTOR_OVERLAY = '#sidebar-overlay'
|
||||
const SELECTOR_WRAPPER = '.wrapper'
|
||||
|
||||
const CLASS_NAME_COLLAPSED = 'sidebar-collapse'
|
||||
const CLASS_NAME_OPEN = 'sidebar-open'
|
||||
const CLASS_NAME_IS_OPENING = 'sidebar-is-opening'
|
||||
const CLASS_NAME_CLOSED = 'sidebar-closed'
|
||||
|
||||
const Default = {
|
||||
autoCollapseSize: 992,
|
||||
enableRemember: false,
|
||||
noTransitionAfterReload: true,
|
||||
animationSpeed: 300
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class PushMenu {
|
||||
constructor(element, options) {
|
||||
this._element = element
|
||||
this._options = options
|
||||
|
||||
if ($(SELECTOR_OVERLAY).length === 0) {
|
||||
this._addOverlay()
|
||||
}
|
||||
|
||||
this._init()
|
||||
var Default = {
|
||||
collapseScreenSize : 767,
|
||||
expandOnHover : false,
|
||||
expandTransitionDelay: 200
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
expand() {
|
||||
const $bodySelector = $(SELECTOR_BODY)
|
||||
|
||||
if (this._options.autoCollapseSize && $(window).width() <= this._options.autoCollapseSize) {
|
||||
$bodySelector.addClass(CLASS_NAME_OPEN)
|
||||
}
|
||||
|
||||
$bodySelector.addClass(CLASS_NAME_IS_OPENING).removeClass(`${CLASS_NAME_COLLAPSED} ${CLASS_NAME_CLOSED}`).delay(50).queue(function () {
|
||||
$bodySelector.removeClass(CLASS_NAME_IS_OPENING)
|
||||
$(this).dequeue()
|
||||
})
|
||||
|
||||
if (this._options.enableRemember) {
|
||||
localStorage.setItem(`remember${EVENT_KEY}`, CLASS_NAME_OPEN)
|
||||
}
|
||||
|
||||
$(this._element).trigger($.Event(EVENT_SHOWN))
|
||||
var Selector = {
|
||||
collapsed : '.sidebar-collapse',
|
||||
open : '.sidebar-open',
|
||||
mainSidebar : '.main-sidebar',
|
||||
contentWrapper: '.content-wrapper',
|
||||
searchInput : '.sidebar-form .form-control',
|
||||
button : '[data-toggle="push-menu"]',
|
||||
mini : '.sidebar-mini',
|
||||
expanded : '.sidebar-expanded-on-hover',
|
||||
layoutFixed : '.fixed'
|
||||
}
|
||||
|
||||
collapse() {
|
||||
const $bodySelector = $(SELECTOR_BODY)
|
||||
|
||||
if (this._options.autoCollapseSize && $(window).width() <= this._options.autoCollapseSize) {
|
||||
$bodySelector.removeClass(CLASS_NAME_OPEN).addClass(CLASS_NAME_CLOSED)
|
||||
}
|
||||
|
||||
$bodySelector.addClass(CLASS_NAME_COLLAPSED)
|
||||
|
||||
if (this._options.enableRemember) {
|
||||
localStorage.setItem(`remember${EVENT_KEY}`, CLASS_NAME_COLLAPSED)
|
||||
}
|
||||
|
||||
$(this._element).trigger($.Event(EVENT_COLLAPSED))
|
||||
|
||||
setTimeout(() => {
|
||||
$(this._element).trigger($.Event(EVENT_COLLAPSED_DONE))
|
||||
}, this._options.animationSpeed)
|
||||
var ClassName = {
|
||||
collapsed : 'sidebar-collapse',
|
||||
open : 'sidebar-open',
|
||||
mini : 'sidebar-mini',
|
||||
expanded : 'sidebar-expanded-on-hover',
|
||||
expandFeature: 'sidebar-mini-expand-feature',
|
||||
layoutFixed : 'fixed'
|
||||
}
|
||||
|
||||
toggle() {
|
||||
if ($(SELECTOR_BODY).hasClass(CLASS_NAME_COLLAPSED)) {
|
||||
this.expand()
|
||||
} else {
|
||||
this.collapse()
|
||||
}
|
||||
var Event = {
|
||||
expanded : 'expanded.pushMenu',
|
||||
collapsed: 'collapsed.pushMenu'
|
||||
}
|
||||
|
||||
autoCollapse(resize = false) {
|
||||
if (!this._options.autoCollapseSize) {
|
||||
return
|
||||
// PushMenu Class Definition
|
||||
// =========================
|
||||
var PushMenu = function (options) {
|
||||
this.options = options
|
||||
this.init()
|
||||
}
|
||||
|
||||
PushMenu.prototype.init = function () {
|
||||
if (this.options.expandOnHover
|
||||
|| ($('body').is(Selector.mini + Selector.layoutFixed))) {
|
||||
this.expandOnHover()
|
||||
$('body').addClass(ClassName.expandFeature)
|
||||
}
|
||||
|
||||
const $bodySelector = $(SELECTOR_BODY)
|
||||
|
||||
if ($(window).width() <= this._options.autoCollapseSize) {
|
||||
if (!$bodySelector.hasClass(CLASS_NAME_OPEN)) {
|
||||
this.collapse()
|
||||
$(Selector.contentWrapper).click(function () {
|
||||
// Enable hide menu when clicking on the content-wrapper on small screens
|
||||
if ($(window).width() <= this.options.collapseScreenSize && $('body').hasClass(ClassName.open)) {
|
||||
this.close()
|
||||
}
|
||||
} else if (resize === true) {
|
||||
if ($bodySelector.hasClass(CLASS_NAME_OPEN)) {
|
||||
$bodySelector.removeClass(CLASS_NAME_OPEN)
|
||||
} else if ($bodySelector.hasClass(CLASS_NAME_CLOSED)) {
|
||||
}.bind(this))
|
||||
|
||||
// __Fix for android devices
|
||||
$(Selector.searchInput).click(function (e) {
|
||||
e.stopPropagation()
|
||||
})
|
||||
}
|
||||
|
||||
PushMenu.prototype.toggle = function () {
|
||||
var windowWidth = $(window).width()
|
||||
var isOpen = !$('body').hasClass(ClassName.collapsed)
|
||||
|
||||
if (windowWidth <= this.options.collapseScreenSize) {
|
||||
isOpen = $('body').hasClass(ClassName.open)
|
||||
}
|
||||
|
||||
if (!isOpen) {
|
||||
this.open()
|
||||
} else {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
|
||||
PushMenu.prototype.open = function () {
|
||||
var windowWidth = $(window).width()
|
||||
|
||||
if (windowWidth > this.options.collapseScreenSize) {
|
||||
$('body').removeClass(ClassName.collapsed)
|
||||
.trigger($.Event(Event.expanded))
|
||||
}
|
||||
else {
|
||||
$('body').addClass(ClassName.open)
|
||||
.trigger($.Event(Event.expanded))
|
||||
}
|
||||
}
|
||||
|
||||
PushMenu.prototype.close = function () {
|
||||
var windowWidth = $(window).width()
|
||||
if (windowWidth > this.options.collapseScreenSize) {
|
||||
$('body').addClass(ClassName.collapsed)
|
||||
.trigger($.Event(Event.collapsed))
|
||||
} else {
|
||||
$('body').removeClass(ClassName.open + ' ' + ClassName.collapsed)
|
||||
.trigger($.Event(Event.collapsed))
|
||||
}
|
||||
}
|
||||
|
||||
PushMenu.prototype.expandOnHover = function () {
|
||||
$(Selector.mainSidebar).hover(function () {
|
||||
if ($('body').is(Selector.mini + Selector.collapsed)
|
||||
&& $(window).width() > this.options.collapseScreenSize) {
|
||||
this.expand()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
remember() {
|
||||
if (!this._options.enableRemember) {
|
||||
return
|
||||
}
|
||||
|
||||
const $body = $('body')
|
||||
const toggleState = localStorage.getItem(`remember${EVENT_KEY}`)
|
||||
|
||||
if (toggleState === CLASS_NAME_COLLAPSED) {
|
||||
if (this._options.noTransitionAfterReload) {
|
||||
$body.addClass('hold-transition').addClass(CLASS_NAME_COLLAPSED).delay(50).queue(function () {
|
||||
$(this).removeClass('hold-transition')
|
||||
$(this).dequeue()
|
||||
})
|
||||
} else {
|
||||
$body.addClass(CLASS_NAME_COLLAPSED)
|
||||
}.bind(this), function () {
|
||||
if ($('body').is(Selector.expanded)) {
|
||||
this.collapse()
|
||||
}
|
||||
} else if (this._options.noTransitionAfterReload) {
|
||||
$body.addClass('hold-transition').removeClass(CLASS_NAME_COLLAPSED).delay(50).queue(function () {
|
||||
$(this).removeClass('hold-transition')
|
||||
$(this).dequeue()
|
||||
})
|
||||
} else {
|
||||
$body.removeClass(CLASS_NAME_COLLAPSED)
|
||||
}
|
||||
}.bind(this))
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_init() {
|
||||
this.remember()
|
||||
this.autoCollapse()
|
||||
|
||||
$(window).resize(() => {
|
||||
this.autoCollapse(true)
|
||||
})
|
||||
PushMenu.prototype.expand = function () {
|
||||
setTimeout(function () {
|
||||
$('body').removeClass(ClassName.collapsed)
|
||||
.addClass(ClassName.expanded)
|
||||
}, this.options.expandTransitionDelay)
|
||||
}
|
||||
|
||||
_addOverlay() {
|
||||
const overlay = $('<div />', {
|
||||
id: 'sidebar-overlay'
|
||||
})
|
||||
|
||||
overlay.on('click', () => {
|
||||
this.collapse()
|
||||
})
|
||||
|
||||
$(SELECTOR_WRAPPER).append(overlay)
|
||||
PushMenu.prototype.collapse = function () {
|
||||
setTimeout(function () {
|
||||
$('body').removeClass(ClassName.expanded)
|
||||
.addClass(ClassName.collapsed)
|
||||
}, this.options.expandTransitionDelay)
|
||||
}
|
||||
|
||||
// Static
|
||||
static _jQueryInterface(config) {
|
||||
// PushMenu Plugin Definition
|
||||
// ==========================
|
||||
function Plugin(option) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = $.extend({}, Default, typeof config === 'object' ? config : $(this).data())
|
||||
var $this = $(this)
|
||||
var data = $this.data(DataKey)
|
||||
|
||||
if (!data) {
|
||||
data = new PushMenu($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
data._init()
|
||||
} else if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
data[config]()
|
||||
} else if (typeof config === 'undefined') {
|
||||
data._init()
|
||||
var options = $.extend({}, Default, $this.data(), typeof option == 'object' && option)
|
||||
$this.data(DataKey, (data = new PushMenu(options)))
|
||||
}
|
||||
|
||||
if (option == 'toggle') data.toggle()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
var old = $.fn.pushMenu
|
||||
|
||||
$(document).on('click', SELECTOR_TOGGLE_BUTTON, event => {
|
||||
event.preventDefault()
|
||||
$.fn.pushMenu = Plugin
|
||||
$.fn.pushMenu.Constructor = PushMenu
|
||||
|
||||
let button = event.currentTarget
|
||||
|
||||
if ($(button).data('widget') !== 'pushmenu') {
|
||||
button = $(button).closest(SELECTOR_TOGGLE_BUTTON)
|
||||
// No Conflict Mode
|
||||
// ================
|
||||
$.fn.pushMenu.noConflict = function () {
|
||||
$.fn.pushMenu = old
|
||||
return this
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
export default PushMenu
|
||||
// Data API
|
||||
// ========
|
||||
$(document).on('click', Selector.button, function (e) {
|
||||
e.preventDefault()
|
||||
Plugin.call($(this), 'toggle')
|
||||
})
|
||||
$(window).on('load', function () {
|
||||
Plugin.call($(Selector.button))
|
||||
})
|
||||
}(jQuery)
|
||||
|
||||
@@ -1,300 +0,0 @@
|
||||
/**
|
||||
* --------------------------------------------
|
||||
* AdminLTE SidebarSearch.js
|
||||
* License MIT
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
import $, { trim } from 'jquery'
|
||||
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'SidebarSearch'
|
||||
const DATA_KEY = 'lte.sidebar-search'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const CLASS_NAME_OPEN = 'sidebar-search-open'
|
||||
const CLASS_NAME_ICON_SEARCH = 'fa-search'
|
||||
const CLASS_NAME_ICON_CLOSE = 'fa-times'
|
||||
const CLASS_NAME_HEADER = 'nav-header'
|
||||
const CLASS_NAME_SEARCH_RESULTS = 'sidebar-search-results'
|
||||
const CLASS_NAME_LIST_GROUP = 'list-group'
|
||||
|
||||
const SELECTOR_DATA_WIDGET = '[data-widget="sidebar-search"]'
|
||||
const SELECTOR_SIDEBAR = '.main-sidebar .nav-sidebar'
|
||||
const SELECTOR_NAV_LINK = '.nav-link'
|
||||
const SELECTOR_NAV_TREEVIEW = '.nav-treeview'
|
||||
const SELECTOR_SEARCH_INPUT = `${SELECTOR_DATA_WIDGET} .form-control`
|
||||
const SELECTOR_SEARCH_BUTTON = `${SELECTOR_DATA_WIDGET} .btn`
|
||||
const SELECTOR_SEARCH_ICON = `${SELECTOR_SEARCH_BUTTON} i`
|
||||
const SELECTOR_SEARCH_LIST_GROUP = `.${CLASS_NAME_LIST_GROUP}`
|
||||
const SELECTOR_SEARCH_RESULTS = `.${CLASS_NAME_SEARCH_RESULTS}`
|
||||
const SELECTOR_SEARCH_RESULTS_GROUP = `${SELECTOR_SEARCH_RESULTS} .${CLASS_NAME_LIST_GROUP}`
|
||||
|
||||
const Default = {
|
||||
arrowSign: '->',
|
||||
minLength: 3,
|
||||
maxResults: 7,
|
||||
highlightName: true,
|
||||
highlightPath: false,
|
||||
highlightClass: 'text-light',
|
||||
notFoundText: 'No element found!'
|
||||
}
|
||||
|
||||
const SearchItems = []
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class SidebarSearch {
|
||||
constructor(_element, _options) {
|
||||
this.element = _element
|
||||
this.options = $.extend({}, Default, _options)
|
||||
this.items = []
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
_init() {
|
||||
if ($(SELECTOR_DATA_WIDGET).length === 0) {
|
||||
return
|
||||
}
|
||||
|
||||
if ($(SELECTOR_DATA_WIDGET).next(SELECTOR_SEARCH_RESULTS).length === 0) {
|
||||
$(SELECTOR_DATA_WIDGET).after(
|
||||
$('<div />', { class: CLASS_NAME_SEARCH_RESULTS })
|
||||
)
|
||||
}
|
||||
|
||||
if ($(SELECTOR_SEARCH_RESULTS).children(SELECTOR_SEARCH_LIST_GROUP).length === 0) {
|
||||
$(SELECTOR_SEARCH_RESULTS).append(
|
||||
$('<div />', { class: CLASS_NAME_LIST_GROUP })
|
||||
)
|
||||
}
|
||||
|
||||
this._addNotFound()
|
||||
|
||||
$(SELECTOR_SIDEBAR).children().each((i, child) => {
|
||||
this._parseItem(child)
|
||||
})
|
||||
}
|
||||
|
||||
search() {
|
||||
const searchValue = $(SELECTOR_SEARCH_INPUT).val().toLowerCase()
|
||||
if (searchValue.length < this.options.minLength) {
|
||||
$(SELECTOR_SEARCH_RESULTS_GROUP).empty()
|
||||
this._addNotFound()
|
||||
this.close()
|
||||
return
|
||||
}
|
||||
|
||||
const searchResults = SearchItems.filter(item => (item.name).toLowerCase().includes(searchValue))
|
||||
const endResults = $(searchResults.slice(0, this.options.maxResults))
|
||||
$(SELECTOR_SEARCH_RESULTS_GROUP).empty()
|
||||
|
||||
if (endResults.length === 0) {
|
||||
this._addNotFound()
|
||||
} else {
|
||||
endResults.each((i, result) => {
|
||||
$(SELECTOR_SEARCH_RESULTS_GROUP).append(this._renderItem(escape(result.name), encodeURI(result.link), result.path))
|
||||
})
|
||||
}
|
||||
|
||||
this.open()
|
||||
}
|
||||
|
||||
open() {
|
||||
$(SELECTOR_DATA_WIDGET).parent().addClass(CLASS_NAME_OPEN)
|
||||
$(SELECTOR_SEARCH_ICON).removeClass(CLASS_NAME_ICON_SEARCH).addClass(CLASS_NAME_ICON_CLOSE)
|
||||
}
|
||||
|
||||
close() {
|
||||
$(SELECTOR_DATA_WIDGET).parent().removeClass(CLASS_NAME_OPEN)
|
||||
$(SELECTOR_SEARCH_ICON).removeClass(CLASS_NAME_ICON_CLOSE).addClass(CLASS_NAME_ICON_SEARCH)
|
||||
}
|
||||
|
||||
toggle() {
|
||||
if ($(SELECTOR_DATA_WIDGET).parent().hasClass(CLASS_NAME_OPEN)) {
|
||||
this.close()
|
||||
} else {
|
||||
this.open()
|
||||
}
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_parseItem(item, path = []) {
|
||||
if ($(item).hasClass(CLASS_NAME_HEADER)) {
|
||||
return
|
||||
}
|
||||
|
||||
const itemObject = {}
|
||||
const navLink = $(item).clone().find(`> ${SELECTOR_NAV_LINK}`)
|
||||
const navTreeview = $(item).clone().find(`> ${SELECTOR_NAV_TREEVIEW}`)
|
||||
|
||||
const link = navLink.attr('href')
|
||||
const name = navLink.find('p').children().remove().end().text()
|
||||
|
||||
itemObject.name = this._trimText(name)
|
||||
itemObject.link = link
|
||||
itemObject.path = path
|
||||
|
||||
if (navTreeview.length === 0) {
|
||||
SearchItems.push(itemObject)
|
||||
} else {
|
||||
const newPath = itemObject.path.concat([itemObject.name])
|
||||
navTreeview.children().each((i, child) => {
|
||||
this._parseItem(child, newPath)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
_trimText(text) {
|
||||
return trim(text.replace(/(\r\n|\n|\r)/gm, ' '))
|
||||
}
|
||||
|
||||
_renderItem(name, link, path) {
|
||||
path = path.join(` ${this.options.arrowSign} `)
|
||||
name = unescape(name)
|
||||
link = decodeURI(link)
|
||||
|
||||
if (this.options.highlightName || this.options.highlightPath) {
|
||||
const searchValue = $(SELECTOR_SEARCH_INPUT).val().toLowerCase()
|
||||
const regExp = new RegExp(searchValue, 'gi')
|
||||
|
||||
if (this.options.highlightName) {
|
||||
name = name.replace(
|
||||
regExp,
|
||||
str => {
|
||||
return `<strong class="${this.options.highlightClass}">${str}</strong>`
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
if (this.options.highlightPath) {
|
||||
path = path.replace(
|
||||
regExp,
|
||||
str => {
|
||||
return `<strong class="${this.options.highlightClass}">${str}</strong>`
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const groupItemElement = $('<a/>', {
|
||||
href: decodeURIComponent(link),
|
||||
class: 'list-group-item'
|
||||
})
|
||||
const searchTitleElement = $('<div/>', {
|
||||
class: 'search-title'
|
||||
}).html(name)
|
||||
const searchPathElement = $('<div/>', {
|
||||
class: 'search-path'
|
||||
}).html(path)
|
||||
|
||||
groupItemElement.append(searchTitleElement).append(searchPathElement)
|
||||
|
||||
return groupItemElement
|
||||
}
|
||||
|
||||
_addNotFound() {
|
||||
$(SELECTOR_SEARCH_RESULTS_GROUP).append(this._renderItem(this.options.notFoundText, '#', []))
|
||||
}
|
||||
|
||||
// Static
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = $.extend({}, Default, typeof config === 'object' ? config : $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new SidebarSearch($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
data._init()
|
||||
} else if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
data[config]()
|
||||
} else if (typeof config === 'undefined') {
|
||||
data._init()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
$(document).on('click', SELECTOR_SEARCH_BUTTON, event => {
|
||||
event.preventDefault()
|
||||
|
||||
SidebarSearch._jQueryInterface.call($(SELECTOR_DATA_WIDGET), 'toggle')
|
||||
})
|
||||
|
||||
$(document).on('keyup', SELECTOR_SEARCH_INPUT, event => {
|
||||
if (event.keyCode == 38) {
|
||||
event.preventDefault()
|
||||
$(SELECTOR_SEARCH_RESULTS_GROUP).children().last().focus()
|
||||
return
|
||||
}
|
||||
|
||||
if (event.keyCode == 40) {
|
||||
event.preventDefault()
|
||||
$(SELECTOR_SEARCH_RESULTS_GROUP).children().first().focus()
|
||||
return
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
SidebarSearch._jQueryInterface.call($(SELECTOR_DATA_WIDGET), 'search')
|
||||
}, 100)
|
||||
})
|
||||
|
||||
$(document).on('keydown', SELECTOR_SEARCH_RESULTS_GROUP, event => {
|
||||
const $focused = $(':focus')
|
||||
|
||||
if (event.keyCode == 38) {
|
||||
event.preventDefault()
|
||||
|
||||
if ($focused.is(':first-child')) {
|
||||
$focused.siblings().last().focus()
|
||||
} else {
|
||||
$focused.prev().focus()
|
||||
}
|
||||
}
|
||||
|
||||
if (event.keyCode == 40) {
|
||||
event.preventDefault()
|
||||
|
||||
if ($focused.is(':last-child')) {
|
||||
$focused.siblings().first().focus()
|
||||
} else {
|
||||
$focused.next().focus()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
$(window).on('load', () => {
|
||||
SidebarSearch._jQueryInterface.call($(SELECTOR_DATA_WIDGET), 'init')
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
$.fn[NAME] = SidebarSearch._jQueryInterface
|
||||
$.fn[NAME].Constructor = SidebarSearch
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return SidebarSearch._jQueryInterface
|
||||
}
|
||||
|
||||
export default SidebarSearch
|
||||
@@ -1,210 +0,0 @@
|
||||
// noinspection EqualityComparisonWithCoercionJS
|
||||
|
||||
/**
|
||||
* --------------------------------------------
|
||||
* AdminLTE Toasts.js
|
||||
* License MIT
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
|
||||
/**
|
||||
* 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}`
|
||||
const EVENT_CREATED = `created${EVENT_KEY}`
|
||||
const EVENT_REMOVED = `removed${EVENT_KEY}`
|
||||
|
||||
const SELECTOR_CONTAINER_TOP_RIGHT = '#toastsContainerTopRight'
|
||||
const SELECTOR_CONTAINER_TOP_LEFT = '#toastsContainerTopLeft'
|
||||
const SELECTOR_CONTAINER_BOTTOM_RIGHT = '#toastsContainerBottomRight'
|
||||
const SELECTOR_CONTAINER_BOTTOM_LEFT = '#toastsContainerBottomLeft'
|
||||
|
||||
const CLASS_NAME_TOP_RIGHT = 'toasts-top-right'
|
||||
const CLASS_NAME_TOP_LEFT = 'toasts-top-left'
|
||||
const CLASS_NAME_BOTTOM_RIGHT = 'toasts-bottom-right'
|
||||
const CLASS_NAME_BOTTOM_LEFT = 'toasts-bottom-left'
|
||||
|
||||
const POSITION_TOP_RIGHT = 'topRight'
|
||||
const POSITION_TOP_LEFT = 'topLeft'
|
||||
const POSITION_BOTTOM_RIGHT = 'bottomRight'
|
||||
const POSITION_BOTTOM_LEFT = 'bottomLeft'
|
||||
|
||||
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()
|
||||
|
||||
$('body').trigger($.Event(EVENT_INIT))
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
create() {
|
||||
const 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)
|
||||
}
|
||||
|
||||
const toastHeader = $('<div class="toast-header">')
|
||||
|
||||
if (this._config.image != null) {
|
||||
const toastImage = $('<img />').addClass('rounded mr-2').attr('src', this._config.image).attr('alt', this._config.imageAlt)
|
||||
|
||||
if (this._config.imageHeight != null) {
|
||||
toastImage.height(this._config.imageHeight).width('auto')
|
||||
}
|
||||
|
||||
toastHeader.append(toastImage)
|
||||
}
|
||||
|
||||
if (this._config.icon != null) {
|
||||
toastHeader.append($('<i />').addClass('mr-2').addClass(this._config.icon))
|
||||
}
|
||||
|
||||
if (this._config.title != null) {
|
||||
toastHeader.append($('<strong />').addClass('mr-auto').html(this._config.title))
|
||||
}
|
||||
|
||||
if (this._config.subtitle != null) {
|
||||
toastHeader.append($('<small />').html(this._config.subtitle))
|
||||
}
|
||||
|
||||
if (this._config.close == true) {
|
||||
const toastClose = $('<button data-dismiss="toast" />').attr('type', 'button').addClass('ml-2 mb-1 close').attr('aria-label', 'Close').append('<span aria-hidden="true">×</span>')
|
||||
|
||||
if (this._config.title == null) {
|
||||
toastClose.toggleClass('ml-2 ml-auto')
|
||||
}
|
||||
|
||||
toastHeader.append(toastClose)
|
||||
}
|
||||
|
||||
toast.append(toastHeader)
|
||||
|
||||
if (this._config.body != null) {
|
||||
toast.append($('<div class="toast-body" />').html(this._config.body))
|
||||
}
|
||||
|
||||
$(this._getContainerId()).prepend(toast)
|
||||
|
||||
const $body = $('body')
|
||||
|
||||
$body.trigger($.Event(EVENT_CREATED))
|
||||
toast.toast('show')
|
||||
|
||||
if (this._config.autoremove) {
|
||||
toast.on('hidden.bs.toast', function () {
|
||||
$(this).delay(200).remove()
|
||||
$body.trigger($.Event(EVENT_REMOVED))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
_getContainerId() {
|
||||
if (this._config.position === POSITION_TOP_RIGHT) {
|
||||
return SELECTOR_CONTAINER_TOP_RIGHT
|
||||
}
|
||||
|
||||
if (this._config.position === POSITION_TOP_LEFT) {
|
||||
return SELECTOR_CONTAINER_TOP_LEFT
|
||||
}
|
||||
|
||||
if (this._config.position === POSITION_BOTTOM_RIGHT) {
|
||||
return SELECTOR_CONTAINER_BOTTOM_RIGHT
|
||||
}
|
||||
|
||||
if (this._config.position === POSITION_BOTTOM_LEFT) {
|
||||
return SELECTOR_CONTAINER_BOTTOM_LEFT
|
||||
}
|
||||
}
|
||||
|
||||
_prepareContainer() {
|
||||
if ($(this._getContainerId()).length === 0) {
|
||||
const container = $('<div />').attr('id', this._getContainerId().replace('#', ''))
|
||||
if (this._config.position == POSITION_TOP_RIGHT) {
|
||||
container.addClass(CLASS_NAME_TOP_RIGHT)
|
||||
} else if (this._config.position == POSITION_TOP_LEFT) {
|
||||
container.addClass(CLASS_NAME_TOP_LEFT)
|
||||
} else if (this._config.position == POSITION_BOTTOM_RIGHT) {
|
||||
container.addClass(CLASS_NAME_BOTTOM_RIGHT)
|
||||
} else if (this._config.position == POSITION_BOTTOM_LEFT) {
|
||||
container.addClass(CLASS_NAME_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)
|
||||
const 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
|
||||
}
|
||||
|
||||
export default Toasts
|
||||
@@ -1,51 +1,44 @@
|
||||
/**
|
||||
* --------------------------------------------
|
||||
* AdminLTE TodoList.js
|
||||
* License MIT
|
||||
* --------------------------------------------
|
||||
/* TodoList()
|
||||
* =========
|
||||
* Converts a list into a todoList.
|
||||
*
|
||||
* @Usage: $('.my-list').todoList(options)
|
||||
* or add [data-widget="todo-list"] to the ul element
|
||||
* Pass any option as data-option="value"
|
||||
*/
|
||||
+function ($) {
|
||||
'use strict'
|
||||
|
||||
import $ from 'jquery'
|
||||
var DataKey = 'lte.todolist'
|
||||
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'TodoList'
|
||||
const DATA_KEY = 'lte.todolist'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const SELECTOR_DATA_TOGGLE = '[data-widget="todo-list"]'
|
||||
const CLASS_NAME_TODO_LIST_DONE = 'done'
|
||||
|
||||
const Default = {
|
||||
onCheck(item) {
|
||||
return item
|
||||
},
|
||||
onUnCheck(item) {
|
||||
return item
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
class TodoList {
|
||||
constructor(element, config) {
|
||||
this._config = config
|
||||
this._element = element
|
||||
|
||||
this._init()
|
||||
var Default = {
|
||||
iCheck : false,
|
||||
onCheck : function () {
|
||||
},
|
||||
onUnCheck: function () {
|
||||
}
|
||||
}
|
||||
|
||||
// Public
|
||||
var Selector = {
|
||||
data: '[data-widget="todo-list"]'
|
||||
}
|
||||
|
||||
toggle(item) {
|
||||
item.parents('li').toggleClass(CLASS_NAME_TODO_LIST_DONE)
|
||||
if (!$(item).prop('checked')) {
|
||||
var ClassName = {
|
||||
done: 'done'
|
||||
}
|
||||
|
||||
// TodoList Class Definition
|
||||
// =========================
|
||||
var TodoList = function (element, options) {
|
||||
this.element = element
|
||||
this.options = options
|
||||
|
||||
this._setUpListeners()
|
||||
}
|
||||
|
||||
TodoList.prototype.toggle = function (item) {
|
||||
item.parents(Selector.li).first().toggleClass(ClassName.done)
|
||||
if (!item.prop('checked')) {
|
||||
this.unCheck(item)
|
||||
return
|
||||
}
|
||||
@@ -53,67 +46,62 @@ class TodoList {
|
||||
this.check(item)
|
||||
}
|
||||
|
||||
check(item) {
|
||||
this._config.onCheck(item)
|
||||
TodoList.prototype.check = function (item) {
|
||||
this.options.onCheck.call(item)
|
||||
}
|
||||
|
||||
unCheck(item) {
|
||||
this._config.onUnCheck(item)
|
||||
TodoList.prototype.unCheck = function (item) {
|
||||
this.options.onUnCheck.call(item)
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_init() {
|
||||
const $toggleSelector = this._element
|
||||
|
||||
$toggleSelector.find('input:checkbox:checked').parents('li').toggleClass(CLASS_NAME_TODO_LIST_DONE)
|
||||
$toggleSelector.on('change', 'input:checkbox', event => {
|
||||
this.toggle($(event.target))
|
||||
TodoList.prototype._setUpListeners = function () {
|
||||
var that = this
|
||||
$(this.element).on('change ifChanged', 'input:checkbox', function () {
|
||||
that.toggle($(this))
|
||||
})
|
||||
}
|
||||
|
||||
// Static
|
||||
static _jQueryInterface(config) {
|
||||
// Plugin Definition
|
||||
// =================
|
||||
function Plugin(option) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = $.extend({}, Default, typeof config === 'object' ? config : $(this).data())
|
||||
var $this = $(this)
|
||||
var data = $this.data(DataKey)
|
||||
|
||||
if (!data) {
|
||||
data = new TodoList($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
data._init()
|
||||
} else if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
var options = $.extend({}, Default, $this.data(), typeof option == 'object' && option)
|
||||
$this.data(DataKey, (data = new TodoList($this, options)))
|
||||
}
|
||||
|
||||
data[config]()
|
||||
} else if (typeof config === 'undefined') {
|
||||
data._init()
|
||||
if (typeof data == 'string') {
|
||||
if (typeof data[option] == 'undefined') {
|
||||
throw new Error('No method named ' + option)
|
||||
}
|
||||
data[option]()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
var old = $.fn.todoList
|
||||
|
||||
$(window).on('load', () => {
|
||||
TodoList._jQueryInterface.call($(SELECTOR_DATA_TOGGLE))
|
||||
})
|
||||
$.fn.todoList = Plugin
|
||||
$.fn.todoList.Constructor = TodoList
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
* ====================================================
|
||||
*/
|
||||
// No Conflict Mode
|
||||
// ================
|
||||
$.fn.todoList.noConflict = function () {
|
||||
$.fn.todoList = old
|
||||
return this
|
||||
}
|
||||
|
||||
$.fn[NAME] = TodoList._jQueryInterface
|
||||
$.fn[NAME].Constructor = TodoList
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return TodoList._jQueryInterface
|
||||
}
|
||||
// TodoList Data API
|
||||
// =================
|
||||
$(window).on('load', function () {
|
||||
$(Selector.data).each(function () {
|
||||
Plugin.call($(this))
|
||||
})
|
||||
})
|
||||
|
||||
export default TodoList
|
||||
}(jQuery)
|
||||
|
||||
145
build/js/Tree.js
Normal file
145
build/js/Tree.js
Normal file
@@ -0,0 +1,145 @@
|
||||
/* Tree()
|
||||
* ======
|
||||
* Converts a nested list into a multilevel
|
||||
* tree view menu.
|
||||
*
|
||||
* @Usage: $('.my-menu').tree(options)
|
||||
* or add [data-widget="tree"] to the ul element
|
||||
* Pass any option as data-option="value"
|
||||
*/
|
||||
+function ($) {
|
||||
'use strict'
|
||||
|
||||
var DataKey = 'lte.tree'
|
||||
|
||||
var Default = {
|
||||
animationSpeed: 500,
|
||||
accordion : true,
|
||||
followLink : false,
|
||||
trigger : '.treeview a'
|
||||
}
|
||||
|
||||
var Selector = {
|
||||
tree : '.tree',
|
||||
treeview : '.treeview',
|
||||
treeviewMenu: '.treeview-menu',
|
||||
open : '.menu-open, .active',
|
||||
li : 'li',
|
||||
data : '[data-widget="tree"]',
|
||||
active : '.active'
|
||||
}
|
||||
|
||||
var ClassName = {
|
||||
open: 'menu-open',
|
||||
tree: 'tree'
|
||||
}
|
||||
|
||||
var Event = {
|
||||
collapsed: 'collapsed.tree',
|
||||
expanded : 'expanded.tree'
|
||||
}
|
||||
|
||||
// Tree Class Definition
|
||||
// =====================
|
||||
var Tree = function (element, options) {
|
||||
this.element = element
|
||||
this.options = options
|
||||
|
||||
$(this.element).addClass(ClassName.tree)
|
||||
|
||||
$(Selector.treeview + Selector.active, this.element).addClass(ClassName.open)
|
||||
|
||||
this._setUpListeners()
|
||||
}
|
||||
|
||||
Tree.prototype.toggle = function (link, event) {
|
||||
var treeviewMenu = link.next(Selector.treeviewMenu)
|
||||
var parentLi = link.parent()
|
||||
var isOpen = parentLi.hasClass(ClassName.open)
|
||||
|
||||
if (!parentLi.is(Selector.treeview)) {
|
||||
return
|
||||
}
|
||||
|
||||
if (!this.options.followLink || link.attr('href') == '#') {
|
||||
event.preventDefault()
|
||||
}
|
||||
|
||||
if (isOpen) {
|
||||
this.collapse(treeviewMenu, parentLi)
|
||||
} else {
|
||||
this.expand(treeviewMenu, parentLi)
|
||||
}
|
||||
}
|
||||
|
||||
Tree.prototype.expand = function (tree, parent) {
|
||||
var expandedEvent = $.Event(Event.expanded)
|
||||
|
||||
if (this.options.accordion) {
|
||||
var openMenuLi = parent.siblings(Selector.open)
|
||||
var openTree = openMenuLi.children(Selector.treeviewMenu)
|
||||
this.collapse(openTree, openMenuLi)
|
||||
}
|
||||
|
||||
parent.addClass(ClassName.open)
|
||||
tree.slideDown(this.options.animationSpeed, function () {
|
||||
$(this.element).trigger(expandedEvent)
|
||||
}.bind(this))
|
||||
}
|
||||
|
||||
Tree.prototype.collapse = function (tree, parentLi) {
|
||||
var collapsedEvent = $.Event(Event.collapsed)
|
||||
|
||||
tree.find(Selector.open).removeClass(ClassName.open)
|
||||
parentLi.removeClass(ClassName.open)
|
||||
tree.slideUp(this.options.animationSpeed, function () {
|
||||
tree.find(Selector.open + ' > ' + Selector.treeview).slideUp()
|
||||
$(this.element).trigger(collapsedEvent)
|
||||
}.bind(this))
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
Tree.prototype._setUpListeners = function () {
|
||||
var that = this
|
||||
|
||||
$(this.element).on('click', this.options.trigger, function (event) {
|
||||
that.toggle($(this), event)
|
||||
})
|
||||
}
|
||||
|
||||
// Plugin Definition
|
||||
// =================
|
||||
function Plugin(option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
var data = $this.data(DataKey)
|
||||
|
||||
if (!data) {
|
||||
var options = $.extend({}, Default, $this.data(), typeof option == 'object' && option)
|
||||
$this.data(DataKey, new Tree($this, options))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
var old = $.fn.tree
|
||||
|
||||
$.fn.tree = Plugin
|
||||
$.fn.tree.Constructor = Tree
|
||||
|
||||
// No Conflict Mode
|
||||
// ================
|
||||
$.fn.tree.noConflict = function () {
|
||||
$.fn.tree = old
|
||||
return this
|
||||
}
|
||||
|
||||
// Tree Data API
|
||||
// =============
|
||||
$(window).on('load', function () {
|
||||
$(Selector.data).each(function () {
|
||||
Plugin.call($(this))
|
||||
})
|
||||
})
|
||||
|
||||
}(jQuery)
|
||||
@@ -1,179 +0,0 @@
|
||||
/**
|
||||
* --------------------------------------------
|
||||
* AdminLTE Treeview.js
|
||||
* License MIT
|
||||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'Treeview'
|
||||
const DATA_KEY = 'lte.treeview'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const EVENT_EXPANDED = `expanded${EVENT_KEY}`
|
||||
const EVENT_COLLAPSED = `collapsed${EVENT_KEY}`
|
||||
const EVENT_LOAD_DATA_API = `load${EVENT_KEY}`
|
||||
|
||||
const SELECTOR_LI = '.nav-item'
|
||||
const SELECTOR_LINK = '.nav-link'
|
||||
const SELECTOR_TREEVIEW_MENU = '.nav-treeview'
|
||||
const SELECTOR_OPEN = '.menu-open'
|
||||
const SELECTOR_DATA_WIDGET = '[data-widget="treeview"]'
|
||||
|
||||
const CLASS_NAME_OPEN = 'menu-open'
|
||||
const CLASS_NAME_IS_OPENING = 'menu-is-opening'
|
||||
const CLASS_NAME_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() {
|
||||
$(`${SELECTOR_LI}${SELECTOR_OPEN} ${SELECTOR_TREEVIEW_MENU}${SELECTOR_OPEN}`).css('display', 'block')
|
||||
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)
|
||||
}
|
||||
|
||||
parentLi.addClass(CLASS_NAME_IS_OPENING)
|
||||
treeviewMenu.stop().slideDown(this._config.animationSpeed, () => {
|
||||
parentLi.addClass(CLASS_NAME_OPEN)
|
||||
$(this._element).trigger(expandedEvent)
|
||||
})
|
||||
|
||||
if (this._config.expandSidebar) {
|
||||
this._expandSidebar()
|
||||
}
|
||||
}
|
||||
|
||||
collapse(treeviewMenu, parentLi) {
|
||||
const collapsedEvent = $.Event(EVENT_COLLAPSED)
|
||||
|
||||
parentLi.removeClass(`${CLASS_NAME_IS_OPENING} ${CLASS_NAME_OPEN}`)
|
||||
treeviewMenu.stop().slideUp(this._config.animationSpeed, () => {
|
||||
$(this._element).trigger(collapsedEvent)
|
||||
treeviewMenu.find(`${SELECTOR_OPEN} > ${SELECTOR_TREEVIEW_MENU}`).slideUp()
|
||||
treeviewMenu.find(SELECTOR_OPEN).removeClass(`${CLASS_NAME_IS_OPENING} ${CLASS_NAME_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(CLASS_NAME_OPEN)
|
||||
|
||||
if (isOpen) {
|
||||
this.collapse($(treeviewMenu), parentLi)
|
||||
} else {
|
||||
this.expand($(treeviewMenu), parentLi)
|
||||
}
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_setupListeners() {
|
||||
const elementId = this._element.attr('id') !== undefined ? `#${this._element.attr('id')}` : ''
|
||||
$(document).on('click', `${elementId}${this._config.trigger}`, event => {
|
||||
this.toggle(event)
|
||||
})
|
||||
}
|
||||
|
||||
_expandSidebar() {
|
||||
if ($('body').hasClass(CLASS_NAME_SIDEBAR_COLLAPSED)) {
|
||||
$(this._config.sidebarButtonSelector).PushMenu('expand')
|
||||
}
|
||||
}
|
||||
|
||||
// Static
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = $.extend({}, Default, typeof config === 'object' ? config : $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new Treeview($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
data._init()
|
||||
} else if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
data[config]()
|
||||
} else if (typeof config === 'undefined') {
|
||||
data._init()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
}
|
||||
|
||||
export default Treeview
|
||||
23
build/less/.csslintrc
Normal file
23
build/less/.csslintrc
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
@@ -1,43 +1,36 @@
|
||||
//
|
||||
// Pages: 400 and 500 error pages
|
||||
//
|
||||
|
||||
/*
|
||||
* Page: 400 and 500 error pages
|
||||
* ------------------------------
|
||||
*/
|
||||
.error-page {
|
||||
margin: 20px auto 0;
|
||||
width: 600px;
|
||||
|
||||
@include media-breakpoint-down(sm) {
|
||||
margin: 20px auto 0 auto;
|
||||
@media (max-width: @screen-sm-max) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
//For the error number e.g: 404
|
||||
> .headline {
|
||||
float: left;
|
||||
font-size: 100px;
|
||||
font-weight: 300;
|
||||
|
||||
@include media-breakpoint-down(sm) {
|
||||
@media (max-width: @screen-sm-max) {
|
||||
float: none;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
//For the message
|
||||
> .error-content {
|
||||
display: block;
|
||||
margin-left: 190px;
|
||||
|
||||
@include media-breakpoint-down(sm) {
|
||||
@media (max-width: @screen-sm-max) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
> h3 {
|
||||
font-size: 25px;
|
||||
font-weight: 300;
|
||||
|
||||
@include media-breakpoint-down(sm) {
|
||||
font-size: 25px;
|
||||
@media (max-width: @screen-sm-max) {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
55
build/less/AdminLTE-without-plugins.less
Normal file
55
build/less/AdminLTE-without-plugins.less
Normal file
@@ -0,0 +1,55 @@
|
||||
/*!
|
||||
* AdminLTE v2.4.0 Without Third-Party Plugins
|
||||
* Author: Almsaeed Studio
|
||||
* Website: Almsaeed Studio <https://adminlte.io>
|
||||
* License: Open source - MIT
|
||||
* Please visit http://opensource.org/licenses/MIT for more information
|
||||
!*/
|
||||
//Bootstrap Variables & Mixins
|
||||
//The core bootstrap code have not been modified. These files
|
||||
//are included only for reference.
|
||||
@import (reference) "../../bower_components/bootstrap/less/mixins";
|
||||
@import (reference) "../../bower_components/bootstrap/less/variables";
|
||||
//MISC
|
||||
//----
|
||||
@import "core";
|
||||
@import "variables";
|
||||
@import "mixins";
|
||||
//COMPONENTS
|
||||
//-----------
|
||||
@import "header";
|
||||
@import "sidebar";
|
||||
@import "sidebar-mini";
|
||||
@import "control-sidebar";
|
||||
@import "dropdown";
|
||||
@import "forms";
|
||||
@import "progress-bars";
|
||||
@import "small-box";
|
||||
@import "boxes";
|
||||
@import "info-box";
|
||||
@import "timeline";
|
||||
@import "buttons";
|
||||
@import "callout";
|
||||
@import "alerts";
|
||||
@import "navs";
|
||||
@import "products";
|
||||
@import "table";
|
||||
@import "labels";
|
||||
@import "direct-chat";
|
||||
@import "users-list";
|
||||
@import "carousel";
|
||||
@import "modal";
|
||||
@import "social-widgets";
|
||||
@import "treeview";
|
||||
//PAGES
|
||||
//------
|
||||
@import "mailbox";
|
||||
@import "lockscreen";
|
||||
@import "login_and_register";
|
||||
@import "404_500_errors";
|
||||
@import "invoice";
|
||||
@import "profile";
|
||||
//Miscellaneous
|
||||
//-------------
|
||||
@import "miscellaneous";
|
||||
@import "print";
|
||||
62
build/less/AdminLTE.less
Normal file
62
build/less/AdminLTE.less
Normal file
@@ -0,0 +1,62 @@
|
||||
/*!
|
||||
* AdminLTE v2.4.0
|
||||
* Author: Almsaeed Studio
|
||||
* Website: Almsaeed Studio <https://adminlte.io>
|
||||
* License: Open source - MIT
|
||||
* Please visit http://opensource.org/licenses/MIT for more information
|
||||
*/
|
||||
// Bootstrap
|
||||
//--------------------------------------------------------
|
||||
@import (reference) "../../bower_components/bootstrap/less/mixins";
|
||||
@import (reference) "../../bower_components/bootstrap/less/variables";
|
||||
|
||||
// MISC
|
||||
//--------------------------------------------------------
|
||||
@import "core";
|
||||
@import "variables";
|
||||
@import "mixins";
|
||||
|
||||
// COMPONENTS
|
||||
//--------------------------------------------------------
|
||||
@import "header";
|
||||
@import "sidebar";
|
||||
@import "sidebar-mini";
|
||||
@import "control-sidebar";
|
||||
@import "dropdown";
|
||||
@import "forms";
|
||||
@import "progress-bars";
|
||||
@import "small-box";
|
||||
@import "boxes";
|
||||
@import "info-box";
|
||||
@import "timeline";
|
||||
@import "buttons";
|
||||
@import "callout";
|
||||
@import "alerts";
|
||||
@import "navs";
|
||||
@import "products";
|
||||
@import "table";
|
||||
@import "labels";
|
||||
@import "direct-chat";
|
||||
@import "users-list";
|
||||
@import "carousel";
|
||||
@import "modal";
|
||||
@import "social-widgets";
|
||||
@import "treeview";
|
||||
|
||||
// PAGES
|
||||
//--------------------------------------------------------
|
||||
@import "mailbox";
|
||||
@import "lockscreen";
|
||||
@import "login_and_register";
|
||||
@import "404_500_errors";
|
||||
@import "invoice";
|
||||
@import "profile";
|
||||
|
||||
// Plugins
|
||||
//--------------------------------------------------------
|
||||
@import "plugins";
|
||||
|
||||
// Miscellaneous
|
||||
//--------------------------------------------------------
|
||||
@import "miscellaneous";
|
||||
@import "print";
|
||||
47
build/less/alerts.less
Normal file
47
build/less/alerts.less
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Component: alert
|
||||
* ----------------
|
||||
*/
|
||||
|
||||
.alert {
|
||||
.border-radius(3px);
|
||||
h4 {
|
||||
font-weight: 600;
|
||||
}
|
||||
.icon {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.close {
|
||||
color: #000;
|
||||
.opacity(.2);
|
||||
&:hover {
|
||||
.opacity(.5);
|
||||
}
|
||||
}
|
||||
a {
|
||||
color: #fff;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
//Alert Variants
|
||||
.alert-success {
|
||||
&:extend(.bg-green);
|
||||
border-color: darken(@green, 5%);
|
||||
}
|
||||
|
||||
.alert-danger,
|
||||
.alert-error {
|
||||
&:extend(.bg-red);
|
||||
border-color: darken(@red, 5%);
|
||||
}
|
||||
|
||||
.alert-warning {
|
||||
&:extend(.bg-yellow);
|
||||
border-color: darken(@yellow, 5%);
|
||||
}
|
||||
|
||||
.alert-info {
|
||||
&:extend(.bg-aqua);
|
||||
border-color: darken(@aqua, 5%);
|
||||
}
|
||||
178
build/less/bootstrap-social.less
vendored
Normal file
178
build/less/bootstrap-social.less
vendored
Normal file
@@ -0,0 +1,178 @@
|
||||
/*
|
||||
* Social Buttons for Bootstrap
|
||||
*
|
||||
* Copyright 2013-2015 Panayiotis Lipiridis
|
||||
* Licensed under the MIT License
|
||||
*
|
||||
* https://github.com/lipis/bootstrap-social
|
||||
*/
|
||||
|
||||
// Import variables and mixins as a reference for separate plugins version
|
||||
@import (reference) "../../bower_components/bootstrap/less/mixins";
|
||||
@import (reference) "../../bower_components/bootstrap/less/variables";
|
||||
@import (reference) "variables";
|
||||
@import (reference) "mixins";
|
||||
|
||||
@bs-height-base: (@line-height-computed + @padding-base-vertical * 2);
|
||||
@bs-height-lg: (floor(@font-size-large * @line-height-base) + @padding-large-vertical * 2);
|
||||
@bs-height-sm: (floor(@font-size-small * 1.5) + @padding-small-vertical * 2);
|
||||
@bs-height-xs: (floor(@font-size-small * 1.2) + @padding-small-vertical + 1);
|
||||
|
||||
.btn-social {
|
||||
position: relative;
|
||||
padding-left: (@bs-height-base + @padding-base-horizontal);
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
> :first-child {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: @bs-height-base;
|
||||
line-height: (@bs-height-base + 2);
|
||||
font-size: 1.6em;
|
||||
text-align: center;
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
&.btn-lg {
|
||||
padding-left: (@bs-height-lg + @padding-large-horizontal);
|
||||
> :first-child {
|
||||
line-height: @bs-height-lg;
|
||||
width: @bs-height-lg;
|
||||
font-size: 1.8em;
|
||||
}
|
||||
}
|
||||
&.btn-sm {
|
||||
padding-left: (@bs-height-sm + @padding-small-horizontal);
|
||||
> :first-child {
|
||||
line-height: @bs-height-sm;
|
||||
width: @bs-height-sm;
|
||||
font-size: 1.4em;
|
||||
}
|
||||
}
|
||||
&.btn-xs {
|
||||
padding-left: (@bs-height-xs + @padding-small-horizontal);
|
||||
> :first-child {
|
||||
line-height: @bs-height-xs;
|
||||
width: @bs-height-xs;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-social-icon {
|
||||
.btn-social;
|
||||
height: (@bs-height-base + 2);
|
||||
width: (@bs-height-base + 2);
|
||||
padding: 0;
|
||||
> :first-child {
|
||||
border: none;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
&.btn-lg {
|
||||
height: @bs-height-lg;
|
||||
width: @bs-height-lg;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
&.btn-sm {
|
||||
height: (@bs-height-sm + 2);
|
||||
width: (@bs-height-sm + 2);
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
&.btn-xs {
|
||||
height: (@bs-height-xs + 2);
|
||||
width: (@bs-height-xs + 2);
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-social(@color-bg, @color: #fff) {
|
||||
background-color: @color-bg;
|
||||
.button-variant(@color, @color-bg, rgba(0, 0, 0, .2));
|
||||
}
|
||||
|
||||
.btn-adn {
|
||||
.btn-social(#d87a68);
|
||||
}
|
||||
|
||||
.btn-bitbucket {
|
||||
.btn-social(#205081);
|
||||
}
|
||||
|
||||
.btn-dropbox {
|
||||
.btn-social(#1087dd);
|
||||
}
|
||||
|
||||
.btn-facebook {
|
||||
.btn-social(#3b5998);
|
||||
}
|
||||
|
||||
.btn-flickr {
|
||||
.btn-social(#ff0084);
|
||||
}
|
||||
|
||||
.btn-foursquare {
|
||||
.btn-social(#f94877);
|
||||
}
|
||||
|
||||
.btn-github {
|
||||
.btn-social(#444444);
|
||||
}
|
||||
|
||||
.btn-google {
|
||||
.btn-social(#dd4b39);
|
||||
}
|
||||
|
||||
.btn-instagram {
|
||||
.btn-social(#3f729b);
|
||||
}
|
||||
|
||||
.btn-linkedin {
|
||||
.btn-social(#007bb6);
|
||||
}
|
||||
|
||||
.btn-microsoft {
|
||||
.btn-social(#2672ec);
|
||||
}
|
||||
|
||||
.btn-openid {
|
||||
.btn-social(#f7931e);
|
||||
}
|
||||
|
||||
.btn-pinterest {
|
||||
.btn-social(#cb2027);
|
||||
}
|
||||
|
||||
.btn-reddit {
|
||||
.btn-social(#eff7ff, #000);
|
||||
}
|
||||
|
||||
.btn-soundcloud {
|
||||
.btn-social(#ff5500);
|
||||
}
|
||||
|
||||
.btn-tumblr {
|
||||
.btn-social(#2c4762);
|
||||
}
|
||||
|
||||
.btn-twitter {
|
||||
.btn-social(#55acee);
|
||||
}
|
||||
|
||||
.btn-vimeo {
|
||||
.btn-social(#1ab7ea);
|
||||
}
|
||||
|
||||
.btn-vk {
|
||||
.btn-social(#587ea3);
|
||||
}
|
||||
|
||||
.btn-yahoo {
|
||||
.btn-social(#720e9e);
|
||||
}
|
||||
489
build/less/boxes.less
Normal file
489
build/less/boxes.less
Normal file
@@ -0,0 +1,489 @@
|
||||
/*
|
||||
* Component: Box
|
||||
* --------------
|
||||
*/
|
||||
.box {
|
||||
position: relative;
|
||||
.border-radius(@box-border-radius);
|
||||
background: #ffffff;
|
||||
border-top: 3px solid @box-default-border-top-color;
|
||||
margin-bottom: 20px;
|
||||
width: 100%;
|
||||
box-shadow: @box-boxshadow;
|
||||
|
||||
// Box color variations
|
||||
&.box-primary {
|
||||
border-top-color: @light-blue;
|
||||
}
|
||||
&.box-info {
|
||||
border-top-color: @aqua;
|
||||
}
|
||||
&.box-danger {
|
||||
border-top-color: @red;
|
||||
}
|
||||
&.box-warning {
|
||||
border-top-color: @yellow;
|
||||
}
|
||||
&.box-success {
|
||||
border-top-color: @green;
|
||||
}
|
||||
&.box-default {
|
||||
border-top-color: @gray-lte;
|
||||
}
|
||||
|
||||
// collapsed mode
|
||||
&.collapsed-box {
|
||||
.box-body,
|
||||
.box-footer {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-stacked {
|
||||
> li {
|
||||
border-bottom: 1px solid @box-border-color;
|
||||
margin: 0;
|
||||
&:last-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// fixed height to 300px
|
||||
&.height-control {
|
||||
.box-body {
|
||||
max-height: 300px;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.border-right {
|
||||
border-right: 1px solid @box-border-color;
|
||||
}
|
||||
.border-left {
|
||||
border-left: 1px solid @box-border-color;
|
||||
}
|
||||
|
||||
//SOLID BOX
|
||||
//---------
|
||||
//use this class to get a colored header and borders
|
||||
|
||||
&.box-solid {
|
||||
border-top: 0;
|
||||
> .box-header {
|
||||
.btn.btn-default {
|
||||
background: transparent;
|
||||
}
|
||||
.btn,
|
||||
a {
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Box color variations
|
||||
&.box-default {
|
||||
.box-solid-variant(@gray-lte, #444);
|
||||
}
|
||||
&.box-primary {
|
||||
.box-solid-variant(@light-blue);
|
||||
}
|
||||
&.box-info {
|
||||
.box-solid-variant(@aqua);
|
||||
}
|
||||
&.box-danger {
|
||||
.box-solid-variant(@red);
|
||||
}
|
||||
&.box-warning {
|
||||
.box-solid-variant(@yellow);
|
||||
}
|
||||
&.box-success {
|
||||
.box-solid-variant(@green);
|
||||
}
|
||||
|
||||
> .box-header > .box-tools .btn {
|
||||
border: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
// Fix font color for tiles
|
||||
&[class*='bg'] {
|
||||
> .box-header {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//BOX GROUP
|
||||
.box-group {
|
||||
> .box {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
// jQuery Knob in a box
|
||||
.knob-label {
|
||||
text-align: center;
|
||||
color: #333;
|
||||
font-weight: 100;
|
||||
font-size: 12px;
|
||||
margin-bottom: 0.3em;
|
||||
}
|
||||
}
|
||||
|
||||
.box,
|
||||
.overlay-wrapper {
|
||||
// Box overlay for LOADING STATE effect
|
||||
> .overlay,
|
||||
> .loading-img {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
z-index: 50;
|
||||
background: rgba(255, 255, 255, 0.7);
|
||||
.border-radius(@box-border-radius);
|
||||
> .fa {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-left: -15px;
|
||||
margin-top: -15px;
|
||||
color: #000;
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.overlay.dark {
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
//Add clearfix to header, body and footer
|
||||
.box-header,
|
||||
.box-body,
|
||||
.box-footer {
|
||||
.clearfix();
|
||||
}
|
||||
|
||||
//Box header
|
||||
.box-header {
|
||||
color: #444;
|
||||
display: block;
|
||||
padding: @box-padding;
|
||||
position: relative;
|
||||
|
||||
//Add bottom border
|
||||
&.with-border {
|
||||
border-bottom: 1px solid @box-border-color;
|
||||
.collapsed-box & {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
//Icons and box title
|
||||
> .fa,
|
||||
> .glyphicon,
|
||||
> .ion,
|
||||
.box-title {
|
||||
display: inline-block;
|
||||
font-size: 18px;
|
||||
margin: 0;
|
||||
line-height: 1;
|
||||
}
|
||||
> .fa,
|
||||
> .glyphicon,
|
||||
> .ion {
|
||||
margin-right: 5px;
|
||||
}
|
||||
> .box-tools {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 5px;
|
||||
[data-toggle="tooltip"] {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
&.pull-right {
|
||||
.dropdown-menu {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-menu > li > a {
|
||||
color: #444!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Box Tools Buttons
|
||||
.btn-box-tool {
|
||||
padding: 5px;
|
||||
font-size: 12px;
|
||||
background: transparent;
|
||||
color: darken(@box-default-border-top-color, 20%);
|
||||
.open &,
|
||||
&:hover {
|
||||
color: darken(@box-default-border-top-color, 40%);
|
||||
}
|
||||
&.btn:active {
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
//Box Body
|
||||
.box-body {
|
||||
.border-radius(0; 0; @box-border-radius; @box-border-radius);
|
||||
padding: @box-padding;
|
||||
.no-header & {
|
||||
.border-top-radius(@box-border-radius);
|
||||
}
|
||||
// Tables within the box body
|
||||
> .table {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
// Calendar within the box body
|
||||
.fc {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.full-width-chart {
|
||||
margin: -19px;
|
||||
}
|
||||
&.no-padding .full-width-chart {
|
||||
margin: -9px;
|
||||
}
|
||||
|
||||
.box-pane {
|
||||
.border-radius(0; 0; @box-border-radius; 0);
|
||||
}
|
||||
.box-pane-right {
|
||||
.border-radius(0; 0; 0; @box-border-radius);
|
||||
}
|
||||
}
|
||||
|
||||
//Box footer
|
||||
.box-footer {
|
||||
.border-radius(0; 0; @box-border-radius; @box-border-radius);
|
||||
border-top: 1px solid @box-border-color;
|
||||
padding: @box-padding;
|
||||
background-color: @box-footer-bg;
|
||||
}
|
||||
|
||||
.chart-legend {
|
||||
&:extend(.list-unstyled);
|
||||
margin: 10px 0;
|
||||
> li {
|
||||
@media (max-width: @screen-sm-max) {
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Comment Box
|
||||
.box-comments {
|
||||
background: #f7f7f7;
|
||||
.box-comment {
|
||||
.clearfix();
|
||||
padding: 8px 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
&:last-of-type {
|
||||
border-bottom: 0;
|
||||
}
|
||||
&:first-of-type {
|
||||
padding-top: 0;
|
||||
}
|
||||
img {
|
||||
&:extend(.img-sm);
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
.comment-text {
|
||||
margin-left: 40px;
|
||||
color: #555;
|
||||
}
|
||||
.username {
|
||||
color: #444;
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
}
|
||||
.text-muted {
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
//Widgets
|
||||
//-----------
|
||||
|
||||
/* Widget: TODO LIST */
|
||||
|
||||
.todo-list {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
overflow: auto;
|
||||
// Todo list element
|
||||
> li {
|
||||
.border-radius(2px);
|
||||
padding: 10px;
|
||||
background: #f4f4f4;
|
||||
margin-bottom: 2px;
|
||||
border-left: 2px solid #e6e7e8;
|
||||
color: #444;
|
||||
&:last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
> input[type='checkbox'] {
|
||||
margin: 0 10px 0 5px;
|
||||
}
|
||||
|
||||
.text {
|
||||
display: inline-block;
|
||||
margin-left: 5px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
// Time labels
|
||||
.label {
|
||||
margin-left: 10px;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
// Tools and options box
|
||||
.tools {
|
||||
display: none;
|
||||
float: right;
|
||||
color: @red;
|
||||
// icons
|
||||
> .fa, > .glyphicon, > .ion {
|
||||
margin-right: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
}
|
||||
&:hover .tools {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
&.done {
|
||||
color: #999;
|
||||
.text {
|
||||
text-decoration: line-through;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.label {
|
||||
background: @gray-lte !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Color varaity
|
||||
.danger {
|
||||
border-left-color: @red;
|
||||
}
|
||||
.warning {
|
||||
border-left-color: @yellow;
|
||||
}
|
||||
.info {
|
||||
border-left-color: @aqua;
|
||||
}
|
||||
.success {
|
||||
border-left-color: @green;
|
||||
}
|
||||
.primary {
|
||||
border-left-color: @light-blue;
|
||||
}
|
||||
|
||||
.handle {
|
||||
display: inline-block;
|
||||
cursor: move;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// END TODO WIDGET
|
||||
|
||||
/* Chat widget (DEPRECATED - this will be removed in the next major release. Use Direct Chat instead)*/
|
||||
.chat {
|
||||
padding: 5px 20px 5px 10px;
|
||||
|
||||
.item {
|
||||
.clearfix();
|
||||
margin-bottom: 10px;
|
||||
// The image
|
||||
> img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border: 2px solid transparent;
|
||||
.border-radius(50%);
|
||||
}
|
||||
|
||||
> .online {
|
||||
border: 2px solid @green;
|
||||
}
|
||||
> .offline {
|
||||
border: 2px solid @red;
|
||||
}
|
||||
|
||||
// The message body
|
||||
> .message {
|
||||
margin-left: 55px;
|
||||
margin-top: -40px;
|
||||
> .name {
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
// The attachment
|
||||
> .attachment {
|
||||
.border-radius(@attachment-border-radius);
|
||||
background: #f4f4f4;
|
||||
margin-left: 65px;
|
||||
margin-right: 15px;
|
||||
padding: 10px;
|
||||
> h4 {
|
||||
margin: 0 0 5px 0;
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
}
|
||||
> p, > .filename {
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
font-style: italic;
|
||||
margin: 0;
|
||||
|
||||
}
|
||||
.clearfix();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//END CHAT WIDGET
|
||||
|
||||
//Input in box
|
||||
.box-input {
|
||||
max-width: 200px;
|
||||
}
|
||||
|
||||
//A fix for panels body text color when placed within
|
||||
// a modal
|
||||
.modal {
|
||||
.panel-body {
|
||||
color: #444;
|
||||
}
|
||||
}
|
||||
168
build/less/buttons.less
Normal file
168
build/less/buttons.less
Normal file
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
* Component: Button
|
||||
* -----------------
|
||||
*/
|
||||
|
||||
.btn {
|
||||
.border-radius(@btn-border-radius);
|
||||
.box-shadow(@btn-boxshadow);
|
||||
border: 1px solid transparent;
|
||||
|
||||
&.uppercase {
|
||||
text-transform: uppercase
|
||||
}
|
||||
|
||||
// Flat buttons
|
||||
&.btn-flat {
|
||||
.border-radius(0);
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
// Active state
|
||||
&:active {
|
||||
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||
-moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
// input file btn
|
||||
&.btn-file {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
> input[type='file'] {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
min-width: 100%;
|
||||
min-height: 100%;
|
||||
font-size: 100px;
|
||||
text-align: right;
|
||||
.opacity(0);
|
||||
outline: none;
|
||||
background: white;
|
||||
cursor: inherit;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Button color variations
|
||||
.btn-default {
|
||||
background-color: #f4f4f4;
|
||||
color: #444;
|
||||
border-color: #ddd;
|
||||
&:hover,
|
||||
&:active,
|
||||
&.hover {
|
||||
background-color: darken(#f4f4f4, 5%);
|
||||
}
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: @light-blue;
|
||||
border-color: darken(@light-blue, 5%);
|
||||
&:hover, &:active, &.hover {
|
||||
background-color: darken(@light-blue, 5%);
|
||||
}
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
background-color: @green;
|
||||
border-color: darken(@green, 5%);
|
||||
&:hover, &:active, &.hover {
|
||||
background-color: darken(@green, 5%);
|
||||
}
|
||||
}
|
||||
|
||||
.btn-info {
|
||||
background-color: @aqua;
|
||||
border-color: darken(@aqua, 5%);
|
||||
&:hover, &:active, &.hover {
|
||||
background-color: darken(@aqua, 5%);
|
||||
}
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
background-color: @red;
|
||||
border-color: darken(@red, 5%);
|
||||
&:hover, &:active, &.hover {
|
||||
background-color: darken(@red, 5%);
|
||||
}
|
||||
}
|
||||
|
||||
.btn-warning {
|
||||
background-color: @yellow;
|
||||
border-color: darken(@yellow, 5%);
|
||||
&:hover, &:active, &.hover {
|
||||
background-color: darken(@yellow, 5%);
|
||||
}
|
||||
}
|
||||
|
||||
.btn-outline {
|
||||
border: 1px solid #fff;
|
||||
background: transparent;
|
||||
color: #fff;
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
color: rgba(255, 255, 255, .7);
|
||||
border-color: rgba(255, 255, 255, .7);
|
||||
}
|
||||
}
|
||||
|
||||
.btn-link {
|
||||
.box-shadow(none);
|
||||
}
|
||||
|
||||
//General .btn with bg class
|
||||
.btn[class*='bg-']:hover {
|
||||
.box-shadow(inset 0 0 100px rgba(0, 0, 0, 0.2));
|
||||
}
|
||||
|
||||
// Application buttons
|
||||
.btn-app {
|
||||
.border-radius(3px);
|
||||
position: relative;
|
||||
padding: 15px 5px;
|
||||
margin: 0 0 10px 10px;
|
||||
min-width: 80px;
|
||||
height: 60px;
|
||||
text-align: center;
|
||||
color: #666;
|
||||
border: 1px solid #ddd;
|
||||
background-color: #f4f4f4;
|
||||
font-size: 12px;
|
||||
//Icons within the btn
|
||||
> .fa, > .glyphicon, > .ion {
|
||||
font-size: 20px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: #f4f4f4;
|
||||
color: #444;
|
||||
border-color: #aaa;
|
||||
}
|
||||
|
||||
&:active, &:focus {
|
||||
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||
-moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||
}
|
||||
|
||||
//The badge
|
||||
> .badge {
|
||||
position: absolute;
|
||||
top: -3px;
|
||||
right: -10px;
|
||||
font-size: 10px;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
48
build/less/callout.less
Normal file
48
build/less/callout.less
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Component: Callout
|
||||
* ------------------
|
||||
*/
|
||||
|
||||
// Base styles (regardless of theme)
|
||||
.callout {
|
||||
.border-radius(3px);
|
||||
margin: 0 0 20px 0;
|
||||
padding: 15px 30px 15px 15px;
|
||||
border-left: 5px solid #eee;
|
||||
a {
|
||||
color: #fff;
|
||||
text-decoration: underline;
|
||||
&:hover {
|
||||
color: #eee;
|
||||
}
|
||||
}
|
||||
h4 {
|
||||
margin-top: 0;
|
||||
font-weight: 600;
|
||||
}
|
||||
p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
code,
|
||||
.highlight {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
// Themes for different contexts
|
||||
&.callout-danger {
|
||||
&:extend(.bg-red);
|
||||
border-color: darken(@red, 10%);
|
||||
}
|
||||
&.callout-warning {
|
||||
&:extend(.bg-yellow);
|
||||
border-color: darken(@yellow, 10%);
|
||||
}
|
||||
&.callout-info {
|
||||
&:extend(.bg-aqua);
|
||||
border-color: darken(@aqua, 10%);
|
||||
}
|
||||
&.callout-success {
|
||||
&:extend(.bg-green);
|
||||
border-color: darken(@green, 10%);
|
||||
}
|
||||
}
|
||||
18
build/less/carousel.less
Normal file
18
build/less/carousel.less
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Component: Carousel
|
||||
* -------------------
|
||||
*/
|
||||
.carousel-control {
|
||||
&.left,
|
||||
&.right {
|
||||
background-image: none;
|
||||
}
|
||||
> .fa {
|
||||
font-size: 40px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
z-index: 5;
|
||||
display: inline-block;
|
||||
margin-top: -20px;
|
||||
}
|
||||
}
|
||||
299
build/less/control-sidebar.less
Normal file
299
build/less/control-sidebar.less
Normal file
@@ -0,0 +1,299 @@
|
||||
/*
|
||||
* Component: Control sidebar. By default, this is the right sidebar.
|
||||
*/
|
||||
// The sidebar's background control class
|
||||
// This is a hack to make the background visible while scrolling
|
||||
.control-sidebar-bg {
|
||||
position: fixed;
|
||||
z-index: 1000;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
// Transitions
|
||||
.control-sidebar-bg,
|
||||
.control-sidebar {
|
||||
top: 0;
|
||||
right: -@control-sidebar-width;
|
||||
width: @control-sidebar-width;
|
||||
.transition(right @transition-speed ease-in-out);
|
||||
}
|
||||
|
||||
// The sidebar
|
||||
.control-sidebar {
|
||||
position: absolute;
|
||||
padding-top: @navbar-height;
|
||||
z-index: 1010;
|
||||
// Fix position after header collapse
|
||||
@media (max-width: @screen-sm) {
|
||||
padding-top: @navbar-height + 50;
|
||||
}
|
||||
// Tab panes
|
||||
> .tab-content {
|
||||
padding: 10px 15px;
|
||||
}
|
||||
// Open state with slide over content effect
|
||||
&.control-sidebar-open {
|
||||
&,
|
||||
+ .control-sidebar-bg {
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Open without slide over content
|
||||
.control-sidebar-open {
|
||||
.control-sidebar-bg,
|
||||
.control-sidebar {
|
||||
right: 0;
|
||||
}
|
||||
@media (min-width: @screen-sm) {
|
||||
.content-wrapper,
|
||||
.right-side,
|
||||
.main-footer {
|
||||
margin-right: @control-sidebar-width;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Fixed Layout
|
||||
.fixed {
|
||||
.control-sidebar {
|
||||
position: fixed;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
// Control sidebar tabs
|
||||
.nav-tabs.control-sidebar-tabs {
|
||||
> li {
|
||||
&:first-of-type > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
border-left-width: 0;
|
||||
}
|
||||
}
|
||||
> a {
|
||||
.border-radius(0);
|
||||
|
||||
// Hover and active states
|
||||
&,
|
||||
&:hover {
|
||||
border-top: none;
|
||||
border-right: none;
|
||||
border-left: 1px solid transparent;
|
||||
border-bottom: 1px solid transparent;
|
||||
}
|
||||
.icon {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
// Active state
|
||||
&.active {
|
||||
> a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
border-top: none;
|
||||
border-right: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Remove responsiveness on small screens
|
||||
@media (max-width: @screen-sm) {
|
||||
display: table;
|
||||
> li {
|
||||
display: table-cell;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Headings in the sidebar content
|
||||
.control-sidebar-heading {
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
padding: 10px 0;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
// Subheadings
|
||||
.control-sidebar-subheading {
|
||||
display: block;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
// Control Sidebar Menu
|
||||
.control-sidebar-menu {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0 -15px;
|
||||
> li > a {
|
||||
.clearfix();
|
||||
display: block;
|
||||
padding: 10px 15px;
|
||||
> .control-sidebar-subheading {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
.menu-icon {
|
||||
float: left;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
line-height: 35px;
|
||||
}
|
||||
.menu-info {
|
||||
margin-left: 45px;
|
||||
margin-top: 3px;
|
||||
> .control-sidebar-subheading {
|
||||
margin: 0;
|
||||
}
|
||||
> p {
|
||||
margin: 0;
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
.progress {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Dark skin
|
||||
.control-sidebar-dark {
|
||||
color: @sidebar-dark-color;
|
||||
// Background
|
||||
&,
|
||||
+ .control-sidebar-bg {
|
||||
background: @sidebar-dark-bg;
|
||||
}
|
||||
// Sidebar tabs
|
||||
.nav-tabs.control-sidebar-tabs {
|
||||
border-bottom: darken(@sidebar-dark-bg, 3%);
|
||||
> li {
|
||||
> a {
|
||||
background: darken(@sidebar-dark-bg, 5%);
|
||||
color: @sidebar-dark-color;
|
||||
// Hover and active states
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
border-left-color: darken(@sidebar-dark-bg, 7%);
|
||||
border-bottom-color: darken(@sidebar-dark-bg, 7%);
|
||||
}
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
background: darken(@sidebar-dark-bg, 3%);
|
||||
}
|
||||
&:hover {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
// Active state
|
||||
&.active {
|
||||
> a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
background: @sidebar-dark-bg;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Heading & subheading
|
||||
.control-sidebar-heading,
|
||||
.control-sidebar-subheading {
|
||||
color: #fff;
|
||||
}
|
||||
// Sidebar list
|
||||
.control-sidebar-menu {
|
||||
> li {
|
||||
> a {
|
||||
&:hover {
|
||||
background: @sidebar-dark-hover-bg;
|
||||
}
|
||||
.menu-info {
|
||||
> p {
|
||||
color: @sidebar-dark-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Light skin
|
||||
.control-sidebar-light {
|
||||
color: lighten(@sidebar-light-color, 10%);
|
||||
// Background
|
||||
&,
|
||||
+ .control-sidebar-bg {
|
||||
background: @sidebar-light-bg;
|
||||
border-left: 1px solid @gray-lte;
|
||||
}
|
||||
// Sidebar tabs
|
||||
.nav-tabs.control-sidebar-tabs {
|
||||
border-bottom: @gray-lte;
|
||||
> li {
|
||||
> a {
|
||||
background: darken(@sidebar-light-bg, 5%);
|
||||
color: @sidebar-light-color;
|
||||
// Hover and active states
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
border-left-color: @gray-lte;
|
||||
border-bottom-color: @gray-lte;
|
||||
}
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
background: darken(@sidebar-light-bg, 3%);
|
||||
}
|
||||
}
|
||||
// Active state
|
||||
&.active {
|
||||
> a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
background: @sidebar-light-bg;
|
||||
color: #111;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Heading & subheading
|
||||
.control-sidebar-heading,
|
||||
.control-sidebar-subheading {
|
||||
color: #111;
|
||||
}
|
||||
// Sidebar list
|
||||
.control-sidebar-menu {
|
||||
margin-left: -14px;
|
||||
> li {
|
||||
> a {
|
||||
&:hover {
|
||||
background: @sidebar-light-hover-bg;
|
||||
}
|
||||
.menu-info {
|
||||
> p {
|
||||
color: lighten(@sidebar-light-color, 10%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
174
build/less/core.less
Normal file
174
build/less/core.less
Normal file
@@ -0,0 +1,174 @@
|
||||
/*
|
||||
* Core: General Layout Style
|
||||
* -------------------------
|
||||
*/
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
.layout-boxed & {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font-weight: 400;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
/* Layout */
|
||||
.wrapper {
|
||||
.clearfix();
|
||||
height: 100%;
|
||||
position: relative;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
.layout-boxed & {
|
||||
max-width: 1250px;
|
||||
margin: 0 auto;
|
||||
min-height: 100%;
|
||||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
.layout-boxed {
|
||||
background: url('@{boxed-layout-bg-image-path}') repeat fixed;
|
||||
}
|
||||
|
||||
/*
|
||||
* Content Wrapper - contains the main content
|
||||
*/
|
||||
.content-wrapper,
|
||||
.main-footer {
|
||||
// Using disposable variable to join statements with a comma
|
||||
@transition-rule: @transition-speed @transition-fn,
|
||||
margin @transition-speed @transition-fn;
|
||||
.transition-transform(@transition-rule);
|
||||
margin-left: @sidebar-width;
|
||||
z-index: 820;
|
||||
// Top nav layout
|
||||
.layout-top-nav & {
|
||||
margin-left: 0;
|
||||
}
|
||||
@media (max-width: @screen-xs-max) {
|
||||
margin-left: 0;
|
||||
}
|
||||
// When opening the sidebar on large screens
|
||||
.sidebar-collapse & {
|
||||
@media (min-width: @screen-sm) {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
// When opening the sidebar on small screens
|
||||
.sidebar-open & {
|
||||
@media (max-width: @screen-xs-max) {
|
||||
.translate(@sidebar-width, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content-wrapper {
|
||||
min-height: 100%;
|
||||
background-color: @body-bg;
|
||||
z-index: 800;
|
||||
}
|
||||
|
||||
.main-footer {
|
||||
background: #fff;
|
||||
padding: 15px;
|
||||
color: #444;
|
||||
border-top: 1px solid @gray-lte;
|
||||
}
|
||||
|
||||
/* Fixed layout */
|
||||
.fixed {
|
||||
.main-header,
|
||||
.main-sidebar,
|
||||
.left-side {
|
||||
position: fixed;
|
||||
}
|
||||
.main-header {
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
}
|
||||
.content-wrapper,
|
||||
.right-side {
|
||||
padding-top: 50px;
|
||||
@media (max-width: @screen-header-collapse) {
|
||||
padding-top: 100px;
|
||||
}
|
||||
}
|
||||
&.layout-boxed {
|
||||
.wrapper {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
.wrapper {
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.hold-transition {
|
||||
.content-wrapper,
|
||||
.right-side,
|
||||
.main-footer,
|
||||
.main-sidebar,
|
||||
.left-side,
|
||||
.main-header .navbar,
|
||||
.main-header .logo,
|
||||
.menu-open .fa-angle-left {
|
||||
/* Fix for IE */
|
||||
.transition(none);
|
||||
}
|
||||
}
|
||||
|
||||
/* Content */
|
||||
.content {
|
||||
min-height: 250px;
|
||||
padding: 15px;
|
||||
.container-fixed(@grid-gutter-width);
|
||||
}
|
||||
|
||||
/* H1 - H6 font */
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
.h1,
|
||||
.h2,
|
||||
.h3,
|
||||
.h4,
|
||||
.h5,
|
||||
.h6 {
|
||||
font-family: 'Source Sans Pro', sans-serif;
|
||||
}
|
||||
|
||||
/* General Links */
|
||||
a {
|
||||
color: @link-color;
|
||||
}
|
||||
|
||||
a:hover,
|
||||
a:active,
|
||||
a:focus {
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
color: @link-hover-color;
|
||||
}
|
||||
|
||||
/* Page Header */
|
||||
.page-header {
|
||||
margin: 10px 0 20px 0;
|
||||
font-size: 22px;
|
||||
|
||||
> small {
|
||||
color: #666;
|
||||
display: block;
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
22
build/less/datepicker.less
Normal file
22
build/less/datepicker.less
Normal file
@@ -0,0 +1,22 @@
|
||||
.box {
|
||||
.datepicker-inline {
|
||||
&,
|
||||
.datepicker-days {
|
||||
&,
|
||||
> table {
|
||||
width: 100%;
|
||||
td {
|
||||
&:hover {
|
||||
background-color: rgba(255, 255, 255, .3);
|
||||
}
|
||||
&.day {
|
||||
&.old,
|
||||
&.new {
|
||||
color: #777;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
194
build/less/direct-chat.less
Normal file
194
build/less/direct-chat.less
Normal file
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Component: Direct Chat
|
||||
* ----------------------
|
||||
*/
|
||||
.direct-chat {
|
||||
.box-body {
|
||||
.border-bottom-radius(0);
|
||||
position: relative;
|
||||
overflow-x: hidden;
|
||||
padding: 0;
|
||||
}
|
||||
&.chat-pane-open {
|
||||
.direct-chat-contacts {
|
||||
.translate(0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.direct-chat-messages {
|
||||
.translate(0, 0);
|
||||
padding: 10px;
|
||||
height: 250px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.direct-chat-msg,
|
||||
.direct-chat-text {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.direct-chat-msg {
|
||||
.clearfix();
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.direct-chat-messages,
|
||||
.direct-chat-contacts {
|
||||
.transition-transform(.5s ease-in-out);
|
||||
}
|
||||
|
||||
.direct-chat-text {
|
||||
.border-radius(5px);
|
||||
position: relative;
|
||||
padding: 5px 10px;
|
||||
background: @direct-chat-default-msg-bg;
|
||||
border: 1px solid @direct-chat-default-msg-border-color;
|
||||
margin: 5px 0 0 50px;
|
||||
color: @direct-chat-default-font-color;
|
||||
|
||||
//Create the arrow
|
||||
&:after,
|
||||
&:before {
|
||||
position: absolute;
|
||||
right: 100%;
|
||||
top: 15px;
|
||||
border: solid transparent;
|
||||
border-right-color: @direct-chat-default-msg-border-color;
|
||||
content: ' ';
|
||||
height: 0;
|
||||
width: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&:after {
|
||||
border-width: 5px;
|
||||
margin-top: -5px;
|
||||
}
|
||||
&:before {
|
||||
border-width: 6px;
|
||||
margin-top: -6px;
|
||||
}
|
||||
.right & {
|
||||
margin-right: 50px;
|
||||
margin-left: 0;
|
||||
&:after,
|
||||
&:before {
|
||||
right: auto;
|
||||
left: 100%;
|
||||
border-right-color: transparent;
|
||||
border-left-color: @direct-chat-default-msg-border-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.direct-chat-img {
|
||||
.border-radius(50%);
|
||||
float: left;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
.right & {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
.direct-chat-info {
|
||||
display: block;
|
||||
margin-bottom: 2px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.direct-chat-name {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.direct-chat-timestamp {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
//Direct chat contacts pane
|
||||
.direct-chat-contacts-open {
|
||||
.direct-chat-contacts {
|
||||
.translate(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.direct-chat-contacts {
|
||||
.translate(101%, 0);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
height: 250px;
|
||||
width: 100%;
|
||||
background: #222d32;
|
||||
color: #fff;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
//Contacts list -- for displaying contacts in direct chat contacts pane
|
||||
.contacts-list {
|
||||
&:extend(.list-unstyled);
|
||||
> li {
|
||||
.clearfix();
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
|
||||
padding: 10px;
|
||||
margin: 0;
|
||||
&:last-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.contacts-list-img {
|
||||
.border-radius(50%);
|
||||
width: 40px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.contacts-list-info {
|
||||
margin-left: 45px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.contacts-list-name,
|
||||
.contacts-list-status {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.contacts-list-name {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.contacts-list-status {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.contacts-list-date {
|
||||
color: #aaa;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.contacts-list-msg {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
//Direct Chat Variants
|
||||
.direct-chat-danger {
|
||||
.direct-chat-variant(@red);
|
||||
}
|
||||
|
||||
.direct-chat-primary {
|
||||
.direct-chat-variant(@light-blue);
|
||||
}
|
||||
|
||||
.direct-chat-warning {
|
||||
.direct-chat-variant(@yellow);
|
||||
}
|
||||
|
||||
.direct-chat-info {
|
||||
.direct-chat-variant(@aqua);
|
||||
}
|
||||
|
||||
.direct-chat-success {
|
||||
.direct-chat-variant(@green);
|
||||
}
|
||||
350
build/less/dropdown.less
Normal file
350
build/less/dropdown.less
Normal file
@@ -0,0 +1,350 @@
|
||||
/*
|
||||
* Component: Dropdown menus
|
||||
* -------------------------
|
||||
*/
|
||||
|
||||
/*Dropdowns in general*/
|
||||
.dropdown-menu {
|
||||
box-shadow: none;
|
||||
border-color: #eee;
|
||||
> li > a {
|
||||
color: #777;
|
||||
}
|
||||
> li > a > .glyphicon,
|
||||
> li > a > .fa,
|
||||
> li > a > .ion {
|
||||
margin-right: 10px;
|
||||
}
|
||||
> li > a:hover {
|
||||
background-color: lighten(@gray-lte, 5%);
|
||||
color: #333;
|
||||
}
|
||||
> .divider {
|
||||
background-color: #eee;
|
||||
}
|
||||
}
|
||||
|
||||
//Navbar custom dropdown menu
|
||||
.navbar-nav > .notifications-menu,
|
||||
.navbar-nav > .messages-menu,
|
||||
.navbar-nav > .tasks-menu {
|
||||
//fix width and padding
|
||||
> .dropdown-menu {
|
||||
> li {
|
||||
position: relative;
|
||||
}
|
||||
width: 280px;
|
||||
//Remove padding and margins
|
||||
padding: 0 0 0 0;
|
||||
margin: 0;
|
||||
top: 100%;
|
||||
}
|
||||
//Define header class
|
||||
> .dropdown-menu > li.header {
|
||||
.border-radius(4px; 4px; 0; 0);
|
||||
background-color: #ffffff;
|
||||
padding: 7px 10px;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
color: #444444;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
//Define footer class
|
||||
> .dropdown-menu > li.footer > a {
|
||||
.border-radius(0; 0; 4px; 4px);
|
||||
font-size: 12px;
|
||||
background-color: #fff;
|
||||
padding: 7px 10px;
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
color: #444 !important;
|
||||
@media (max-width: @screen-sm-max) {
|
||||
background: #fff !important;
|
||||
color: #444 !important;
|
||||
}
|
||||
text-align: center;
|
||||
//Hover state
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
//Clear inner menu padding and margins
|
||||
> .dropdown-menu > li .menu {
|
||||
max-height: 200px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
overflow-x: hidden;
|
||||
> li > a {
|
||||
display: block;
|
||||
white-space: nowrap; /* Prevent text from breaking */
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
// Hove state
|
||||
&:hover {
|
||||
background: #f4f4f4;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Notifications menu
|
||||
.navbar-nav > .notifications-menu {
|
||||
> .dropdown-menu > li .menu {
|
||||
// Links inside the menu
|
||||
> li > a {
|
||||
color: #444444;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
padding: 10px;
|
||||
// Icons inside the menu
|
||||
> .glyphicon,
|
||||
> .fa,
|
||||
> .ion {
|
||||
width: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//Messages menu
|
||||
.navbar-nav > .messages-menu {
|
||||
//Inner menu
|
||||
> .dropdown-menu > li .menu {
|
||||
// Messages menu item
|
||||
> li > a {
|
||||
margin: 0;
|
||||
//line-height: 20px;
|
||||
padding: 10px 10px;
|
||||
// User image
|
||||
> div > img {
|
||||
margin: auto 10px auto auto;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
// Message heading
|
||||
> h4 {
|
||||
padding: 0;
|
||||
margin: 0 0 0 45px;
|
||||
color: #444444;
|
||||
font-size: 15px;
|
||||
position: relative;
|
||||
// Small for message time display
|
||||
> small {
|
||||
color: #999999;
|
||||
font-size: 10px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
> p {
|
||||
margin: 0 0 0 45px;
|
||||
font-size: 12px;
|
||||
color: #888888;
|
||||
}
|
||||
|
||||
.clearfix();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//Tasks menu
|
||||
.navbar-nav > .tasks-menu {
|
||||
> .dropdown-menu > li .menu {
|
||||
> li > a {
|
||||
padding: 10px;
|
||||
|
||||
> h3 {
|
||||
font-size: 14px;
|
||||
padding: 0;
|
||||
margin: 0 0 10px 0;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
> .progress {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//User menu
|
||||
.navbar-nav > .user-menu {
|
||||
> .dropdown-menu {
|
||||
.border-top-radius(0);
|
||||
padding: 1px 0 0 0;
|
||||
border-top-width: 0;
|
||||
width: 280px;
|
||||
|
||||
&,
|
||||
> .user-body {
|
||||
.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;
|
||||
color: #fff;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
font-size: 17px;
|
||||
//text-shadow: 2px 2px 3px #333333;
|
||||
margin-top: 10px;
|
||||
> small {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Menu Body
|
||||
> .user-body {
|
||||
padding: 15px;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
border-top: 1px solid #dddddd;
|
||||
.clearfix();
|
||||
a {
|
||||
color: #444 !important;
|
||||
@media (max-width: @screen-sm-max) {
|
||||
background: #fff !important;
|
||||
color: #444 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Menu Footer
|
||||
> .user-footer {
|
||||
background-color: #f9f9f9;
|
||||
padding: 10px;
|
||||
.clearfix();
|
||||
.btn-default {
|
||||
color: #666666;
|
||||
&:hover {
|
||||
@media (max-width: @screen-sm-max) {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.user-image {
|
||||
float: left;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
border-radius: 50%;
|
||||
margin-right: 10px;
|
||||
margin-top: -2px;
|
||||
@media (max-width: @screen-xs-max) {
|
||||
float: none;
|
||||
margin-right: 0;
|
||||
margin-top: -8px;
|
||||
line-height: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 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 {
|
||||
backface-visibility: visible !important;
|
||||
.animation(flipInX .7s both);
|
||||
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes flipInX {
|
||||
0% {
|
||||
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
|
||||
-webkit-transition-timing-function: ease-in;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
40% {
|
||||
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
|
||||
-webkit-transition-timing-function: ease-in;
|
||||
}
|
||||
|
||||
60% {
|
||||
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
80% {
|
||||
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-webkit-transform: perspective(400px);
|
||||
}
|
||||
}
|
||||
|
||||
/* Fix dropdown menu in navbars */
|
||||
.navbar-custom-menu > .navbar-nav {
|
||||
> li {
|
||||
position: relative;
|
||||
> .dropdown-menu {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: @screen-sm-max) {
|
||||
.navbar-custom-menu > .navbar-nav {
|
||||
float: right;
|
||||
> li {
|
||||
position: static;
|
||||
> .dropdown-menu {
|
||||
position: absolute;
|
||||
right: 5%;
|
||||
left: auto;
|
||||
border: 1px solid #ddd;
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
108
build/less/forms.less
Normal file
108
build/less/forms.less
Normal file
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* Component: Form
|
||||
* ---------------
|
||||
*/
|
||||
.form-control {
|
||||
.border-radius(@input-radius);
|
||||
box-shadow: none;
|
||||
border-color: @gray-lte;
|
||||
&:focus {
|
||||
border-color: @light-blue;
|
||||
box-shadow: none;
|
||||
}
|
||||
&::-moz-placeholder,
|
||||
&:-ms-input-placeholder,
|
||||
&::-webkit-input-placeholder {
|
||||
color: #bbb;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&:not(select) {
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
}
|
||||
|
||||
.form-group {
|
||||
&.has-success {
|
||||
label {
|
||||
color: @green;
|
||||
}
|
||||
.form-control,
|
||||
.input-group-addon {
|
||||
border-color: @green;
|
||||
box-shadow: none;
|
||||
}
|
||||
.help-block {
|
||||
color: @green;
|
||||
}
|
||||
}
|
||||
|
||||
&.has-warning {
|
||||
label {
|
||||
color: @yellow;
|
||||
}
|
||||
.form-control,
|
||||
.input-group-addon {
|
||||
border-color: @yellow;
|
||||
box-shadow: none;
|
||||
}
|
||||
.help-block {
|
||||
color: @yellow;
|
||||
}
|
||||
}
|
||||
|
||||
&.has-error {
|
||||
label {
|
||||
color: @red;
|
||||
}
|
||||
.form-control,
|
||||
.input-group-addon {
|
||||
border-color: @red;
|
||||
box-shadow: none;
|
||||
}
|
||||
.help-block {
|
||||
color: @red;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Input group */
|
||||
.input-group {
|
||||
.input-group-addon {
|
||||
.border-radius(@input-radius);
|
||||
border-color: @gray-lte;
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
/* button groups */
|
||||
.btn-group-vertical {
|
||||
.btn {
|
||||
&.btn-flat:first-of-type, &.btn-flat:last-of-type {
|
||||
.border-radius(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.icheck > label {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
/* support Font Awesome icons in form-control */
|
||||
.form-control-feedback.fa {
|
||||
line-height: @input-height-base;
|
||||
}
|
||||
|
||||
.input-lg + .form-control-feedback.fa,
|
||||
.input-group-lg + .form-control-feedback.fa,
|
||||
.form-group-lg .form-control + .form-control-feedback.fa {
|
||||
line-height: @input-height-large;
|
||||
}
|
||||
|
||||
.input-sm + .form-control-feedback.fa,
|
||||
.input-group-sm + .form-control-feedback.fa,
|
||||
.form-group-sm .form-control + .form-control-feedback.fa {
|
||||
line-height: @input-height-small;
|
||||
}
|
||||
@@ -1,15 +1,20 @@
|
||||
//
|
||||
// Plugin: Full Calendar
|
||||
//
|
||||
/*
|
||||
* Plugin: Full Calendar
|
||||
* ---------------------
|
||||
*/
|
||||
// Import variables and mixins as a reference for separate plugins version
|
||||
@import (reference) "../../bower_components/bootstrap/less/mixins";
|
||||
@import (reference) "../../bower_components/bootstrap/less/variables";
|
||||
@import (reference) "variables";
|
||||
@import (reference) "mixins";
|
||||
|
||||
// Buttons
|
||||
// Fullcalendar buttons
|
||||
.fc-button {
|
||||
background: $gray-100;
|
||||
background: #f4f4f4;
|
||||
background-image: none;
|
||||
border-bottom-color: #ddd;
|
||||
color: #444;
|
||||
border-color: #ddd;
|
||||
color: $gray-700;
|
||||
|
||||
border-bottom-color: #ddd;
|
||||
&:hover,
|
||||
&:active,
|
||||
&.hover {
|
||||
@@ -19,9 +24,9 @@
|
||||
|
||||
// Calendar title
|
||||
.fc-header-title h2 {
|
||||
color: #666;
|
||||
font-size: 15px;
|
||||
line-height: 1.6em;
|
||||
color: #666;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
@@ -39,8 +44,8 @@
|
||||
}
|
||||
|
||||
.fc-grid {
|
||||
border: 0;
|
||||
width: 100%;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.fc-widget-header:first-of-type,
|
||||
@@ -54,30 +59,9 @@
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
.fc-toolbar,
|
||||
.fc-toolbar.fc-header-toolbar {
|
||||
.fc-toolbar {
|
||||
padding: @box-padding;
|
||||
margin: 0;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
@include media-breakpoint-down(xs) {
|
||||
.fc-toolbar {
|
||||
flex-direction: column;
|
||||
|
||||
.fc-left {
|
||||
order: 1;
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
|
||||
.fc-center {
|
||||
order: 0;
|
||||
margin-bottom: .375rem;
|
||||
}
|
||||
|
||||
.fc-right {
|
||||
order: 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fc-day-number {
|
||||
@@ -90,44 +74,33 @@
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
> li {
|
||||
float: left;
|
||||
font-size: 30px;
|
||||
line-height: 30px;
|
||||
margin-right: 5px;
|
||||
|
||||
.fa,
|
||||
.fas,
|
||||
.far,
|
||||
.fab,
|
||||
.fal,
|
||||
.fad,
|
||||
.svg-inline--fa,
|
||||
.ion {
|
||||
transition: transform linear .3s;
|
||||
|
||||
line-height: 30px;
|
||||
.fa {
|
||||
.transition-transform(linear .3s);
|
||||
&:hover {
|
||||
@include rotate(30deg);
|
||||
.rotate(30deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#add-new-event {
|
||||
transition: all linear .3s;
|
||||
.transition(all linear .3s);
|
||||
}
|
||||
|
||||
.external-event {
|
||||
@include box-shadow($card-shadow);
|
||||
|
||||
border-radius: $border-radius;
|
||||
cursor: move;
|
||||
font-weight: 700;
|
||||
margin-bottom: 4px;
|
||||
padding: 5px 10px;
|
||||
|
||||
font-weight: bold;
|
||||
margin-bottom: 4px;
|
||||
box-shadow: @box-boxshadow;
|
||||
text-shadow: @box-boxshadow;
|
||||
border-radius: @box-border-radius;
|
||||
cursor: move;
|
||||
&:hover {
|
||||
@include box-shadow(inset 0 0 90px rgba(0, 0, 0, 0.2));
|
||||
box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
}
|
||||
248
build/less/header.less
Normal file
248
build/less/header.less
Normal file
@@ -0,0 +1,248 @@
|
||||
/*
|
||||
* Component: Main Header
|
||||
* ----------------------
|
||||
*/
|
||||
|
||||
.main-header {
|
||||
position: relative;
|
||||
max-height: 100px;
|
||||
z-index: 1030;
|
||||
//Navbar
|
||||
.navbar {
|
||||
.transition(margin-left @transition-speed @transition-fn);
|
||||
margin-bottom: 0;
|
||||
margin-left: @sidebar-width;
|
||||
border: none;
|
||||
min-height: @navbar-height;
|
||||
border-radius: 0;
|
||||
.layout-top-nav & {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
//Navbar search text input
|
||||
#navbar-search-input.form-control {
|
||||
background: rgba(255, 255, 255, .2);
|
||||
border-color: transparent;
|
||||
&:focus,
|
||||
&:active {
|
||||
border-color: rgba(0, 0, 0, .1);
|
||||
background: rgba(255, 255, 255, .9);
|
||||
}
|
||||
&::-moz-placeholder {
|
||||
color: #ccc;
|
||||
opacity: 1;
|
||||
}
|
||||
&:-ms-input-placeholder {
|
||||
color: #ccc;
|
||||
}
|
||||
&::-webkit-input-placeholder {
|
||||
color: #ccc;
|
||||
}
|
||||
}
|
||||
//Navbar Right Menu
|
||||
.navbar-custom-menu,
|
||||
.navbar-right {
|
||||
float: right;
|
||||
@media (max-width: @screen-sm-max) {
|
||||
a {
|
||||
color: inherit;
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
.navbar-right {
|
||||
@media (max-width: @screen-header-collapse) {
|
||||
float: none;
|
||||
.navbar-collapse & {
|
||||
margin: 7.5px -15px;
|
||||
}
|
||||
|
||||
> li {
|
||||
color: inherit;
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
//Navbar toggle button
|
||||
.sidebar-toggle {
|
||||
float: left;
|
||||
background-color: transparent;
|
||||
background-image: none;
|
||||
padding: @navbar-padding-vertical @navbar-padding-horizontal;
|
||||
//Add the fontawesome bars icon
|
||||
font-family: fontAwesome;
|
||||
&:before {
|
||||
content: "\f0c9";
|
||||
}
|
||||
&:hover {
|
||||
color: #fff;
|
||||
}
|
||||
&:focus,
|
||||
&:active {
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
.sidebar-toggle .icon-bar {
|
||||
display: none;
|
||||
}
|
||||
//Navbar User Menu
|
||||
.navbar .nav > li.user > a {
|
||||
> .fa,
|
||||
> .glyphicon,
|
||||
> .ion {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
//Labels in navbar
|
||||
.navbar .nav > li > a > .label {
|
||||
position: absolute;
|
||||
top: 9px;
|
||||
right: 7px;
|
||||
text-align: center;
|
||||
font-size: 9px;
|
||||
padding: 2px 3px;
|
||||
line-height: .9;
|
||||
}
|
||||
|
||||
//Logo bar
|
||||
.logo {
|
||||
.transition(width @transition-speed @transition-fn);
|
||||
display: block;
|
||||
float: left;
|
||||
height: @navbar-height;
|
||||
font-size: 20px;
|
||||
line-height: 50px;
|
||||
text-align: center;
|
||||
width: @sidebar-width;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
padding: 0 15px;
|
||||
font-weight: 300;
|
||||
overflow: hidden;
|
||||
//Add support to sidebar mini by allowing the user to create
|
||||
//2 logo designs. mini and lg
|
||||
.logo-lg {
|
||||
//should be visibile when sidebar isn't collapsed
|
||||
display: block;
|
||||
}
|
||||
.logo-mini {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
//Navbar Brand. Alternative logo with layout-top-nav
|
||||
.navbar-brand {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
// Content Header
|
||||
.content-header {
|
||||
position: relative;
|
||||
padding: 15px 15px 0 15px;
|
||||
// Header Text
|
||||
> h1 {
|
||||
margin: 0;
|
||||
font-size: 24px;
|
||||
> small {
|
||||
font-size: 15px;
|
||||
display: inline-block;
|
||||
padding-left: 4px;
|
||||
font-weight: 300;
|
||||
}
|
||||
}
|
||||
|
||||
> .breadcrumb {
|
||||
float: right;
|
||||
background: transparent;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
font-size: 12px;
|
||||
padding: 7px 5px;
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
right: 10px;
|
||||
.border-radius(2px);
|
||||
> li > a {
|
||||
color: #444;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
> .fa, > .glyphicon, > .ion {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
> li + li:before {
|
||||
content: '>\00a0';
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: @screen-sm-max) {
|
||||
> .breadcrumb {
|
||||
position: relative;
|
||||
margin-top: 5px;
|
||||
top: 0;
|
||||
right: 0;
|
||||
float: none;
|
||||
background: @gray-lte;
|
||||
padding-left: 10px;
|
||||
li:before {
|
||||
color: darken(@gray-lte, 20%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-toggle {
|
||||
color: #fff;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: @navbar-padding-vertical @navbar-padding-horizontal;
|
||||
}
|
||||
|
||||
//Control navbar scaffolding on x-small screens
|
||||
@media (max-width: @screen-sm-max) {
|
||||
.navbar-custom-menu .navbar-nav > li {
|
||||
float: left;
|
||||
}
|
||||
|
||||
//Dont't let links get full width
|
||||
.navbar-custom-menu .navbar-nav {
|
||||
margin: 0;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.navbar-custom-menu .navbar-nav > li > a {
|
||||
padding-top: 15px;
|
||||
padding-bottom: 15px;
|
||||
line-height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
// Collapse header
|
||||
@media (max-width: @screen-header-collapse) {
|
||||
.main-header {
|
||||
position: relative;
|
||||
.logo,
|
||||
.navbar {
|
||||
width: 100%;
|
||||
float: none;
|
||||
}
|
||||
.navbar {
|
||||
margin: 0;
|
||||
}
|
||||
.navbar-custom-menu {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-collapse.pull-left {
|
||||
@media (max-width: @screen-sm-max) {
|
||||
float: none !important;
|
||||
+ .navbar-custom-menu {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 40px;
|
||||
}
|
||||
}
|
||||
}
|
||||
75
build/less/info-box.less
Normal file
75
build/less/info-box.less
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Component: Info Box
|
||||
* -------------------
|
||||
*/
|
||||
.info-box {
|
||||
display: block;
|
||||
min-height: 90px;
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
box-shadow: @box-boxshadow;
|
||||
.border-radius(2px);
|
||||
margin-bottom: 15px;
|
||||
small {
|
||||
font-size: 14px;
|
||||
}
|
||||
.progress {
|
||||
background: rgba(0, 0, 0, .2);
|
||||
margin: 5px -10px 5px -10px;
|
||||
height: 2px;
|
||||
&,
|
||||
& .progress-bar {
|
||||
.border-radius(0);
|
||||
}
|
||||
.progress-bar {
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.info-box-icon {
|
||||
.border-radius(2px; 0; 2px; 0);
|
||||
display: block;
|
||||
float: left;
|
||||
height: 90px;
|
||||
width: 90px;
|
||||
text-align: center;
|
||||
font-size: 45px;
|
||||
line-height: 90px;
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
> img {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.info-box-content {
|
||||
padding: 5px 10px;
|
||||
margin-left: 90px;
|
||||
}
|
||||
|
||||
.info-box-number {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.progress-description,
|
||||
.info-box-text {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.info-box-text {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.info-box-more {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.progress-description {
|
||||
margin: 0;
|
||||
}
|
||||
16
build/less/invoice.less
Normal file
16
build/less/invoice.less
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Page: Invoice
|
||||
* -------------
|
||||
*/
|
||||
|
||||
.invoice {
|
||||
position: relative;
|
||||
background: #fff;
|
||||
border: 1px solid #f4f4f4;
|
||||
padding: 20px;
|
||||
margin: 10px 25px;
|
||||
}
|
||||
|
||||
.invoice-title {
|
||||
margin-top: 0;
|
||||
}
|
||||
28
build/less/labels.less
Normal file
28
build/less/labels.less
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Component: Label
|
||||
* ----------------
|
||||
*/
|
||||
.label-default {
|
||||
background-color: @gray-lte;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.label-danger {
|
||||
&:extend(.bg-red);
|
||||
}
|
||||
|
||||
.label-info {
|
||||
&:extend(.bg-aqua);
|
||||
}
|
||||
|
||||
.label-warning {
|
||||
&:extend(.bg-yellow);
|
||||
}
|
||||
|
||||
.label-primary {
|
||||
&:extend(.bg-light-blue);
|
||||
}
|
||||
|
||||
.label-success {
|
||||
&:extend(.bg-green);
|
||||
}
|
||||
73
build/less/lockscreen.less
Normal file
73
build/less/lockscreen.less
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Page: Lock Screen
|
||||
* -----------------
|
||||
*/
|
||||
/* ADD THIS CLASS TO THE <BODY> TAG */
|
||||
.lockscreen {
|
||||
background: @gray-lte;
|
||||
}
|
||||
|
||||
.lockscreen-logo {
|
||||
font-size: 35px;
|
||||
text-align: center;
|
||||
margin-bottom: 25px;
|
||||
font-weight: 300;
|
||||
a {
|
||||
color: #444;
|
||||
}
|
||||
}
|
||||
|
||||
.lockscreen-wrapper {
|
||||
max-width: 400px;
|
||||
margin: 0 auto;
|
||||
margin-top: 10%;
|
||||
}
|
||||
|
||||
/* User name [optional] */
|
||||
.lockscreen .lockscreen-name {
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* Will contain the image and the sign in form */
|
||||
.lockscreen-item {
|
||||
.border-radius(4px);
|
||||
padding: 0;
|
||||
background: #fff;
|
||||
position: relative;
|
||||
margin: 10px auto 30px auto;
|
||||
width: 290px;
|
||||
}
|
||||
|
||||
/* User image */
|
||||
.lockscreen-image {
|
||||
.border-radius(50%);
|
||||
position: absolute;
|
||||
left: -10px;
|
||||
top: -25px;
|
||||
background: #fff;
|
||||
padding: 5px;
|
||||
z-index: 10;
|
||||
> img {
|
||||
.border-radius(50%);
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Contains the password input and the login button */
|
||||
.lockscreen-credentials {
|
||||
margin-left: 70px;
|
||||
.form-control {
|
||||
border: 0;
|
||||
}
|
||||
.btn {
|
||||
background-color: #fff;
|
||||
border: 0;
|
||||
padding: 0 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.lockscreen-footer {
|
||||
margin-top: 10px;
|
||||
}
|
||||
52
build/less/login_and_register.less
Normal file
52
build/less/login_and_register.less
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Page: Login & Register
|
||||
* ----------------------
|
||||
*/
|
||||
|
||||
.login-logo,
|
||||
.register-logo {
|
||||
font-size: 35px;
|
||||
text-align: center;
|
||||
margin-bottom: 25px;
|
||||
font-weight: 300;
|
||||
a {
|
||||
color: #444;
|
||||
}
|
||||
}
|
||||
|
||||
.login-page,
|
||||
.register-page {
|
||||
background: @gray-lte;
|
||||
}
|
||||
|
||||
.login-box,
|
||||
.register-box {
|
||||
width: 360px;
|
||||
margin: 7% auto;
|
||||
@media (max-width: @screen-sm) {
|
||||
width: 90%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.login-box-body,
|
||||
.register-box-body {
|
||||
background: #fff;
|
||||
padding: 20px;
|
||||
border-top: 0;
|
||||
color: #666;
|
||||
.form-control-feedback {
|
||||
color: #777;
|
||||
}
|
||||
}
|
||||
|
||||
.login-box-msg,
|
||||
.register-box-msg {
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
padding: 0 20px 20px 20px;
|
||||
}
|
||||
|
||||
.social-auth-links {
|
||||
margin: 10px 0;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Pages: Mailbox
|
||||
//
|
||||
|
||||
/*
|
||||
* Page: Mailbox
|
||||
* -------------
|
||||
*/
|
||||
.mailbox-messages {
|
||||
> .table {
|
||||
margin: 0;
|
||||
@@ -10,24 +10,21 @@
|
||||
|
||||
.mailbox-controls {
|
||||
padding: 5px;
|
||||
|
||||
&.with-border {
|
||||
border-bottom: 1px solid $card-border-color;
|
||||
border-bottom: 1px solid @box-border-color;
|
||||
}
|
||||
}
|
||||
|
||||
.mailbox-read-info {
|
||||
border-bottom: 1px solid $card-border-color;
|
||||
border-bottom: 1px solid @box-border-color;
|
||||
padding: 10px;
|
||||
|
||||
h3 {
|
||||
font-size: 20px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h5 {
|
||||
margin: 0;
|
||||
padding: 5px 0 0;
|
||||
padding: 5px 0 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,19 +38,19 @@
|
||||
}
|
||||
|
||||
.mailbox-attachments {
|
||||
@include list-unstyled ();
|
||||
&:extend(.list-unstyled);
|
||||
li {
|
||||
border: 1px solid #eee;
|
||||
float: left;
|
||||
width: 200px;
|
||||
border: 1px solid #eee;
|
||||
margin-bottom: 10px;
|
||||
margin-right: 10px;
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
.mailbox-attachment-name {
|
||||
font-weight: bold;
|
||||
color: #666;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.mailbox-attachment-icon,
|
||||
@@ -63,37 +60,29 @@
|
||||
}
|
||||
|
||||
.mailbox-attachment-info {
|
||||
background-color: $gray-100;
|
||||
padding: 10px;
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
.mailbox-attachment-size {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
|
||||
> span {
|
||||
display: inline-block;
|
||||
padding-top: .75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.mailbox-attachment-icon {
|
||||
color: #666;
|
||||
font-size: 65px;
|
||||
max-height: 132.5px;
|
||||
padding: 20px 10px;
|
||||
text-align: center;
|
||||
|
||||
font-size: 65px;
|
||||
color: #666;
|
||||
padding: 20px 10px;
|
||||
&.has-img {
|
||||
padding: 0;
|
||||
|
||||
> img {
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mailbox-attachment-close {
|
||||
@extend .close;
|
||||
&:extend(.close);
|
||||
}
|
||||
606
build/less/miscellaneous.less
Normal file
606
build/less/miscellaneous.less
Normal file
@@ -0,0 +1,606 @@
|
||||
/*
|
||||
* General: Miscellaneous
|
||||
* ----------------------
|
||||
*/
|
||||
// 10px padding and margins
|
||||
.pad {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.margin {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.margin-bottom {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.margin-bottom-none {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.margin-r-5 {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
// Display inline
|
||||
.inline {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
// Description Blocks
|
||||
.description-block {
|
||||
display: block;
|
||||
margin: 10px 0;
|
||||
text-align: center;
|
||||
&.margin-bottom {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
> .description-header {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
}
|
||||
> .description-text {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
|
||||
// Background colors
|
||||
.bg-red,
|
||||
.bg-yellow,
|
||||
.bg-aqua,
|
||||
.bg-blue,
|
||||
.bg-light-blue,
|
||||
.bg-green,
|
||||
.bg-navy,
|
||||
.bg-teal,
|
||||
.bg-olive,
|
||||
.bg-lime,
|
||||
.bg-orange,
|
||||
.bg-fuchsia,
|
||||
.bg-purple,
|
||||
.bg-maroon,
|
||||
.bg-black,
|
||||
.bg-red-active,
|
||||
.bg-yellow-active,
|
||||
.bg-aqua-active,
|
||||
.bg-blue-active,
|
||||
.bg-light-blue-active,
|
||||
.bg-green-active,
|
||||
.bg-navy-active,
|
||||
.bg-teal-active,
|
||||
.bg-olive-active,
|
||||
.bg-lime-active,
|
||||
.bg-orange-active,
|
||||
.bg-fuchsia-active,
|
||||
.bg-purple-active,
|
||||
.bg-maroon-active,
|
||||
.bg-black-active {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.bg-gray {
|
||||
color: #000;
|
||||
background-color: @gray-lte !important;
|
||||
}
|
||||
|
||||
.bg-gray-light {
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
|
||||
.bg-black {
|
||||
background-color: @black !important;
|
||||
}
|
||||
|
||||
.bg-red {
|
||||
background-color: @red !important;
|
||||
}
|
||||
|
||||
.bg-yellow {
|
||||
background-color: @yellow !important;
|
||||
}
|
||||
|
||||
.bg-aqua {
|
||||
background-color: @aqua !important;
|
||||
}
|
||||
|
||||
.bg-blue {
|
||||
background-color: @blue !important;
|
||||
}
|
||||
|
||||
.bg-light-blue {
|
||||
background-color: @light-blue !important;
|
||||
}
|
||||
|
||||
.bg-green {
|
||||
background-color: @green !important;
|
||||
}
|
||||
|
||||
.bg-navy {
|
||||
background-color: @navy !important;
|
||||
}
|
||||
|
||||
.bg-teal {
|
||||
background-color: @teal !important;
|
||||
}
|
||||
|
||||
.bg-olive {
|
||||
background-color: @olive !important;
|
||||
}
|
||||
|
||||
.bg-lime {
|
||||
background-color: @lime !important;
|
||||
}
|
||||
|
||||
.bg-orange {
|
||||
background-color: @orange !important;
|
||||
}
|
||||
|
||||
.bg-fuchsia {
|
||||
background-color: @fuchsia !important;
|
||||
}
|
||||
|
||||
.bg-purple {
|
||||
background-color: @purple !important;
|
||||
}
|
||||
|
||||
.bg-maroon {
|
||||
background-color: @maroon !important;
|
||||
}
|
||||
|
||||
//Set of Active Background Colors
|
||||
.bg-gray-active {
|
||||
color: #000;
|
||||
background-color: darken(@gray-lte, 10%) !important;
|
||||
}
|
||||
|
||||
.bg-black-active {
|
||||
background-color: darken(@black, 10%) !important;
|
||||
}
|
||||
|
||||
.bg-red-active {
|
||||
background-color: darken(@red , 6%) !important;
|
||||
}
|
||||
|
||||
.bg-yellow-active {
|
||||
background-color: darken(@yellow , 6%) !important;
|
||||
}
|
||||
|
||||
.bg-aqua-active {
|
||||
background-color: darken(@aqua , 6%) !important;
|
||||
}
|
||||
|
||||
.bg-blue-active {
|
||||
background-color: darken(@blue , 10%) !important;
|
||||
}
|
||||
|
||||
.bg-light-blue-active {
|
||||
background-color: darken(@light-blue , 6%) !important;
|
||||
}
|
||||
|
||||
.bg-green-active {
|
||||
background-color: darken(@green , 5%) !important;
|
||||
}
|
||||
|
||||
.bg-navy-active {
|
||||
background-color: darken(@navy , 2%) !important;
|
||||
}
|
||||
|
||||
.bg-teal-active {
|
||||
background-color: darken(@teal , 5%) !important;
|
||||
}
|
||||
|
||||
.bg-olive-active {
|
||||
background-color: darken(@olive , 5%) !important;
|
||||
}
|
||||
|
||||
.bg-lime-active {
|
||||
background-color: darken(@lime , 5%) !important;
|
||||
}
|
||||
|
||||
.bg-orange-active {
|
||||
background-color: darken(@orange , 5%) !important;
|
||||
}
|
||||
|
||||
.bg-fuchsia-active {
|
||||
background-color: darken(@fuchsia , 5%) !important;
|
||||
}
|
||||
|
||||
.bg-purple-active {
|
||||
background-color: darken(@purple , 5%) !important;
|
||||
}
|
||||
|
||||
.bg-maroon-active {
|
||||
background-color: darken(@maroon , 3%) !important;
|
||||
}
|
||||
|
||||
//Disabled!
|
||||
[class^="bg-"].disabled {
|
||||
.opacity(.65);
|
||||
}
|
||||
|
||||
// Text colors
|
||||
.text-red {
|
||||
color: @red !important;
|
||||
}
|
||||
|
||||
.text-yellow {
|
||||
color: @yellow !important;
|
||||
}
|
||||
|
||||
.text-aqua {
|
||||
color: @aqua !important;
|
||||
}
|
||||
|
||||
.text-blue {
|
||||
color: @blue !important;
|
||||
}
|
||||
|
||||
.text-black {
|
||||
color: @black !important;
|
||||
}
|
||||
|
||||
.text-light-blue {
|
||||
color: @light-blue !important;
|
||||
}
|
||||
|
||||
.text-green {
|
||||
color: @green !important;
|
||||
}
|
||||
|
||||
.text-gray {
|
||||
color: @gray-lte !important;
|
||||
}
|
||||
|
||||
.text-navy {
|
||||
color: @navy !important;
|
||||
}
|
||||
|
||||
.text-teal {
|
||||
color: @teal !important;
|
||||
}
|
||||
|
||||
.text-olive {
|
||||
color: @olive !important;
|
||||
}
|
||||
|
||||
.text-lime {
|
||||
color: @lime !important;
|
||||
}
|
||||
|
||||
.text-orange {
|
||||
color: @orange !important;
|
||||
}
|
||||
|
||||
.text-fuchsia {
|
||||
color: @fuchsia !important;
|
||||
}
|
||||
|
||||
.text-purple {
|
||||
color: @purple !important;
|
||||
}
|
||||
|
||||
.text-maroon {
|
||||
color: @maroon !important;
|
||||
}
|
||||
|
||||
.link-muted {
|
||||
color: darken(@gray-lte, 30%);
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: darken(@gray-lte, 40%);
|
||||
}
|
||||
}
|
||||
|
||||
.link-black {
|
||||
color: #666;
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
// Hide elements by display none only
|
||||
.hide {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
// Remove borders
|
||||
.no-border {
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
// Remove padding
|
||||
.no-padding {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
// Remove margins
|
||||
.no-margin {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
// Remove box shadow
|
||||
.no-shadow {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
// Unstyled List
|
||||
.list-unstyled {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.list-group-unbordered {
|
||||
> .list-group-item {
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
border-radius: 0;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove border radius
|
||||
.flat {
|
||||
.border-radius(0) !important;
|
||||
}
|
||||
|
||||
.text-bold {
|
||||
&, &.table td, &.table th {
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
.text-sm {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
// _fix for sparkline tooltip
|
||||
.jqstooltip {
|
||||
padding: 5px !important;
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
// Gradient Background colors
|
||||
.bg-teal-gradient {
|
||||
.gradient(@teal; @teal; lighten(@teal, 16%)) !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.bg-light-blue-gradient {
|
||||
.gradient(@light-blue; @light-blue; lighten(@light-blue, 12%)) !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.bg-blue-gradient {
|
||||
.gradient(@blue; @blue; lighten(@blue, 7%)) !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.bg-aqua-gradient {
|
||||
.gradient(@aqua; @aqua; lighten(@aqua, 7%)) !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.bg-yellow-gradient {
|
||||
.gradient(@yellow; @yellow; lighten(@yellow, 16%)) !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.bg-purple-gradient {
|
||||
.gradient(@purple; @purple; lighten(@purple, 16%)) !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.bg-green-gradient {
|
||||
.gradient(@green; @green; lighten(@green, 7%)) !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.bg-red-gradient {
|
||||
.gradient(@red; @red; lighten(@red, 10%)) !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.bg-black-gradient {
|
||||
.gradient(@black; @black; lighten(@black, 10%)) !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.bg-maroon-gradient {
|
||||
.gradient(@maroon; @maroon; lighten(@maroon, 10%)) !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
//Description Block Extension
|
||||
.description-block {
|
||||
.description-icon {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
//Remove top padding
|
||||
.no-pad-top {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
//Make position static
|
||||
.position-static {
|
||||
position: static !important;
|
||||
}
|
||||
|
||||
//List utility classes
|
||||
.list-header {
|
||||
font-size: 15px;
|
||||
padding: 10px 4px;
|
||||
font-weight: bold;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.list-seperator {
|
||||
height: 1px;
|
||||
background: @box-border-color;
|
||||
margin: 15px 0 9px 0;
|
||||
}
|
||||
|
||||
.list-link {
|
||||
> a {
|
||||
padding: 4px;
|
||||
color: #777;
|
||||
&:hover {
|
||||
color: #222;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Light font weight
|
||||
.font-light {
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
//User block
|
||||
.user-block {
|
||||
.clearfix();
|
||||
img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
float: left;
|
||||
}
|
||||
.username,
|
||||
.description,
|
||||
.comment {
|
||||
display: block;
|
||||
margin-left: 50px;
|
||||
}
|
||||
.username {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.description {
|
||||
color: #999;
|
||||
font-size: 13px;
|
||||
}
|
||||
&.user-block-sm {
|
||||
img {
|
||||
&:extend(.img-sm);
|
||||
}
|
||||
.username,
|
||||
.description,
|
||||
.comment {
|
||||
margin-left: 40px;
|
||||
}
|
||||
.username {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Image sizes
|
||||
.img-sm,
|
||||
.img-md,
|
||||
.img-lg {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.img-sm {
|
||||
width: 30px !important;
|
||||
height: 30px !important;
|
||||
+ .img-push {
|
||||
margin-left: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.img-md {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
+ .img-push {
|
||||
margin-left: 70px;
|
||||
}
|
||||
}
|
||||
|
||||
.img-lg {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
+ .img-push {
|
||||
margin-left: 110px;
|
||||
}
|
||||
}
|
||||
|
||||
// Image bordered
|
||||
.img-bordered {
|
||||
border: 3px solid @gray-lte;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.img-bordered-sm {
|
||||
border: 2px solid @gray-lte;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
//General attachemnt block
|
||||
.attachment-block {
|
||||
border: 1px solid @box-border-color;
|
||||
padding: 5px;
|
||||
margin-bottom: 10px;
|
||||
background: #f7f7f7;
|
||||
|
||||
.attachment-img {
|
||||
max-width: 100px;
|
||||
max-height: 100px;
|
||||
height: auto;
|
||||
float: left;
|
||||
}
|
||||
.attachment-pushed {
|
||||
margin-left: 110px;
|
||||
}
|
||||
.attachment-heading {
|
||||
margin: 0;
|
||||
}
|
||||
.attachment-text {
|
||||
color: #555;
|
||||
}
|
||||
}
|
||||
|
||||
.connectedSortable {
|
||||
min-height: 100px;
|
||||
}
|
||||
|
||||
.ui-helper-hidden-accessible {
|
||||
border: 0;
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.sort-highlight {
|
||||
background: #f4f4f4;
|
||||
border: 1px dashed #ddd;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.full-opacity-hover {
|
||||
.opacity(.65);
|
||||
&:hover {
|
||||
.opacity(1);
|
||||
}
|
||||
}
|
||||
|
||||
// Charts
|
||||
.chart {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
svg,
|
||||
canvas {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
312
build/less/mixins.less
Normal file
312
build/less/mixins.less
Normal file
@@ -0,0 +1,312 @@
|
||||
//AdminLTE mixins
|
||||
//===============
|
||||
|
||||
//Changes the color and the hovering properties of the navbar
|
||||
.navbar-variant(@color; @font-color: rgba(255, 255, 255, 0.8); @hover-color: #f6f6f6; @hover-bg: rgba(0, 0, 0, 0.1)) {
|
||||
background-color: @color;
|
||||
//Navbar links
|
||||
.nav > li > a {
|
||||
color: @font-color;
|
||||
}
|
||||
|
||||
.nav > li > a:hover,
|
||||
.nav > li > a:active,
|
||||
.nav > li > a:focus,
|
||||
.nav .open > a,
|
||||
.nav .open > a:hover,
|
||||
.nav .open > a:focus,
|
||||
.nav > .active > a {
|
||||
background: @hover-bg;
|
||||
color: @hover-color;
|
||||
}
|
||||
|
||||
//Add color to the sidebar toggle button
|
||||
.sidebar-toggle {
|
||||
color: @font-color;
|
||||
&:hover {
|
||||
color: @hover-color;
|
||||
background: @hover-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Logo color variation
|
||||
.logo-variant(@bg-color; @color: #fff; @border-bottom-color: transparent; @border-bottom-width: 0) {
|
||||
background-color: @bg-color;
|
||||
color: @color;
|
||||
border-bottom: @border-bottom-width solid @border-bottom-color;
|
||||
|
||||
&:hover {
|
||||
background-color: darken(@bg-color, 1%);
|
||||
}
|
||||
}
|
||||
|
||||
//Box solid color variantion creator
|
||||
.box-solid-variant(@color; @text-color: #fff) {
|
||||
border: 1px solid @color;
|
||||
> .box-header {
|
||||
color: @text-color;
|
||||
background: @color;
|
||||
background-color: @color;
|
||||
a,
|
||||
.btn {
|
||||
color: @text-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Direct Chat Variant
|
||||
.direct-chat-variant(@bg-color; @color: #fff) {
|
||||
.right > .direct-chat-text {
|
||||
background: @bg-color;
|
||||
border-color: @bg-color;
|
||||
color: @color;
|
||||
&:after,
|
||||
&:before {
|
||||
border-left-color: @bg-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//border radius creator
|
||||
.border-radius(@radius) {
|
||||
border-radius: @radius;
|
||||
}
|
||||
|
||||
//Different radius each side
|
||||
.border-radius(@top-left, @top-right, @bottom-left, @bottom-right)
|
||||
{
|
||||
border-top-left-radius: @top-left;
|
||||
border-top-right-radius: @top-right;
|
||||
border-bottom-right-radius: @bottom-right;
|
||||
border-bottom-left-radius: @bottom-left;
|
||||
}
|
||||
|
||||
//Gradient background
|
||||
.gradient(@color: #F5F5F5, @start: #EEE, @stop: #FFF) {
|
||||
background: @color;
|
||||
background: -webkit-gradient(linear,
|
||||
left bottom,
|
||||
left top,
|
||||
color-stop(0, @start),
|
||||
color-stop(1, @stop));
|
||||
background: -ms-linear-gradient(bottom,
|
||||
@start,
|
||||
@stop);
|
||||
background: -moz-linear-gradient(center bottom,
|
||||
@start 0%,
|
||||
@stop 100%);
|
||||
background: -o-linear-gradient(@stop,
|
||||
@start);
|
||||
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@stop,@start));
|
||||
}
|
||||
|
||||
//Added 2.1.0
|
||||
//Skins Mixins
|
||||
|
||||
//Dark Sidebar Mixin
|
||||
.skin-dark-sidebar(@link-hover-border-color) {
|
||||
// Sidebar background color (Both .wrapper and .left-side are responsible for sidebar bg color)
|
||||
.wrapper,
|
||||
.main-sidebar,
|
||||
.left-side {
|
||||
background-color: @sidebar-dark-bg;
|
||||
}
|
||||
//User Panel (resides in the sidebar)
|
||||
.user-panel {
|
||||
> .info, > .info > a {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
//Sidebar Menu. First level links
|
||||
.sidebar-menu > li {
|
||||
//Section Headning
|
||||
&.header {
|
||||
color: lighten(@sidebar-dark-bg, 20%);
|
||||
background: darken(@sidebar-dark-bg, 4%);
|
||||
}
|
||||
//links
|
||||
> a {
|
||||
border-left: 3px solid transparent;
|
||||
}
|
||||
//Hover and active states
|
||||
&:hover > a,
|
||||
&.active > a,
|
||||
&.menu-open > a {
|
||||
color: @sidebar-dark-hover-color;
|
||||
background: @sidebar-dark-hover-bg;
|
||||
}
|
||||
&.active > a {
|
||||
border-left-color: @link-hover-border-color;
|
||||
}
|
||||
//First Level Submenu
|
||||
> .treeview-menu {
|
||||
margin: 0 1px;
|
||||
background: @sidebar-dark-submenu-bg;
|
||||
}
|
||||
}
|
||||
//All links within the sidebar menu
|
||||
.sidebar a {
|
||||
color: @sidebar-dark-color;
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
//All submenus
|
||||
.sidebar-menu .treeview-menu {
|
||||
> li {
|
||||
> a {
|
||||
color: @sidebar-dark-submenu-color;
|
||||
}
|
||||
&.active > a, > a:hover {
|
||||
color: @sidebar-dark-submenu-hover-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
//The sidebar search form
|
||||
.sidebar-form {
|
||||
.border-radius(3px);
|
||||
border: 1px solid lighten(@sidebar-dark-bg, 10%);
|
||||
margin: 10px 10px;
|
||||
input[type="text"], .btn {
|
||||
box-shadow: none;
|
||||
background-color: lighten(@sidebar-dark-bg, 10%);
|
||||
border: 1px solid transparent;
|
||||
height: 35px;
|
||||
//.transition(all @transition-speed @transition-fn);
|
||||
}
|
||||
input[type="text"] {
|
||||
color: #666;
|
||||
.border-radius(2px, 0, 2px, 0);
|
||||
&:focus,
|
||||
&:focus + .input-group-btn .btn {
|
||||
background-color: #fff;
|
||||
color: #666;
|
||||
}
|
||||
&:focus + .input-group-btn .btn {
|
||||
border-left-color: #fff;
|
||||
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
color: #999;
|
||||
.border-radius(0, 2px, 0, 2px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Light Sidebar Mixin
|
||||
.skin-light-sidebar(@icon-active-color) {
|
||||
// Sidebar background color (Both .wrapper and .left-side are responsible for sidebar bg color)
|
||||
.wrapper,
|
||||
.main-sidebar,
|
||||
.left-side {
|
||||
background-color: @sidebar-light-bg;
|
||||
}
|
||||
.content-wrapper,
|
||||
.main-footer {
|
||||
//border-left: 1px solid @gray-lte;
|
||||
}
|
||||
.main-sidebar {
|
||||
border-right: 1px solid @gray-lte;
|
||||
}
|
||||
//User Panel (resides in the sidebar)
|
||||
.user-panel {
|
||||
> .info, > .info > a {
|
||||
color: @sidebar-light-color;
|
||||
}
|
||||
}
|
||||
//Sidebar Menu. First level links
|
||||
.sidebar-menu > li {
|
||||
.transition(border-left-color .3s ease);
|
||||
//border-left: 3px solid transparent;
|
||||
//Section Headning
|
||||
&.header {
|
||||
color: lighten(@sidebar-light-color, 25%);
|
||||
background: @sidebar-light-bg;
|
||||
}
|
||||
//links
|
||||
> a {
|
||||
border-left: 3px solid transparent;
|
||||
font-weight: 600;
|
||||
}
|
||||
//Hover and active states
|
||||
&:hover > a,
|
||||
&.active > a {
|
||||
color: @sidebar-light-hover-color;
|
||||
background: @sidebar-light-hover-bg;
|
||||
}
|
||||
&:hover > a {
|
||||
|
||||
}
|
||||
&.active {
|
||||
border-left-color: @icon-active-color;
|
||||
> a {
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
//First Level Submenu
|
||||
> .treeview-menu {
|
||||
background: @sidebar-light-submenu-bg;
|
||||
}
|
||||
}
|
||||
//All links within the sidebar menu
|
||||
.sidebar a {
|
||||
color: @sidebar-light-color;
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
//All submenus
|
||||
.sidebar-menu .treeview-menu {
|
||||
> li {
|
||||
> a {
|
||||
color: @sidebar-light-submenu-color;
|
||||
}
|
||||
&.active > a,
|
||||
> a:hover {
|
||||
color: @sidebar-light-submenu-hover-color;
|
||||
}
|
||||
&.active > a {
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
//The sidebar search form
|
||||
.sidebar-form {
|
||||
.border-radius(3px);
|
||||
border: 1px solid @gray-lte; //darken(@sidebar-light-bg, 5%);
|
||||
margin: 10px 10px;
|
||||
input[type="text"],
|
||||
.btn {
|
||||
box-shadow: none;
|
||||
background-color: #fff; //darken(@sidebar-light-bg, 3%);
|
||||
border: 1px solid transparent;
|
||||
height: 35px;
|
||||
//.transition(all @transition-speed @transition-fn);
|
||||
}
|
||||
input[type="text"] {
|
||||
color: #666;
|
||||
.border-radius(2px, 0, 2px, 0);
|
||||
&:focus,
|
||||
&:focus + .input-group-btn .btn {
|
||||
background-color: #fff;
|
||||
color: #666;
|
||||
}
|
||||
&:focus + .input-group-btn .btn {
|
||||
border-left-color: #fff;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
color: #999;
|
||||
.border-radius(0, 2px, 0, 2px);
|
||||
}
|
||||
}
|
||||
@media (min-width: @screen-sm-min) {
|
||||
&.sidebar-mini.sidebar-collapse {
|
||||
.sidebar-menu > li > .treeview-menu {
|
||||
border-left: 1px solid @gray-lte;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
80
build/less/modal.less
Normal file
80
build/less/modal.less
Normal file
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Component: modal
|
||||
* ----------------
|
||||
*/
|
||||
.modal {
|
||||
background: rgba(0, 0, 0, .3);
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
.border-radius(0);
|
||||
.box-shadow(0 2px 3px rgba(0, 0, 0, .125));
|
||||
border: 0;
|
||||
@media (min-width: @screen-sm-min) {
|
||||
.box-shadow(0 2px 3px rgba(0, 0, 0, .125));
|
||||
}
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
border-bottom-color: @box-border-color;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
border-top-color: @box-border-color;
|
||||
}
|
||||
|
||||
//Modal variants
|
||||
.modal-primary {
|
||||
.modal-body {
|
||||
&:extend(.bg-light-blue);
|
||||
}
|
||||
.modal-header,
|
||||
.modal-footer {
|
||||
&:extend(.bg-light-blue-active);
|
||||
border-color: darken(@light-blue, 10%);
|
||||
}
|
||||
}
|
||||
|
||||
.modal-warning {
|
||||
.modal-body {
|
||||
&:extend(.bg-yellow);
|
||||
}
|
||||
.modal-header,
|
||||
.modal-footer {
|
||||
&:extend(.bg-yellow-active);
|
||||
border-color: darken(@yellow, 10%);
|
||||
}
|
||||
}
|
||||
|
||||
.modal-info {
|
||||
.modal-body {
|
||||
&:extend(.bg-aqua);
|
||||
}
|
||||
.modal-header,
|
||||
.modal-footer {
|
||||
&:extend(.bg-aqua-active);
|
||||
border-color: darken(@aqua, 10%);
|
||||
}
|
||||
}
|
||||
|
||||
.modal-success {
|
||||
.modal-body {
|
||||
&:extend(.bg-green);
|
||||
}
|
||||
.modal-header,
|
||||
.modal-footer {
|
||||
&:extend(.bg-green-active);
|
||||
border-color: darken(@green, 10%);
|
||||
}
|
||||
}
|
||||
|
||||
.modal-danger {
|
||||
.modal-body {
|
||||
&:extend(.bg-red);
|
||||
}
|
||||
.modal-header,
|
||||
.modal-footer {
|
||||
&:extend(.bg-red-active);
|
||||
border-color: darken(@red, 10%);
|
||||
}
|
||||
}
|
||||
232
build/less/navs.less
Normal file
232
build/less/navs.less
Normal file
@@ -0,0 +1,232 @@
|
||||
/*
|
||||
* Component: Nav
|
||||
* --------------
|
||||
*/
|
||||
|
||||
.nav {
|
||||
> li > a:hover,
|
||||
> li > a:active,
|
||||
> li > a:focus {
|
||||
color: #444;
|
||||
background: #f7f7f7;
|
||||
}
|
||||
}
|
||||
|
||||
/* NAV PILLS */
|
||||
.nav-pills {
|
||||
> li > a {
|
||||
.border-radius(0);
|
||||
border-top: 3px solid transparent;
|
||||
color: #444;
|
||||
> .fa,
|
||||
> .glyphicon,
|
||||
> .ion {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
> li.active > a,
|
||||
> li.active > a:hover,
|
||||
> li.active > a:focus {
|
||||
border-top-color: @light-blue;
|
||||
}
|
||||
> li.active > a {
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
/* NAV STACKED */
|
||||
.nav-stacked {
|
||||
> li > a {
|
||||
.border-radius(0);
|
||||
border-top: 0;
|
||||
border-left: 3px solid transparent;
|
||||
color: #444;
|
||||
}
|
||||
> li.active > a,
|
||||
> li.active > a:hover {
|
||||
background: transparent;
|
||||
color: #444;
|
||||
border-top: 0;
|
||||
border-left-color: @light-blue;
|
||||
}
|
||||
|
||||
> li.header {
|
||||
border-bottom: 1px solid #ddd;
|
||||
color: #777;
|
||||
margin-bottom: 10px;
|
||||
padding: 5px 10px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
|
||||
/* NAV TABS */
|
||||
.nav-tabs-custom {
|
||||
margin-bottom: 20px;
|
||||
background: #fff;
|
||||
box-shadow: @box-boxshadow;
|
||||
border-radius: @box-border-radius;
|
||||
> .nav-tabs {
|
||||
margin: 0;
|
||||
border-bottom-color: #f4f4f4;
|
||||
|
||||
.border-top-radius(@box-border-radius);
|
||||
> li {
|
||||
border-top: 3px solid transparent;
|
||||
margin-bottom: -2px;
|
||||
|
||||
&.disabled > a {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
> a {
|
||||
color: #444;
|
||||
.border-radius(0);
|
||||
&.text-muted {
|
||||
color: #999;
|
||||
}
|
||||
&,
|
||||
&:hover {
|
||||
background: transparent;
|
||||
margin: 0;
|
||||
}
|
||||
&:hover {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
&:not(.active) {
|
||||
> a:hover,
|
||||
> a:focus,
|
||||
> a:active {
|
||||
border-color: transparent;
|
||||
}
|
||||
}
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
> li.active {
|
||||
border-top-color: @light-blue;
|
||||
& > a,
|
||||
&:hover > a {
|
||||
background-color: #fff;
|
||||
color: #444;
|
||||
}
|
||||
> a {
|
||||
border-top-color: transparent;
|
||||
border-left-color: #f4f4f4;
|
||||
border-right-color: #f4f4f4;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
> li:first-of-type {
|
||||
margin-left: 0;
|
||||
&.active {
|
||||
> a {
|
||||
border-left-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Pulled to the right
|
||||
&.pull-right {
|
||||
float: none !important;
|
||||
> li {
|
||||
float: right;
|
||||
}
|
||||
> li:first-of-type {
|
||||
margin-right: 0;
|
||||
> a {
|
||||
border-left-width: 1px;
|
||||
}
|
||||
&.active {
|
||||
> a {
|
||||
border-left-color: #f4f4f4;
|
||||
border-right-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> li.header {
|
||||
line-height: 35px;
|
||||
padding: 0 10px;
|
||||
font-size: 20px;
|
||||
color: #444;
|
||||
> .fa,
|
||||
> .glyphicon,
|
||||
> .ion {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> .tab-content {
|
||||
background: #fff;
|
||||
padding: 10px;
|
||||
.border-bottom-radius(@box-border-radius);
|
||||
}
|
||||
|
||||
.dropdown.open > a {
|
||||
&:active,
|
||||
&:focus {
|
||||
background: transparent;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
// Tab color variations
|
||||
&.tab-primary {
|
||||
> .nav-tabs {
|
||||
> li.active {
|
||||
border-top-color: @light-blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.tab-info {
|
||||
> .nav-tabs {
|
||||
> li.active {
|
||||
border-top-color: @aqua;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.tab-danger {
|
||||
> .nav-tabs {
|
||||
> li.active {
|
||||
border-top-color: @red;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.tab-warning {
|
||||
> .nav-tabs {
|
||||
> li.active {
|
||||
border-top-color: @yellow;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.tab-success {
|
||||
> .nav-tabs {
|
||||
> li.active {
|
||||
border-top-color: @green;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.tab-default {
|
||||
> .nav-tabs {
|
||||
> li.active {
|
||||
border-top-color: @gray-lte;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* PAGINATION */
|
||||
.pagination {
|
||||
> li > a {
|
||||
background: #fafafa;
|
||||
color: #666;
|
||||
}
|
||||
&.pagination-flat {
|
||||
> li > a {
|
||||
.border-radius(0) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
5
build/less/plugins.less
Normal file
5
build/less/plugins.less
Normal file
@@ -0,0 +1,5 @@
|
||||
// Customized third-party plugins
|
||||
@import "bootstrap-social.less";
|
||||
@import "fullcalendar.less";
|
||||
@import "select2.less";
|
||||
@import "datepicker";
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Misc: Print
|
||||
//
|
||||
|
||||
/*
|
||||
* Misc: print
|
||||
* -----------
|
||||
*/
|
||||
@media print {
|
||||
//Add to elements that you do not want to show when printing
|
||||
.no-print {
|
||||
@@ -10,29 +10,32 @@
|
||||
|
||||
//Elements that we want to hide when printing
|
||||
.main-sidebar,
|
||||
.left-side,
|
||||
.main-header,
|
||||
.content-header {
|
||||
@extend .no-print;
|
||||
&:extend(.no-print);
|
||||
}
|
||||
|
||||
//This is the only element that should appear, so let's remove the margins
|
||||
.content-wrapper,
|
||||
.right-side,
|
||||
.main-footer {
|
||||
@include translate(0, 0);
|
||||
margin-left: 0 !important;
|
||||
min-height: 0 !important;
|
||||
.translate(0, 0) !important;
|
||||
}
|
||||
|
||||
.layout-fixed .content-wrapper {
|
||||
.fixed .content-wrapper,
|
||||
.fixed .right-side {
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
|
||||
//Invoice printing
|
||||
.invoice {
|
||||
width: 100%;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.invoice-col {
|
||||
@@ -43,7 +46,6 @@
|
||||
//Make sure table content displays properly
|
||||
.table-responsive {
|
||||
overflow: auto;
|
||||
|
||||
> .table tr th,
|
||||
> .table tr td {
|
||||
white-space: normal !important;
|
||||
45
build/less/products.less
Normal file
45
build/less/products.less
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Component: Products List
|
||||
* ------------------------
|
||||
*/
|
||||
.products-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
> .item {
|
||||
.border-radius(@box-border-radius);
|
||||
.box-shadow(@box-boxshadow);
|
||||
.clearfix();
|
||||
padding: 10px 0;
|
||||
background: #fff;
|
||||
}
|
||||
.product-img {
|
||||
float: left;
|
||||
img {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
}
|
||||
.product-info {
|
||||
margin-left: 60px;
|
||||
}
|
||||
.product-title {
|
||||
font-weight: 600;
|
||||
}
|
||||
.product-description {
|
||||
display: block;
|
||||
color: #999;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
.product-list-in-box > .item {
|
||||
.box-shadow(none);
|
||||
.border-radius(0);
|
||||
border-bottom: 1px solid @box-border-color;
|
||||
&:last-of-type {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,13 @@
|
||||
//
|
||||
// Pages: Profile
|
||||
//
|
||||
/*
|
||||
* Page: Profile
|
||||
* -------------
|
||||
*/
|
||||
|
||||
.profile-user-img {
|
||||
border: 3px solid $gray-500;
|
||||
margin: 0 auto;
|
||||
padding: 3px;
|
||||
width: 100px;
|
||||
padding: 3px;
|
||||
border: 3px solid @gray-lte;
|
||||
}
|
||||
|
||||
.profile-username {
|
||||
@@ -15,30 +16,16 @@
|
||||
}
|
||||
|
||||
.post {
|
||||
border-bottom: 1px solid $gray-500;
|
||||
color: #666;
|
||||
border-bottom: 1px solid @gray-lte;
|
||||
margin-bottom: 15px;
|
||||
padding-bottom: 15px;
|
||||
|
||||
color: #666;
|
||||
&:last-of-type {
|
||||
border-bottom: 0;
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.user-block {
|
||||
margin-bottom: 15px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.row {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@include dark-mode () {
|
||||
.post {
|
||||
color: $white;
|
||||
border-color: $gray-600;
|
||||
}
|
||||
}
|
||||
111
build/less/progress-bars.less
Normal file
111
build/less/progress-bars.less
Normal file
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
* Component: Progress Bar
|
||||
* -----------------------
|
||||
*/
|
||||
|
||||
//General CSS
|
||||
.progress,
|
||||
.progress > .progress-bar {
|
||||
.box-shadow(none);
|
||||
&, .progress-bar {
|
||||
.border-radius(@progress-bar-border-radius);
|
||||
}
|
||||
}
|
||||
|
||||
/* size variation */
|
||||
.progress.sm,
|
||||
.progress-sm {
|
||||
height: 10px;
|
||||
&, .progress-bar {
|
||||
.border-radius(@progress-bar-sm-border-radius);
|
||||
}
|
||||
}
|
||||
|
||||
.progress.xs,
|
||||
.progress-xs {
|
||||
height: 7px;
|
||||
&, .progress-bar {
|
||||
.border-radius(@progress-bar-xs-border-radius);
|
||||
}
|
||||
}
|
||||
|
||||
.progress.xxs,
|
||||
.progress-xxs {
|
||||
height: 3px;
|
||||
&, .progress-bar {
|
||||
.border-radius(@progress-bar-xs-border-radius);
|
||||
}
|
||||
}
|
||||
|
||||
/* Vertical bars */
|
||||
.progress.vertical {
|
||||
position: relative;
|
||||
width: 30px;
|
||||
height: 200px;
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
> .progress-bar {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
//Sizes
|
||||
&.sm,
|
||||
&.progress-sm {
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
&.xs,
|
||||
&.progress-xs {
|
||||
width: 10px;
|
||||
}
|
||||
&.xxs,
|
||||
&.progress-xxs {
|
||||
width: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
//Progress Groups
|
||||
.progress-group {
|
||||
.progress-text {
|
||||
font-weight: 600;
|
||||
}
|
||||
.progress-number {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
/* Remove margins from progress bars when put in a table */
|
||||
.table {
|
||||
tr > td .progress {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Variations
|
||||
// -------------------------
|
||||
.progress-bar-light-blue,
|
||||
.progress-bar-primary {
|
||||
.progress-bar-variant(@light-blue);
|
||||
}
|
||||
|
||||
.progress-bar-green,
|
||||
.progress-bar-success {
|
||||
.progress-bar-variant(@green);
|
||||
}
|
||||
|
||||
.progress-bar-aqua,
|
||||
.progress-bar-info {
|
||||
.progress-bar-variant(@aqua);
|
||||
}
|
||||
|
||||
.progress-bar-yellow,
|
||||
.progress-bar-warning {
|
||||
.progress-bar-variant(@yellow);
|
||||
}
|
||||
|
||||
.progress-bar-red,
|
||||
.progress-bar-danger {
|
||||
.progress-bar-variant(@red);
|
||||
}
|
||||
127
build/less/select2.less
Normal file
127
build/less/select2.less
Normal file
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
* Plugin: Select2
|
||||
* ---------------
|
||||
*/
|
||||
// Import variables and mixins as a reference for separate plugins version
|
||||
@import (reference) "../../bower_components/bootstrap/less/mixins";
|
||||
@import (reference) "../../bower_components/bootstrap/less/variables";
|
||||
@import (reference) "variables";
|
||||
@import (reference) "mixins";
|
||||
|
||||
//Signle select
|
||||
.select2-container--default,
|
||||
.select2-selection {
|
||||
&.select2-container--focus,
|
||||
&:focus,
|
||||
&:active {
|
||||
outline: none;
|
||||
}
|
||||
.select2-selection--single {
|
||||
border: 1px solid @gray-lte;
|
||||
border-radius: @input-radius;
|
||||
padding: 6px 12px;
|
||||
height: 34px;
|
||||
}
|
||||
}
|
||||
|
||||
.select2-container--default.select2-container--open {
|
||||
border-color: @light-blue;
|
||||
}
|
||||
|
||||
.select2-dropdown {
|
||||
border: 1px solid @gray-lte;
|
||||
border-radius: @input-radius;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected] {
|
||||
background-color: @light-blue;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.select2-results__option {
|
||||
padding: 6px 12px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.select2-container .select2-selection--single .select2-selection__rendered {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
height: auto;
|
||||
margin-top: -4px;
|
||||
}
|
||||
|
||||
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
|
||||
padding-right: 6px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||
height: 28px;
|
||||
right: 3px;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow b {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.select2-dropdown,
|
||||
.select2-search--inline {
|
||||
.select2-search__field {
|
||||
border: 1px solid @gray-lte;
|
||||
&:focus {
|
||||
outline: none;
|
||||
//border: 1px solid @light-blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select2-container--default.select2-container--focus .select2-selection--multiple,
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field {
|
||||
border-color: @light-blue !important;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-results__option[aria-disabled=true] {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-results__option[aria-selected=true] {
|
||||
background-color: #ddd;
|
||||
&,
|
||||
&:hover {
|
||||
color: #444;
|
||||
}
|
||||
}
|
||||
|
||||
//Multiple select
|
||||
.select2-container--default {
|
||||
.select2-selection--multiple {
|
||||
border: 1px solid @gray-lte;
|
||||
border-radius: @input-radius;
|
||||
&:focus {
|
||||
border-color: @light-blue;
|
||||
}
|
||||
}
|
||||
&.select2-container--focus .select2-selection--multiple {
|
||||
border-color: @gray-lte;
|
||||
}
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||
background-color: @light-blue;
|
||||
border-color: darken(@light-blue, 5%);
|
||||
padding: 1px 10px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
||||
margin-right: 5px;
|
||||
color: rgba(255, 255, 255, .7);
|
||||
&:hover {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.select2-container .select2-selection--single .select2-selection__rendered {
|
||||
padding-right: 10px;
|
||||
}
|
||||
165
build/less/sidebar-mini.less
Normal file
165
build/less/sidebar-mini.less
Normal file
@@ -0,0 +1,165 @@
|
||||
/*
|
||||
* Component: Sidebar Mini
|
||||
*/
|
||||
|
||||
//Add sidebar-mini class to the body tag to activate this feature
|
||||
.sidebar-mini {
|
||||
//Sidebar mini should work only on devices larger than @screen-sm
|
||||
@media (min-width: @screen-sm) {
|
||||
//When the sidebar is collapsed...
|
||||
&.sidebar-collapse {
|
||||
|
||||
//Apply the new margining to the main content and footer
|
||||
.content-wrapper,
|
||||
.right-side,
|
||||
.main-footer {
|
||||
margin-left: 50px !important;
|
||||
z-index: 840;
|
||||
}
|
||||
|
||||
//Modify the sidebar to shrink instead of disappearing
|
||||
.main-sidebar {
|
||||
//Don't go away! Just shrink
|
||||
.translate(0, 0);
|
||||
width: 50px !important;
|
||||
z-index: 850;
|
||||
}
|
||||
|
||||
.sidebar-menu {
|
||||
> li {
|
||||
position: relative;
|
||||
> a {
|
||||
margin-right: 0;
|
||||
}
|
||||
> a > span {
|
||||
border-top-right-radius: 4px;
|
||||
}
|
||||
|
||||
&:not(.treeview) {
|
||||
> a > span {
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
> .treeview-menu {
|
||||
// Add some padding to the treeview menu
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Make the sidebar links, menus, labels, badges
|
||||
//and angle icons disappear
|
||||
.main-sidebar .user-panel > .info,
|
||||
.sidebar-form,
|
||||
.sidebar-menu > li > a > span,
|
||||
.sidebar-menu > li > .treeview-menu,
|
||||
.sidebar-menu > li > a > .pull-right,
|
||||
.sidebar-menu li.header {
|
||||
display: none !important;
|
||||
-webkit-transform: translateZ(0);
|
||||
}
|
||||
|
||||
.main-header {
|
||||
//Let's make the logo also shrink and the mini logo to appear
|
||||
.logo {
|
||||
width: 50px;
|
||||
> .logo-mini {
|
||||
display: block;
|
||||
margin-left: -15px;
|
||||
margin-right: -15px;
|
||||
font-size: 18px;
|
||||
}
|
||||
> .logo-lg {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
//Since the logo got smaller, we need to fix the navbar's position
|
||||
.navbar {
|
||||
margin-left: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Show menu items on hover
|
||||
.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse {
|
||||
.sidebar-menu > li:hover {
|
||||
> a {
|
||||
//overflow: visible;
|
||||
}
|
||||
> a > span:not(.pull-right), //:not(.pull-right-container),
|
||||
> .treeview-menu {
|
||||
display: block !important;
|
||||
position: absolute;
|
||||
width: @sidebar-width - 50;
|
||||
left: 50px;
|
||||
}
|
||||
|
||||
//position the header & treeview menus
|
||||
> a > span {
|
||||
top: 0;
|
||||
margin-left: -3px;
|
||||
padding: 12px 5px 12px 20px;
|
||||
background-color: inherit;
|
||||
}
|
||||
> a > .pull-right-container {
|
||||
//display: block!important;
|
||||
position: relative !important;
|
||||
float: right;
|
||||
width: auto !important;
|
||||
left: 200px - 20px !important;
|
||||
top: -22px !important;
|
||||
z-index: 900;
|
||||
> .label:not(:first-of-type) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
> .treeview-menu {
|
||||
top: 44px;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-expanded-on-hover {
|
||||
.main-footer,
|
||||
.content-wrapper {
|
||||
margin-left: 50px;
|
||||
}
|
||||
.main-sidebar {
|
||||
box-shadow: @sidebar-expanded-shadow;
|
||||
}
|
||||
}
|
||||
|
||||
//A fix for text overflow while transitioning from sidebar mini to full sidebar
|
||||
.sidebar-menu,
|
||||
.main-sidebar .user-panel,
|
||||
.sidebar-menu > li.header {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sidebar-menu:hover {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.sidebar-form,
|
||||
.sidebar-menu > li.header {
|
||||
overflow: hidden;
|
||||
text-overflow: clip;
|
||||
}
|
||||
|
||||
.sidebar-menu li > a {
|
||||
position: relative;
|
||||
> .pull-right-container {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 50%;
|
||||
margin-top: -7px;
|
||||
}
|
||||
}
|
||||
141
build/less/sidebar.less
Normal file
141
build/less/sidebar.less
Normal file
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
* Component: Sidebar
|
||||
* ------------------
|
||||
*/
|
||||
// Main Sidebar
|
||||
.main-sidebar {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding-top: 50px;
|
||||
min-height: 100%;
|
||||
width: @sidebar-width;
|
||||
z-index: 810;
|
||||
|
||||
// Using disposable variable to join statements with a comma
|
||||
@transition-rule: @transition-speed @transition-fn, width @transition-speed @transition-fn;
|
||||
.transition-transform(@transition-rule);
|
||||
|
||||
@media (max-width: @screen-header-collapse) {
|
||||
padding-top: 100px;
|
||||
}
|
||||
|
||||
@media (max-width: @screen-xs-max) {
|
||||
.translate(-@sidebar-width, 0);
|
||||
}
|
||||
|
||||
.sidebar-collapse & {
|
||||
@media (min-width: @screen-sm) {
|
||||
.translate(-@sidebar-width, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-open & {
|
||||
@media (max-width: @screen-xs-max) {
|
||||
.translate(0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
// Remove border from form
|
||||
.sidebar-form {
|
||||
input:focus {
|
||||
border-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
// Sidebar user panel
|
||||
.user-panel {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
overflow: hidden;
|
||||
.clearfix();
|
||||
> .image > img {
|
||||
width: 100%;
|
||||
max-width: 45px;
|
||||
height: auto;
|
||||
}
|
||||
> .info {
|
||||
padding: 5px 5px 5px 15px;
|
||||
line-height: 1;
|
||||
position: absolute;
|
||||
left: 55px;
|
||||
> p {
|
||||
font-weight: 600;
|
||||
margin-bottom: 9px;
|
||||
}
|
||||
> a {
|
||||
text-decoration: none;
|
||||
padding-right: 5px;
|
||||
margin-top: 3px;
|
||||
font-size: 11px;
|
||||
> .fa,
|
||||
> .ion,
|
||||
> .glyphicon {
|
||||
margin-right: 3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sidebar menu
|
||||
.sidebar-menu {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
//First Level
|
||||
> li {
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
> a {
|
||||
padding: 12px 5px 12px 15px;
|
||||
display: block;
|
||||
> .fa,
|
||||
> .glyphicon,
|
||||
> .ion {
|
||||
width: 20px;
|
||||
}
|
||||
}
|
||||
.label,
|
||||
.badge {
|
||||
margin-right: 5px;
|
||||
}
|
||||
.badge {
|
||||
margin-top: 3px;
|
||||
}
|
||||
}
|
||||
li.header {
|
||||
padding: 10px 25px 10px 15px;
|
||||
font-size: 12px;
|
||||
}
|
||||
li > a > .fa-angle-left,
|
||||
li > a > .pull-right-container > .fa-angle-left {
|
||||
width: auto;
|
||||
height: auto;
|
||||
padding: 0;
|
||||
margin-right: 10px;
|
||||
.transition(transform .5s ease);
|
||||
}
|
||||
li > a > .fa-angle-left {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 10px;
|
||||
margin-top: -8px;
|
||||
}
|
||||
|
||||
.menu-open {
|
||||
> a > .fa-angle-left,
|
||||
> a > .pull-right-container > .fa-angle-left {
|
||||
.rotate(-90deg);
|
||||
}
|
||||
}
|
||||
.active > .treeview-menu {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
13
build/less/skins/_all-skins.less
Normal file
13
build/less/skins/_all-skins.less
Normal file
@@ -0,0 +1,13 @@
|
||||
//All skins in one file
|
||||
@import "skin-blue.less";
|
||||
@import "skin-blue-light.less";
|
||||
@import "skin-black.less";
|
||||
@import "skin-black-light.less";
|
||||
@import "skin-green.less";
|
||||
@import "skin-green-light.less";
|
||||
@import "skin-red.less";
|
||||
@import "skin-red-light.less";
|
||||
@import "skin-yellow.less";
|
||||
@import "skin-yellow-light.less";
|
||||
@import "skin-purple.less";
|
||||
@import "skin-purple-light.less";
|
||||
65
build/less/skins/skin-black-light.less
Normal file
65
build/less/skins/skin-black-light.less
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Skin: Black
|
||||
* -----------
|
||||
*/
|
||||
@import "../../../bower_components/bootstrap/less/mixins.less";
|
||||
@import "../../../bower_components/bootstrap/less/variables.less";
|
||||
@import "../variables.less";
|
||||
@import "../mixins.less";
|
||||
|
||||
/* skin-black navbar */
|
||||
.skin-black-light {
|
||||
//Navbar & Logo
|
||||
.main-header {
|
||||
//.box-shadow(0px 1px 1px rgba(0, 0, 0, 0.05));
|
||||
border-bottom: 1px solid @gray-lte;
|
||||
.navbar-toggle {
|
||||
color: #333;
|
||||
}
|
||||
.navbar-brand {
|
||||
color: #333;
|
||||
border-right: 1px solid @gray-lte;
|
||||
}
|
||||
.navbar {
|
||||
.navbar-variant(#fff; #333; #999; #fff);
|
||||
> .sidebar-toggle {
|
||||
color: #333;
|
||||
border-right: 1px solid @gray-lte;
|
||||
}
|
||||
.navbar-nav {
|
||||
> li > a {
|
||||
border-right: 1px solid @gray-lte;
|
||||
}
|
||||
}
|
||||
.navbar-custom-menu .navbar-nav,
|
||||
.navbar-right {
|
||||
> li {
|
||||
> a {
|
||||
border-left: 1px solid @gray-lte;
|
||||
border-right-width: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
> .logo {
|
||||
.logo-variant(#fff; #333);
|
||||
border-right: 1px solid @gray-lte;
|
||||
@media (max-width: @screen-header-collapse) {
|
||||
.logo-variant(#222; #fff);
|
||||
border-right: none;
|
||||
}
|
||||
}
|
||||
|
||||
li.user-header {
|
||||
background-color: #222;
|
||||
}
|
||||
}
|
||||
|
||||
//Content Header
|
||||
.content-header {
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
//Create the sidebar skin
|
||||
.skin-light-sidebar(#fff);
|
||||
}
|
||||
74
build/less/skins/skin-black.less
Normal file
74
build/less/skins/skin-black.less
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* Skin: Black
|
||||
* -----------
|
||||
*/
|
||||
@import "../../../bower_components/bootstrap/less/mixins.less";
|
||||
@import "../../../bower_components/bootstrap/less/variables.less";
|
||||
@import "../variables.less";
|
||||
@import "../mixins.less";
|
||||
|
||||
/* skin-black navbar */
|
||||
.skin-black {
|
||||
//Navbar & Logo
|
||||
.main-header {
|
||||
.box-shadow(0px 1px 1px rgba(0, 0, 0, 0.05));
|
||||
.navbar-toggle {
|
||||
color: #333;
|
||||
}
|
||||
.navbar-brand {
|
||||
color: #333;
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
.navbar {
|
||||
.navbar-variant(#fff; #333; #999; #fff);
|
||||
> .sidebar-toggle {
|
||||
color: #333;
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
.navbar-nav {
|
||||
> li > a {
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
}
|
||||
.navbar-custom-menu .navbar-nav,
|
||||
.navbar-right {
|
||||
> li {
|
||||
> a {
|
||||
border-left: 1px solid #eee;
|
||||
border-right-width: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
> .logo {
|
||||
.logo-variant(#fff; #333);
|
||||
border-right: 1px solid #eee;
|
||||
@media (max-width: @screen-header-collapse) {
|
||||
.logo-variant(#222; #fff);
|
||||
border-right: none;
|
||||
}
|
||||
}
|
||||
|
||||
li.user-header {
|
||||
background-color: #222;
|
||||
}
|
||||
}
|
||||
|
||||
//Content Header
|
||||
.content-header {
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
//Create the sidebar skin
|
||||
.skin-dark-sidebar(#fff);
|
||||
|
||||
.pace {
|
||||
.pace-progress {
|
||||
background: #222;
|
||||
}
|
||||
.pace-activity {
|
||||
border-top-color: #222;
|
||||
border-left-color: #222;
|
||||
}
|
||||
}
|
||||
}
|
||||
61
build/less/skins/skin-blue-light.less
Normal file
61
build/less/skins/skin-blue-light.less
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Skin: Blue
|
||||
* ----------
|
||||
*/
|
||||
@import "../../../bower_components/bootstrap/less/mixins.less";
|
||||
@import "../../../bower_components/bootstrap/less/variables.less";
|
||||
@import "../variables.less";
|
||||
@import "../mixins.less";
|
||||
|
||||
.skin-blue-light {
|
||||
//Navbar
|
||||
.main-header {
|
||||
.navbar {
|
||||
.navbar-variant(@light-blue; #fff);
|
||||
.sidebar-toggle {
|
||||
color: #fff;
|
||||
&:hover {
|
||||
background-color: darken(@light-blue, 5%);
|
||||
}
|
||||
}
|
||||
@media (max-width: @screen-header-collapse) {
|
||||
.dropdown-menu {
|
||||
li {
|
||||
&.divider {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
a {
|
||||
color: #fff;
|
||||
&:hover {
|
||||
background: darken(@light-blue, 5%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//Logo
|
||||
.logo {
|
||||
.logo-variant(@light-blue);
|
||||
}
|
||||
|
||||
li.user-header {
|
||||
background-color: @light-blue;
|
||||
}
|
||||
}
|
||||
|
||||
//Content Header
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
//Create the sidebar skin
|
||||
.skin-light-sidebar(@light-blue);
|
||||
.main-footer {
|
||||
border-top-color: @gray-lte;
|
||||
}
|
||||
}
|
||||
|
||||
.skin-blue.layout-top-nav .main-header > .logo {
|
||||
.logo-variant(@light-blue);
|
||||
}
|
||||
58
build/less/skins/skin-blue.less
Normal file
58
build/less/skins/skin-blue.less
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Skin: Blue
|
||||
* ----------
|
||||
*/
|
||||
@import "../../../bower_components/bootstrap/less/mixins.less";
|
||||
@import "../../../bower_components/bootstrap/less/variables.less";
|
||||
@import "../variables.less";
|
||||
@import "../mixins.less";
|
||||
|
||||
.skin-blue {
|
||||
//Navbar
|
||||
.main-header {
|
||||
.navbar {
|
||||
.navbar-variant(@light-blue; #fff);
|
||||
.sidebar-toggle {
|
||||
color: #fff;
|
||||
&:hover {
|
||||
background-color: darken(@light-blue, 5%);
|
||||
}
|
||||
}
|
||||
@media (max-width: @screen-header-collapse) {
|
||||
.dropdown-menu {
|
||||
li {
|
||||
&.divider {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
a {
|
||||
color: #fff;
|
||||
&:hover {
|
||||
background: darken(@light-blue, 5%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//Logo
|
||||
.logo {
|
||||
.logo-variant(darken(@light-blue, 5%));
|
||||
}
|
||||
|
||||
li.user-header {
|
||||
background-color: @light-blue;
|
||||
}
|
||||
}
|
||||
|
||||
//Content Header
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
//Create the sidebar skin
|
||||
.skin-dark-sidebar(@light-blue);
|
||||
}
|
||||
|
||||
.skin-blue.layout-top-nav .main-header > .logo {
|
||||
.logo-variant(@light-blue);
|
||||
}
|
||||
55
build/less/skins/skin-green-light.less
Normal file
55
build/less/skins/skin-green-light.less
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Skin: Green
|
||||
* -----------
|
||||
*/
|
||||
@import "../../../bower_components/bootstrap/less/mixins.less";
|
||||
@import "../../../bower_components/bootstrap/less/variables.less";
|
||||
@import "../variables.less";
|
||||
@import "../mixins.less";
|
||||
|
||||
.skin-green-light {
|
||||
//Navbar
|
||||
.main-header {
|
||||
.navbar {
|
||||
.navbar-variant(@green; #fff);
|
||||
.sidebar-toggle {
|
||||
color: #fff;
|
||||
&:hover {
|
||||
background-color: darken(@green, 5%);
|
||||
}
|
||||
}
|
||||
@media (max-width: @screen-header-collapse) {
|
||||
.dropdown-menu {
|
||||
li {
|
||||
&.divider {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
a {
|
||||
color: #fff;
|
||||
&:hover {
|
||||
background: darken(@green, 5%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//Logo
|
||||
.logo {
|
||||
.logo-variant(@green);
|
||||
}
|
||||
|
||||
li.user-header {
|
||||
background-color: @green;
|
||||
}
|
||||
}
|
||||
|
||||
//Content Header
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
//Create the sidebar skin
|
||||
.skin-light-sidebar(@green);
|
||||
|
||||
}
|
||||
55
build/less/skins/skin-green.less
Normal file
55
build/less/skins/skin-green.less
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Skin: Green
|
||||
* -----------
|
||||
*/
|
||||
@import "../../../bower_components/bootstrap/less/mixins.less";
|
||||
@import "../../../bower_components/bootstrap/less/variables.less";
|
||||
@import "../variables.less";
|
||||
@import "../mixins.less";
|
||||
|
||||
.skin-green {
|
||||
//Navbar
|
||||
.main-header {
|
||||
.navbar {
|
||||
.navbar-variant(@green; #fff);
|
||||
.sidebar-toggle {
|
||||
color: #fff;
|
||||
&:hover {
|
||||
background-color: darken(@green, 5%);
|
||||
}
|
||||
}
|
||||
@media (max-width: @screen-header-collapse) {
|
||||
.dropdown-menu {
|
||||
li {
|
||||
&.divider {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
a {
|
||||
color: #fff;
|
||||
&:hover {
|
||||
background: darken(@green, 5%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//Logo
|
||||
.logo {
|
||||
.logo-variant(darken(@green, 5%));
|
||||
}
|
||||
|
||||
li.user-header {
|
||||
background-color: @green;
|
||||
}
|
||||
}
|
||||
|
||||
//Content Header
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
//Create the sidebar skin
|
||||
.skin-dark-sidebar(@green);
|
||||
|
||||
}
|
||||
54
build/less/skins/skin-purple-light.less
Normal file
54
build/less/skins/skin-purple-light.less
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Skin: Purple
|
||||
* ------------
|
||||
*/
|
||||
@import "../../../bower_components/bootstrap/less/mixins.less";
|
||||
@import "../../../bower_components/bootstrap/less/variables.less";
|
||||
@import "../variables.less";
|
||||
@import "../mixins.less";
|
||||
|
||||
.skin-purple-light {
|
||||
//Navbar
|
||||
.main-header {
|
||||
.navbar {
|
||||
.navbar-variant(@purple; #fff);
|
||||
.sidebar-toggle {
|
||||
color: #fff;
|
||||
&:hover {
|
||||
background-color: darken(@purple, 5%);
|
||||
}
|
||||
}
|
||||
@media (max-width: @screen-header-collapse) {
|
||||
.dropdown-menu {
|
||||
li {
|
||||
&.divider {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
a {
|
||||
color: #fff;
|
||||
&:hover {
|
||||
background: darken(@purple, 5%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//Logo
|
||||
.logo {
|
||||
.logo-variant(@purple);
|
||||
}
|
||||
|
||||
li.user-header {
|
||||
background-color: @purple;
|
||||
}
|
||||
}
|
||||
|
||||
//Content Header
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
//Create the sidebar skin
|
||||
.skin-light-sidebar(@purple);
|
||||
}
|
||||
54
build/less/skins/skin-purple.less
Normal file
54
build/less/skins/skin-purple.less
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Skin: Purple
|
||||
* ------------
|
||||
*/
|
||||
@import "../../../bower_components/bootstrap/less/mixins.less";
|
||||
@import "../../../bower_components/bootstrap/less/variables.less";
|
||||
@import "../variables.less";
|
||||
@import "../mixins.less";
|
||||
|
||||
.skin-purple {
|
||||
//Navbar
|
||||
.main-header {
|
||||
.navbar {
|
||||
.navbar-variant(@purple; #fff);
|
||||
.sidebar-toggle {
|
||||
color: #fff;
|
||||
&:hover {
|
||||
background-color: darken(@purple, 5%);
|
||||
}
|
||||
}
|
||||
@media (max-width: @screen-header-collapse) {
|
||||
.dropdown-menu {
|
||||
li {
|
||||
&.divider {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
a {
|
||||
color: #fff;
|
||||
&:hover {
|
||||
background: darken(@purple, 5%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//Logo
|
||||
.logo {
|
||||
.logo-variant(darken(@purple, 5%));
|
||||
}
|
||||
|
||||
li.user-header {
|
||||
background-color: @purple;
|
||||
}
|
||||
}
|
||||
|
||||
//Content Header
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
//Create the sidebar skin
|
||||
.skin-dark-sidebar(@purple);
|
||||
}
|
||||
54
build/less/skins/skin-red-light.less
Normal file
54
build/less/skins/skin-red-light.less
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Skin: Red
|
||||
* ---------
|
||||
*/
|
||||
@import "../../../bower_components/bootstrap/less/mixins.less";
|
||||
@import "../../../bower_components/bootstrap/less/variables.less";
|
||||
@import "../variables.less";
|
||||
@import "../mixins.less";
|
||||
|
||||
.skin-red-light {
|
||||
//Navbar
|
||||
.main-header {
|
||||
.navbar {
|
||||
.navbar-variant(@red; #fff);
|
||||
.sidebar-toggle {
|
||||
color: #fff;
|
||||
&:hover {
|
||||
background-color: darken(@red, 5%);
|
||||
}
|
||||
}
|
||||
@media (max-width: @screen-header-collapse) {
|
||||
.dropdown-menu {
|
||||
li {
|
||||
&.divider {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
a {
|
||||
color: #fff;
|
||||
&:hover {
|
||||
background: darken(@red, 5%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//Logo
|
||||
.logo {
|
||||
.logo-variant(@red);
|
||||
}
|
||||
|
||||
li.user-header {
|
||||
background-color: @red;
|
||||
}
|
||||
}
|
||||
|
||||
//Content Header
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
//Create the sidebar skin
|
||||
.skin-light-sidebar(@red);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user