first commit

This commit is contained in:
2022-04-13 13:51:55 +07:00
commit 47e209c023
3107 changed files with 238911 additions and 0 deletions

View File

@ -0,0 +1,12 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['https://www.paypal.me/dipuraj']

View File

@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
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.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View File

@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
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.

View File

@ -0,0 +1,27 @@
### Fixes:
-
-
-
### Changes:
-
-
-
### Thank you for your contribution!
Please note the following points for pull request
- Make sure that the pull request is not a duplicate.
- Follow the same code style as the library.
- Pull request should target the `dev` branch.
- Don't alter the licence headers.
- Run the test suites in the `test` directory first by running `npm test` or `gulp test`.
- Don't modify any files in the `dist` directory.
- Link any issue that is related to the pull request.
- Provide a description of your changes.
IMPORTANT: Please review the [CONTRIBUTING.md](../CONTRIBUTING.md) file for detailed contributing guidelines.
**YOU CAN REMOVE THIS PR TEMPLATE BEFORE SUBMITTING**

View File

@ -0,0 +1,19 @@
/ref.txt
/node_modules/
/bower_components/
/vendor/
/public/
# IDE Files
#-------------------------
/nbproject/
.idea/*
.vscode/*
## Sublime Text cache files
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
*.sublime-workspace
*.sublime-project
/nbproject/private/

View File

@ -0,0 +1,64 @@
.*.swp
._*
.DS_Store
.git
.github
.hg
.lock-wscript
.svn
.wafpickle-*
CVS
npm-debug.log
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz
*.orig
*.jql.js
work
build
src
test
spec
pids
logs
results
coverage
lib-cov
html-report
xunit.xml
# IDE Files
#-------------------------
/nbproject/*
.idea/*
.vscode/*
.project
.idea
.settings
.iml
## Sublime Text cache files
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
*.sublime-workspace
*.sublime-project
ehthumbs.db
Icon?
Thumbs.db
.AppleDouble
.LSOverride
.Spotlight-V100
.Trashes
/ref.txt
/node_modules/
/bower_components/
/vendor/

View File

@ -0,0 +1,3 @@
language: node_js
node_js:
- "node"

View File

@ -0,0 +1,76 @@
# 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, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, 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 dipumedayil@gmail.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and 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][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

View File

@ -0,0 +1,45 @@
# Contributing
## How can I contribute?
- Fix a bug you found or already reported on the [GitHub Issues Tracker](https://github.com/techlab/jquery-smartwizard/issues/).
- Add new features to the project.
- Create new themes
- Add new test cases.
- Add documentation.
- Add a demo page.
- [Donate](https://www.paypal.me/dipuraj) money for the project on [![Paypal](https://img.shields.io/badge/PayPal-dipuraj-blue.svg)](https://www.paypal.me/dipuraj)
## How to contribute code?
Here are the basic steps to get started contributing code:
1. Fork the [repo](https://github.com/techlab/jquery-smartwizard/).
2. Install the dependencies, run `npm install`.
3. Start the project, run `npm start`.
4. Replicate the issue you're trying to fix or spec out the feature you're trying to add.
5. Modify the code to fix the bug or to add the feature. All changes should happen in the relevant `src/js/*.js` and `src/scss/*.scss` files.
6. Verify that your fix or feature works.
7. Run the test cases by running `npm test`, you can also add more test cases based on your new change.
8. Build the code by running `npm run build`.
9. Commit your changes with an informative description.
10. Open a pull request to the [dev](https://github.com/techlab/jquery-smartwizard/tree/dev) branch of the [repo](https://github.com/techlab/jquery-smartwizard/) with your new commit and a descriptive message about what the PR does.
Thank you for your contribution!
##### Notes for pull request
- Follow the same code style as the library.
- Run the test suites in the `test` directory first by running `npm test`.
- Don't modify any files in the `dist` directory.
- Don't alter the licence headers.
## Reporting bugs
#### Make sure it is a bug related to this project
Before reporting the bug, please make sure that the bug is in the project and not from your own code or any other library used.
#### Try the latest version
Bugs in the older versions of the project may have already been fixed.
In order to avoid reporting known issues, make sure you are always testing against the latest release.
Also make sure the problem hasn't already been reported on the [GitHub Issues Tracker](https://github.com/techlab/jquery-smartwizard/issues/).
If not, create a new issue there and include your test case.
## Contributors
Million thanks to all our [Code Contributors](https://github.com/techlab/jquery-smartwizard/graphs/contributors) and Supporters.

View File

@ -0,0 +1,22 @@
MIT License
Copyright (c) 2020 Dipu Raj
http://techlaboratory.net
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,233 @@
# jQuery Smart Wizard v5
#### The awesome jQuery step wizard plugin.
[![Build Status](https://travis-ci.org/techlab/jquery-smartwizard.svg?branch=master)](https://travis-ci.org/techlab/jquery-smartwizard)
[![npm version](https://badge.fury.io/js/smartwizard.svg)](https://www.npmjs.com/package/smartwizard)
[![Packagist Version](https://badgen.net/packagist/v/techlab/smartwizard)](https://packagist.org/packages/techlab/smartwizard)
[![Npm Downloadsl](https://badgen.net/npm/dm/smartwizard?icon=npm)](https://www.npmjs.com/package/smartwizard)
[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/smartwizard/badge?style=rounded)](https://www.jsdelivr.com/package/npm/smartwizard)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/techlab/jquery-smartwizard/master/LICENSE)
[![GitHub Repo](https://badgen.net/badge/icon/jquery-smartwizard?icon=github&label=&color=0da4d3)](https://github.com/techlab/jquery-smartwizard)
[![Donate on Paypal](https://img.shields.io/badge/PayPal-dipuraj-blue.svg)](https://www.paypal.me/dipuraj)
**jQuery Smart Wizard** is an accessible step wizard plugin for jQuery.
Provides a neat and stylish interface for your forms, checkout screen, registration steps, etc.
Easy implementation, Bootstrap compatiblity, customizable toolbars, themes, events and Ajax support are few of the features.
+ [Homepage](http://techlaboratory.net/jquery-smartwizard)
+ [Documentation](http://techlaboratory.net/jquery-smartwizard#documentation)
+ [Demos](http://techlaboratory.net/jquery-smartwizard#demo)
+ [StackOverflow Q&A](http://stackoverflow.com/questions/tagged/smart-wizard)
+ [GitHub Issues](https://github.com/techlab/jquery-smartwizard/issues)
Demos
-----
+ [Basic Example](http://techlaboratory.net/projects/demo/jquery-smart-wizard/v5)
+ [Ajax Example](http://techlaboratory.net/projects/demo/jquery-smart-wizard/v5/ajax)
+ [Multiple Wizard Example](http://techlaboratory.net/projects/demo/jquery-smart-wizard/v5/multiple)
Screenshots
-----
![Smart Wizard Default](http://techlaboratory.net/assets/media/jquery-smart-wizard/jquery-smartwizard-v5-default.png)
![Smart Wizard Arrows](http://techlaboratory.net/assets/media/jquery-smart-wizard/jquery-smartwizard-v5-arrows.png)
![Smart Wizard Black](http://techlaboratory.net/assets/media/jquery-smart-wizard/jquery-smartwizard-v5-dark.png)
![Smart Wizard Dots](http://techlaboratory.net/assets/media/jquery-smart-wizard/jquery-smartwizard-v5-dots.png)
Requirements
-----
+ [jQuery](http://jquery.com/) (supports from jQuery-1.11.1+ to the latest jQuery-3.5)
Installation
-----
### [NPM](https://www.npmjs.com/package/smartwizard)
npm install smartwizard
### [Yarn](https://yarn.pm/smartwizard)
yarn add smartwizard
### [Composer](https://packagist.org/packages/techlab/smartwizard)
composer require techlab/smartwizard
### [CDN - jsDelivr](https://www.jsdelivr.com/package/npm/smartwizard)
```html
<!-- CSS -->
<link href="https://cdn.jsdelivr.net/npm/smartwizard@5/dist/css/smart_wizard_all.min.css" rel="stylesheet" type="text/css" />
<!-- JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/smartwizard@5/dist/js/jquery.smartWizard.min.js" type="text/javascript"></script>
```
### [CDN - UNPKG](https://unpkg.com/browse/smartwizard/)
```html
<!-- CSS -->
<link href="https://unpkg.com/smartwizard@5/dist/css/smart_wizard_all.min.css" rel="stylesheet" type="text/css" />
<!-- JavaScript -->
<script src="https://unpkg.com/smartwizard@5/dist/js/jquery.smartWizard.min.js" type="text/javascript"></script>
```
### Download
#### [Download from GitHub](https://github.com/techlab/jquery-smartwizard/archive/master.zip)
Features
-----
- Standalone CSS
- Accessible controls
- Bootstrap compatible
- Cool themes included
- Dark mode
- URL navigation and selection
- Event support
- Ajax content support
- Keyboard navigation
- Auto height adjustment
- Cool transition animations (fade/slide-horizontal/slide-vertical/slide-swing)
- External anchor support
- Easy to implement and minimal HTML required
- Customizable toolbar, option to add extra buttons
- Responsive design
- reset option
- Easy navigation with step anchors and navigation buttons
- Easy to implement and minimal HTML required
- Supports all modern browsers
- Compatible with all jQuery versions (jQuery 1.11.1+, jQuery 2+, jQuery 3.5+)
Usage
-----
Include SmartWizard CSS
```html
<link href="https://cdn.jsdelivr.net/npm/smartwizard@5/dist/css/smart_wizard_all.min.css" rel="stylesheet" type="text/css" />
```
Include HTML (*This is the basic HTML markup for the Smart Wizard. You can customize it by adding your on steps content*).
```html
<div id="smartwizard">
<ul class="nav">
<li class="nav-item">
<a class="nav-link" href="#step-1">
Step 1
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#step-2">
Step 2
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#step-3">
Step 3
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#step-4">
Step 4
</a>
</li>
</ul>
<div class="tab-content">
<div id="step-1" class="tab-pane" role="tabpanel" aria-labelledby="step-1">
Step 1 Content
</div>
<div id="step-2" class="tab-pane" role="tabpanel" aria-labelledby="step-2">
Step 2 Content
</div>
<div id="step-3" class="tab-pane" role="tabpanel" aria-labelledby="step-3">
Step 3 Content
</div>
<div id="step-4" class="tab-pane" role="tabpanel" aria-labelledby="step-4">
Step 4 Content
</div>
</div>
</div>
```
Include jQuery (*ignore this if you have already included on the page*).
```html
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
```
Include SmartWizard plugin
```html
<script src="https://cdn.jsdelivr.net/npm/smartwizard@5/dist/js/jquery.smartWizard.min.js" type="text/javascript"></script>
```
Initialize the SmartWizard
```html
<script type="text/javascript">
$(document).ready(function() {
$('#smartwizard').smartWizard();
});
</script>
```
That's it!
Please see the [documentation](http://techlaboratory.net/jquery-smartwizard#documentation) for more details on implementation and usage.
##### All options
```JavaScript
$('#smartwizard').smartWizard({
selected: 0, // Initial selected step, 0 = first step
theme: 'default', // theme for the wizard, related css need to include for other than default theme
justified: true, // Nav menu justification. true/false
darkMode:false, // Enable/disable Dark Mode if the theme supports. true/false
autoAdjustHeight: true, // Automatically adjust content height
cycleSteps: false, // Allows to cycle the navigation of steps
backButtonSupport: true, // Enable the back button support
enableURLhash: true, // Enable selection of the step based on url hash
transition: {
animation: 'none', // Effect on navigation, none/fade/slide-horizontal/slide-vertical/slide-swing
speed: '400', // Transion animation speed
easing:'' // Transition animation easing. Not supported without a jQuery easing plugin
},
toolbarSettings: {
toolbarPosition: 'bottom', // none, top, bottom, both
toolbarButtonPosition: 'right', // left, right, center
showNextButton: true, // show/hide a Next button
showPreviousButton: true, // show/hide a Previous button
toolbarExtraButtons: [] // Extra buttons to show on toolbar, array of jQuery input/buttons elements
},
anchorSettings: {
anchorClickable: true, // Enable/Disable anchor navigation
enableAllAnchors: false, // Activates all anchors clickable all times
markDoneStep: true, // Add done state on navigation
markAllPreviousStepsAsDone: true, // When a step selected by url hash, all previous steps are marked done
removeDoneStepOnNavigateBack: false, // While navigate back done step after active step will be cleared
enableAnchorOnDoneStep: true // Enable/Disable the done steps navigation
},
keyboardSettings: {
keyNavigation: true, // Enable/Disable keyboard navigation(left and right keys are used if enabled)
keyLeft: [37], // Left key code
keyRight: [39] // Right key code
},
lang: { // Language variables for button
next: 'Next',
previous: 'Previous'
},
disabledSteps: [], // Array Steps disabled
errorSteps: [], // Highlight step with errors
hiddenSteps: [] // Hidden steps
});
```
License
----
[MIT License](https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE)
Contribute
----
If you like the project please support with your contribution.
[Donate on Paypal](https://www.paypal.me/dipuraj)
Thank you :)

View File

@ -0,0 +1,29 @@
{
"name": "techlab/smartwizard",
"description": "The awesome jQuery step wizard plugin",
"homepage": "http://techlaboratory.net/jquery-smartwizard",
"license": "MIT",
"support": {
"source": "https://github.com/techlab/jquery-smartwizard",
"issues": "https://github.com/techlab/jquery-smartwizard/issues",
"docs": "http://techlaboratory.net/jquery-smartwizard#documentation"
},
"keywords": [
"bootstrap",
"wizard",
"step",
"ui",
"jquery-plugin",
"jquery",
"wizard plugin"
],
"authors": [
{
"name": "Dipu Raj",
"email": "hello.techlab@gmail.com",
"homepage": "http://dipu.me"
}
],
"require": {
}
}

View File

@ -0,0 +1,241 @@
/*!
* jQuery SmartWizard v5
* jQuery Wizard Plugin
* http://www.techlaboratory.net/smartwizard
*
* Created by Dipu Raj
* http://dipu.me
*
* Licensed under the terms of MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/
/* SmartWizard Base Styles */
.sw {
position: relative;
}
.sw *,
.sw *::before,
.sw *::after {
box-sizing: border-box;
}
.sw > .tab-content {
position: relative;
overflow: hidden;
}
.sw .toolbar {
padding: .8rem;
}
.sw .toolbar > .btn {
display: inline-block;
text-decoration: none;
text-align: center;
text-transform: none;
vertical-align: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
margin-left: .2rem;
margin-right: .2rem;
cursor: pointer;
}
.sw .toolbar > .btn.disabled, .sw .toolbar > .btn:disabled {
opacity: .65;
}
.sw > .nav {
display: flex;
flex-wrap: wrap;
list-style: none;
padding-left: 0;
margin-top: 0;
margin-bottom: 0;
}
@media screen and (max-width: 640px) {
.sw > .nav {
flex-direction: column !important;
flex: 1 auto;
}
}
.sw > .nav .nav-link {
display: block;
padding: .5rem 1rem;
text-decoration: none;
}
.sw > .nav .nav-link:hover, .sw > .nav .nav-link:active, .sw > .nav .nav-link:focus {
text-decoration: none;
}
.sw > .nav .nav-link::-moz-focus-inner {
border: 0 !important;
}
.sw > .nav .nav-link.disabled {
color: #ccc !important;
pointer-events: none;
cursor: default;
}
.sw > .nav .nav-link.hidden {
display: none !important;
}
.sw.sw-justified > .nav > li, .sw.sw-justified > .nav .nav-link {
flex-basis: 0;
flex-grow: 1;
text-align: center;
}
.sw.sw-dark {
color: rgba(255, 255, 255, 0.95);
background: #000;
}
.sw.sw-loading {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.sw.sw-loading::after {
content: "";
display: block;
position: absolute;
opacity: 1;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: rgba(255, 255, 255, 0.7);
z-index: 2;
transition: all .2s ease;
}
.sw.sw-loading::before {
content: '';
display: inline-block;
position: absolute;
top: 45%;
left: 45%;
width: 2rem;
height: 2rem;
border: 10px solid #f3f3f3;
border-top: 10px solid #3498db;
border-radius: 50%;
z-index: 10;
-webkit-animation: spin 1s linear infinite;
animation: spin 1s linear infinite;
}
@-webkit-keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/* SmartWizard Theme: Default */
.sw-theme-default {
border: 1px solid #eeeeee;
}
.sw-theme-default > .tab-content > .tab-pane {
padding: 10px;
}
.sw-theme-default .toolbar > .btn {
color: #fff;
background-color: #17a2b8;
border: 1px solid #17a2b8;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400;
}
.sw-theme-default > .nav {
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1) !important;
}
.sw-theme-default > .nav .nav-link {
position: relative;
height: 100%;
min-height: 100%;
}
.sw-theme-default > .nav .nav-link::after {
content: "";
position: absolute;
height: 2px;
width: 0;
left: 0px;
bottom: -1px;
background: #999999;
transition: all .35s ease .15s;
}
.sw-theme-default > .nav .nav-link.inactive {
color: #999999;
cursor: not-allowed;
}
.sw-theme-default > .nav .nav-link.active {
color: #17a2b8 !important;
cursor: pointer;
}
.sw-theme-default > .nav .nav-link.active::after {
background: #17a2b8 !important;
width: 100%;
}
.sw-theme-default > .nav .nav-link.done {
color: #5cb85c !important;
cursor: pointer;
}
.sw-theme-default > .nav .nav-link.done::after {
background: #5cb85c;
width: 100%;
}
.sw-theme-default > .nav .nav-link.disabled {
color: #dddddd !important;
cursor: not-allowed;
}
.sw-theme-default > .nav .nav-link.disabled::after {
background: #dddddd;
width: 100%;
}
.sw-theme-default > .nav .nav-link.danger {
color: #d9534f !important;
cursor: pointer;
}
.sw-theme-default > .nav .nav-link.danger::after {
background: #d9534f;
width: 100%;
}

View File

@ -0,0 +1,11 @@
/*!
* jQuery SmartWizard v5
* jQuery Wizard Plugin
* http://www.techlaboratory.net/smartwizard
*
* Created by Dipu Raj
* http://dipu.me
*
* Licensed under the terms of MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/.sw{position:relative}.sw *,.sw ::after,.sw ::before{box-sizing:border-box}.sw>.tab-content{position:relative;overflow:hidden}.sw .toolbar{padding:.8rem}.sw .toolbar>.btn{display:inline-block;text-decoration:none;text-align:center;text-transform:none;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-left:.2rem;margin-right:.2rem;cursor:pointer}.sw .toolbar>.btn.disabled,.sw .toolbar>.btn:disabled{opacity:.65}.sw>.nav{display:flex;flex-wrap:wrap;list-style:none;padding-left:0;margin-top:0;margin-bottom:0}@media screen and (max-width:640px){.sw>.nav{flex-direction:column!important;flex:1 auto}}.sw>.nav .nav-link{display:block;padding:.5rem 1rem;text-decoration:none}.sw>.nav .nav-link:active,.sw>.nav .nav-link:focus,.sw>.nav .nav-link:hover{text-decoration:none}.sw>.nav .nav-link::-moz-focus-inner{border:0!important}.sw>.nav .nav-link.disabled{color:#ccc!important;pointer-events:none;cursor:default}.sw>.nav .nav-link.hidden{display:none!important}.sw.sw-justified>.nav .nav-link,.sw.sw-justified>.nav>li{flex-basis:0;flex-grow:1;text-align:center}.sw.sw-dark{color:rgba(255,255,255,.95);background:#000}.sw.sw-loading{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.sw.sw-loading::after{content:"";display:block;position:absolute;opacity:1;top:0;left:0;height:100%;width:100%;background:rgba(255,255,255,.7);z-index:2;transition:all .2s ease}.sw.sw-loading::before{content:'';display:inline-block;position:absolute;top:45%;left:45%;width:2rem;height:2rem;border:10px solid #f3f3f3;border-top:10px solid #3498db;border-radius:50%;z-index:10;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.sw-theme-default{border:1px solid #eee}.sw-theme-default>.tab-content>.tab-pane{padding:10px}.sw-theme-default .toolbar>.btn{color:#fff;background-color:#17a2b8;border:1px solid #17a2b8;padding:.375rem .75rem;border-radius:.25rem;font-weight:400}.sw-theme-default>.nav{box-shadow:0 .125rem .25rem rgba(0,0,0,.1)!important}.sw-theme-default>.nav .nav-link{position:relative;height:100%;min-height:100%}.sw-theme-default>.nav .nav-link::after{content:"";position:absolute;height:2px;width:0;left:0;bottom:-1px;background:#999;transition:all .35s ease .15s}.sw-theme-default>.nav .nav-link.inactive{color:#999;cursor:not-allowed}.sw-theme-default>.nav .nav-link.active{color:#17a2b8!important;cursor:pointer}.sw-theme-default>.nav .nav-link.active::after{background:#17a2b8!important;width:100%}.sw-theme-default>.nav .nav-link.done{color:#5cb85c!important;cursor:pointer}.sw-theme-default>.nav .nav-link.done::after{background:#5cb85c;width:100%}.sw-theme-default>.nav .nav-link.disabled{color:#ddd!important;cursor:not-allowed}.sw-theme-default>.nav .nav-link.disabled::after{background:#ddd;width:100%}.sw-theme-default>.nav .nav-link.danger{color:#d9534f!important;cursor:pointer}.sw-theme-default>.nav .nav-link.danger::after{background:#d9534f;width:100%}

View File

@ -0,0 +1,683 @@
/*!
* jQuery SmartWizard v5
* jQuery Wizard Plugin
* http://www.techlaboratory.net/smartwizard
*
* Created by Dipu Raj
* http://dipu.me
*
* Licensed under the terms of MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/
/* SmartWizard Base Styles */
.sw {
position: relative;
}
.sw *,
.sw *::before,
.sw *::after {
box-sizing: border-box;
}
.sw > .tab-content {
position: relative;
overflow: hidden;
}
.sw .toolbar {
padding: .8rem;
}
.sw .toolbar > .btn {
display: inline-block;
text-decoration: none;
text-align: center;
text-transform: none;
vertical-align: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
margin-left: .2rem;
margin-right: .2rem;
cursor: pointer;
}
.sw .toolbar > .btn.disabled, .sw .toolbar > .btn:disabled {
opacity: .65;
}
.sw > .nav {
display: flex;
flex-wrap: wrap;
list-style: none;
padding-left: 0;
margin-top: 0;
margin-bottom: 0;
}
@media screen and (max-width: 640px) {
.sw > .nav {
flex-direction: column !important;
flex: 1 auto;
}
}
.sw > .nav .nav-link {
display: block;
padding: .5rem 1rem;
text-decoration: none;
}
.sw > .nav .nav-link:hover, .sw > .nav .nav-link:active, .sw > .nav .nav-link:focus {
text-decoration: none;
}
.sw > .nav .nav-link::-moz-focus-inner {
border: 0 !important;
}
.sw > .nav .nav-link.disabled {
color: #ccc !important;
pointer-events: none;
cursor: default;
}
.sw > .nav .nav-link.hidden {
display: none !important;
}
.sw.sw-justified > .nav > li, .sw.sw-justified > .nav .nav-link {
flex-basis: 0;
flex-grow: 1;
text-align: center;
}
.sw.sw-dark {
color: rgba(255, 255, 255, 0.95);
background: #000;
}
.sw.sw-loading {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.sw.sw-loading::after {
content: "";
display: block;
position: absolute;
opacity: 1;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: rgba(255, 255, 255, 0.7);
z-index: 2;
transition: all .2s ease;
}
.sw.sw-loading::before {
content: '';
display: inline-block;
position: absolute;
top: 45%;
left: 45%;
width: 2rem;
height: 2rem;
border: 10px solid #f3f3f3;
border-top: 10px solid #3498db;
border-radius: 50%;
z-index: 10;
-webkit-animation: spin 1s linear infinite;
animation: spin 1s linear infinite;
}
@-webkit-keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/* SmartWizard Theme: Default */
.sw-theme-default {
border: 1px solid #eeeeee;
}
.sw-theme-default > .tab-content > .tab-pane {
padding: 10px;
}
.sw-theme-default .toolbar > .btn {
color: #fff;
background-color: #17a2b8;
border: 1px solid #17a2b8;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400;
}
.sw-theme-default > .nav {
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1) !important;
}
.sw-theme-default > .nav .nav-link {
position: relative;
height: 100%;
min-height: 100%;
}
.sw-theme-default > .nav .nav-link::after {
content: "";
position: absolute;
height: 2px;
width: 0;
left: 0px;
bottom: -1px;
background: #999999;
transition: all .35s ease .15s;
}
.sw-theme-default > .nav .nav-link.inactive {
color: #999999;
cursor: not-allowed;
}
.sw-theme-default > .nav .nav-link.active {
color: #17a2b8 !important;
cursor: pointer;
}
.sw-theme-default > .nav .nav-link.active::after {
background: #17a2b8 !important;
width: 100%;
}
.sw-theme-default > .nav .nav-link.done {
color: #5cb85c !important;
cursor: pointer;
}
.sw-theme-default > .nav .nav-link.done::after {
background: #5cb85c;
width: 100%;
}
.sw-theme-default > .nav .nav-link.disabled {
color: #dddddd !important;
cursor: not-allowed;
}
.sw-theme-default > .nav .nav-link.disabled::after {
background: #dddddd;
width: 100%;
}
.sw-theme-default > .nav .nav-link.danger {
color: #d9534f !important;
cursor: pointer;
}
.sw-theme-default > .nav .nav-link.danger::after {
background: #d9534f;
width: 100%;
}
/* SmartWizard Theme: Arrows */
.sw-theme-arrows {
border: 1px solid #eeeeee;
}
.sw-theme-arrows > .tab-content > .tab-pane {
padding: 10px;
}
.sw-theme-arrows .toolbar > .btn {
color: #ffffff;
background-color: #17a2b8;
border: 1px solid #17a2b8;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400;
}
.sw-theme-arrows > .nav {
overflow: hidden;
border-bottom: 1px solid #eeeeee;
}
.sw-theme-arrows > .nav .nav-link {
position: relative;
height: 100%;
min-height: 100%;
margin-right: 30px;
margin-left: -30px;
padding-left: 40px;
}
@media screen and (max-width: 640px) {
.sw-theme-arrows > .nav .nav-link {
overflow: hidden;
margin-bottom: 1px;
margin-right: unset;
}
}
.sw-theme-arrows > .nav .nav-link::after {
content: "";
position: absolute;
display: block;
width: 0;
height: 0;
top: 50%;
left: 100%;
margin-top: -50px;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
border-left: 30px solid #f8f8f8;
z-index: 2;
}
.sw-theme-arrows > .nav .nav-link::before {
content: " ";
position: absolute;
display: block;
width: 0;
height: 0;
top: 50%;
left: 100%;
margin-top: -50px;
margin-left: 1px;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
border-left: 30px solid #eeeeee;
z-index: 1;
}
.sw-theme-arrows > .nav .nav-link.inactive {
color: #999999;
border-color: #f8f8f8;
background: #f8f8f8;
cursor: not-allowed;
}
.sw-theme-arrows > .nav .nav-link.active {
color: #ffffff;
border-color: #5bc0de;
background: #5bc0de;
cursor: pointer;
}
.sw-theme-arrows > .nav .nav-link.active::after {
border-left-color: #5bc0de;
}
.sw-theme-arrows > .nav .nav-link.done {
color: #ffffff;
border-color: #5cb85c;
background: #5cb85c;
cursor: pointer;
}
.sw-theme-arrows > .nav .nav-link.done::after {
border-left-color: #5cb85c;
}
.sw-theme-arrows > .nav .nav-link.disabled {
color: #eeeeee;
border-color: #f9f9f9;
background: #f9f9f9;
cursor: not-allowed;
}
.sw-theme-arrows > .nav .nav-link.disabled::after {
border-left-color: #f9f9f9;
}
.sw-theme-arrows > .nav .nav-link.danger {
color: #ffffff;
border-color: #d9534f;
background: #d9534f;
cursor: pointer;
}
.sw-theme-arrows > .nav .nav-link.danger::after {
border-left-color: #d9534f;
}
.sw-theme-arrows.sw-dark {
color: rgba(255, 255, 255, 0.95);
background: #000;
}
.sw-theme-arrows.sw-dark > .nav {
border-bottom: 1px solid #555555;
}
.sw-theme-arrows.sw-dark > .nav .nav-link::after {
border-left: 30px solid #5f5f5f;
}
.sw-theme-arrows.sw-dark > .nav .nav-link::before {
border-left: 30px solid #555555;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.inactive {
color: white;
border-color: #5f5f5f;
background: #5f5f5f;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.inactive::after {
border-left-color: #5f5f5f;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.active {
color: white;
border-color: #010506;
background: #0a2730;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.active::after {
border-left-color: #0a2730;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.done {
color: white;
border-color: black;
background: black;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.done::after {
border-left-color: black;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.disabled {
color: #555555 !important;
border-color: #f9f9f9;
background: #474747;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.disabled::after {
border-left-color: #474747;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.danger {
color: #ffffff;
border-color: #d9534f;
background: #d9534f;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.danger::after {
border-left-color: #d9534f;
}
/* SmartWizard Theme: Dots */
.sw-theme-dots > .tab-content > .tab-pane {
padding: 10px;
}
.sw-theme-dots .toolbar > .btn {
color: #ffffff;
background-color: #17a2b8;
border: 1px solid #17a2b8;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400;
}
.sw-theme-dots > .nav {
position: relative;
margin-bottom: 10px;
}
.sw-theme-dots > .nav::before {
content: " ";
position: absolute;
top: 18px;
left: 0;
width: 100%;
height: 5px;
background-color: #eeeeee;
border-radius: 3px;
z-index: 1;
}
.sw-theme-dots > .nav .nav-link {
position: relative;
margin-top: 40px;
}
.sw-theme-dots > .nav .nav-link::before {
content: " ";
position: absolute;
display: block;
top: -36px;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
width: 32px;
height: 32px;
border-radius: 50%;
border: none;
background: #f5f5f5;
color: #428bca;
text-decoration: none;
z-index: 98;
}
.sw-theme-dots > .nav .nav-link::after {
content: " ";
position: absolute;
display: block;
top: -28px;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
width: 16px;
height: 16px;
border-radius: 50%;
z-index: 99;
}
.sw-theme-dots > .nav .nav-link.inactive {
color: #999999;
cursor: not-allowed;
}
.sw-theme-dots > .nav .nav-link.inactive::after {
background-color: #999999;
}
.sw-theme-dots > .nav .nav-link.active {
color: #5bc0de !important;
cursor: pointer;
}
.sw-theme-dots > .nav .nav-link.active::after {
background-color: #5bc0de !important;
}
.sw-theme-dots > .nav .nav-link.done {
color: #5cb85c;
cursor: pointer;
}
.sw-theme-dots > .nav .nav-link.done::after {
background-color: #5cb85c;
}
.sw-theme-dots > .nav .nav-link.disabled {
color: #f9f9f9;
cursor: not-allowed;
}
.sw-theme-dots > .nav .nav-link.disabled::after {
background-color: #f9f9f9;
}
.sw-theme-dots > .nav .nav-link.danger {
color: #d9534f;
cursor: pointer;
}
.sw-theme-dots > .nav .nav-link.danger::after {
background-color: #d9534f;
}
.sw-theme-dots.sw-dark {
color: rgba(255, 255, 255, 0.95);
background: #000;
}
.sw-theme-dots.sw-dark > .nav::before {
background-color: #3c3c3c;
}
.sw-theme-dots.sw-dark > .nav .nav-link::before {
background: #434343;
color: black;
}
/* SmartWizard Theme: Progress */
.sw-theme-progress {
border: 1px solid #eeeeee;
}
.sw-theme-progress > .tab-content > .tab-pane {
padding: 10px;
}
.sw-theme-progress .toolbar > .btn {
color: #ffffff;
background-color: #17a2b8;
border: 1px solid #17a2b8;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400;
}
.sw-theme-progress > .nav {
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1) !important;
}
.sw-theme-progress > .nav .nav-link {
position: relative;
height: 100%;
min-height: 100%;
background: transparent;
overflow: hidden;
z-index: 2;
}
.sw-theme-progress > .nav .nav-link::after {
content: "";
position: absolute;
height: 150%;
width: 0;
left: 0;
top: 0;
background: #ffffff;
z-index: -1;
transition: all .35s ease .10s;
}
.sw-theme-progress > .nav .nav-link.inactive {
color: #999999;
cursor: not-allowed;
}
.sw-theme-progress > .nav .nav-link.active {
color: #ffffff !important;
cursor: pointer;
}
.sw-theme-progress > .nav .nav-link.active::after {
background-color: #5cb85c;
width: 100%;
}
.sw-theme-progress > .nav .nav-link.done {
color: #ffffff !important;
cursor: pointer;
}
.sw-theme-progress > .nav .nav-link.done::after {
background: #5cb85c;
width: 100%;
}
.sw-theme-progress > .nav .nav-link.disabled {
color: #dddddd !important;
cursor: not-allowed;
}
.sw-theme-progress > .nav .nav-link.disabled::after {
background: #f9f9f9;
width: 100%;
}
.sw-theme-progress > .nav .nav-link.danger {
color: #ffffff !important;
cursor: pointer;
}
.sw-theme-progress > .nav .nav-link.danger::after {
background: #d9534f;
width: 100%;
}
.sw-theme-progress.sw-dark {
color: rgba(255, 255, 255, 0.95);
}
.sw-theme-progress.sw-dark > .nav .nav-link.active {
color: white;
}
.sw-theme-progress.sw-dark > .nav .nav-link.active::after {
background-color: #333;
}
.sw-theme-progress.sw-dark > .nav .nav-link.done {
color: #ffffff !important;
}
.sw-theme-progress.sw-dark > .nav .nav-link.done::after {
background: #333;
}
.sw-theme-progress.sw-dark > .nav .nav-link.disabled {
color: #2b2b2b !important;
}
.sw-theme-progress.sw-dark > .nav .nav-link.disabled::after {
background: #474747;
}
.sw-theme-progress.sw-dark > .nav .nav-link.danger {
color: #ffffff !important;
}
.sw-theme-progress.sw-dark > .nav .nav-link.danger::after {
background: #d9534f;
}

View File

@ -0,0 +1,11 @@
/*!
* jQuery SmartWizard v5
* jQuery Wizard Plugin
* http://www.techlaboratory.net/smartwizard
*
* Created by Dipu Raj
* http://dipu.me
*
* Licensed under the terms of MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/.sw{position:relative}.sw *,.sw ::after,.sw ::before{box-sizing:border-box}.sw>.tab-content{position:relative;overflow:hidden}.sw .toolbar{padding:.8rem}.sw .toolbar>.btn{display:inline-block;text-decoration:none;text-align:center;text-transform:none;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-left:.2rem;margin-right:.2rem;cursor:pointer}.sw .toolbar>.btn.disabled,.sw .toolbar>.btn:disabled{opacity:.65}.sw>.nav{display:flex;flex-wrap:wrap;list-style:none;padding-left:0;margin-top:0;margin-bottom:0}@media screen and (max-width:640px){.sw>.nav{flex-direction:column!important;flex:1 auto}}.sw>.nav .nav-link{display:block;padding:.5rem 1rem;text-decoration:none}.sw>.nav .nav-link:active,.sw>.nav .nav-link:focus,.sw>.nav .nav-link:hover{text-decoration:none}.sw>.nav .nav-link::-moz-focus-inner{border:0!important}.sw>.nav .nav-link.disabled{color:#ccc!important;pointer-events:none;cursor:default}.sw>.nav .nav-link.hidden{display:none!important}.sw.sw-justified>.nav .nav-link,.sw.sw-justified>.nav>li{flex-basis:0;flex-grow:1;text-align:center}.sw.sw-dark{color:rgba(255,255,255,.95);background:#000}.sw.sw-loading{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.sw.sw-loading::after{content:"";display:block;position:absolute;opacity:1;top:0;left:0;height:100%;width:100%;background:rgba(255,255,255,.7);z-index:2;transition:all .2s ease}.sw.sw-loading::before{content:'';display:inline-block;position:absolute;top:45%;left:45%;width:2rem;height:2rem;border:10px solid #f3f3f3;border-top:10px solid #3498db;border-radius:50%;z-index:10;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.sw-theme-default{border:1px solid #eee}.sw-theme-default>.tab-content>.tab-pane{padding:10px}.sw-theme-default .toolbar>.btn{color:#fff;background-color:#17a2b8;border:1px solid #17a2b8;padding:.375rem .75rem;border-radius:.25rem;font-weight:400}.sw-theme-default>.nav{box-shadow:0 .125rem .25rem rgba(0,0,0,.1)!important}.sw-theme-default>.nav .nav-link{position:relative;height:100%;min-height:100%}.sw-theme-default>.nav .nav-link::after{content:"";position:absolute;height:2px;width:0;left:0;bottom:-1px;background:#999;transition:all .35s ease .15s}.sw-theme-default>.nav .nav-link.inactive{color:#999;cursor:not-allowed}.sw-theme-default>.nav .nav-link.active{color:#17a2b8!important;cursor:pointer}.sw-theme-default>.nav .nav-link.active::after{background:#17a2b8!important;width:100%}.sw-theme-default>.nav .nav-link.done{color:#5cb85c!important;cursor:pointer}.sw-theme-default>.nav .nav-link.done::after{background:#5cb85c;width:100%}.sw-theme-default>.nav .nav-link.disabled{color:#ddd!important;cursor:not-allowed}.sw-theme-default>.nav .nav-link.disabled::after{background:#ddd;width:100%}.sw-theme-default>.nav .nav-link.danger{color:#d9534f!important;cursor:pointer}.sw-theme-default>.nav .nav-link.danger::after{background:#d9534f;width:100%}.sw-theme-arrows{border:1px solid #eee}.sw-theme-arrows>.tab-content>.tab-pane{padding:10px}.sw-theme-arrows .toolbar>.btn{color:#fff;background-color:#17a2b8;border:1px solid #17a2b8;padding:.375rem .75rem;border-radius:.25rem;font-weight:400}.sw-theme-arrows>.nav{overflow:hidden;border-bottom:1px solid #eee}.sw-theme-arrows>.nav .nav-link{position:relative;height:100%;min-height:100%;margin-right:30px;margin-left:-30px;padding-left:40px}@media screen and (max-width:640px){.sw-theme-arrows>.nav .nav-link{overflow:hidden;margin-bottom:1px;margin-right:unset}}.sw-theme-arrows>.nav .nav-link::after{content:"";position:absolute;display:block;width:0;height:0;top:50%;left:100%;margin-top:-50px;border-top:50px solid transparent;border-bottom:50px solid transparent;border-left:30px solid #f8f8f8;z-index:2}.sw-theme-arrows>.nav .nav-link::before{content:" ";position:absolute;display:block;width:0;height:0;top:50%;left:100%;margin-top:-50px;margin-left:1px;border-top:50px solid transparent;border-bottom:50px solid transparent;border-left:30px solid #eee;z-index:1}.sw-theme-arrows>.nav .nav-link.inactive{color:#999;border-color:#f8f8f8;background:#f8f8f8;cursor:not-allowed}.sw-theme-arrows>.nav .nav-link.active{color:#fff;border-color:#5bc0de;background:#5bc0de;cursor:pointer}.sw-theme-arrows>.nav .nav-link.active::after{border-left-color:#5bc0de}.sw-theme-arrows>.nav .nav-link.done{color:#fff;border-color:#5cb85c;background:#5cb85c;cursor:pointer}.sw-theme-arrows>.nav .nav-link.done::after{border-left-color:#5cb85c}.sw-theme-arrows>.nav .nav-link.disabled{color:#eee;border-color:#f9f9f9;background:#f9f9f9;cursor:not-allowed}.sw-theme-arrows>.nav .nav-link.disabled::after{border-left-color:#f9f9f9}.sw-theme-arrows>.nav .nav-link.danger{color:#fff;border-color:#d9534f;background:#d9534f;cursor:pointer}.sw-theme-arrows>.nav .nav-link.danger::after{border-left-color:#d9534f}.sw-theme-arrows.sw-dark{color:rgba(255,255,255,.95);background:#000}.sw-theme-arrows.sw-dark>.nav{border-bottom:1px solid #555}.sw-theme-arrows.sw-dark>.nav .nav-link::after{border-left:30px solid #5f5f5f}.sw-theme-arrows.sw-dark>.nav .nav-link::before{border-left:30px solid #555}.sw-theme-arrows.sw-dark>.nav .nav-link.inactive{color:#fff;border-color:#5f5f5f;background:#5f5f5f}.sw-theme-arrows.sw-dark>.nav .nav-link.inactive::after{border-left-color:#5f5f5f}.sw-theme-arrows.sw-dark>.nav .nav-link.active{color:#fff;border-color:#010506;background:#0a2730}.sw-theme-arrows.sw-dark>.nav .nav-link.active::after{border-left-color:#0a2730}.sw-theme-arrows.sw-dark>.nav .nav-link.done{color:#fff;border-color:#000;background:#000}.sw-theme-arrows.sw-dark>.nav .nav-link.done::after{border-left-color:#000}.sw-theme-arrows.sw-dark>.nav .nav-link.disabled{color:#555!important;border-color:#f9f9f9;background:#474747}.sw-theme-arrows.sw-dark>.nav .nav-link.disabled::after{border-left-color:#474747}.sw-theme-arrows.sw-dark>.nav .nav-link.danger{color:#fff;border-color:#d9534f;background:#d9534f}.sw-theme-arrows.sw-dark>.nav .nav-link.danger::after{border-left-color:#d9534f}.sw-theme-dots>.tab-content>.tab-pane{padding:10px}.sw-theme-dots .toolbar>.btn{color:#fff;background-color:#17a2b8;border:1px solid #17a2b8;padding:.375rem .75rem;border-radius:.25rem;font-weight:400}.sw-theme-dots>.nav{position:relative;margin-bottom:10px}.sw-theme-dots>.nav::before{content:" ";position:absolute;top:18px;left:0;width:100%;height:5px;background-color:#eee;border-radius:3px;z-index:1}.sw-theme-dots>.nav .nav-link{position:relative;margin-top:40px}.sw-theme-dots>.nav .nav-link::before{content:" ";position:absolute;display:block;top:-36px;left:0;right:0;margin-left:auto;margin-right:auto;width:32px;height:32px;border-radius:50%;border:none;background:#f5f5f5;color:#428bca;text-decoration:none;z-index:98}.sw-theme-dots>.nav .nav-link::after{content:" ";position:absolute;display:block;top:-28px;left:0;right:0;margin-left:auto;margin-right:auto;width:16px;height:16px;border-radius:50%;z-index:99}.sw-theme-dots>.nav .nav-link.inactive{color:#999;cursor:not-allowed}.sw-theme-dots>.nav .nav-link.inactive::after{background-color:#999}.sw-theme-dots>.nav .nav-link.active{color:#5bc0de!important;cursor:pointer}.sw-theme-dots>.nav .nav-link.active::after{background-color:#5bc0de!important}.sw-theme-dots>.nav .nav-link.done{color:#5cb85c;cursor:pointer}.sw-theme-dots>.nav .nav-link.done::after{background-color:#5cb85c}.sw-theme-dots>.nav .nav-link.disabled{color:#f9f9f9;cursor:not-allowed}.sw-theme-dots>.nav .nav-link.disabled::after{background-color:#f9f9f9}.sw-theme-dots>.nav .nav-link.danger{color:#d9534f;cursor:pointer}.sw-theme-dots>.nav .nav-link.danger::after{background-color:#d9534f}.sw-theme-dots.sw-dark{color:rgba(255,255,255,.95);background:#000}.sw-theme-dots.sw-dark>.nav::before{background-color:#3c3c3c}.sw-theme-dots.sw-dark>.nav .nav-link::before{background:#434343;color:#000}.sw-theme-progress{border:1px solid #eee}.sw-theme-progress>.tab-content>.tab-pane{padding:10px}.sw-theme-progress .toolbar>.btn{color:#fff;background-color:#17a2b8;border:1px solid #17a2b8;padding:.375rem .75rem;border-radius:.25rem;font-weight:400}.sw-theme-progress>.nav{box-shadow:0 .125rem .25rem rgba(0,0,0,.1)!important}.sw-theme-progress>.nav .nav-link{position:relative;height:100%;min-height:100%;background:0 0;overflow:hidden;z-index:2}.sw-theme-progress>.nav .nav-link::after{content:"";position:absolute;height:150%;width:0;left:0;top:0;background:#fff;z-index:-1;transition:all .35s ease .1s}.sw-theme-progress>.nav .nav-link.inactive{color:#999;cursor:not-allowed}.sw-theme-progress>.nav .nav-link.active{color:#fff!important;cursor:pointer}.sw-theme-progress>.nav .nav-link.active::after{background-color:#5cb85c;width:100%}.sw-theme-progress>.nav .nav-link.done{color:#fff!important;cursor:pointer}.sw-theme-progress>.nav .nav-link.done::after{background:#5cb85c;width:100%}.sw-theme-progress>.nav .nav-link.disabled{color:#ddd!important;cursor:not-allowed}.sw-theme-progress>.nav .nav-link.disabled::after{background:#f9f9f9;width:100%}.sw-theme-progress>.nav .nav-link.danger{color:#fff!important;cursor:pointer}.sw-theme-progress>.nav .nav-link.danger::after{background:#d9534f;width:100%}.sw-theme-progress.sw-dark{color:rgba(255,255,255,.95)}.sw-theme-progress.sw-dark>.nav .nav-link.active{color:#fff}.sw-theme-progress.sw-dark>.nav .nav-link.active::after{background-color:#333}.sw-theme-progress.sw-dark>.nav .nav-link.done{color:#fff!important}.sw-theme-progress.sw-dark>.nav .nav-link.done::after{background:#333}.sw-theme-progress.sw-dark>.nav .nav-link.disabled{color:#2b2b2b!important}.sw-theme-progress.sw-dark>.nav .nav-link.disabled::after{background:#474747}.sw-theme-progress.sw-dark>.nav .nav-link.danger{color:#fff!important}.sw-theme-progress.sw-dark>.nav .nav-link.danger::after{background:#d9534f}

View File

@ -0,0 +1,346 @@
/*!
* jQuery SmartWizard v5
* jQuery Wizard Plugin
* http://www.techlaboratory.net/smartwizard
*
* Created by Dipu Raj
* http://dipu.me
*
* Licensed under the terms of MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/
/* SmartWizard Base Styles */
.sw {
position: relative;
}
.sw *,
.sw *::before,
.sw *::after {
box-sizing: border-box;
}
.sw > .tab-content {
position: relative;
overflow: hidden;
}
.sw .toolbar {
padding: .8rem;
}
.sw .toolbar > .btn {
display: inline-block;
text-decoration: none;
text-align: center;
text-transform: none;
vertical-align: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
margin-left: .2rem;
margin-right: .2rem;
cursor: pointer;
}
.sw .toolbar > .btn.disabled, .sw .toolbar > .btn:disabled {
opacity: .65;
}
.sw > .nav {
display: flex;
flex-wrap: wrap;
list-style: none;
padding-left: 0;
margin-top: 0;
margin-bottom: 0;
}
@media screen and (max-width: 640px) {
.sw > .nav {
flex-direction: column !important;
flex: 1 auto;
}
}
.sw > .nav .nav-link {
display: block;
padding: .5rem 1rem;
text-decoration: none;
}
.sw > .nav .nav-link:hover, .sw > .nav .nav-link:active, .sw > .nav .nav-link:focus {
text-decoration: none;
}
.sw > .nav .nav-link::-moz-focus-inner {
border: 0 !important;
}
.sw > .nav .nav-link.disabled {
color: #ccc !important;
pointer-events: none;
cursor: default;
}
.sw > .nav .nav-link.hidden {
display: none !important;
}
.sw.sw-justified > .nav > li, .sw.sw-justified > .nav .nav-link {
flex-basis: 0;
flex-grow: 1;
text-align: center;
}
.sw.sw-dark {
color: rgba(255, 255, 255, 0.95);
background: #000;
}
.sw.sw-loading {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.sw.sw-loading::after {
content: "";
display: block;
position: absolute;
opacity: 1;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: rgba(255, 255, 255, 0.7);
z-index: 2;
transition: all .2s ease;
}
.sw.sw-loading::before {
content: '';
display: inline-block;
position: absolute;
top: 45%;
left: 45%;
width: 2rem;
height: 2rem;
border: 10px solid #f3f3f3;
border-top: 10px solid #3498db;
border-radius: 50%;
z-index: 10;
-webkit-animation: spin 1s linear infinite;
animation: spin 1s linear infinite;
}
@-webkit-keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/* SmartWizard Theme: Arrows */
.sw-theme-arrows {
border: 1px solid #eeeeee;
}
.sw-theme-arrows > .tab-content > .tab-pane {
padding: 10px;
}
.sw-theme-arrows .toolbar > .btn {
color: #ffffff;
background-color: #17a2b8;
border: 1px solid #17a2b8;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400;
}
.sw-theme-arrows > .nav {
overflow: hidden;
border-bottom: 1px solid #eeeeee;
}
.sw-theme-arrows > .nav .nav-link {
position: relative;
height: 100%;
min-height: 100%;
margin-right: 30px;
margin-left: -30px;
padding-left: 40px;
}
@media screen and (max-width: 640px) {
.sw-theme-arrows > .nav .nav-link {
overflow: hidden;
margin-bottom: 1px;
margin-right: unset;
}
}
.sw-theme-arrows > .nav .nav-link::after {
content: "";
position: absolute;
display: block;
width: 0;
height: 0;
top: 50%;
left: 100%;
margin-top: -50px;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
border-left: 30px solid #f8f8f8;
z-index: 2;
}
.sw-theme-arrows > .nav .nav-link::before {
content: " ";
position: absolute;
display: block;
width: 0;
height: 0;
top: 50%;
left: 100%;
margin-top: -50px;
margin-left: 1px;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
border-left: 30px solid #eeeeee;
z-index: 1;
}
.sw-theme-arrows > .nav .nav-link.inactive {
color: #999999;
border-color: #f8f8f8;
background: #f8f8f8;
cursor: not-allowed;
}
.sw-theme-arrows > .nav .nav-link.active {
color: #ffffff;
border-color: #5bc0de;
background: #5bc0de;
cursor: pointer;
}
.sw-theme-arrows > .nav .nav-link.active::after {
border-left-color: #5bc0de;
}
.sw-theme-arrows > .nav .nav-link.done {
color: #ffffff;
border-color: #5cb85c;
background: #5cb85c;
cursor: pointer;
}
.sw-theme-arrows > .nav .nav-link.done::after {
border-left-color: #5cb85c;
}
.sw-theme-arrows > .nav .nav-link.disabled {
color: #eeeeee;
border-color: #f9f9f9;
background: #f9f9f9;
cursor: not-allowed;
}
.sw-theme-arrows > .nav .nav-link.disabled::after {
border-left-color: #f9f9f9;
}
.sw-theme-arrows > .nav .nav-link.danger {
color: #ffffff;
border-color: #d9534f;
background: #d9534f;
cursor: pointer;
}
.sw-theme-arrows > .nav .nav-link.danger::after {
border-left-color: #d9534f;
}
.sw-theme-arrows.sw-dark {
color: rgba(255, 255, 255, 0.95);
background: #000;
}
.sw-theme-arrows.sw-dark > .nav {
border-bottom: 1px solid #555555;
}
.sw-theme-arrows.sw-dark > .nav .nav-link::after {
border-left: 30px solid #5f5f5f;
}
.sw-theme-arrows.sw-dark > .nav .nav-link::before {
border-left: 30px solid #555555;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.inactive {
color: white;
border-color: #5f5f5f;
background: #5f5f5f;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.inactive::after {
border-left-color: #5f5f5f;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.active {
color: white;
border-color: #010506;
background: #0a2730;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.active::after {
border-left-color: #0a2730;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.done {
color: white;
border-color: black;
background: black;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.done::after {
border-left-color: black;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.disabled {
color: #555555 !important;
border-color: #f9f9f9;
background: #474747;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.disabled::after {
border-left-color: #474747;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.danger {
color: #ffffff;
border-color: #d9534f;
background: #d9534f;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.danger::after {
border-left-color: #d9534f;
}

View File

@ -0,0 +1,11 @@
/*!
* jQuery SmartWizard v5
* jQuery Wizard Plugin
* http://www.techlaboratory.net/smartwizard
*
* Created by Dipu Raj
* http://dipu.me
*
* Licensed under the terms of MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/.sw{position:relative}.sw *,.sw ::after,.sw ::before{box-sizing:border-box}.sw>.tab-content{position:relative;overflow:hidden}.sw .toolbar{padding:.8rem}.sw .toolbar>.btn{display:inline-block;text-decoration:none;text-align:center;text-transform:none;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-left:.2rem;margin-right:.2rem;cursor:pointer}.sw .toolbar>.btn.disabled,.sw .toolbar>.btn:disabled{opacity:.65}.sw>.nav{display:flex;flex-wrap:wrap;list-style:none;padding-left:0;margin-top:0;margin-bottom:0}@media screen and (max-width:640px){.sw>.nav{flex-direction:column!important;flex:1 auto}}.sw>.nav .nav-link{display:block;padding:.5rem 1rem;text-decoration:none}.sw>.nav .nav-link:active,.sw>.nav .nav-link:focus,.sw>.nav .nav-link:hover{text-decoration:none}.sw>.nav .nav-link::-moz-focus-inner{border:0!important}.sw>.nav .nav-link.disabled{color:#ccc!important;pointer-events:none;cursor:default}.sw>.nav .nav-link.hidden{display:none!important}.sw.sw-justified>.nav .nav-link,.sw.sw-justified>.nav>li{flex-basis:0;flex-grow:1;text-align:center}.sw.sw-dark{color:rgba(255,255,255,.95);background:#000}.sw.sw-loading{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.sw.sw-loading::after{content:"";display:block;position:absolute;opacity:1;top:0;left:0;height:100%;width:100%;background:rgba(255,255,255,.7);z-index:2;transition:all .2s ease}.sw.sw-loading::before{content:'';display:inline-block;position:absolute;top:45%;left:45%;width:2rem;height:2rem;border:10px solid #f3f3f3;border-top:10px solid #3498db;border-radius:50%;z-index:10;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.sw-theme-arrows{border:1px solid #eee}.sw-theme-arrows>.tab-content>.tab-pane{padding:10px}.sw-theme-arrows .toolbar>.btn{color:#fff;background-color:#17a2b8;border:1px solid #17a2b8;padding:.375rem .75rem;border-radius:.25rem;font-weight:400}.sw-theme-arrows>.nav{overflow:hidden;border-bottom:1px solid #eee}.sw-theme-arrows>.nav .nav-link{position:relative;height:100%;min-height:100%;margin-right:30px;margin-left:-30px;padding-left:40px}@media screen and (max-width:640px){.sw-theme-arrows>.nav .nav-link{overflow:hidden;margin-bottom:1px;margin-right:unset}}.sw-theme-arrows>.nav .nav-link::after{content:"";position:absolute;display:block;width:0;height:0;top:50%;left:100%;margin-top:-50px;border-top:50px solid transparent;border-bottom:50px solid transparent;border-left:30px solid #f8f8f8;z-index:2}.sw-theme-arrows>.nav .nav-link::before{content:" ";position:absolute;display:block;width:0;height:0;top:50%;left:100%;margin-top:-50px;margin-left:1px;border-top:50px solid transparent;border-bottom:50px solid transparent;border-left:30px solid #eee;z-index:1}.sw-theme-arrows>.nav .nav-link.inactive{color:#999;border-color:#f8f8f8;background:#f8f8f8;cursor:not-allowed}.sw-theme-arrows>.nav .nav-link.active{color:#fff;border-color:#5bc0de;background:#5bc0de;cursor:pointer}.sw-theme-arrows>.nav .nav-link.active::after{border-left-color:#5bc0de}.sw-theme-arrows>.nav .nav-link.done{color:#fff;border-color:#5cb85c;background:#5cb85c;cursor:pointer}.sw-theme-arrows>.nav .nav-link.done::after{border-left-color:#5cb85c}.sw-theme-arrows>.nav .nav-link.disabled{color:#eee;border-color:#f9f9f9;background:#f9f9f9;cursor:not-allowed}.sw-theme-arrows>.nav .nav-link.disabled::after{border-left-color:#f9f9f9}.sw-theme-arrows>.nav .nav-link.danger{color:#fff;border-color:#d9534f;background:#d9534f;cursor:pointer}.sw-theme-arrows>.nav .nav-link.danger::after{border-left-color:#d9534f}.sw-theme-arrows.sw-dark{color:rgba(255,255,255,.95);background:#000}.sw-theme-arrows.sw-dark>.nav{border-bottom:1px solid #555}.sw-theme-arrows.sw-dark>.nav .nav-link::after{border-left:30px solid #5f5f5f}.sw-theme-arrows.sw-dark>.nav .nav-link::before{border-left:30px solid #555}.sw-theme-arrows.sw-dark>.nav .nav-link.inactive{color:#fff;border-color:#5f5f5f;background:#5f5f5f}.sw-theme-arrows.sw-dark>.nav .nav-link.inactive::after{border-left-color:#5f5f5f}.sw-theme-arrows.sw-dark>.nav .nav-link.active{color:#fff;border-color:#010506;background:#0a2730}.sw-theme-arrows.sw-dark>.nav .nav-link.active::after{border-left-color:#0a2730}.sw-theme-arrows.sw-dark>.nav .nav-link.done{color:#fff;border-color:#000;background:#000}.sw-theme-arrows.sw-dark>.nav .nav-link.done::after{border-left-color:#000}.sw-theme-arrows.sw-dark>.nav .nav-link.disabled{color:#555!important;border-color:#f9f9f9;background:#474747}.sw-theme-arrows.sw-dark>.nav .nav-link.disabled::after{border-left-color:#474747}.sw-theme-arrows.sw-dark>.nav .nav-link.danger{color:#fff;border-color:#d9534f;background:#d9534f}.sw-theme-arrows.sw-dark>.nav .nav-link.danger::after{border-left-color:#d9534f}

View File

@ -0,0 +1,243 @@
/*!
* jQuery SmartWizard v5
* jQuery Wizard Plugin
* http://www.techlaboratory.net/smartwizard
*
* Created by Dipu Raj
* http://dipu.me
*
* Licensed under the terms of MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/
/* SmartWizard Base Styles */
.sw {
position: relative;
}
.sw *,
.sw *::before,
.sw *::after {
box-sizing: border-box;
}
.sw > .tab-content {
position: relative;
overflow: hidden;
}
.sw .toolbar {
padding: .8rem;
}
.sw .toolbar > .btn {
display: inline-block;
text-decoration: none;
text-align: center;
text-transform: none;
vertical-align: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
margin-left: .2rem;
margin-right: .2rem;
cursor: pointer;
}
.sw .toolbar > .btn.disabled, .sw .toolbar > .btn:disabled {
opacity: .65;
}
.sw > .nav {
display: flex;
flex-wrap: wrap;
list-style: none;
padding-left: 0;
margin-top: 0;
margin-bottom: 0;
}
@media screen and (max-width: 640px) {
.sw > .nav {
flex-direction: column !important;
flex: 1 auto;
}
}
.sw > .nav .nav-link {
display: block;
padding: .5rem 1rem;
text-decoration: none;
}
.sw > .nav .nav-link:hover, .sw > .nav .nav-link:active, .sw > .nav .nav-link:focus {
text-decoration: none;
}
.sw > .nav .nav-link::-moz-focus-inner {
border: 0 !important;
}
.sw > .nav .nav-link.disabled {
color: #ccc !important;
pointer-events: none;
cursor: default;
}
.sw > .nav .nav-link.hidden {
display: none !important;
}
.sw.sw-justified > .nav > li, .sw.sw-justified > .nav .nav-link {
flex-basis: 0;
flex-grow: 1;
text-align: center;
}
.sw.sw-dark {
color: rgba(255, 255, 255, 0.95);
background: #000;
}
.sw.sw-loading {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.sw.sw-loading::after {
content: "";
display: block;
position: absolute;
opacity: 1;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: rgba(255, 255, 255, 0.7);
z-index: 2;
transition: all .2s ease;
}
.sw.sw-loading::before {
content: '';
display: inline-block;
position: absolute;
top: 45%;
left: 45%;
width: 2rem;
height: 2rem;
border: 10px solid #f3f3f3;
border-top: 10px solid #3498db;
border-radius: 50%;
z-index: 10;
-webkit-animation: spin 1s linear infinite;
animation: spin 1s linear infinite;
}
@-webkit-keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/* SmartWizard Theme: Dark */
.sw-theme-dark {
border: 1px solid #eeeeee;
box-shadow: 0 1px 10px rgba(130, 130, 134, 0.1);
color: rgba(255, 255, 255, 0.95);
background: #181c20;
}
.sw-theme-dark > .tab-content > .tab-pane {
padding: 10px;
}
.sw-theme-dark .toolbar > .btn {
color: #fff;
background-color: #17a2b8;
border: 1px solid #17a2b8;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400;
}
.sw-theme-dark > .nav {
background: #0D0F12;
}
.sw-theme-dark > .nav .nav-link {
position: relative;
height: 100%;
min-height: 100%;
}
.sw-theme-dark > .nav .nav-link::after {
content: "";
position: absolute;
height: 2px;
width: 100%;
left: 0px;
bottom: -1px;
background: #999999;
transition: all 250ms ease 0s;
transform: scale(0);
}
.sw-theme-dark > .nav .nav-link.inactive {
color: #999999;
cursor: not-allowed;
}
.sw-theme-dark > .nav .nav-link.active {
color: #17a2b8 !important;
cursor: pointer;
}
.sw-theme-dark > .nav .nav-link.active::after {
background: #17a2b8 !important;
transform: scale(1);
}
.sw-theme-dark > .nav .nav-link.done {
color: #5cb85c !important;
cursor: pointer;
}
.sw-theme-dark > .nav .nav-link.done::after {
background: #5cb85c;
transform: scale(1);
}
.sw-theme-dark > .nav .nav-link.disabled {
color: #f9f9f9 !important;
cursor: not-allowed;
}
.sw-theme-dark > .nav .nav-link.disabled::after {
background: #f9f9f9;
}
.sw-theme-dark > .nav .nav-link.danger {
color: #d9534f !important;
cursor: pointer;
}
.sw-theme-dark > .nav .nav-link.danger::after {
background: #d9534f;
}

View File

@ -0,0 +1,11 @@
/*!
* jQuery SmartWizard v5
* jQuery Wizard Plugin
* http://www.techlaboratory.net/smartwizard
*
* Created by Dipu Raj
* http://dipu.me
*
* Licensed under the terms of MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/.sw{position:relative}.sw *,.sw ::after,.sw ::before{box-sizing:border-box}.sw>.tab-content{position:relative;overflow:hidden}.sw .toolbar{padding:.8rem}.sw .toolbar>.btn{display:inline-block;text-decoration:none;text-align:center;text-transform:none;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-left:.2rem;margin-right:.2rem;cursor:pointer}.sw .toolbar>.btn.disabled,.sw .toolbar>.btn:disabled{opacity:.65}.sw>.nav{display:flex;flex-wrap:wrap;list-style:none;padding-left:0;margin-top:0;margin-bottom:0}@media screen and (max-width:640px){.sw>.nav{flex-direction:column!important;flex:1 auto}}.sw>.nav .nav-link{display:block;padding:.5rem 1rem;text-decoration:none}.sw>.nav .nav-link:active,.sw>.nav .nav-link:focus,.sw>.nav .nav-link:hover{text-decoration:none}.sw>.nav .nav-link::-moz-focus-inner{border:0!important}.sw>.nav .nav-link.disabled{color:#ccc!important;pointer-events:none;cursor:default}.sw>.nav .nav-link.hidden{display:none!important}.sw.sw-justified>.nav .nav-link,.sw.sw-justified>.nav>li{flex-basis:0;flex-grow:1;text-align:center}.sw.sw-dark{color:rgba(255,255,255,.95);background:#000}.sw.sw-loading{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.sw.sw-loading::after{content:"";display:block;position:absolute;opacity:1;top:0;left:0;height:100%;width:100%;background:rgba(255,255,255,.7);z-index:2;transition:all .2s ease}.sw.sw-loading::before{content:'';display:inline-block;position:absolute;top:45%;left:45%;width:2rem;height:2rem;border:10px solid #f3f3f3;border-top:10px solid #3498db;border-radius:50%;z-index:10;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.sw-theme-dark{border:1px solid #eee;box-shadow:0 1px 10px rgba(130,130,134,.1);color:rgba(255,255,255,.95);background:#181c20}.sw-theme-dark>.tab-content>.tab-pane{padding:10px}.sw-theme-dark .toolbar>.btn{color:#fff;background-color:#17a2b8;border:1px solid #17a2b8;padding:.375rem .75rem;border-radius:.25rem;font-weight:400}.sw-theme-dark>.nav{background:#0d0f12}.sw-theme-dark>.nav .nav-link{position:relative;height:100%;min-height:100%}.sw-theme-dark>.nav .nav-link::after{content:"";position:absolute;height:2px;width:100%;left:0;bottom:-1px;background:#999;transition:all 250ms ease 0s;transform:scale(0)}.sw-theme-dark>.nav .nav-link.inactive{color:#999;cursor:not-allowed}.sw-theme-dark>.nav .nav-link.active{color:#17a2b8!important;cursor:pointer}.sw-theme-dark>.nav .nav-link.active::after{background:#17a2b8!important;transform:scale(1)}.sw-theme-dark>.nav .nav-link.done{color:#5cb85c!important;cursor:pointer}.sw-theme-dark>.nav .nav-link.done::after{background:#5cb85c;transform:scale(1)}.sw-theme-dark>.nav .nav-link.disabled{color:#f9f9f9!important;cursor:not-allowed}.sw-theme-dark>.nav .nav-link.disabled::after{background:#f9f9f9}.sw-theme-dark>.nav .nav-link.danger{color:#d9534f!important;cursor:pointer}.sw-theme-dark>.nav .nav-link.danger::after{background:#d9534f}

View File

@ -0,0 +1,1053 @@
"use strict";
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
/*!
* jQuery SmartWizard v5.1.1
* The awesome jQuery step wizard plugin
* http://www.techlaboratory.net/jquery-smartwizard
*
* Created by Dipu Raj
* http://dipu.me
*
* @license Licensed under the terms of the MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else if ((typeof module === "undefined" ? "undefined" : _typeof(module)) === 'object' && module.exports) {
// Node/CommonJS
module.exports = function (root, jQuery) {
if (jQuery === undefined) {
// require('jQuery') returns a factory that requires window to
// build a jQuery instance, we normalize how we use modules
// that require this pattern but the window provided is a noop
// if it's defined (how jquery works)
if (typeof window !== 'undefined') {
jQuery = require('jquery');
} else {
jQuery = require('jquery')(root);
}
}
factory(jQuery);
return jQuery;
};
} else {
// Browser globals
factory(jQuery);
}
})(function ($) {
"use strict"; // Default options
var defaults = {
selected: 0,
// Initial selected step, 0 = first step
theme: 'default',
// theme for the wizard, related css need to include for other than default theme
justified: true,
// Nav menu justification. true/false
darkMode: false,
// Enable/disable Dark Mode if the theme supports. true/false
autoAdjustHeight: true,
// Automatically adjust content height
cycleSteps: false,
// Allows to cycle the navigation of steps
backButtonSupport: true,
// Enable the back button support
enableURLhash: true,
// Enable selection of the step based on url hash
transition: {
animation: 'none',
// Effect on navigation, none/fade/slide-horizontal/slide-vertical/slide-swing
speed: '400',
// Transion animation speed
easing: '' // Transition animation easing. Not supported without a jQuery easing plugin
},
toolbarSettings: {
toolbarPosition: 'bottom',
// none, top, bottom, both
toolbarButtonPosition: 'right',
// left, right, center
showNextButton: true,
// show/hide a Next button
showPreviousButton: true,
// show/hide a Previous button
toolbarExtraButtons: [] // Extra buttons to show on toolbar, array of jQuery input/buttons elements
},
anchorSettings: {
anchorClickable: true,
// Enable/Disable anchor navigation
enableAllAnchors: false,
// Activates all anchors clickable all times
markDoneStep: true,
// Add done state on navigation
markAllPreviousStepsAsDone: true,
// When a step selected by url hash, all previous steps are marked done
removeDoneStepOnNavigateBack: false,
// While navigate back done step after active step will be cleared
enableAnchorOnDoneStep: true // Enable/Disable the done steps navigation
},
keyboardSettings: {
keyNavigation: true,
// Enable/Disable keyboard navigation(left and right keys are used if enabled)
keyLeft: [37],
// Left key code
keyRight: [39] // Right key code
},
lang: {
// Language variables for button
next: 'Next',
previous: 'Previous'
},
disabledSteps: [],
// Array Steps disabled
errorSteps: [],
// Highlight step with errors
hiddenSteps: [] // Hidden steps
};
var SmartWizard = /*#__PURE__*/function () {
function SmartWizard(element, options) {
_classCallCheck(this, SmartWizard);
// Merge user settings with default
this.options = $.extend(true, {}, defaults, options); // Main container element
this.main = $(element); // Navigation bar element
this.nav = this._getFirstDescendant('.nav'); // Step anchor elements
this.steps = this.nav.find('.nav-link'); // Content container
this.container = this._getFirstDescendant('.tab-content'); // Content pages
this.pages = this.container.children('.tab-pane'); // Assign options
this._initOptions(); // Initial load
this._initLoad();
} // Initial Load Method
_createClass(SmartWizard, [{
key: "_initLoad",
value: function _initLoad() {
// Clean the elements
this.pages.hide();
this.steps.removeClass('done active'); // Active step index
this.current_index = null; // Get the initial step index
var idx = this._getStepIndex(); // Mark any previous steps done
this._setPreviousStepsDone(idx); // Show the initial step
this._showStep(idx);
} // Initialize options
}, {
key: "_initOptions",
value: function _initOptions() {
// Set the elements
this._setElements(); // Add toolbar
this._setToolbar(); // Assign plugin events
this._setEvents();
}
}, {
key: "_getFirstDescendant",
value: function _getFirstDescendant(selector) {
// Check for first level element
var elm = this.main.children(selector);
if (elm.length > 0) {
return elm;
} // Check for second level element
this.main.children().each(function (i, n) {
var tmp = $(n).children(selector);
if (tmp.length > 0) {
elm = tmp;
return false;
}
});
if (elm.length > 0) {
return elm;
} // Element not found
this._showError("Element not found " + selector);
return false;
}
}, {
key: "_setElements",
value: function _setElements() {
// Set the main element
this.main.addClass('sw');
this._setTheme(this.options.theme);
this._setJustify(this.options.justified);
this._setDarkMode(this.options.darkMode); // Set the anchor default style
if (this.options.anchorSettings.enableAllAnchors !== true || this.options.anchorSettings.anchorClickable !== true) {
this.steps.addClass('inactive');
} // Disabled steps
this._setCSSClass(this.options.disabledSteps, "disabled"); // Error steps
this._setCSSClass(this.options.errorSteps, "danger"); // Hidden steps
this._setCSSClass(this.options.hiddenSteps, "hidden");
}
}, {
key: "_setEvents",
value: function _setEvents() {
var _this = this;
// Check if event handler already exists
if (this.main.data('click-init')) {
return true;
} // Flag item to prevent attaching handler again
this.main.data('click-init', true); // Anchor click event
$(this.steps).on("click", function (e) {
e.preventDefault();
if (_this.options.anchorSettings.anchorClickable === false) {
return true;
} // Get the step index
var idx = _this.steps.index(e.currentTarget);
if (idx === _this.current_index) {
return true;
}
if (_this.options.anchorSettings.enableAnchorOnDoneStep === false && _this._isDone(idx)) {
return true;
}
if (_this.options.anchorSettings.enableAllAnchors !== false || _this._isDone(idx)) {
_this._showStep(idx);
}
}); // Next button event
this.main.find('.sw-btn-next').on("click", function (e) {
e.preventDefault();
_this._showNext();
}); // Previous button event
this.main.find('.sw-btn-prev').on("click", function (e) {
e.preventDefault();
_this._showPrevious();
}); // Keyboard navigation event
if (this.options.keyboardSettings.keyNavigation) {
$(document).keyup(function (e) {
_this._keyNav(e);
});
} // Back/forward browser button event
if (this.options.backButtonSupport) {
$(window).on('hashchange', function (e) {
var idx = _this._getURLHashIndex();
if (idx !== false) {
e.preventDefault();
_this._showStep(idx);
}
});
}
}
}, {
key: "_setToolbar",
value: function _setToolbar() {
// Skip right away if the toolbar is not enabled
if (this.options.toolbarSettings.toolbarPosition === 'none') {
return true;
} // Append toolbar based on the position
switch (this.options.toolbarSettings.toolbarPosition) {
case 'top':
this.container.before(this._createToolbar('top'));
break;
case 'bottom':
this.container.after(this._createToolbar('bottom'));
break;
case 'both':
this.container.before(this._createToolbar('top'));
this.container.after(this._createToolbar('bottom'));
break;
default:
this.container.after(this._createToolbar('bottom'));
break;
}
}
}, {
key: "_createToolbar",
value: function _createToolbar(position) {
// Skip if the toolbar is already created
if (this.main.find('.toolbar-' + position).length > 0) {
return null;
}
var toolbar = $('<div></div>').addClass('toolbar toolbar-' + position).attr('role', 'toolbar'); // Create the toolbar buttons
var btnNext = this.options.toolbarSettings.showNextButton !== false ? $('<button></button>').text(this.options.lang.next).addClass('btn btn-primary sw-btn-next').attr('type', 'button') : null;
var btnPrevious = this.options.toolbarSettings.showPreviousButton !== false ? $('<button></button>').text(this.options.lang.previous).addClass('btn btn-primary sw-btn-prev').attr('type', 'button') : null;
toolbar.append(btnPrevious, btnNext); // Add extra toolbar buttons
if (this.options.toolbarSettings.toolbarExtraButtons && this.options.toolbarSettings.toolbarExtraButtons.length > 0) {
$.each(this.options.toolbarSettings.toolbarExtraButtons, function (_i, n) {
toolbar.append(n.clone(true));
});
}
toolbar.css('text-align', this.options.toolbarSettings.toolbarButtonPosition);
return toolbar;
}
}, {
key: "_showNext",
value: function _showNext() {
var si = this._getNextShowable(this.current_index);
if (si === false) {
return false;
}
this._showStep(si);
}
}, {
key: "_showPrevious",
value: function _showPrevious() {
var si = this._getPreviousShowable(this.current_index);
if (si === false) {
return false;
}
this._showStep(si);
}
}, {
key: "_showStep",
value: function _showStep(idx) {
// If current step is requested again, skip
if (idx == this.current_index) {
return false;
} // If step not found, skip
if (!this.steps.eq(idx)) {
return false;
} // If it is a disabled step, skip
if (!this._isShowable(idx)) {
return false;
} // Load step content
this._loadStep(idx);
}
}, {
key: "_getNextShowable",
value: function _getNextShowable(idx) {
var si = false; // Find the next showable step
for (var i = idx + 1; i < this.steps.length; i++) {
if (this._isShowable(i)) {
si = i;
break;
}
}
if (si !== false && this.steps.length <= si) {
if (!this.options.cycleSteps) {
return false;
}
si = 0;
}
return si;
}
}, {
key: "_getPreviousShowable",
value: function _getPreviousShowable(idx) {
var si = false; // Find the previous showable step
for (var i = idx - 1; i >= 0; i--) {
if (this._isShowable(i)) {
si = i;
break;
}
}
if (si !== false && 0 > si) {
if (!this.options.cycleSteps) {
return false;
}
si = this.steps.length - 1;
}
return si;
}
}, {
key: "_isShowable",
value: function _isShowable(idx) {
var elm = this.steps.eq(idx);
if (elm.hasClass('disabled') || elm.hasClass('hidden')) {
return false;
}
return true;
}
}, {
key: "_isDone",
value: function _isDone(idx) {
var elm = this.steps.eq(idx);
if (elm.hasClass('done')) {
return true;
}
return false;
}
}, {
key: "_setPreviousStepsDone",
value: function _setPreviousStepsDone(idx) {
if (idx > 0 && this.options.anchorSettings.markDoneStep && this.options.anchorSettings.markAllPreviousStepsAsDone) {
// Mark previous steps of the active step as done
for (var i = idx; i >= 0; i--) {
this._setCSSClass(i, "done");
}
}
}
}, {
key: "_setCSSClass",
value: function _setCSSClass(idx, cls) {
var _this2 = this;
if (idx === null) {
return false;
}
var idxs = $.isArray(idx) ? idx : [idx];
idxs.map(function (i) {
_this2.steps.eq(i).addClass(cls);
});
}
}, {
key: "_resetCSSClass",
value: function _resetCSSClass(idx, cls) {
var _this3 = this;
var idxs = $.isArray(idx) ? idx : [idx];
idxs.map(function (i) {
_this3.steps.eq(i).removeClass(cls);
});
}
}, {
key: "_getStepDirection",
value: function _getStepDirection(idx) {
if (this.current_index == null) {
return '';
}
return this.current_index < idx ? "forward" : "backward";
}
}, {
key: "_getStepPosition",
value: function _getStepPosition(idx) {
var stepPosition = 'middle';
if (idx === 0) {
stepPosition = 'first';
} else if (idx === this.steps.length - 1) {
stepPosition = 'last';
}
return stepPosition;
}
}, {
key: "_getStepAnchor",
value: function _getStepAnchor(idx) {
if (idx == null) {
return null;
}
return this.steps.eq(idx);
}
}, {
key: "_getStepPage",
value: function _getStepPage(idx) {
if (idx == null) {
return null;
}
var anchor = this._getStepAnchor(idx);
return anchor.length > 0 ? this.main.find(anchor.attr("href")) : null;
}
}, {
key: "_setStepContent",
value: function _setStepContent(idx, html) {
var page = this._getStepPage(idx);
if (page) {
page.html(html);
}
}
}, {
key: "_loadStep",
value: function _loadStep(idx) {
var _this4 = this;
// Get current step element
var curStep = this._getStepAnchor(this.current_index); // Get step direction
var stepDirection = this._getStepDirection(idx); // Get the direction of step navigation
if (this.current_index !== null) {
// Trigger "leaveStep" event
if (this._triggerEvent("leaveStep", [curStep, this.current_index, idx, stepDirection]) === false) {
return false;
}
} // Get next step element
var selStep = this._getStepAnchor(idx); // Get the content if used
var getStepContent = this._triggerEvent("stepContent", [selStep, idx, stepDirection]);
if (getStepContent) {
if (_typeof(getStepContent) == "object") {
getStepContent.then(function (res) {
_this4._setStepContent(idx, res);
_this4._transitStep(idx);
})["catch"](function (err) {
console.error(err);
_this4._setStepContent(idx, err);
_this4._transitStep(idx);
});
} else if (typeof getStepContent == "string") {
this._setStepContent(idx, getStepContent);
this._transitStep(idx);
} else {
this._transitStep(idx);
}
} else {
this._transitStep(idx);
}
}
}, {
key: "_transitStep",
value: function _transitStep(idx) {
var _this5 = this;
// Get step to show element
var selStep = this._getStepAnchor(idx); // Change the url hash to new step
this._setURLHash(selStep.attr("href")); // Update controls
this._setAnchor(idx); // Get the direction of step navigation
var stepDirection = this._getStepDirection(idx); // Get the position of step
var stepPosition = this._getStepPosition(idx); // Animate the step
this._doStepAnimation(idx, function () {
// Fix height with content
_this5._fixHeight(idx); // Trigger "showStep" event
_this5._triggerEvent("showStep", [selStep, _this5.current_index, stepDirection, stepPosition]);
}); // Update the current index
this.current_index = idx; // Set the buttons based on the step
this._setButtons(idx);
}
}, {
key: "_doStepAnimation",
value: function _doStepAnimation(idx, callback) {
var _this6 = this;
// Get current step element
var curPage = this._getStepPage(this.current_index); // Get next step element
var selPage = this._getStepPage(idx); // Get the animation
var animation = this.options.transition.animation.toLowerCase(); // Complete any ongoing animations
this._stopAnimations();
switch (animation) {
case 'slide-horizontal':
case 'slide-h':
// horizontal slide
var containerWidth = this.container.width();
var curLastLeft = containerWidth;
var nextFirstLeft = containerWidth * -2; // Forward direction
if (idx > this.current_index) {
curLastLeft = containerWidth * -1;
nextFirstLeft = containerWidth;
} // First load set the container width
if (this.current_index == null) {
this.container.height(selPage.outerHeight());
}
var css_pos, css_left;
if (curPage) {
css_pos = curPage.css("position");
css_left = curPage.css("left");
curPage.css("position", 'absolute').css("left", 0).animate({
left: curLastLeft
}, this.options.transition.speed, this.options.transition.easing, function () {
$(this).hide();
curPage.css("position", css_pos).css("left", css_left);
});
}
css_pos = selPage.css("position");
css_left = selPage.css("left");
selPage.css("position", 'absolute').css("left", nextFirstLeft).outerWidth(containerWidth).show().animate({
left: 0
}, this.options.transition.speed, this.options.transition.easing, function () {
selPage.css("position", css_pos).css("left", css_left);
callback();
});
break;
case 'slide-vertical':
case 'slide-v':
// vertical slide
var containerHeight = this.container.height();
var curLastTop = containerHeight;
var nextFirstTop = containerHeight * -2; // Forward direction
if (idx > this.current_index) {
curLastTop = containerHeight * -1;
nextFirstTop = containerHeight;
}
var css_vpos, css_vtop;
if (curPage) {
css_vpos = curPage.css("position");
css_vtop = curPage.css("top");
curPage.css("position", 'absolute').css("top", 0).animate({
top: curLastTop
}, this.options.transition.speed, this.options.transition.easing, function () {
$(this).hide();
curPage.css("position", css_vpos).css("top", css_vtop);
});
}
css_vpos = selPage.css("position");
css_vtop = selPage.css("top");
selPage.css("position", 'absolute').css("top", nextFirstTop).show().animate({
top: 0
}, this.options.transition.speed, this.options.transition.easing, function () {
selPage.css("position", css_vpos).css("top", css_vtop);
callback();
});
break;
case 'slide-swing':
case 'slide-s':
// normal slide
if (curPage) {
curPage.slideUp('fast', this.options.transition.easing, function () {
selPage.slideDown(_this6.options.transition.speed, _this6.options.transition.easing, function () {
callback();
});
});
} else {
selPage.slideDown(this.options.transition.speed, this.options.transition.easing, function () {
callback();
});
}
break;
case 'fade':
// normal fade
if (curPage) {
curPage.fadeOut('fast', this.options.transition.easing, function () {
selPage.fadeIn('fast', _this6.options.transition.easing, function () {
callback();
});
});
} else {
selPage.fadeIn(this.options.transition.speed, this.options.transition.easing, function () {
callback();
});
}
break;
default:
if (curPage) {
curPage.hide();
}
selPage.show();
callback();
break;
}
}
}, {
key: "_stopAnimations",
value: function _stopAnimations() {
this.pages.finish();
this.container.finish();
}
}, {
key: "_setAnchor",
value: function _setAnchor(idx) {
// Current step anchor > Remove other classes and add done class
this._resetCSSClass(this.current_index, "active");
if (this.options.anchorSettings.markDoneStep !== false && this.current_index !== null) {
this._setCSSClass(this.current_index, "done");
if (this.options.anchorSettings.removeDoneStepOnNavigateBack !== false && this._getStepDirection(idx) === 'backward') {
this._resetCSSClass(this.current_index, "done");
}
} // Next step anchor > Remove other classes and add active class
this._resetCSSClass(idx, "done");
this._setCSSClass(idx, "active");
}
}, {
key: "_setButtons",
value: function _setButtons(idx) {
// Previous/Next Button enable/disable based on step
if (!this.options.cycleSteps) {
this.main.find('.sw-btn-prev').removeClass("disabled");
this.main.find('.sw-btn-next').removeClass("disabled");
switch (this._getStepPosition(idx)) {
case 'first':
this.main.find('.sw-btn-prev').addClass("disabled");
break;
case 'last':
this.main.find('.sw-btn-next').addClass("disabled");
break;
default:
if (this._getNextShowable(idx) === false) {
this.main.find('.sw-btn-next').addClass("disabled");
}
if (this._getPreviousShowable(idx) === false) {
this.main.find('.sw-btn-prev').addClass("disabled");
}
break;
}
}
}
}, {
key: "_getStepIndex",
value: function _getStepIndex() {
// Get selected step from the url
var idx = this._getURLHashIndex();
return idx === false ? this.options.selected : idx;
}
}, {
key: "_setTheme",
value: function _setTheme(theme) {
this.main.removeClass(function (index, className) {
return (className.match(/(^|\s)sw-theme-\S+/g) || []).join(' ');
}).addClass('sw-theme-' + theme);
}
}, {
key: "_setJustify",
value: function _setJustify(justified) {
if (justified === true) {
this.main.addClass('sw-justified');
} else {
this.main.removeClass('sw-justified');
}
}
}, {
key: "_setDarkMode",
value: function _setDarkMode(darkMode) {
if (darkMode === true) {
this.main.addClass('sw-dark');
} else {
this.main.removeClass('sw-dark');
}
} // HELPER FUNCTIONS
}, {
key: "_keyNav",
value: function _keyNav(e) {
// Keyboard navigation
if ($.inArray(e.which, this.options.keyboardSettings.keyLeft) > -1) {
// left
this._showPrevious();
e.preventDefault();
} else if ($.inArray(e.which, this.options.keyboardSettings.keyRight) > -1) {
// right
this._showNext();
e.preventDefault();
} else {
return; // exit this handler for other keys
}
}
}, {
key: "_fixHeight",
value: function _fixHeight(idx) {
// Auto adjust height of the container
if (this.options.autoAdjustHeight) {
var selPage = this._getStepPage(idx);
this.container.finish().animate({
height: selPage.outerHeight()
}, this.options.transition.speed);
}
}
}, {
key: "_triggerEvent",
value: function _triggerEvent(name, params) {
// Trigger an event
var e = $.Event(name);
this.main.trigger(e, params);
if (e.isDefaultPrevented()) {
return false;
}
return e.result;
}
}, {
key: "_setURLHash",
value: function _setURLHash(hash) {
if (this.options.enableURLhash && window.location.hash !== hash) {
history.pushState(null, null, hash);
}
}
}, {
key: "_getURLHashIndex",
value: function _getURLHashIndex() {
if (this.options.enableURLhash) {
// Get step number from url hash if available
var hash = window.location.hash;
if (hash.length > 0) {
var elm = this.nav.find("a[href*='" + hash + "']");
if (elm.length > 0) {
return this.steps.index(elm);
}
}
}
return false;
}
}, {
key: "_loader",
value: function _loader(action) {
switch (action) {
case 'show':
this.main.addClass('sw-loading');
break;
case 'hide':
this.main.removeClass('sw-loading');
break;
default:
this.main.toggleClass('sw-loading');
}
}
}, {
key: "_showError",
value: function _showError(msg) {
console.error(msg);
} // PUBLIC FUNCTIONS
}, {
key: "goToStep",
value: function goToStep(stepIndex) {
this._showStep(stepIndex);
}
}, {
key: "next",
value: function next() {
this._showNext();
}
}, {
key: "prev",
value: function prev() {
this._showPrevious();
}
}, {
key: "reset",
value: function reset() {
// Reset all
this._setURLHash('#');
this._initOptions();
this._initLoad();
}
}, {
key: "stepState",
value: function stepState(stepArray, state) {
if (!stepArray) {
return false;
}
switch (state) {
case 'disable':
this._setCSSClass(stepArray, 'disabled');
break;
case 'enable':
this._resetCSSClass(stepArray, 'disabled');
break;
case 'hide':
this._setCSSClass(stepArray, 'hidden');
break;
case 'show':
this._resetCSSClass(stepArray, 'hidden');
break;
case 'error-on':
this._setCSSClass(stepArray, 'danger');
break;
case 'error-off':
this._resetCSSClass(stepArray, 'danger');
break;
}
}
}, {
key: "setOptions",
value: function setOptions(options) {
this.options = $.extend(true, {}, this.options, options);
this._initOptions();
}
}, {
key: "getStepIndex",
value: function getStepIndex() {
return this.current_index;
}
}, {
key: "loader",
value: function loader(state) {
if (state === "show") {
this.main.addClass('sw-loading');
} else {
this.main.removeClass('sw-loading');
}
}
}]);
return SmartWizard;
}(); // Wrapper for the plugin
$.fn.smartWizard = function (options) {
if (options === undefined || _typeof(options) === 'object') {
return this.each(function () {
if (!$.data(this, "smartWizard")) {
$.data(this, "smartWizard", new SmartWizard(this, options));
}
});
} else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
var instance = $.data(this[0], 'smartWizard');
if (options === 'destroy') {
$.data(this, 'smartWizard', null);
}
if (instance instanceof SmartWizard && typeof instance[options] === 'function') {
return instance[options].apply(instance, Array.prototype.slice.call(arguments, 1));
} else {
return this;
}
}
};
});

View File

@ -0,0 +1,13 @@
"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var s=0;s<e.length;s++){var i=e[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function _createClass(t,e,s){return e&&_defineProperties(t.prototype,e),s&&_defineProperties(t,s),t}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}
/*!
* jQuery SmartWizard v5.1.1
* The awesome jQuery step wizard plugin
* http://www.techlaboratory.net/jquery-smartwizard
*
* Created by Dipu Raj
* http://dipu.me
*
* @license Licensed under the terms of the MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/
!function(s){"function"==typeof define&&define.amd?define(["jquery"],s):"object"===("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=function(t,e){return void 0===e&&(e="undefined"!=typeof window?require("jquery"):require("jquery")(t)),s(e),e}:s(jQuery)}(function(v){var i={selected:0,theme:"default",justified:!0,darkMode:!1,autoAdjustHeight:!0,cycleSteps:!1,backButtonSupport:!0,enableURLhash:!0,transition:{animation:"none",speed:"400",easing:""},toolbarSettings:{toolbarPosition:"bottom",toolbarButtonPosition:"right",showNextButton:!0,showPreviousButton:!0,toolbarExtraButtons:[]},anchorSettings:{anchorClickable:!0,enableAllAnchors:!1,markDoneStep:!0,markAllPreviousStepsAsDone:!0,removeDoneStepOnNavigateBack:!1,enableAnchorOnDoneStep:!0},keyboardSettings:{keyNavigation:!0,keyLeft:[37],keyRight:[39]},lang:{next:"Next",previous:"Previous"},disabledSteps:[],errorSteps:[],hiddenSteps:[]},s=function(){function s(t,e){_classCallCheck(this,s),this.options=v.extend(!0,{},i,e),this.main=v(t),this.nav=this._getFirstDescendant(".nav"),this.steps=this.nav.find(".nav-link"),this.container=this._getFirstDescendant(".tab-content"),this.pages=this.container.children(".tab-pane"),this._initOptions(),this._initLoad()}return _createClass(s,[{key:"_initLoad",value:function(){this.pages.hide(),this.steps.removeClass("done active"),this.current_index=null;var t=this._getStepIndex();this._setPreviousStepsDone(t),this._showStep(t)}},{key:"_initOptions",value:function(){this._setElements(),this._setToolbar(),this._setEvents()}},{key:"_getFirstDescendant",value:function(i){var n=this.main.children(i);return 0<n.length?n:(this.main.children().each(function(t,e){var s=v(e).children(i);if(0<s.length)return n=s,!1}),0<n.length?n:(this._showError("Element not found "+i),!1))}},{key:"_setElements",value:function(){this.main.addClass("sw"),this._setTheme(this.options.theme),this._setJustify(this.options.justified),this._setDarkMode(this.options.darkMode),!0===this.options.anchorSettings.enableAllAnchors&&!0===this.options.anchorSettings.anchorClickable||this.steps.addClass("inactive"),this._setCSSClass(this.options.disabledSteps,"disabled"),this._setCSSClass(this.options.errorSteps,"danger"),this._setCSSClass(this.options.hiddenSteps,"hidden")}},{key:"_setEvents",value:function(){var s=this;if(this.main.data("click-init"))return!0;this.main.data("click-init",!0),v(this.steps).on("click",function(t){if(t.preventDefault(),!1===s.options.anchorSettings.anchorClickable)return!0;var e=s.steps.index(t.currentTarget);return e===s.current_index||(!(!1!==s.options.anchorSettings.enableAnchorOnDoneStep||!s._isDone(e))||void(!1===s.options.anchorSettings.enableAllAnchors&&!s._isDone(e)||s._showStep(e)))}),this.main.find(".sw-btn-next").on("click",function(t){t.preventDefault(),s._showNext()}),this.main.find(".sw-btn-prev").on("click",function(t){t.preventDefault(),s._showPrevious()}),this.options.keyboardSettings.keyNavigation&&v(document).keyup(function(t){s._keyNav(t)}),this.options.backButtonSupport&&v(window).on("hashchange",function(t){var e=s._getURLHashIndex();!1!==e&&(t.preventDefault(),s._showStep(e))})}},{key:"_setToolbar",value:function(){if("none"===this.options.toolbarSettings.toolbarPosition)return!0;switch(this.options.toolbarSettings.toolbarPosition){case"top":this.container.before(this._createToolbar("top"));break;case"bottom":this.container.after(this._createToolbar("bottom"));break;case"both":this.container.before(this._createToolbar("top")),this.container.after(this._createToolbar("bottom"));break;default:this.container.after(this._createToolbar("bottom"))}}},{key:"_createToolbar",value:function(t){if(0<this.main.find(".toolbar-"+t).length)return null;var s=v("<div></div>").addClass("toolbar toolbar-"+t).attr("role","toolbar"),e=!1!==this.options.toolbarSettings.showNextButton?v("<button></button>").text(this.options.lang.next).addClass("btn sw-btn-next").attr("type","button"):null,i=!1!==this.options.toolbarSettings.showPreviousButton?v("<button></button>").text(this.options.lang.previous).addClass("btn sw-btn-prev").attr("type","button"):null;return s.append(i,e),this.options.toolbarSettings.toolbarExtraButtons&&0<this.options.toolbarSettings.toolbarExtraButtons.length&&v.each(this.options.toolbarSettings.toolbarExtraButtons,function(t,e){s.append(e.clone(!0))}),s.css("text-align",this.options.toolbarSettings.toolbarButtonPosition),s}},{key:"_showNext",value:function(){var t=this._getNextShowable(this.current_index);if(!1===t)return!1;this._showStep(t)}},{key:"_showPrevious",value:function(){var t=this._getPreviousShowable(this.current_index);if(!1===t)return!1;this._showStep(t)}},{key:"_showStep",value:function(t){return t!=this.current_index&&(!!this.steps.eq(t)&&(!!this._isShowable(t)&&void this._loadStep(t)))}},{key:"_getNextShowable",value:function(t){for(var e=!1,s=t+1;s<this.steps.length;s++)if(this._isShowable(s)){e=s;break}if(!1!==e&&this.steps.length<=e){if(!this.options.cycleSteps)return!1;e=0}return e}},{key:"_getPreviousShowable",value:function(t){for(var e=!1,s=t-1;0<=s;s--)if(this._isShowable(s)){e=s;break}if(!1!==e&&e<0){if(!this.options.cycleSteps)return!1;e=this.steps.length-1}return e}},{key:"_isShowable",value:function(t){var e=this.steps.eq(t);return!e.hasClass("disabled")&&!e.hasClass("hidden")}},{key:"_isDone",value:function(t){return!!this.steps.eq(t).hasClass("done")}},{key:"_setPreviousStepsDone",value:function(t){if(0<t&&this.options.anchorSettings.markDoneStep&&this.options.anchorSettings.markAllPreviousStepsAsDone)for(var e=t;0<=e;e--)this._setCSSClass(e,"done")}},{key:"_setCSSClass",value:function(t,e){var s=this;if(null===t)return!1;(v.isArray(t)?t:[t]).map(function(t){s.steps.eq(t).addClass(e)})}},{key:"_resetCSSClass",value:function(t,e){var s=this;(v.isArray(t)?t:[t]).map(function(t){s.steps.eq(t).removeClass(e)})}},{key:"_getStepDirection",value:function(t){return null==this.current_index?"":this.current_index<t?"forward":"backward"}},{key:"_getStepPosition",value:function(t){var e="middle";return 0===t?e="first":t===this.steps.length-1&&(e="last"),e}},{key:"_getStepAnchor",value:function(t){return null==t?null:this.steps.eq(t)}},{key:"_getStepPage",value:function(t){if(null==t)return null;var e=this._getStepAnchor(t);return 0<e.length?this.main.find(e.attr("href")):null}},{key:"_setStepContent",value:function(t,e){var s=this._getStepPage(t);s&&s.html(e)}},{key:"_loadStep",value:function(e){var s=this,t=this._getStepAnchor(this.current_index),i=this._getStepDirection(e);if(null!==this.current_index&&!1===this._triggerEvent("leaveStep",[t,this.current_index,e,i]))return!1;var n=this._getStepAnchor(e),o=this._triggerEvent("stepContent",[n,e,i]);o?"object"==_typeof(o)?o.then(function(t){s._setStepContent(e,t),s._transitStep(e)}).catch(function(t){console.error(t),s._setStepContent(e,t),s._transitStep(e)}):("string"==typeof o&&this._setStepContent(e,o),this._transitStep(e)):this._transitStep(e)}},{key:"_transitStep",value:function(t){var e=this,s=this._getStepAnchor(t);this._setURLHash(s.attr("href")),this._setAnchor(t);var i=this._getStepDirection(t),n=this._getStepPosition(t);this._doStepAnimation(t,function(){e._fixHeight(t),e._triggerEvent("showStep",[s,e.current_index,i,n])}),this.current_index=t,this._setButtons(t)}},{key:"_doStepAnimation",value:function(t,e){var s=this,i=this._getStepPage(this.current_index),n=this._getStepPage(t),o=this.options.transition.animation.toLowerCase();switch(this._stopAnimations(),o){case"slide-horizontal":case"slide-h":var a,r,h=this.container.width(),l=h,u=-2*h;t>this.current_index&&(l=-1*h,u=h),null==this.current_index&&this.container.height(n.outerHeight()),i&&(a=i.css("position"),r=i.css("left"),i.css("position","absolute").css("left",0).animate({left:l},this.options.transition.speed,this.options.transition.easing,function(){v(this).hide(),i.css("position",a).css("left",r)})),a=n.css("position"),r=n.css("left"),n.css("position","absolute").css("left",u).outerWidth(h).show().animate({left:0},this.options.transition.speed,this.options.transition.easing,function(){n.css("position",a).css("left",r),e()});break;case"slide-vertical":case"slide-v":var c,d,p=this.container.height(),f=p,_=-2*p;t>this.current_index&&(f=-1*p,_=p),i&&(c=i.css("position"),d=i.css("top"),i.css("position","absolute").css("top",0).animate({top:f},this.options.transition.speed,this.options.transition.easing,function(){v(this).hide(),i.css("position",c).css("top",d)})),c=n.css("position"),d=n.css("top"),n.css("position","absolute").css("top",_).show().animate({top:0},this.options.transition.speed,this.options.transition.easing,function(){n.css("position",c).css("top",d),e()});break;case"slide-swing":case"slide-s":i?i.slideUp("fast",this.options.transition.easing,function(){n.slideDown(s.options.transition.speed,s.options.transition.easing,function(){e()})}):n.slideDown(this.options.transition.speed,this.options.transition.easing,function(){e()});break;case"fade":i?i.fadeOut("fast",this.options.transition.easing,function(){n.fadeIn("fast",s.options.transition.easing,function(){e()})}):n.fadeIn(this.options.transition.speed,this.options.transition.easing,function(){e()});break;default:i&&i.hide(),n.show(),e()}}},{key:"_stopAnimations",value:function(){this.pages.finish(),this.container.finish()}},{key:"_setAnchor",value:function(t){this._resetCSSClass(this.current_index,"active"),!1!==this.options.anchorSettings.markDoneStep&&null!==this.current_index&&(this._setCSSClass(this.current_index,"done"),!1!==this.options.anchorSettings.removeDoneStepOnNavigateBack&&"backward"===this._getStepDirection(t)&&this._resetCSSClass(this.current_index,"done")),this._resetCSSClass(t,"done"),this._setCSSClass(t,"active")}},{key:"_setButtons",value:function(t){if(!this.options.cycleSteps)switch(this.main.find(".sw-btn-prev").removeClass("disabled"),this.main.find(".sw-btn-next").removeClass("disabled"),this._getStepPosition(t)){case"first":this.main.find(".sw-btn-prev").addClass("disabled");break;case"last":this.main.find(".sw-btn-next").addClass("disabled");break;default:!1===this._getNextShowable(t)&&this.main.find(".sw-btn-next").addClass("disabled"),!1===this._getPreviousShowable(t)&&this.main.find(".sw-btn-prev").addClass("disabled")}}},{key:"_getStepIndex",value:function(){var t=this._getURLHashIndex();return!1===t?this.options.selected:t}},{key:"_setTheme",value:function(t){this.main.removeClass(function(t,e){return(e.match(/(^|\s)sw-theme-\S+/g)||[]).join(" ")}).addClass("sw-theme-"+t)}},{key:"_setJustify",value:function(t){!0===t?this.main.addClass("sw-justified"):this.main.removeClass("sw-justified")}},{key:"_setDarkMode",value:function(t){!0===t?this.main.addClass("sw-dark"):this.main.removeClass("sw-dark")}},{key:"_keyNav",value:function(t){if(-1<v.inArray(t.which,this.options.keyboardSettings.keyLeft))this._showPrevious(),t.preventDefault();else{if(!(-1<v.inArray(t.which,this.options.keyboardSettings.keyRight)))return;this._showNext(),t.preventDefault()}}},{key:"_fixHeight",value:function(t){var e;this.options.autoAdjustHeight&&(e=this._getStepPage(t),this.container.finish().animate({height:e.outerHeight()},this.options.transition.speed))}},{key:"_triggerEvent",value:function(t,e){var s=v.Event(t);return this.main.trigger(s,e),!s.isDefaultPrevented()&&s.result}},{key:"_setURLHash",value:function(t){this.options.enableURLhash&&window.location.hash!==t&&history.pushState(null,null,t)}},{key:"_getURLHashIndex",value:function(){if(this.options.enableURLhash){var t=window.location.hash;if(0<t.length){var e=this.nav.find("a[href*='"+t+"']");if(0<e.length)return this.steps.index(e)}}return!1}},{key:"_loader",value:function(t){switch(t){case"show":this.main.addClass("sw-loading");break;case"hide":this.main.removeClass("sw-loading");break;default:this.main.toggleClass("sw-loading")}}},{key:"_showError",value:function(t){console.error(t)}},{key:"goToStep",value:function(t){this._showStep(t)}},{key:"next",value:function(){this._showNext()}},{key:"prev",value:function(){this._showPrevious()}},{key:"reset",value:function(){this._setURLHash("#"),this._initOptions(),this._initLoad()}},{key:"stepState",value:function(t,e){if(!t)return!1;switch(e){case"disable":this._setCSSClass(t,"disabled");break;case"enable":this._resetCSSClass(t,"disabled");break;case"hide":this._setCSSClass(t,"hidden");break;case"show":this._resetCSSClass(t,"hidden");break;case"error-on":this._setCSSClass(t,"danger");break;case"error-off":this._resetCSSClass(t,"danger")}}},{key:"setOptions",value:function(t){this.options=v.extend(!0,{},this.options,t),this._initOptions()}},{key:"getStepIndex",value:function(){return this.current_index}},{key:"loader",value:function(t){"show"===t?this.main.addClass("sw-loading"):this.main.removeClass("sw-loading")}}]),s}();v.fn.smartWizard=function(t){if(void 0===t||"object"===_typeof(t))return this.each(function(){v.data(this,"smartWizard")||v.data(this,"smartWizard",new s(this,t))});if("string"==typeof t&&"_"!==t[0]&&"init"!==t){var e=v.data(this[0],"smartWizard");return"destroy"===t&&v.data(this,"smartWizard",null),e instanceof s&&"function"==typeof e[t]?e[t].apply(e,Array.prototype.slice.call(arguments,1)):this}}});

View File

@ -0,0 +1,254 @@
<!doctype html>
<html lang="en">
<head>
<title>jQuery Smart Wizard - The awesome jQuery step wizard plugin</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Include SmartWizard CSS -->
<link href="./css/smart_wizard_all.css" rel="stylesheet" type="text/css" />
<!-- Demo Page Style - You don't need -->
<style>
body {
padding-right: 5%;
padding-left: 5%;
}
</style>
</head>
<body>
<br />
<p>
<label>Theme:</label>
<select id="theme_selector">
<option value="default" selected>Default</option>
<option value="arrows">Arrows</option>
<option value="dots">Dots</option>
<option value="progress">Progress</option>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="checkbox" id="is_justified" value="1" checked />
<label for="is_justified">Justified</label>
&nbsp;&nbsp;&nbsp;&nbsp;
<label>Animation:</label>
<select id="animation">
<option value="none">None</option>
<option value="fade">Fade</option>
<option value="slide-horizontal" selected>Slide Horizontal</option>
<option value="slide-vertical">Slide Vertical</option>
<option value="slide-swing">Slide Swing</option>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;
<label>Go To:</label>
<select id="got_to_step">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;
<label>External Buttons:</label>
<button class="btn btn-secondary" id="prev-btn" type="button">Go Previous</button>
<button class="btn btn-secondary" id="next-btn" type="button">Go Next</button>
<button class="btn btn-danger" id="reset-btn" type="button">Reset Wizard</button>
</p>
<br />
<!-- SmartWizard html -->
<div id="smartwizard">
<ul class="nav">
<li class="nav-item">
<a class="nav-link" href="#step-1" data-repo="jquery-smarttab">
<strong>SmartTab</strong><br />repository details from GitHub
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#step-2" data-repo="smartwizard">
<strong>SmartWizard</strong><br />repository details from GitHub
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#step-3" data-repo="jquery-smartcart">
<strong>SmartCart</strong><br />repository details from GitHub
</a>
</li>
</ul>
<div class="tab-content">
<div id="step-1" class="tab-pane" role="tabpanel" aria-labelledby="step-1">
</div>
<div id="step-2" class="tab-pane" role="tabpanel" aria-labelledby="step-2">
</div>
<div id="step-3" class="tab-pane" role="tabpanel" aria-labelledby="step-3">
</div>
<div id="step-4" class="tab-pane" role="tabpanel" aria-labelledby="step-4">
</div>
</div>
</div>
<br /> &nbsp;
<!-- Include jQuery -->
<script src="https://code.jquery.com/jquery-3.5.0.min.js" integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script>
<!-- Include SmartWizard JavaScript source -->
<script type="text/javascript" src="./js/jquery.smartWizard.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
// Toolbar extra buttons
var btnFinish = $('<button></button>').text('Finish')
.addClass('btn btn-info')
.on('click', function(){ alert('Finish Clicked'); });
var btnCancel = $('<button></button>').text('Cancel')
.addClass('btn btn-danger')
.on('click', function(){ $('#smartwizard').smartWizard("reset"); });
// Step show event
$("#smartwizard").on("showStep", function(e, anchorObject, stepNumber, stepDirection, stepPosition) {
$("#prev-btn").removeClass('disabled');
$("#next-btn").removeClass('disabled');
if(stepPosition === 'first') {
$("#prev-btn").addClass('disabled');
} else if(stepPosition === 'last') {
$("#next-btn").addClass('disabled');
} else {
$("#prev-btn").removeClass('disabled');
$("#next-btn").removeClass('disabled');
}
});
$("#smartwizard").on("stepContent", function(e, anchorObject, stepIndex, stepDirection) {
var repo = anchorObject.data('repo');
var ajaxURL = "https://api.npms.io/v2/package/" + repo;
// Return a promise object
return new Promise((resolve, reject) => {
// Ajax call to fetch your content
$.ajax({
method : "GET",
url : ajaxURL,
beforeSend: function( xhr ) {
// Show the loader
$('#smartwizard').smartWizard("loader", "show");
}
}).done(function( res ) {
// console.log(res);
var html = '<h2>Ajax data about ' + repo + ' loaded from GitHub</h2>';
html += '<br>URL: <strong>' + ajaxURL + '</strong>';
html += '<br>Name: <strong>' + res.collected.metadata.name + '</strong>';
html += '<br>Description: ' + res.collected.metadata.description;
html += '<br>Homepage: <a href="' + res.collected.github.homepage + '" >'+ res.collected.github.homepage +'</a>';
html += '<br>Keywords: ' + res.collected.metadata.keywords.join(', ');
// html += '<br>Clone URL: ' + res.clone_url;
html += '<br>Stars: ' + res.collected.github.starsCount;
html += '<br>Forks: ' + res.collected.github.forksCount;
html += '<br>Watchers: ' + res.collected.github.subscribersCount;
html += '<br>Open Issues: ' + res.collected.github.issues.openCount + '/' + res.collected.github.issues.count;
html += '<br><br>Popularity: ' + parseInt(res.score.detail.popularity * 100);
html += '<br>Quality: ' + parseInt(res.score.detail.quality * 100);
html += '<br>Maintenance: ' + parseInt(res.score.detail.maintenance * 100);
// Resolve the Promise with the tab content
resolve(html);
// Hide the loader
$('#smartwizard').smartWizard("loader", "hide");
}).fail(function(err) {
// Reject the Promise with error message to show as tab content
reject( "An error loading the resource" );
// Hide the loader
$('#smartwizard').smartWizard("loader", "hide");
});
});
});
// Smart Wizard
$('#smartwizard').smartWizard({
selected: 0,
transition: {
animation: 'slide-horizontal', // Effect on navigation, none/fade/slide-horizontal/slide-vertical/slide-swing
},
toolbarSettings: {
toolbarPosition: 'both', // both bottom
toolbarExtraButtons: [btnFinish, btnCancel]
}
});
// External Button Events
$("#reset-btn").on("click", function() {
// Reset wizard
$('#smartwizard').smartWizard("reset");
return true;
});
$("#prev-btn").on("click", function() {
// Navigate previous
$('#smartwizard').smartWizard("prev");
return true;
});
$("#next-btn").on("click", function() {
// Navigate next
$('#smartwizard').smartWizard("next");
return true;
});
// Demo Button Events
$("#got_to_step").on("change", function() {
// Go to step
var step_index = $(this).val() - 1;
$('#smartwizard').smartWizard("goToStep", step_index);
return true;
});
$("#is_justified").on("click", function() {
// Change Justify
var options = {
justified: $(this).prop("checked")
};
$('#smartwizard').smartWizard("setOptions", options);
return true;
});
$("#animation").on("change", function() {
// Change theme
var options = {
transition: {
animation: $(this).val()
},
};
$('#smartwizard').smartWizard("setOptions", options);
return true;
});
$("#theme_selector").on("change", function() {
// Change theme
var options = {
theme: $(this).val()
};
$('#smartwizard').smartWizard("setOptions", options);
return true;
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,233 @@
<!doctype html>
<html lang="en">
<head>
<title>jQuery Smart Wizard - The awesome jQuery step wizard plugin</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Include SmartWizard CSS -->
<link href="./css/smart_wizard_all.css" rel="stylesheet" type="text/css" />
<!-- Demo Page Style - You don't need -->
<style>
body {
padding-right: 5%;
padding-left: 5%;
}
</style>
</head>
<body>
<br />
<p>
<label>Theme:</label>
<select id="theme_selector">
<option value="default">Default</option>
<option value="arrows" selected>Arrows</option>
<option value="dots">Dots</option>
<option value="progress">Progress</option>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="checkbox" id="dark_mode" value="1" />
<label for="dark_mode">Dark Mode</label>
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="checkbox" id="is_justified" value="1" checked />
<label for="is_justified">Justified</label>
&nbsp;&nbsp;&nbsp;&nbsp;
<label>Animation:</label>
<select id="animation">
<option value="none">None</option>
<option value="fade">Fade</option>
<option value="slide-horizontal" selected>Slide Horizontal</option>
<option value="slide-vertical">Slide Vertical</option>
<option value="slide-swing">Slide Swing</option>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;
<label>Go To:</label>
<select id="got_to_step">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;
<label>External Buttons:</label>
<button class="btn btn-secondary" id="prev-btn" type="button">Go Previous</button>
<button class="btn btn-secondary" id="next-btn" type="button">Go Next</button>
<button class="btn btn-danger" id="reset-btn" type="button">Reset Wizard</button>
</p>
<br />
<!-- SmartWizard html -->
<div id="smartwizard">
<ul class="nav">
<li class="nav-item">
<a class="nav-link" href="#step-1">
<strong>Step 1</strong> <br>This is step description
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#step-2">
<strong>Step 2</strong> <br>This is step description
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#step-3">
<strong>Step 3</strong> <br>This is step description
</a>
</li>
<li class="nav-item">
<a class="nav-link " href="#step-4">
<strong>Step 4</strong> <br>This is step description
</a>
</li>
</ul>
<div class="tab-content">
<div id="step-1" class="tab-pane" role="tabpanel" aria-labelledby="step-1">
<h3>Step 1 Content</h3>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
<div id="step-2" class="tab-pane" role="tabpanel" aria-labelledby="step-2">
<h3>Step 2 Content</h3>
<div>Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </div>
</div>
<div id="step-3" class="tab-pane" role="tabpanel" aria-labelledby="step-3">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
<div id="step-4" class="tab-pane" role="tabpanel" aria-labelledby="step-4">
<h3>Step 4 Content</h3>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
</div>
</div>
<br /> &nbsp;
<!-- Include jQuery -->
<script src="https://code.jquery.com/jquery-3.5.0.min.js" integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script>
<!-- Include SmartWizard JavaScript source -->
<script type="text/javascript" src="./js/jquery.smartWizard.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
// Toolbar extra buttons
var btnFinish = $('<button></button>').text('Finish')
.addClass('btn btn-info')
.on('click', function(){ alert('Finish Clicked'); });
var btnCancel = $('<button></button>').text('Cancel')
.addClass('btn btn-danger')
.on('click', function(){ $('#smartwizard').smartWizard("reset"); });
// Step show event
$("#smartwizard").on("showStep", function(e, anchorObject, stepNumber, stepDirection, stepPosition) {
$("#prev-btn").removeClass('disabled');
$("#next-btn").removeClass('disabled');
if(stepPosition === 'first') {
$("#prev-btn").addClass('disabled');
} else if(stepPosition === 'last') {
$("#next-btn").addClass('disabled');
} else {
$("#prev-btn").removeClass('disabled');
$("#next-btn").removeClass('disabled');
}
});
// Smart Wizard
$('#smartwizard').smartWizard({
selected: 0,
theme: 'arrows', // default, arrows, dots, progress
// darkMode: true,
transition: {
animation: 'slide-horizontal', // Effect on navigation, none/fade/slide-horizontal/slide-vertical/slide-swing
},
toolbarSettings: {
toolbarPosition: 'both', // both bottom
toolbarExtraButtons: [btnFinish, btnCancel]
}
});
// External Button Events
$("#reset-btn").on("click", function() {
// Reset wizard
$('#smartwizard').smartWizard("reset");
return true;
});
$("#prev-btn").on("click", function() {
// Navigate previous
$('#smartwizard').smartWizard("prev");
return true;
});
$("#next-btn").on("click", function() {
// Navigate next
$('#smartwizard').smartWizard("next");
return true;
});
// Demo Button Events
$("#got_to_step").on("change", function() {
// Go to step
var step_index = $(this).val() - 1;
$('#smartwizard').smartWizard("goToStep", step_index);
return true;
});
$("#dark_mode").on("click", function() {
// Change dark mode
var options = {
darkMode: $(this).prop("checked")
};
$('#smartwizard').smartWizard("setOptions", options);
return true;
});
$("#is_justified").on("click", function() {
// Change Justify
var options = {
justified: $(this).prop("checked")
};
$('#smartwizard').smartWizard("setOptions", options);
return true;
});
$("#animation").on("change", function() {
// Change theme
var options = {
transition: {
animation: $(this).val()
},
};
$('#smartwizard').smartWizard("setOptions", options);
return true;
});
$("#theme_selector").on("change", function() {
// Change theme
var options = {
theme: $(this).val()
};
$('#smartwizard').smartWizard("setOptions", options);
return true;
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,376 @@
<!doctype html>
<html lang="en">
<head>
<title>jQuery Smart Wizard - The awesome jQuery step wizard plugin</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Include SmartWizard CSS -->
<link href="./css/smart_wizard_all.css" rel="stylesheet" type="text/css" />
<!-- Demo Page Style - You don't need -->
<style>
body {
padding-right: 5%;
padding-left: 5%;
}
</style>
</head>
<body>
<br />
<p>
<label>Theme:</label>
<select id="theme_selector">
<option value="default">Default</option>
<option value="arrows" selected>Arrows</option>
<option value="dots">Dots</option>
<option value="progress">Progress</option>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="checkbox" id="is_justified" value="1" checked />
<label for="is_justified">Justified</label>
&nbsp;&nbsp;&nbsp;&nbsp;
<label>Animation:</label>
<select id="animation">
<option value="none">None</option>
<option value="fade">Fade</option>
<option value="slide-horizontal" selected>Slide Horizontal</option>
<option value="slide-vertical">Slide Vertical</option>
<option value="slide-swing">Slide Swing</option>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;
<label>Go To:</label>
<select id="got_to_step">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;
<label>External Buttons:</label>
<button class="btn btn-secondary" id="prev-btn" type="button">Go Previous</button>
<button class="btn btn-secondary" id="next-btn" type="button">Go Next</button>
<button class="btn btn-danger" id="reset-btn" type="button">Reset Wizard</button>
</p>
<br />
<!-- SmartWizard html -->
<div id="smartwizard">
<ul class="nav">
<li class="nav-item">
<a class="nav-link" href="#step-1">
<strong>Step 1</strong> This is step description
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#step-2">
<strong>Step 2</strong> This is step description
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#step-3">
<strong>Step 3</strong> This is step description
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#step-4">
<strong>Step 4</strong> This is step description
</a>
</li>
</ul>
<div class="tab-content">
<div id="step-1" class="tab-pane" role="tabpanel" aria-labelledby="step-1">
<h3>Step 1 Content</h3>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
<div id="step-2" class="tab-pane" role="tabpanel" aria-labelledby="step-2">
<h3>Step 2 Content</h3>
<div>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </div>
</div>
<div id="step-3" class="tab-pane" role="tabpanel" aria-labelledby="step-3">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
<div id="step-4" class="tab-pane" role="tabpanel" aria-labelledby="step-4">
<h3>Step 4 Content</h3>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
</div>
</div>
<br /> &nbsp;
<p>
<label>Theme:</label>
<select id="theme_selector2">
<option value="default">Default</option>
<option value="arrows">Arrows</option>
<option value="dots" selected>Dots</option>
<option value="progress">Progress</option>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="checkbox" id="is_justified2" value="1" checked />
<label for="is_justified2">Justified</label>
&nbsp;&nbsp;&nbsp;&nbsp;
<label>Animation:</label>
<select id="animation2">
<option value="none">None</option>
<option value="fade">Fade</option>
<option value="slide-horizontal" selected>Slide Horizontal</option>
<option value="slide-vertical">Slide Vertical</option>
<option value="slide-swing">Slide Swing</option>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;
<label>Go To:</label>
<select id="got_to_step2">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;
<label>External Buttons:</label>
<button class="btn btn-secondary" id="prev-btn2" type="button">Go Previous</button>
<button class="btn btn-secondary" id="next-btn2" type="button">Go Next</button>
<button class="btn btn-danger" id="reset-btn2" type="button">Reset Wizard</button>
</p>
<br />
<!-- SmartWizard html -->
<div id="smartwizard2">
<ul class="nav">
<li class="nav-item">
<a class="nav-link" href="#step-1">
<strong>Step 1</strong> This is step description
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#step-2">
<strong>Step 2</strong> This is step description
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#step-3">
<strong>Step 3</strong> This is step description
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#step-4">
<strong>Step 4</strong> This is step description
</a>
</li>
</ul>
<div class="tab-content">
<div id="step-1" class="tab-pane" role="tabpanel" aria-labelledby="step-1">
<h3>Step 1 Content</h3>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
<div id="step-2" class="tab-pane" role="tabpanel" aria-labelledby="step-2">
<h3>Step 2 Content</h3>
<div>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </div>
</div>
<div id="step-3" class="tab-pane" role="tabpanel" aria-labelledby="step-3">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
<div id="step-4" class="tab-pane" role="tabpanel" aria-labelledby="step-4">
<h3>Step 4 Content</h3>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
</div>
</div>
<!-- Include jQuery -->
<script src="https://code.jquery.com/jquery-3.5.0.min.js" integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script>
<!-- Include SmartWizard JavaScript source -->
<script type="text/javascript" src="./js/jquery.smartWizard.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
// Toolbar extra buttons
var btnFinish = $('<button></button>').text('Finish')
.addClass('btn btn-info')
.on('click', function(){ alert('Finish Clicked'); });
var btnCancel = $('<button></button>').text('Cancel')
.addClass('btn btn-danger')
.on('click', function(){ $('#smartwizard').smartWizard("reset"); });
// Step show event
$("#smartwizard #smartwizard2").on("showStep", function(e, anchorObject, stepNumber, stepDirection, stepPosition) {
$("#prev-btn").removeClass('disabled');
$("#next-btn").removeClass('disabled');
if(stepPosition === 'first') {
$("#prev-btn").addClass('disabled');
} else if(stepPosition === 'last') {
$("#next-btn").addClass('disabled');
} else {
$("#prev-btn").removeClass('disabled');
$("#next-btn").removeClass('disabled');
}
});
// Smart Wizard
$('#smartwizard').smartWizard({
selected: 0,
theme: 'arrows',
transition: {
animation: 'slide-horizontal', // Effect on navigation, none/fade/slide-horizontal/slide-vertical/slide-swing
},
toolbarSettings: {
toolbarPosition: 'both', // both bottom
toolbarExtraButtons: [btnFinish, btnCancel]
}
});
// External Button Events
$("#reset-btn").on("click", function() {
// Reset wizard
$('#smartwizard').smartWizard("reset");
return true;
});
$("#prev-btn").on("click", function() {
// Navigate previous
$('#smartwizard').smartWizard("prev");
return true;
});
$("#next-btn").on("click", function() {
// Navigate next
$('#smartwizard').smartWizard("next");
return true;
});
// Demo Button Events
$("#got_to_step").on("change", function() {
// Go to step
var step_index = $(this).val() - 1;
$('#smartwizard').smartWizard("goToStep", step_index);
return true;
});
$("#is_justified").on("click", function() {
// Change Justify
var options = {
justified: $(this).prop("checked")
};
$('#smartwizard').smartWizard("setOptions", options);
return true;
});
$("#animation").on("change", function() {
// Change theme
var options = {
transition: {
animation: $(this).val()
},
};
$('#smartwizard').smartWizard("setOptions", options);
return true;
});
$("#theme_selector").on("change", function() {
// Change theme
var options = {
theme: $(this).val()
};
$('#smartwizard').smartWizard("setOptions", options);
return true;
});
// Smart Wizard 2nd
$('#smartwizard2').smartWizard({
selected: 0,
theme: 'dots',
enableURLhash: false,
transition: {
animation: 'slide-horizontal', // Effect on navigation, none/fade/slide-horizontal/slide-vertical/slide-swing
},
toolbarSettings: {
toolbarPosition: 'both', // both bottom
toolbarExtraButtons: [btnFinish, btnCancel]
}
});
// External Button Events
$("#reset-btn2").on("click", function() {
// Reset wizard
$('#smartwizard2').smartWizard("reset");
return true;
});
$("#prev-btn2").on("click", function() {
// Navigate previous
$('#smartwizard2').smartWizard("prev");
return true;
});
$("#next-btn2").on("click", function() {
// Navigate next
$('#smartwizard2').smartWizard("next");
return true;
});
// Demo Button Events
$("#got_to_step2").on("change", function() {
// Go to step
var step_index = $(this).val() - 1;
$('#smartwizard2').smartWizard("goToStep", step_index);
return true;
});
$("#is_justified2").on("click", function() {
// Change Justify
var options = {
justified: $(this).prop("checked")
};
$('#smartwizard2').smartWizard("setOptions", options);
return true;
});
$("#animation2").on("change", function() {
// Change theme
var options = {
transition: {
animation: $(this).val()
},
};
$('#smartwizard2').smartWizard("setOptions", options);
return true;
});
$("#theme_selector2").on("change", function() {
// Change theme
var options = {
theme: $(this).val()
};
$('#smartwizard2').smartWizard("setOptions", options);
return true;
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,137 @@
// Include the required tools used on tasks
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
rename = require('gulp-rename'),
uglify = require('gulp-uglify'),
saveLicense = require('uglify-save-license'),
babel = require("gulp-babel"),
postcss = require('gulp-postcss'),
cleanCSS = require('gulp-clean-css'),
cssbeautify = require('gulp-cssbeautify'),
autoprefixer = require('autoprefixer'),
sass = require('gulp-sass'),
del = require('del');
sass.compiler = require('node-sass');
var Server = require('karma').Server;
var browserSync = require('browser-sync').create();
var reload = browserSync.reload;
// Specify the Source files
var SRC_JS = 'src/js/*.js';
var SRC_CSS = 'src/css/*.css';
var SRC_SCSS = 'src/scss/*.scss';
// Specify the Destination folders
var DEST_JS = 'dist/js';
var DEST_CSS = 'dist/css';
var DEST_SCSS = 'src/css';
// BUILD JS
function build_js(cb) {
gulp.src(SRC_JS)
.pipe(babel({
presets: ['@babel/env']
}))
.pipe(gulp.dest(DEST_JS))
.pipe(uglify({
output: {
comments: saveLicense
}
}))
.pipe(rename({
suffix: '.min'
}))
.pipe(gulp.dest(DEST_JS));
cb();
}
// BUILD CSS
function build_css(cb) {
gulp.src(SRC_CSS)
.pipe(postcss( [autoprefixer()] ))
.pipe(cssbeautify({ autosemicolon: true }))
.pipe(gulp.dest(DEST_CSS))
.pipe(cleanCSS({compatibility: 'ie8'}))
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest(DEST_CSS));
cb();
}
// BUILD SCSS
function build_scss(cb) {
gulp.src(SRC_SCSS)
.pipe(sass({outputStyle:'expanded'}).on('error', sass.logError))
.pipe(gulp.dest(DEST_SCSS));
cb();
}
// LINT
function lint_js(cb) {
gulp.src(SRC_JS)
.pipe(jshint({ "esversion": 8 }))
.pipe(jshint.reporter('default'));
cb();
}
// CLEAN
function clean_js(cb) {
del.sync([DEST_JS]);
cb();
}
function clean_css(cb) {
del.sync([DEST_CSS]);
cb();
}
// WATCH
function watch(cb) {
gulp.watch(SRC_JS, build_js);
gulp.watch(SRC_CSS, build_css);
gulp.watch(SRC_SCSS, build_scss);
cb();
}
// SERVE
function serve(cb) {
// Serve files from the root of this project
browserSync.init({
server: {
baseDir: ["examples", "dist"],
index: "index.html"
}
});
gulp.watch(SRC_JS, build_js).on("change", reload);
gulp.watch(SRC_CSS, build_css).on("change", reload);
gulp.watch(SRC_SCSS, build_scss).on("change", reload);
cb();
}
// TEST
function test(cb) {
new Server({
configFile: __dirname + '/karma.conf.js',
singleRun: true
}, done).start();
cb();
}
// EXPORT methods
exports.clean = gulp.parallel(clean_js, clean_css);
exports.build = gulp.parallel(gulp.series(clean_js, lint_js, build_js), gulp.series(build_scss, build_css, clean_css));
exports.lint = lint_js;
exports.watch = watch;
exports.test = test;
exports.serve = serve;
exports.default = serve;

View File

@ -0,0 +1,75 @@
// Karma configuration
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine-jquery', 'jasmine'],
// list of files / patterns to load in the browser
files: [
'test/*.js',
'https://code.jquery.com/jquery-3.4.1.min.js',
'src/js/*.js',
{
pattern: 'test/*.html',
watched: true,
served: true,
included: false
}
],
// list of files to exclude
exclude: [
],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['spec'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['ChromeHeadless'], // 'PhantomJS' 'Chrome', 'Chrome_without_security'
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true,
// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity
})
}

View File

@ -0,0 +1,76 @@
{
"name": "smartwizard",
"title": "jQuery Smart Wizard",
"version": "v5.1.1",
"author": {
"name": "Dipu Raj",
"email": "hello.techlab@gmail.com",
"url": "http://dipu.me"
},
"description": "The awesome jQuery step wizard plugin",
"homepage": "http://techlaboratory.net/jquery-smartwizard",
"license": "MIT",
"contributors": [
{
"name": "Dipu Raj",
"email": "hello.techlab@gmail.com"
}
],
"main": "./dist/js/jquery.smartWizard.js",
"style": "./dist/css/smart_wizard.css",
"repository": {
"type": "git",
"url": "https://github.com/techlab/jquery-smartwizard.git"
},
"bugs": {
"url": "https://github.com/techlab/jquery-smartwizard/issues"
},
"keywords": [
"jQuery",
"Wizard",
"Tabs",
"Steps",
"Bootstrap",
"Plugin",
"Step",
"ui",
"jquery-plugin",
"Tabs"
],
"scripts": {
"start": "gulp serve",
"watch": "gulp watch",
"test": "./node_modules/karma/bin/karma start --single-run",
"build": "gulp build",
"clean": "gulp clean",
"lint": "gulp lint"
},
"devDependencies": {
"@babel/core": "^7.8.3",
"@babel/preset-env": "^7.8.3",
"autoprefixer": "^9.7.4",
"browser-sync": "^2.26.7",
"del": "^5.1.0",
"gulp": "^4.0.2",
"gulp-babel": "^8.0.0",
"gulp-clean-css": "^4.2.0",
"gulp-cssbeautify": "^2.0.1",
"gulp-jasmine": "^4.0.0",
"gulp-jshint": "^2.1.0",
"gulp-postcss": "^8.0.0",
"gulp-rename": "^2.0.0",
"gulp-sass": "^4.0.2",
"gulp-uglify": "^3.0.2",
"jasmine-core": "^3.5.0",
"jasmine-jquery": "^2.1.1",
"jshint": "^2.11.0",
"karma": "^4.4.1",
"karma-chrome-launcher": "^3.1.0",
"karma-jasmine": "^3.1.0",
"karma-jasmine-jquery": "^0.1.1",
"karma-spec-reporter": "0.0.32",
"node-sass": "^4.13.1",
"uglify-save-license": "^0.4.1"
},
"dependencies": {}
}

View File

@ -0,0 +1,223 @@
/*!
* jQuery SmartWizard v5
* jQuery Wizard Plugin
* http://www.techlaboratory.net/smartwizard
*
* Created by Dipu Raj
* http://dipu.me
*
* Licensed under the terms of MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/
/* SmartWizard Base Styles */
.sw {
position: relative;
}
.sw *,
.sw *::before,
.sw *::after {
box-sizing: border-box;
}
.sw > .tab-content {
position: relative;
overflow: hidden;
}
.sw .toolbar {
padding: .8rem;
}
.sw .toolbar > .btn {
display: inline-block;
text-decoration: none;
text-align: center;
text-transform: none;
vertical-align: middle;
user-select: none;
margin-left: .2rem;
margin-right: .2rem;
cursor: pointer;
}
.sw .toolbar > .btn.disabled, .sw .toolbar > .btn:disabled {
opacity: .65;
}
.sw > .nav {
display: flex;
flex-wrap: wrap;
list-style: none;
padding-left: 0;
margin-top: 0;
margin-bottom: 0;
}
@media screen and (max-width: 640px) {
.sw > .nav {
flex-direction: column !important;
flex: 1 auto;
}
}
.sw > .nav .nav-link {
display: block;
padding: .5rem 1rem;
text-decoration: none;
}
.sw > .nav .nav-link:hover, .sw > .nav .nav-link:active, .sw > .nav .nav-link:focus {
text-decoration: none;
}
.sw > .nav .nav-link::-moz-focus-inner {
border: 0 !important;
}
.sw > .nav .nav-link.disabled {
color: #ccc !important;
pointer-events: none;
cursor: default;
}
.sw > .nav .nav-link.hidden {
display: none !important;
}
.sw.sw-justified > .nav > li, .sw.sw-justified > .nav .nav-link {
flex-basis: 0;
flex-grow: 1;
text-align: center;
}
.sw.sw-dark {
color: rgba(255, 255, 255, 0.95);
background: #000;
}
.sw.sw-loading {
user-select: none;
}
.sw.sw-loading::after {
content: "";
display: block;
position: absolute;
opacity: 1;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: rgba(255, 255, 255, 0.7);
z-index: 2;
transition: all .2s ease;
}
.sw.sw-loading::before {
content: '';
display: inline-block;
position: absolute;
top: 45%;
left: 45%;
width: 2rem;
height: 2rem;
border: 10px solid #f3f3f3;
border-top: 10px solid #3498db;
border-radius: 50%;
z-index: 10;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/* SmartWizard Theme: Default */
.sw-theme-default {
border: 1px solid #eeeeee;
}
.sw-theme-default > .tab-content > .tab-pane {
padding: 10px;
}
.sw-theme-default .toolbar > .btn {
color: #fff;
background-color: #17a2b8;
border: 1px solid #17a2b8;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400;
}
.sw-theme-default > .nav {
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1) !important;
}
.sw-theme-default > .nav .nav-link {
position: relative;
height: 100%;
min-height: 100%;
}
.sw-theme-default > .nav .nav-link::after {
content: "";
position: absolute;
height: 2px;
width: 0;
left: 0px;
bottom: -1px;
background: #999999;
transition: all .35s ease .15s;
}
.sw-theme-default > .nav .nav-link.inactive {
color: #999999;
cursor: not-allowed;
}
.sw-theme-default > .nav .nav-link.active {
color: #17a2b8 !important;
cursor: pointer;
}
.sw-theme-default > .nav .nav-link.active::after {
background: #17a2b8 !important;
width: 100%;
}
.sw-theme-default > .nav .nav-link.done {
color: #5cb85c !important;
cursor: pointer;
}
.sw-theme-default > .nav .nav-link.done::after {
background: #5cb85c;
width: 100%;
}
.sw-theme-default > .nav .nav-link.disabled {
color: #dddddd !important;
cursor: not-allowed;
}
.sw-theme-default > .nav .nav-link.disabled::after {
background: #dddddd;
width: 100%;
}
.sw-theme-default > .nav .nav-link.danger {
color: #d9534f !important;
cursor: pointer;
}
.sw-theme-default > .nav .nav-link.danger::after {
background: #d9534f;
width: 100%;
}

View File

@ -0,0 +1,665 @@
/*!
* jQuery SmartWizard v5
* jQuery Wizard Plugin
* http://www.techlaboratory.net/smartwizard
*
* Created by Dipu Raj
* http://dipu.me
*
* Licensed under the terms of MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/
/* SmartWizard Base Styles */
.sw {
position: relative;
}
.sw *,
.sw *::before,
.sw *::after {
box-sizing: border-box;
}
.sw > .tab-content {
position: relative;
overflow: hidden;
}
.sw .toolbar {
padding: .8rem;
}
.sw .toolbar > .btn {
display: inline-block;
text-decoration: none;
text-align: center;
text-transform: none;
vertical-align: middle;
user-select: none;
margin-left: .2rem;
margin-right: .2rem;
cursor: pointer;
}
.sw .toolbar > .btn.disabled, .sw .toolbar > .btn:disabled {
opacity: .65;
}
.sw > .nav {
display: flex;
flex-wrap: wrap;
list-style: none;
padding-left: 0;
margin-top: 0;
margin-bottom: 0;
}
@media screen and (max-width: 640px) {
.sw > .nav {
flex-direction: column !important;
flex: 1 auto;
}
}
.sw > .nav .nav-link {
display: block;
padding: .5rem 1rem;
text-decoration: none;
}
.sw > .nav .nav-link:hover, .sw > .nav .nav-link:active, .sw > .nav .nav-link:focus {
text-decoration: none;
}
.sw > .nav .nav-link::-moz-focus-inner {
border: 0 !important;
}
.sw > .nav .nav-link.disabled {
color: #ccc !important;
pointer-events: none;
cursor: default;
}
.sw > .nav .nav-link.hidden {
display: none !important;
}
.sw.sw-justified > .nav > li, .sw.sw-justified > .nav .nav-link {
flex-basis: 0;
flex-grow: 1;
text-align: center;
}
.sw.sw-dark {
color: rgba(255, 255, 255, 0.95);
background: #000;
}
.sw.sw-loading {
user-select: none;
}
.sw.sw-loading::after {
content: "";
display: block;
position: absolute;
opacity: 1;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: rgba(255, 255, 255, 0.7);
z-index: 2;
transition: all .2s ease;
}
.sw.sw-loading::before {
content: '';
display: inline-block;
position: absolute;
top: 45%;
left: 45%;
width: 2rem;
height: 2rem;
border: 10px solid #f3f3f3;
border-top: 10px solid #3498db;
border-radius: 50%;
z-index: 10;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/* SmartWizard Theme: Default */
.sw-theme-default {
border: 1px solid #eeeeee;
}
.sw-theme-default > .tab-content > .tab-pane {
padding: 10px;
}
.sw-theme-default .toolbar > .btn {
color: #fff;
background-color: #17a2b8;
border: 1px solid #17a2b8;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400;
}
.sw-theme-default > .nav {
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1) !important;
}
.sw-theme-default > .nav .nav-link {
position: relative;
height: 100%;
min-height: 100%;
}
.sw-theme-default > .nav .nav-link::after {
content: "";
position: absolute;
height: 2px;
width: 0;
left: 0px;
bottom: -1px;
background: #999999;
transition: all .35s ease .15s;
}
.sw-theme-default > .nav .nav-link.inactive {
color: #999999;
cursor: not-allowed;
}
.sw-theme-default > .nav .nav-link.active {
color: #17a2b8 !important;
cursor: pointer;
}
.sw-theme-default > .nav .nav-link.active::after {
background: #17a2b8 !important;
width: 100%;
}
.sw-theme-default > .nav .nav-link.done {
color: #5cb85c !important;
cursor: pointer;
}
.sw-theme-default > .nav .nav-link.done::after {
background: #5cb85c;
width: 100%;
}
.sw-theme-default > .nav .nav-link.disabled {
color: #dddddd !important;
cursor: not-allowed;
}
.sw-theme-default > .nav .nav-link.disabled::after {
background: #dddddd;
width: 100%;
}
.sw-theme-default > .nav .nav-link.danger {
color: #d9534f !important;
cursor: pointer;
}
.sw-theme-default > .nav .nav-link.danger::after {
background: #d9534f;
width: 100%;
}
/* SmartWizard Theme: Arrows */
.sw-theme-arrows {
border: 1px solid #eeeeee;
}
.sw-theme-arrows > .tab-content > .tab-pane {
padding: 10px;
}
.sw-theme-arrows .toolbar > .btn {
color: #ffffff;
background-color: #17a2b8;
border: 1px solid #17a2b8;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400;
}
.sw-theme-arrows > .nav {
overflow: hidden;
border-bottom: 1px solid #eeeeee;
}
.sw-theme-arrows > .nav .nav-link {
position: relative;
height: 100%;
min-height: 100%;
margin-right: 30px;
margin-left: -30px;
padding-left: 40px;
}
@media screen and (max-width: 640px) {
.sw-theme-arrows > .nav .nav-link {
overflow: hidden;
margin-bottom: 1px;
margin-right: unset;
}
}
.sw-theme-arrows > .nav .nav-link::after {
content: "";
position: absolute;
display: block;
width: 0;
height: 0;
top: 50%;
left: 100%;
margin-top: -50px;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
border-left: 30px solid #f8f8f8;
z-index: 2;
}
.sw-theme-arrows > .nav .nav-link::before {
content: " ";
position: absolute;
display: block;
width: 0;
height: 0;
top: 50%;
left: 100%;
margin-top: -50px;
margin-left: 1px;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
border-left: 30px solid #eeeeee;
z-index: 1;
}
.sw-theme-arrows > .nav .nav-link.inactive {
color: #999999;
border-color: #f8f8f8;
background: #f8f8f8;
cursor: not-allowed;
}
.sw-theme-arrows > .nav .nav-link.active {
color: #ffffff;
border-color: #5bc0de;
background: #5bc0de;
cursor: pointer;
}
.sw-theme-arrows > .nav .nav-link.active::after {
border-left-color: #5bc0de;
}
.sw-theme-arrows > .nav .nav-link.done {
color: #ffffff;
border-color: #5cb85c;
background: #5cb85c;
cursor: pointer;
}
.sw-theme-arrows > .nav .nav-link.done::after {
border-left-color: #5cb85c;
}
.sw-theme-arrows > .nav .nav-link.disabled {
color: #eeeeee;
border-color: #f9f9f9;
background: #f9f9f9;
cursor: not-allowed;
}
.sw-theme-arrows > .nav .nav-link.disabled::after {
border-left-color: #f9f9f9;
}
.sw-theme-arrows > .nav .nav-link.danger {
color: #ffffff;
border-color: #d9534f;
background: #d9534f;
cursor: pointer;
}
.sw-theme-arrows > .nav .nav-link.danger::after {
border-left-color: #d9534f;
}
.sw-theme-arrows.sw-dark {
color: rgba(255, 255, 255, 0.95);
background: #000;
}
.sw-theme-arrows.sw-dark > .nav {
border-bottom: 1px solid #555555;
}
.sw-theme-arrows.sw-dark > .nav .nav-link::after {
border-left: 30px solid #5f5f5f;
}
.sw-theme-arrows.sw-dark > .nav .nav-link::before {
border-left: 30px solid #555555;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.inactive {
color: white;
border-color: #5f5f5f;
background: #5f5f5f;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.inactive::after {
border-left-color: #5f5f5f;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.active {
color: white;
border-color: #010506;
background: #0a2730;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.active::after {
border-left-color: #0a2730;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.done {
color: white;
border-color: black;
background: black;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.done::after {
border-left-color: black;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.disabled {
color: #555555 !important;
border-color: #f9f9f9;
background: #474747;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.disabled::after {
border-left-color: #474747;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.danger {
color: #ffffff;
border-color: #d9534f;
background: #d9534f;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.danger::after {
border-left-color: #d9534f;
}
/* SmartWizard Theme: Dots */
.sw-theme-dots > .tab-content > .tab-pane {
padding: 10px;
}
.sw-theme-dots .toolbar > .btn {
color: #ffffff;
background-color: #17a2b8;
border: 1px solid #17a2b8;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400;
}
.sw-theme-dots > .nav {
position: relative;
margin-bottom: 10px;
}
.sw-theme-dots > .nav::before {
content: " ";
position: absolute;
top: 18px;
left: 0;
width: 100%;
height: 5px;
background-color: #eeeeee;
border-radius: 3px;
z-index: 1;
}
.sw-theme-dots > .nav .nav-link {
position: relative;
margin-top: 40px;
}
.sw-theme-dots > .nav .nav-link::before {
content: " ";
position: absolute;
display: block;
top: -36px;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
width: 32px;
height: 32px;
border-radius: 50%;
border: none;
background: #f5f5f5;
color: #428bca;
text-decoration: none;
z-index: 98;
}
.sw-theme-dots > .nav .nav-link::after {
content: " ";
position: absolute;
display: block;
top: -28px;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
width: 16px;
height: 16px;
border-radius: 50%;
z-index: 99;
}
.sw-theme-dots > .nav .nav-link.inactive {
color: #999999;
cursor: not-allowed;
}
.sw-theme-dots > .nav .nav-link.inactive::after {
background-color: #999999;
}
.sw-theme-dots > .nav .nav-link.active {
color: #5bc0de !important;
cursor: pointer;
}
.sw-theme-dots > .nav .nav-link.active::after {
background-color: #5bc0de !important;
}
.sw-theme-dots > .nav .nav-link.done {
color: #5cb85c;
cursor: pointer;
}
.sw-theme-dots > .nav .nav-link.done::after {
background-color: #5cb85c;
}
.sw-theme-dots > .nav .nav-link.disabled {
color: #f9f9f9;
cursor: not-allowed;
}
.sw-theme-dots > .nav .nav-link.disabled::after {
background-color: #f9f9f9;
}
.sw-theme-dots > .nav .nav-link.danger {
color: #d9534f;
cursor: pointer;
}
.sw-theme-dots > .nav .nav-link.danger::after {
background-color: #d9534f;
}
.sw-theme-dots.sw-dark {
color: rgba(255, 255, 255, 0.95);
background: #000;
}
.sw-theme-dots.sw-dark > .nav::before {
background-color: #3c3c3c;
}
.sw-theme-dots.sw-dark > .nav .nav-link::before {
background: #434343;
color: black;
}
/* SmartWizard Theme: Progress */
.sw-theme-progress {
border: 1px solid #eeeeee;
}
.sw-theme-progress > .tab-content > .tab-pane {
padding: 10px;
}
.sw-theme-progress .toolbar > .btn {
color: #ffffff;
background-color: #17a2b8;
border: 1px solid #17a2b8;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400;
}
.sw-theme-progress > .nav {
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1) !important;
}
.sw-theme-progress > .nav .nav-link {
position: relative;
height: 100%;
min-height: 100%;
background: transparent;
overflow: hidden;
z-index: 2;
}
.sw-theme-progress > .nav .nav-link::after {
content: "";
position: absolute;
height: 150%;
width: 0;
left: 0;
top: 0;
background: #ffffff;
z-index: -1;
transition: all .35s ease .10s;
}
.sw-theme-progress > .nav .nav-link.inactive {
color: #999999;
cursor: not-allowed;
}
.sw-theme-progress > .nav .nav-link.active {
color: #ffffff !important;
cursor: pointer;
}
.sw-theme-progress > .nav .nav-link.active::after {
background-color: #5cb85c;
width: 100%;
}
.sw-theme-progress > .nav .nav-link.done {
color: #ffffff !important;
cursor: pointer;
}
.sw-theme-progress > .nav .nav-link.done::after {
background: #5cb85c;
width: 100%;
}
.sw-theme-progress > .nav .nav-link.disabled {
color: #dddddd !important;
cursor: not-allowed;
}
.sw-theme-progress > .nav .nav-link.disabled::after {
background: #f9f9f9;
width: 100%;
}
.sw-theme-progress > .nav .nav-link.danger {
color: #ffffff !important;
cursor: pointer;
}
.sw-theme-progress > .nav .nav-link.danger::after {
background: #d9534f;
width: 100%;
}
.sw-theme-progress.sw-dark {
color: rgba(255, 255, 255, 0.95);
}
.sw-theme-progress.sw-dark > .nav .nav-link.active {
color: white;
}
.sw-theme-progress.sw-dark > .nav .nav-link.active::after {
background-color: #333;
}
.sw-theme-progress.sw-dark > .nav .nav-link.done {
color: #ffffff !important;
}
.sw-theme-progress.sw-dark > .nav .nav-link.done::after {
background: #333;
}
.sw-theme-progress.sw-dark > .nav .nav-link.disabled {
color: #2b2b2b !important;
}
.sw-theme-progress.sw-dark > .nav .nav-link.disabled::after {
background: #474747;
}
.sw-theme-progress.sw-dark > .nav .nav-link.danger {
color: #ffffff !important;
}
.sw-theme-progress.sw-dark > .nav .nav-link.danger::after {
background: #d9534f;
}

View File

@ -0,0 +1,328 @@
/*!
* jQuery SmartWizard v5
* jQuery Wizard Plugin
* http://www.techlaboratory.net/smartwizard
*
* Created by Dipu Raj
* http://dipu.me
*
* Licensed under the terms of MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/
/* SmartWizard Base Styles */
.sw {
position: relative;
}
.sw *,
.sw *::before,
.sw *::after {
box-sizing: border-box;
}
.sw > .tab-content {
position: relative;
overflow: hidden;
}
.sw .toolbar {
padding: .8rem;
}
.sw .toolbar > .btn {
display: inline-block;
text-decoration: none;
text-align: center;
text-transform: none;
vertical-align: middle;
user-select: none;
margin-left: .2rem;
margin-right: .2rem;
cursor: pointer;
}
.sw .toolbar > .btn.disabled, .sw .toolbar > .btn:disabled {
opacity: .65;
}
.sw > .nav {
display: flex;
flex-wrap: wrap;
list-style: none;
padding-left: 0;
margin-top: 0;
margin-bottom: 0;
}
@media screen and (max-width: 640px) {
.sw > .nav {
flex-direction: column !important;
flex: 1 auto;
}
}
.sw > .nav .nav-link {
display: block;
padding: .5rem 1rem;
text-decoration: none;
}
.sw > .nav .nav-link:hover, .sw > .nav .nav-link:active, .sw > .nav .nav-link:focus {
text-decoration: none;
}
.sw > .nav .nav-link::-moz-focus-inner {
border: 0 !important;
}
.sw > .nav .nav-link.disabled {
color: #ccc !important;
pointer-events: none;
cursor: default;
}
.sw > .nav .nav-link.hidden {
display: none !important;
}
.sw.sw-justified > .nav > li, .sw.sw-justified > .nav .nav-link {
flex-basis: 0;
flex-grow: 1;
text-align: center;
}
.sw.sw-dark {
color: rgba(255, 255, 255, 0.95);
background: #000;
}
.sw.sw-loading {
user-select: none;
}
.sw.sw-loading::after {
content: "";
display: block;
position: absolute;
opacity: 1;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: rgba(255, 255, 255, 0.7);
z-index: 2;
transition: all .2s ease;
}
.sw.sw-loading::before {
content: '';
display: inline-block;
position: absolute;
top: 45%;
left: 45%;
width: 2rem;
height: 2rem;
border: 10px solid #f3f3f3;
border-top: 10px solid #3498db;
border-radius: 50%;
z-index: 10;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/* SmartWizard Theme: Arrows */
.sw-theme-arrows {
border: 1px solid #eeeeee;
}
.sw-theme-arrows > .tab-content > .tab-pane {
padding: 10px;
}
.sw-theme-arrows .toolbar > .btn {
color: #ffffff;
background-color: #17a2b8;
border: 1px solid #17a2b8;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400;
}
.sw-theme-arrows > .nav {
overflow: hidden;
border-bottom: 1px solid #eeeeee;
}
.sw-theme-arrows > .nav .nav-link {
position: relative;
height: 100%;
min-height: 100%;
margin-right: 30px;
margin-left: -30px;
padding-left: 40px;
}
@media screen and (max-width: 640px) {
.sw-theme-arrows > .nav .nav-link {
overflow: hidden;
margin-bottom: 1px;
margin-right: unset;
}
}
.sw-theme-arrows > .nav .nav-link::after {
content: "";
position: absolute;
display: block;
width: 0;
height: 0;
top: 50%;
left: 100%;
margin-top: -50px;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
border-left: 30px solid #f8f8f8;
z-index: 2;
}
.sw-theme-arrows > .nav .nav-link::before {
content: " ";
position: absolute;
display: block;
width: 0;
height: 0;
top: 50%;
left: 100%;
margin-top: -50px;
margin-left: 1px;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
border-left: 30px solid #eeeeee;
z-index: 1;
}
.sw-theme-arrows > .nav .nav-link.inactive {
color: #999999;
border-color: #f8f8f8;
background: #f8f8f8;
cursor: not-allowed;
}
.sw-theme-arrows > .nav .nav-link.active {
color: #ffffff;
border-color: #5bc0de;
background: #5bc0de;
cursor: pointer;
}
.sw-theme-arrows > .nav .nav-link.active::after {
border-left-color: #5bc0de;
}
.sw-theme-arrows > .nav .nav-link.done {
color: #ffffff;
border-color: #5cb85c;
background: #5cb85c;
cursor: pointer;
}
.sw-theme-arrows > .nav .nav-link.done::after {
border-left-color: #5cb85c;
}
.sw-theme-arrows > .nav .nav-link.disabled {
color: #eeeeee;
border-color: #f9f9f9;
background: #f9f9f9;
cursor: not-allowed;
}
.sw-theme-arrows > .nav .nav-link.disabled::after {
border-left-color: #f9f9f9;
}
.sw-theme-arrows > .nav .nav-link.danger {
color: #ffffff;
border-color: #d9534f;
background: #d9534f;
cursor: pointer;
}
.sw-theme-arrows > .nav .nav-link.danger::after {
border-left-color: #d9534f;
}
.sw-theme-arrows.sw-dark {
color: rgba(255, 255, 255, 0.95);
background: #000;
}
.sw-theme-arrows.sw-dark > .nav {
border-bottom: 1px solid #555555;
}
.sw-theme-arrows.sw-dark > .nav .nav-link::after {
border-left: 30px solid #5f5f5f;
}
.sw-theme-arrows.sw-dark > .nav .nav-link::before {
border-left: 30px solid #555555;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.inactive {
color: white;
border-color: #5f5f5f;
background: #5f5f5f;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.inactive::after {
border-left-color: #5f5f5f;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.active {
color: white;
border-color: #010506;
background: #0a2730;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.active::after {
border-left-color: #0a2730;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.done {
color: white;
border-color: black;
background: black;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.done::after {
border-left-color: black;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.disabled {
color: #555555 !important;
border-color: #f9f9f9;
background: #474747;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.disabled::after {
border-left-color: #474747;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.danger {
color: #ffffff;
border-color: #d9534f;
background: #d9534f;
}
.sw-theme-arrows.sw-dark > .nav .nav-link.danger::after {
border-left-color: #d9534f;
}

View File

@ -0,0 +1,225 @@
/*!
* jQuery SmartWizard v5
* jQuery Wizard Plugin
* http://www.techlaboratory.net/smartwizard
*
* Created by Dipu Raj
* http://dipu.me
*
* Licensed under the terms of MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/
/* SmartWizard Base Styles */
.sw {
position: relative;
}
.sw *,
.sw *::before,
.sw *::after {
box-sizing: border-box;
}
.sw > .tab-content {
position: relative;
overflow: hidden;
}
.sw .toolbar {
padding: .8rem;
}
.sw .toolbar > .btn {
display: inline-block;
text-decoration: none;
text-align: center;
text-transform: none;
vertical-align: middle;
user-select: none;
margin-left: .2rem;
margin-right: .2rem;
cursor: pointer;
}
.sw .toolbar > .btn.disabled, .sw .toolbar > .btn:disabled {
opacity: .65;
}
.sw > .nav {
display: flex;
flex-wrap: wrap;
list-style: none;
padding-left: 0;
margin-top: 0;
margin-bottom: 0;
}
@media screen and (max-width: 640px) {
.sw > .nav {
flex-direction: column !important;
flex: 1 auto;
}
}
.sw > .nav .nav-link {
display: block;
padding: .5rem 1rem;
text-decoration: none;
}
.sw > .nav .nav-link:hover, .sw > .nav .nav-link:active, .sw > .nav .nav-link:focus {
text-decoration: none;
}
.sw > .nav .nav-link::-moz-focus-inner {
border: 0 !important;
}
.sw > .nav .nav-link.disabled {
color: #ccc !important;
pointer-events: none;
cursor: default;
}
.sw > .nav .nav-link.hidden {
display: none !important;
}
.sw.sw-justified > .nav > li, .sw.sw-justified > .nav .nav-link {
flex-basis: 0;
flex-grow: 1;
text-align: center;
}
.sw.sw-dark {
color: rgba(255, 255, 255, 0.95);
background: #000;
}
.sw.sw-loading {
user-select: none;
}
.sw.sw-loading::after {
content: "";
display: block;
position: absolute;
opacity: 1;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: rgba(255, 255, 255, 0.7);
z-index: 2;
transition: all .2s ease;
}
.sw.sw-loading::before {
content: '';
display: inline-block;
position: absolute;
top: 45%;
left: 45%;
width: 2rem;
height: 2rem;
border: 10px solid #f3f3f3;
border-top: 10px solid #3498db;
border-radius: 50%;
z-index: 10;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/* SmartWizard Theme: Dark */
.sw-theme-dark {
border: 1px solid #eeeeee;
box-shadow: 0 1px 10px rgba(130, 130, 134, 0.1);
color: rgba(255, 255, 255, 0.95);
background: #181c20;
}
.sw-theme-dark > .tab-content > .tab-pane {
padding: 10px;
}
.sw-theme-dark .toolbar > .btn {
color: #fff;
background-color: #17a2b8;
border: 1px solid #17a2b8;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400;
}
.sw-theme-dark > .nav {
background: #0D0F12;
}
.sw-theme-dark > .nav .nav-link {
position: relative;
height: 100%;
min-height: 100%;
}
.sw-theme-dark > .nav .nav-link::after {
content: "";
position: absolute;
height: 2px;
width: 100%;
left: 0px;
bottom: -1px;
background: #999999;
transition: all 250ms ease 0s;
transform: scale(0);
}
.sw-theme-dark > .nav .nav-link.inactive {
color: #999999;
cursor: not-allowed;
}
.sw-theme-dark > .nav .nav-link.active {
color: #17a2b8 !important;
cursor: pointer;
}
.sw-theme-dark > .nav .nav-link.active::after {
background: #17a2b8 !important;
transform: scale(1);
}
.sw-theme-dark > .nav .nav-link.done {
color: #5cb85c !important;
cursor: pointer;
}
.sw-theme-dark > .nav .nav-link.done::after {
background: #5cb85c;
transform: scale(1);
}
.sw-theme-dark > .nav .nav-link.disabled {
color: #f9f9f9 !important;
cursor: not-allowed;
}
.sw-theme-dark > .nav .nav-link.disabled::after {
background: #f9f9f9;
}
.sw-theme-dark > .nav .nav-link.danger {
color: #d9534f !important;
cursor: pointer;
}
.sw-theme-dark > .nav .nav-link.danger::after {
background: #d9534f;
}

View File

@ -0,0 +1,268 @@
/*!
* jQuery SmartWizard v5
* jQuery Wizard Plugin
* http://www.techlaboratory.net/smartwizard
*
* Created by Dipu Raj
* http://dipu.me
*
* Licensed under the terms of MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/
/* SmartWizard Base Styles */
.sw {
position: relative;
}
.sw *,
.sw *::before,
.sw *::after {
box-sizing: border-box;
}
.sw > .tab-content {
position: relative;
overflow: hidden;
}
.sw .toolbar {
padding: .8rem;
}
.sw .toolbar > .btn {
display: inline-block;
text-decoration: none;
text-align: center;
text-transform: none;
vertical-align: middle;
user-select: none;
margin-left: .2rem;
margin-right: .2rem;
cursor: pointer;
}
.sw .toolbar > .btn.disabled, .sw .toolbar > .btn:disabled {
opacity: .65;
}
.sw > .nav {
display: flex;
flex-wrap: wrap;
list-style: none;
padding-left: 0;
margin-top: 0;
margin-bottom: 0;
}
@media screen and (max-width: 640px) {
.sw > .nav {
flex-direction: column !important;
flex: 1 auto;
}
}
.sw > .nav .nav-link {
display: block;
padding: .5rem 1rem;
text-decoration: none;
}
.sw > .nav .nav-link:hover, .sw > .nav .nav-link:active, .sw > .nav .nav-link:focus {
text-decoration: none;
}
.sw > .nav .nav-link::-moz-focus-inner {
border: 0 !important;
}
.sw > .nav .nav-link.disabled {
color: #ccc !important;
pointer-events: none;
cursor: default;
}
.sw > .nav .nav-link.hidden {
display: none !important;
}
.sw.sw-justified > .nav > li, .sw.sw-justified > .nav .nav-link {
flex-basis: 0;
flex-grow: 1;
text-align: center;
}
.sw.sw-dark {
color: rgba(255, 255, 255, 0.95);
background: #000;
}
.sw.sw-loading {
user-select: none;
}
.sw.sw-loading::after {
content: "";
display: block;
position: absolute;
opacity: 1;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: rgba(255, 255, 255, 0.7);
z-index: 2;
transition: all .2s ease;
}
.sw.sw-loading::before {
content: '';
display: inline-block;
position: absolute;
top: 45%;
left: 45%;
width: 2rem;
height: 2rem;
border: 10px solid #f3f3f3;
border-top: 10px solid #3498db;
border-radius: 50%;
z-index: 10;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/* SmartWizard Theme: Dots */
.sw-theme-dots > .tab-content > .tab-pane {
padding: 10px;
}
.sw-theme-dots .toolbar > .btn {
color: #ffffff;
background-color: #17a2b8;
border: 1px solid #17a2b8;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400;
}
.sw-theme-dots > .nav {
position: relative;
margin-bottom: 10px;
}
.sw-theme-dots > .nav::before {
content: " ";
position: absolute;
top: 18px;
left: 0;
width: 100%;
height: 5px;
background-color: #eeeeee;
border-radius: 3px;
z-index: 1;
}
.sw-theme-dots > .nav .nav-link {
position: relative;
margin-top: 40px;
}
.sw-theme-dots > .nav .nav-link::before {
content: " ";
position: absolute;
display: block;
top: -36px;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
width: 32px;
height: 32px;
border-radius: 50%;
border: none;
background: #f5f5f5;
color: #428bca;
text-decoration: none;
z-index: 98;
}
.sw-theme-dots > .nav .nav-link::after {
content: " ";
position: absolute;
display: block;
top: -28px;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
width: 16px;
height: 16px;
border-radius: 50%;
z-index: 99;
}
.sw-theme-dots > .nav .nav-link.inactive {
color: #999999;
cursor: not-allowed;
}
.sw-theme-dots > .nav .nav-link.inactive::after {
background-color: #999999;
}
.sw-theme-dots > .nav .nav-link.active {
color: #5bc0de !important;
cursor: pointer;
}
.sw-theme-dots > .nav .nav-link.active::after {
background-color: #5bc0de !important;
}
.sw-theme-dots > .nav .nav-link.done {
color: #5cb85c;
cursor: pointer;
}
.sw-theme-dots > .nav .nav-link.done::after {
background-color: #5cb85c;
}
.sw-theme-dots > .nav .nav-link.disabled {
color: #f9f9f9;
cursor: not-allowed;
}
.sw-theme-dots > .nav .nav-link.disabled::after {
background-color: #f9f9f9;
}
.sw-theme-dots > .nav .nav-link.danger {
color: #d9534f;
cursor: pointer;
}
.sw-theme-dots > .nav .nav-link.danger::after {
background-color: #d9534f;
}
.sw-theme-dots.sw-dark {
color: rgba(255, 255, 255, 0.95);
background: #000;
}
.sw-theme-dots.sw-dark > .nav::before {
background-color: #3c3c3c;
}
.sw-theme-dots.sw-dark > .nav .nav-link::before {
background: #434343;
color: black;
}

View File

@ -0,0 +1,263 @@
/*!
* jQuery SmartWizard v5
* jQuery Wizard Plugin
* http://www.techlaboratory.net/smartwizard
*
* Created by Dipu Raj
* http://dipu.me
*
* Licensed under the terms of MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/
/* SmartWizard Base Styles */
.sw {
position: relative;
}
.sw *,
.sw *::before,
.sw *::after {
box-sizing: border-box;
}
.sw > .tab-content {
position: relative;
overflow: hidden;
}
.sw .toolbar {
padding: .8rem;
}
.sw .toolbar > .btn {
display: inline-block;
text-decoration: none;
text-align: center;
text-transform: none;
vertical-align: middle;
user-select: none;
margin-left: .2rem;
margin-right: .2rem;
cursor: pointer;
}
.sw .toolbar > .btn.disabled, .sw .toolbar > .btn:disabled {
opacity: .65;
}
.sw > .nav {
display: flex;
flex-wrap: wrap;
list-style: none;
padding-left: 0;
margin-top: 0;
margin-bottom: 0;
}
@media screen and (max-width: 640px) {
.sw > .nav {
flex-direction: column !important;
flex: 1 auto;
}
}
.sw > .nav .nav-link {
display: block;
padding: .5rem 1rem;
text-decoration: none;
}
.sw > .nav .nav-link:hover, .sw > .nav .nav-link:active, .sw > .nav .nav-link:focus {
text-decoration: none;
}
.sw > .nav .nav-link::-moz-focus-inner {
border: 0 !important;
}
.sw > .nav .nav-link.disabled {
color: #ccc !important;
pointer-events: none;
cursor: default;
}
.sw > .nav .nav-link.hidden {
display: none !important;
}
.sw.sw-justified > .nav > li, .sw.sw-justified > .nav .nav-link {
flex-basis: 0;
flex-grow: 1;
text-align: center;
}
.sw.sw-dark {
color: rgba(255, 255, 255, 0.95);
background: #000;
}
.sw.sw-loading {
user-select: none;
}
.sw.sw-loading::after {
content: "";
display: block;
position: absolute;
opacity: 1;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: rgba(255, 255, 255, 0.7);
z-index: 2;
transition: all .2s ease;
}
.sw.sw-loading::before {
content: '';
display: inline-block;
position: absolute;
top: 45%;
left: 45%;
width: 2rem;
height: 2rem;
border: 10px solid #f3f3f3;
border-top: 10px solid #3498db;
border-radius: 50%;
z-index: 10;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/* SmartWizard Theme: Progress */
.sw-theme-progress {
border: 1px solid #eeeeee;
}
.sw-theme-progress > .tab-content > .tab-pane {
padding: 10px;
}
.sw-theme-progress .toolbar > .btn {
color: #ffffff;
background-color: #17a2b8;
border: 1px solid #17a2b8;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400;
}
.sw-theme-progress > .nav {
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1) !important;
}
.sw-theme-progress > .nav .nav-link {
position: relative;
height: 100%;
min-height: 100%;
background: transparent;
overflow: hidden;
z-index: 2;
}
.sw-theme-progress > .nav .nav-link::after {
content: "";
position: absolute;
height: 150%;
width: 0;
left: 0;
top: 0;
background: #ffffff;
z-index: -1;
transition: all .35s ease .10s;
}
.sw-theme-progress > .nav .nav-link.inactive {
color: #999999;
cursor: not-allowed;
}
.sw-theme-progress > .nav .nav-link.active {
color: #ffffff !important;
cursor: pointer;
}
.sw-theme-progress > .nav .nav-link.active::after {
background-color: #5cb85c;
width: 100%;
}
.sw-theme-progress > .nav .nav-link.done {
color: #ffffff !important;
cursor: pointer;
}
.sw-theme-progress > .nav .nav-link.done::after {
background: #5cb85c;
width: 100%;
}
.sw-theme-progress > .nav .nav-link.disabled {
color: #dddddd !important;
cursor: not-allowed;
}
.sw-theme-progress > .nav .nav-link.disabled::after {
background: #f9f9f9;
width: 100%;
}
.sw-theme-progress > .nav .nav-link.danger {
color: #ffffff !important;
cursor: pointer;
}
.sw-theme-progress > .nav .nav-link.danger::after {
background: #d9534f;
width: 100%;
}
.sw-theme-progress.sw-dark {
color: rgba(255, 255, 255, 0.95);
}
.sw-theme-progress.sw-dark > .nav .nav-link.active {
color: white;
}
.sw-theme-progress.sw-dark > .nav .nav-link.active::after {
background-color: #333;
}
.sw-theme-progress.sw-dark > .nav .nav-link.done {
color: #ffffff !important;
}
.sw-theme-progress.sw-dark > .nav .nav-link.done::after {
background: #333;
}
.sw-theme-progress.sw-dark > .nav .nav-link.disabled {
color: #2b2b2b !important;
}
.sw-theme-progress.sw-dark > .nav .nav-link.disabled::after {
background: #474747;
}
.sw-theme-progress.sw-dark > .nav .nav-link.danger {
color: #ffffff !important;
}
.sw-theme-progress.sw-dark > .nav .nav-link.danger::after {
background: #d9534f;
}

View File

@ -0,0 +1,893 @@
/*!
* jQuery SmartWizard v5.1.1
* The awesome jQuery step wizard plugin
* http://www.techlaboratory.net/jquery-smartwizard
*
* Created by Dipu Raj
* http://dipu.me
*
* @license Licensed under the terms of the MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else if (typeof module === 'object' && module.exports) {
// Node/CommonJS
module.exports = function( root, jQuery ) {
if ( jQuery === undefined ) {
// require('jQuery') returns a factory that requires window to
// build a jQuery instance, we normalize how we use modules
// that require this pattern but the window provided is a noop
// if it's defined (how jquery works)
if ( typeof window !== 'undefined' ) {
jQuery = require('jquery');
}
else {
jQuery = require('jquery')(root);
}
}
factory(jQuery);
return jQuery;
};
} else {
// Browser globals
factory(jQuery);
}
}(function ($) {
"use strict";
// Default options
var defaults = {
selected: 0, // Initial selected step, 0 = first step
theme: 'default', // theme for the wizard, related css need to include for other than default theme
justified: true, // Nav menu justification. true/false
darkMode:false, // Enable/disable Dark Mode if the theme supports. true/false
autoAdjustHeight: true, // Automatically adjust content height
cycleSteps: false, // Allows to cycle the navigation of steps
backButtonSupport: true, // Enable the back button support
enableURLhash: true, // Enable selection of the step based on url hash
transition: {
animation: 'none', // Effect on navigation, none/fade/slide-horizontal/slide-vertical/slide-swing
speed: '400', // Transion animation speed
easing:'' // Transition animation easing. Not supported without a jQuery easing plugin
},
toolbarSettings: {
toolbarPosition: 'bottom', // none, top, bottom, both
toolbarButtonPosition: 'right', // left, right, center
showNextButton: true, // show/hide a Next button
showPreviousButton: true, // show/hide a Previous button
toolbarExtraButtons: [] // Extra buttons to show on toolbar, array of jQuery input/buttons elements
},
anchorSettings: {
anchorClickable: true, // Enable/Disable anchor navigation
enableAllAnchors: false, // Activates all anchors clickable all times
markDoneStep: true, // Add done state on navigation
markAllPreviousStepsAsDone: true, // When a step selected by url hash, all previous steps are marked done
removeDoneStepOnNavigateBack: false, // While navigate back done step after active step will be cleared
enableAnchorOnDoneStep: true // Enable/Disable the done steps navigation
},
keyboardSettings: {
keyNavigation: true, // Enable/Disable keyboard navigation(left and right keys are used if enabled)
keyLeft: [37], // Left key code
keyRight: [39] // Right key code
},
lang: { // Language variables for button
next: 'Next',
previous: 'Previous'
},
disabledSteps: [], // Array Steps disabled
errorSteps: [], // Highlight step with errors
hiddenSteps: [] // Hidden steps
};
class SmartWizard {
constructor(element, options) {
// Merge user settings with default
this.options = $.extend(true, {}, defaults, options);
// Main container element
this.main = $(element);
// Navigation bar element
this.nav = this._getFirstDescendant('.nav');
// Step anchor elements
this.steps = this.nav.find('.nav-link');
// Content container
this.container = this._getFirstDescendant('.tab-content');
// Content pages
this.pages = this.container.children('.tab-pane');
// Assign options
this._initOptions();
// Initial load
this._initLoad();
}
// Initial Load Method
_initLoad() {
// Clean the elements
this.pages.hide();
this.steps.removeClass('done active');
// Active step index
this.current_index = null;
// Get the initial step index
let idx = this._getStepIndex();
// Mark any previous steps done
this._setPreviousStepsDone(idx);
// Show the initial step
this._showStep(idx);
}
// Initialize options
_initOptions() {
// Set the elements
this._setElements();
// Add toolbar
this._setToolbar();
// Assign plugin events
this._setEvents();
}
_getFirstDescendant(selector) {
// Check for first level element
let elm = this.main.children(selector);
if (elm.length > 0) {
return elm;
}
// Check for second level element
this.main.children().each((i, n) => {
let tmp = $(n).children(selector);
if (tmp.length > 0) {
elm = tmp;
return false;
}
});
if (elm.length > 0) {
return elm;
}
// Element not found
this._showError("Element not found " + selector);
return false;
}
_setElements() {
// Set the main element
this.main.addClass('sw');
this._setTheme(this.options.theme);
this._setJustify(this.options.justified);
this._setDarkMode(this.options.darkMode);
// Set the anchor default style
if (this.options.anchorSettings.enableAllAnchors !== true || this.options.anchorSettings.anchorClickable !== true) {
this.steps.addClass('inactive');
}
// Disabled steps
this._setCSSClass(this.options.disabledSteps, "disabled");
// Error steps
this._setCSSClass(this.options.errorSteps, "danger");
// Hidden steps
this._setCSSClass(this.options.hiddenSteps, "hidden");
}
_setEvents() {
// Check if event handler already exists
if (this.main.data('click-init')) {
return true;
}
// Flag item to prevent attaching handler again
this.main.data('click-init', true);
// Anchor click event
$(this.steps).on("click", (e) => {
e.preventDefault();
if (this.options.anchorSettings.anchorClickable === false) {
return true;
}
// Get the step index
var idx = this.steps.index(e.currentTarget);
if (idx === this.current_index) {
return true;
}
if (this.options.anchorSettings.enableAnchorOnDoneStep === false && this._isDone(idx)) {
return true;
}
if (this.options.anchorSettings.enableAllAnchors !== false || this._isDone(idx)) {
this._showStep(idx);
}
});
// Next button event
this.main.find('.sw-btn-next').on("click", (e) => {
e.preventDefault();
this._showNext();
});
// Previous button event
this.main.find('.sw-btn-prev').on("click", (e) => {
e.preventDefault();
this._showPrevious();
});
// Keyboard navigation event
if (this.options.keyboardSettings.keyNavigation) {
$(document).keyup((e) => {
this._keyNav(e);
});
}
// Back/forward browser button event
if (this.options.backButtonSupport) {
$(window).on('hashchange', (e) => {
let idx = this._getURLHashIndex();
if (idx !== false) {
e.preventDefault();
this._showStep(idx);
}
});
}
}
_setToolbar() {
// Skip right away if the toolbar is not enabled
if (this.options.toolbarSettings.toolbarPosition === 'none') {
return true;
}
// Append toolbar based on the position
switch (this.options.toolbarSettings.toolbarPosition) {
case 'top':
this.container.before(this._createToolbar('top'));
break;
case 'bottom':
this.container.after(this._createToolbar('bottom'));
break;
case 'both':
this.container.before(this._createToolbar('top'));
this.container.after(this._createToolbar('bottom'));
break;
default:
this.container.after(this._createToolbar('bottom'));
break;
}
}
_createToolbar(position) {
// Skip if the toolbar is already created
if (this.main.find('.toolbar-' + position).length > 0) {
return null;
}
var toolbar = $('<div></div>').addClass('toolbar toolbar-' + position).attr('role', 'toolbar');
// Create the toolbar buttons
let btnNext = this.options.toolbarSettings.showNextButton !== false ? $('<button></button>').text(this.options.lang.next).addClass('btn sw-btn-next').attr('type', 'button') : null;
let btnPrevious = this.options.toolbarSettings.showPreviousButton !== false ? $('<button></button>').text(this.options.lang.previous).addClass('btn sw-btn-prev').attr('type', 'button') : null;
toolbar.append(btnPrevious, btnNext);
// Add extra toolbar buttons
if (this.options.toolbarSettings.toolbarExtraButtons && this.options.toolbarSettings.toolbarExtraButtons.length > 0) {
$.each(this.options.toolbarSettings.toolbarExtraButtons, (_i, n) => {
toolbar.append(n.clone(true));
});
}
toolbar.css('text-align', this.options.toolbarSettings.toolbarButtonPosition);
return toolbar;
}
_showNext() {
var si = this._getNextShowable(this.current_index);
if (si === false) {
return false;
}
this._showStep(si);
}
_showPrevious() {
var si = this._getPreviousShowable(this.current_index);
if (si === false) {
return false;
}
this._showStep(si);
}
_showStep(idx) {
// If current step is requested again, skip
if (idx == this.current_index) {
return false;
}
// If step not found, skip
if (!this.steps.eq(idx)) {
return false;
}
// If it is a disabled step, skip
if (!this._isShowable(idx)) {
return false;
}
// Load step content
this._loadStep(idx);
}
_getNextShowable(idx) {
var si = false;
// Find the next showable step
for (var i = idx + 1; i < this.steps.length; i++) {
if (this._isShowable(i)) {
si = i;
break;
}
}
if (si !== false && this.steps.length <= si) {
if (!this.options.cycleSteps) {
return false;
}
si = 0;
}
return si;
}
_getPreviousShowable(idx) {
var si = false;
// Find the previous showable step
for (var i = idx - 1; i >= 0; i--) {
if (this._isShowable(i)) {
si = i;
break;
}
}
if (si !== false && 0 > si) {
if (!this.options.cycleSteps) {
return false;
}
si = this.steps.length - 1;
}
return si;
}
_isShowable(idx) {
let elm = this.steps.eq(idx);
if (elm.hasClass('disabled') || elm.hasClass('hidden')) {
return false;
}
return true;
}
_isDone(idx) {
let elm = this.steps.eq(idx);
if (elm.hasClass('done')) {
return true;
}
return false;
}
_setPreviousStepsDone(idx) {
if (idx > 0 && this.options.anchorSettings.markDoneStep && this.options.anchorSettings.markAllPreviousStepsAsDone) {
// Mark previous steps of the active step as done
for(var i = idx; i >= 0; i--) {
this._setCSSClass(i, "done");
}
}
}
_setCSSClass(idx, cls) {
if (idx === null) {
return false;
}
let idxs = $.isArray(idx) ? idx : [idx];
idxs.map((i) => {
this.steps.eq(i).addClass(cls);
});
}
_resetCSSClass(idx, cls) {
let idxs = $.isArray(idx) ? idx : [idx];
idxs.map((i) => {
this.steps.eq(i).removeClass(cls);
});
}
_getStepDirection(idx) {
if (this.current_index == null) {
return '';
}
return this.current_index < idx ? "forward" : "backward";
}
_getStepPosition(idx) {
let stepPosition = 'middle';
if (idx === 0) {
stepPosition = 'first';
} else if (idx === this.steps.length - 1) {
stepPosition = 'last';
}
return stepPosition;
}
_getStepAnchor(idx) {
if (idx == null) {
return null;
}
return this.steps.eq(idx);
}
_getStepPage(idx) {
if (idx == null) {
return null;
}
let anchor = this._getStepAnchor(idx);
return anchor.length > 0 ? this.main.find(anchor.attr("href")) : null;
}
_setStepContent(idx, html) {
let page = this._getStepPage(idx);
if (page) {
page.html(html);
}
}
_loadStep(idx) {
// Get current step element
let curStep = this._getStepAnchor(this.current_index);
// Get step direction
let stepDirection = this._getStepDirection(idx);
// Get the direction of step navigation
if (this.current_index !== null) {
// Trigger "leaveStep" event
if (this._triggerEvent("leaveStep", [curStep, this.current_index, idx, stepDirection]) === false) {
return false;
}
}
// Get next step element
let selStep = this._getStepAnchor(idx);
// Get the content if used
let getStepContent = this._triggerEvent("stepContent", [selStep, idx, stepDirection]);
if (getStepContent) {
if (typeof getStepContent == "object") {
getStepContent.then((res) => {
this._setStepContent(idx, res);
this._transitStep(idx);
}).catch((err) => {
console.error(err);
this._setStepContent(idx, err);
this._transitStep(idx);
});
} else if (typeof getStepContent == "string") {
this._setStepContent(idx, getStepContent);
this._transitStep(idx);
} else {
this._transitStep(idx);
}
} else {
this._transitStep(idx);
}
}
_transitStep(idx) {
// Get step to show element
let selStep = this._getStepAnchor(idx);
// Change the url hash to new step
this._setURLHash(selStep.attr("href"));
// Update controls
this._setAnchor(idx);
// Get the direction of step navigation
let stepDirection = this._getStepDirection(idx);
// Get the position of step
let stepPosition = this._getStepPosition(idx);
// Animate the step
this._doStepAnimation(idx, () => {
// Fix height with content
this._fixHeight(idx);
// Trigger "showStep" event
this._triggerEvent("showStep", [selStep, this.current_index, stepDirection, stepPosition]);
});
// Update the current index
this.current_index = idx;
// Set the buttons based on the step
this._setButtons(idx);
}
_doStepAnimation(idx, callback) {
// Get current step element
let curPage = this._getStepPage(this.current_index);
// Get next step element
let selPage = this._getStepPage(idx);
// Get the animation
let animation = this.options.transition.animation.toLowerCase();
// Complete any ongoing animations
this._stopAnimations();
switch (animation) {
case 'slide-horizontal':
case 'slide-h':
// horizontal slide
var containerWidth = this.container.width();
var curLastLeft = containerWidth;
var nextFirstLeft = containerWidth * -2;
// Forward direction
if (idx > this.current_index) {
curLastLeft = containerWidth * -1;
nextFirstLeft = containerWidth;
}
// First load set the container width
if (this.current_index == null) {
this.container.height(selPage.outerHeight());
}
var css_pos, css_left;
if (curPage) {
css_pos = curPage.css("position");
css_left = curPage.css("left");
curPage.css("position", 'absolute')
.css("left", 0)
.animate({
left: curLastLeft
},
this.options.transition.speed,
this.options.transition.easing,
function() {
$(this).hide();
curPage.css("position", css_pos).css("left", css_left);
});
}
css_pos = selPage.css("position");
css_left = selPage.css("left");
selPage.css("position", 'absolute')
.css("left", nextFirstLeft)
.outerWidth(containerWidth)
.show()
.animate({
left: 0
},
this.options.transition.speed,
this.options.transition.easing,
() => {
selPage.css("position", css_pos).css("left", css_left);
callback();
});
break;
case 'slide-vertical':
case 'slide-v':
// vertical slide
var containerHeight = this.container.height();
var curLastTop = containerHeight;
var nextFirstTop = containerHeight * -2;
// Forward direction
if (idx > this.current_index) {
curLastTop = containerHeight * -1;
nextFirstTop = containerHeight;
}
var css_vpos, css_vtop;
if (curPage) {
css_vpos = curPage.css("position");
css_vtop = curPage.css("top");
curPage.css("position", 'absolute')
.css("top", 0)
.animate({
top: curLastTop
},
this.options.transition.speed,
this.options.transition.easing,
function() {
$(this).hide();
curPage.css("position", css_vpos).css("top", css_vtop);
});
}
css_vpos = selPage.css("position");
css_vtop = selPage.css("top");
selPage.css("position", 'absolute')
.css("top", nextFirstTop)
.show()
.animate({
top: 0
},
this.options.transition.speed,
this.options.transition.easing,
() => {
selPage.css("position", css_vpos).css("top", css_vtop);
callback();
});
break;
case 'slide-swing':
case 'slide-s':
// normal slide
if (curPage) {
curPage.slideUp('fast', this.options.transition.easing, () => {
selPage.slideDown(this.options.transition.speed, this.options.transition.easing, () => {
callback();
});
});
} else {
selPage.slideDown(this.options.transition.speed, this.options.transition.easing, () => {
callback();
});
}
break;
case 'fade':
// normal fade
if (curPage) {
curPage.fadeOut('fast', this.options.transition.easing, () => {
selPage.fadeIn('fast', this.options.transition.easing, () => {
callback();
});
});
} else {
selPage.fadeIn(this.options.transition.speed, this.options.transition.easing, () => {
callback();
});
}
break;
default:
if (curPage) {
curPage.hide();
}
selPage.show();
callback();
break;
}
}
_stopAnimations() {
this.pages.finish();
this.container.finish();
}
_setAnchor(idx) {
// Current step anchor > Remove other classes and add done class
this._resetCSSClass(this.current_index, "active");
if (this.options.anchorSettings.markDoneStep !== false && this.current_index !== null) {
this._setCSSClass(this.current_index, "done");
if (this.options.anchorSettings.removeDoneStepOnNavigateBack !== false && this._getStepDirection(idx) === 'backward') {
this._resetCSSClass(this.current_index, "done");
}
}
// Next step anchor > Remove other classes and add active class
this._resetCSSClass(idx, "done");
this._setCSSClass(idx, "active");
}
_setButtons(idx) {
// Previous/Next Button enable/disable based on step
if (!this.options.cycleSteps) {
this.main.find('.sw-btn-prev').removeClass("disabled");
this.main.find('.sw-btn-next').removeClass("disabled");
switch (this._getStepPosition(idx)) {
case 'first':
this.main.find('.sw-btn-prev').addClass("disabled");
break;
case 'last':
this.main.find('.sw-btn-next').addClass("disabled");
break;
default:
if (this._getNextShowable(idx) === false) {
this.main.find('.sw-btn-next').addClass("disabled");
}
if (this._getPreviousShowable(idx) === false) {
this.main.find('.sw-btn-prev').addClass("disabled");
}
break;
}
}
}
_getStepIndex() {
// Get selected step from the url
let idx = this._getURLHashIndex();
return (idx === false) ? this.options.selected : idx;
}
_setTheme(theme) {
this.main.removeClass(function (index, className) {
return (className.match (/(^|\s)sw-theme-\S+/g) || []).join(' ');
}).addClass('sw-theme-' + theme);
}
_setJustify(justified) {
if (justified === true) {
this.main.addClass('sw-justified');
} else {
this.main.removeClass('sw-justified');
}
}
_setDarkMode(darkMode) {
if (darkMode === true) {
this.main.addClass('sw-dark');
} else {
this.main.removeClass('sw-dark');
}
}
// HELPER FUNCTIONS
_keyNav(e) {
// Keyboard navigation
if ($.inArray(e.which, this.options.keyboardSettings.keyLeft) > -1) {
// left
this._showPrevious();
e.preventDefault();
} else if ($.inArray(e.which, this.options.keyboardSettings.keyRight) > -1) {
// right
this._showNext();
e.preventDefault();
} else {
return; // exit this handler for other keys
}
}
_fixHeight(idx) {
// Auto adjust height of the container
if (this.options.autoAdjustHeight) {
let selPage = this._getStepPage(idx);
this.container.finish()
.animate({
height: selPage.outerHeight()
},
this.options.transition.speed
);
}
}
_triggerEvent(name, params) {
// Trigger an event
var e = $.Event(name);
this.main.trigger(e, params);
if (e.isDefaultPrevented()) {
return false;
}
return e.result;
}
_setURLHash(hash) {
if (this.options.enableURLhash && window.location.hash !== hash) {
history.pushState(null,null,hash);
}
}
_getURLHashIndex() {
if (this.options.enableURLhash) {
// Get step number from url hash if available
var hash = window.location.hash;
if (hash.length > 0) {
var elm = this.nav.find("a[href*='" + hash + "']");
if (elm.length > 0) {
return this.steps.index(elm);
}
}
}
return false;
}
_loader(action) {
switch (action) {
case 'show':
this.main.addClass('sw-loading');
break;
case 'hide':
this.main.removeClass('sw-loading');
break;
default:
this.main.toggleClass('sw-loading');
}
}
_showError(msg) {
console.error(msg);
}
// PUBLIC FUNCTIONS
goToStep(stepIndex) {
this._showStep(stepIndex);
}
next() {
this._showNext();
}
prev() {
this._showPrevious();
}
reset() {
// Reset all
this._setURLHash('#');
this._initOptions();
this._initLoad();
}
stepState(stepArray, state) {
if (!stepArray) {
return false;
}
switch (state) {
case 'disable':
this._setCSSClass(stepArray, 'disabled');
break;
case 'enable':
this._resetCSSClass(stepArray, 'disabled');
break;
case 'hide':
this._setCSSClass(stepArray, 'hidden');
break;
case 'show':
this._resetCSSClass(stepArray, 'hidden');
break;
case 'error-on':
this._setCSSClass(stepArray, 'danger');
break;
case 'error-off':
this._resetCSSClass(stepArray, 'danger');
break;
}
}
setOptions(options) {
this.options = $.extend(true, {}, this.options, options);
this._initOptions();
}
getStepIndex() {
return this.current_index;
}
loader(state) {
if (state === "show") {
this.main.addClass('sw-loading');
} else {
this.main.removeClass('sw-loading');
}
}
}
// Wrapper for the plugin
$.fn.smartWizard = function (options) {
if (options === undefined || typeof options === 'object') {
return this.each(function () {
if (!$.data(this, "smartWizard")) {
$.data(this, "smartWizard", new SmartWizard(this, options));
}
});
} else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
let instance = $.data(this[0], 'smartWizard');
if (options === 'destroy') {
$.data(this, 'smartWizard', null);
}
if (instance instanceof SmartWizard && typeof instance[options] === 'function') {
return instance[options].apply(instance, Array.prototype.slice.call(arguments, 1));
} else {
return this;
}
}
};
}));

View File

@ -0,0 +1,136 @@
$breakpoint-phone: 640px;
.sw {
position: relative;
*,
*::before,
*::after {
box-sizing: border-box; // 1
}
& > .tab-content {
position: relative;
overflow: hidden;
}
// Toolbar style
& .toolbar {
padding: .8rem;
& > .btn {
display: inline-block;
text-decoration: none;
text-align: center;
text-transform: none;
vertical-align: middle;
user-select: none;
margin-left: .2rem;
margin-right: .2rem;
cursor: pointer;
&.disabled, &:disabled {
opacity: .65;
}
}
}
& > .nav {
display: flex;
flex-wrap: wrap;
list-style: none;
padding-left: 0;
margin-top: 0;
margin-bottom: 0;
@media screen and (max-width: $breakpoint-phone) {
flex-direction: column!important;
flex: 1 auto;
}
.nav-link {
display: block;
padding: .5rem 1rem;
text-decoration: none;
&:hover,
&:active,
&:focus {
text-decoration: none;
}
&::-moz-focus-inner {
border: 0!important;;
}
&.disabled {
color: #ccc !important;
pointer-events: none;
cursor: default;
}
&.hidden {
display: none !important;
}
}
}
// Justified navigation style
&.sw-justified {
& > .nav {
& > li, .nav-link {
flex-basis: 0;
flex-grow: 1;
text-align: center;
}
}
}
// Dark mode style
&.sw-dark {
color: rgba(255, 255, 255, 0.95);
background: #000;
}
// Loading animation
&.sw-loading {
user-select: none;
&::after {
content: "";
display: block;
position: absolute;
opacity: 1;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: rgba(255,255,255,.7);
z-index: 2;
transition: all .2s ease;
}
&::before {
content: '';
display: inline-block;
position: absolute;
top: 45%;
left: 45%;
width: 2rem;
height: 2rem;
border: 10px solid #f3f3f3;
border-top: 10px solid #3498db;
border-radius: 50%;
z-index: 10;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
}
}

View File

@ -0,0 +1,19 @@
/*!
* jQuery SmartWizard v5
* jQuery Wizard Plugin
* http://www.techlaboratory.net/smartwizard
*
* Created by Dipu Raj
* http://dipu.me
*
* Licensed under the terms of MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/
@charset 'utf-8';
/* SmartWizard Base Styles */
@import 'core/_base';
/* SmartWizard Theme: Default */
@import 'themes/_default';

View File

@ -0,0 +1,28 @@
/*!
* jQuery SmartWizard v5
* jQuery Wizard Plugin
* http://www.techlaboratory.net/smartwizard
*
* Created by Dipu Raj
* http://dipu.me
*
* Licensed under the terms of MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/
@charset 'utf-8';
/* SmartWizard Base Styles */
@import 'core/_base';
/* SmartWizard Theme: Default */
@import 'themes/_default';
/* SmartWizard Theme: Arrows */
@import 'themes/_arrows';
/* SmartWizard Theme: Dots */
@import 'themes/_dots';
/* SmartWizard Theme: Progress */
@import 'themes/_progress';

View File

@ -0,0 +1,19 @@
/*!
* jQuery SmartWizard v5
* jQuery Wizard Plugin
* http://www.techlaboratory.net/smartwizard
*
* Created by Dipu Raj
* http://dipu.me
*
* Licensed under the terms of MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/
@charset 'utf-8';
/* SmartWizard Base Styles */
@import 'core/_base';
/* SmartWizard Theme: Arrows */
@import 'themes/_arrows';

View File

@ -0,0 +1,19 @@
/*!
* jQuery SmartWizard v5
* jQuery Wizard Plugin
* http://www.techlaboratory.net/smartwizard
*
* Created by Dipu Raj
* http://dipu.me
*
* Licensed under the terms of MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/
@charset 'utf-8';
/* SmartWizard Base Styles */
@import 'core/_base';
/* SmartWizard Theme: Dots */
@import 'themes/_dots';

View File

@ -0,0 +1,19 @@
/*!
* jQuery SmartWizard v5
* jQuery Wizard Plugin
* http://www.techlaboratory.net/smartwizard
*
* Created by Dipu Raj
* http://dipu.me
*
* Licensed under the terms of MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/
@charset 'utf-8';
/* SmartWizard Base Styles */
@import 'core/_base';
/* SmartWizard Theme: Progress */
@import 'themes/_progress';

View File

@ -0,0 +1,227 @@
// Color Settings
$container-border-color : #eeeeee;
$toolbar-text-color : #ffffff;
$toolbar-bg-color : #f9f9f9;
$toolbar-btn-bg-color : #17a2b8;
$nav-border-color : #eeeeee;
$nav-active-primary-color : #5bc0de;
$nav-active-secondary-color : #ffffff;
$nav-inactive-primary-color : #f8f8f8;
$nav-inactive-secondary-color : #999999;
$nav-done-primary-color : #5cb85c;
$nav-done-secondary-color : #ffffff;
$nav-disabled-primary-color : #f9f9f9;
$nav-disabled-secondary-color : #eeeeee;
$nav-danger-primary-color : #d9534f;
$nav-danger-secondary-color : #ffffff;
.sw-theme-arrows {
border: 1px solid $container-border-color;
// Content style
& > .tab-content {
& > .tab-pane {
padding: 10px;
}
}
// Toolbar style
& .toolbar {
& > .btn {
color: $toolbar-text-color;
background-color: $toolbar-btn-bg-color;
border: 1px solid $toolbar-btn-bg-color;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400;
}
}
// Navigation style
& > .nav {
overflow: hidden;
border-bottom: 1px solid $container-border-color;
.nav-link {
position: relative;
height: 100%;
min-height: 100%;
margin-right: 30px;
margin-left: -30px;
padding-left: 40px;
@media screen and (max-width: $breakpoint-phone) {
overflow: hidden;
margin-bottom: 1px;
margin-right: unset;
}
&::after {
content: "";
position: absolute;
display: block;
width: 0;
height: 0;
top: 50%;
left: 100%;
margin-top: -50px;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
border-left: 30px solid $nav-inactive-primary-color;
z-index: 2;
}
&::before {
content: " ";
position: absolute;
display: block;
width: 0;
height: 0;
top: 50%;
left: 100%;
margin-top: -50px;
margin-left: 1px;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
border-left: 30px solid $nav-border-color;
z-index: 1;
}
&.inactive {
color: $nav-inactive-secondary-color;
border-color: $nav-inactive-primary-color;
background: $nav-inactive-primary-color;
cursor: not-allowed;
}
&.active {
color: $nav-active-secondary-color ;
border-color: $nav-active-primary-color ;
background: $nav-active-primary-color;
cursor: pointer;
&::after {
border-left-color: $nav-active-primary-color;
}
}
&.done {
color: $nav-done-secondary-color;
border-color: $nav-done-primary-color;
background: $nav-done-primary-color;
cursor: pointer;
&::after {
border-left-color: $nav-done-primary-color;
}
}
&.disabled {
color: $nav-disabled-secondary-color;
border-color: $nav-disabled-primary-color;
background: $nav-disabled-primary-color;
cursor: not-allowed;
&::after {
border-left-color: $nav-disabled-primary-color;
}
}
&.danger {
color: $nav-danger-secondary-color;
border-color: $nav-danger-primary-color;
background: $nav-danger-primary-color;
cursor: pointer;
&::after {
border-left-color: $nav-danger-primary-color;
}
}
}
}
// Dark mode style
&.sw-dark {
color: rgba(255, 255, 255, 0.95);
background: #000;
& > .nav {
border-bottom: 1px solid darken($container-border-color, 60%);
.nav-link {
&::after {
border-left: 30px solid darken($nav-inactive-primary-color, 60%);
}
&::before {
border-left: 30px solid darken($nav-border-color, 60%);
}
&.inactive {
color: lighten($nav-inactive-secondary-color, 50%);
border-color: darken($nav-inactive-primary-color, 60%);
background: darken($nav-inactive-primary-color, 60%);
&::after {
border-left-color: darken($nav-inactive-primary-color, 60%);
}
}
&.active {
color: lighten($nav-active-secondary-color, 50%);
border-color: darken($nav-active-primary-color, 60%);
background: darken($nav-active-primary-color, 50%);
&::after {
border-left-color: darken($nav-active-primary-color, 50%);
}
}
&.done {
color: lighten($nav-done-secondary-color, 50%);
border-color: darken($nav-done-primary-color, 60%);
background: darken($nav-done-primary-color, 60%);
&::after {
border-left-color: darken($nav-done-primary-color, 60%);
}
}
&.disabled {
color: darken($nav-disabled-secondary-color, 60%) !important;
border-color: $nav-disabled-primary-color;
background: darken($nav-disabled-primary-color, 70%);
&::after {
border-left-color: darken($nav-disabled-primary-color, 70%);
}
}
&.danger {
color: $nav-danger-secondary-color;
border-color: $nav-danger-primary-color;
background: $nav-danger-primary-color;
&::after {
border-left-color: $nav-danger-primary-color;
}
}
}
}
}
}

View File

@ -0,0 +1,116 @@
// Color Settings
$container-border-color : #eeeeee;
$toolbar-bg-color : rgba(0,0,0,.03);
$toolbar-btn-bg-color : #17a2b8;
$nav-active-primary-color : #17a2b8; // #17a2b8 #5bc0de
$nav-active-secondary-color : #ffffff;
$nav-inactive-primary-color : #f8f8f8;
$nav-inactive-secondary-color : #999999;
$nav-done-primary-color : #5cb85c;
$nav-done-secondary-color : #ffffff;
$nav-disabled-primary-color : #dddddd;
$nav-disabled-secondary-color : #eeeeee;
$nav-danger-primary-color : #d9534f;
$nav-danger-secondary-color : #ffffff;
.sw-theme-default {
border: 1px solid $container-border-color;
// Content style
& > .tab-content {
& > .tab-pane {
padding: 10px;
}
}
// Toolbar style
& .toolbar {
& > .btn {
color: #fff;
background-color: $toolbar-btn-bg-color;
border: 1px solid $toolbar-btn-bg-color;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400;
}
}
// Navigation style
& > .nav {
box-shadow: 0 .125rem .25rem rgba(0,0,0,.1)!important;
.nav-link {
position: relative;
height: 100%;
min-height: 100%;
&::after {
content: "";
position: absolute;
height: 2px;
width: 0;
left: 0px;
bottom: -1px;
background: $nav-inactive-secondary-color;
transition: all .35s ease .15s;
}
&.inactive {
color: $nav-inactive-secondary-color;
cursor: not-allowed;
}
&.active {
color: $nav-active-primary-color !important;
cursor: pointer;
&::after {
background: $nav-active-primary-color !important;
width: 100%;
}
}
&.done {
color: $nav-done-primary-color !important;
cursor: pointer;
&::after {
background: $nav-done-primary-color;
width: 100%;
}
}
&.disabled {
color: $nav-disabled-primary-color !important;
cursor: not-allowed;
&::after {
background: $nav-disabled-primary-color;
width: 100%;
}
}
&.danger {
color: $nav-danger-primary-color !important;
cursor: pointer;
&::after {
background: $nav-danger-primary-color;
width: 100%;
}
}
}
}
}

View File

@ -0,0 +1,174 @@
// Color Settings
$container-border-color : #eeeeee;
$toolbar-text-color : #ffffff;
$toolbar-bg-color : #f9f9f9;
$toolbar-btn-bg-color : #17a2b8;
$nav-line-text-color : #428bca;
$nav-line-bg-color : #f5f5f5;
$nav-active-primary-color : #5bc0de;
$nav-active-secondary-color : #ffffff;
$nav-inactive-primary-color : #f8f8f8;
$nav-inactive-secondary-color : #999999;
$nav-done-primary-color : #5cb85c;
$nav-done-secondary-color : #ffffff;
$nav-disabled-primary-color : #f9f9f9;
$nav-disabled-secondary-color : #eeeeee;
$nav-danger-primary-color : #d9534f;
$nav-danger-secondary-color : #ffffff;
.sw-theme-dots {
// Content style
& > .tab-content {
& > .tab-pane {
padding: 10px;
}
}
// Toolbar style
& .toolbar {
& > .btn {
color: $toolbar-text-color;
background-color: $toolbar-btn-bg-color;
border: 1px solid $toolbar-btn-bg-color;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400;
}
}
// Navigation style
& > .nav {
position: relative;
margin-bottom: 10px;
&::before {
content: " ";
position: absolute;
top: 18px;
left: 0;
width: 100%;
height: 5px;
background-color: $container-border-color;
border-radius: 3px;
z-index: 1;
}
.nav-link {
position: relative;
margin-top: 40px;
&::before {
content: " ";
position: absolute;
display: block;
top: -36px;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
width: 32px;
height: 32px;
border-radius: 50%;
border: none;
background: $nav-line-bg-color;
color: $nav-line-text-color;
text-decoration: none;
z-index: 98;
}
&::after {
content: " ";
position: absolute;
display: block;
top: -28px;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
width: 16px;
height: 16px;
border-radius: 50%;
z-index: 99;
}
&.inactive {
color: $nav-inactive-secondary-color;
cursor: not-allowed;
&::after {
background-color: $nav-inactive-secondary-color;
}
}
&.active {
color: $nav-active-primary-color !important;
cursor: pointer;
&::after {
background-color: $nav-active-primary-color !important;
}
}
&.done {
color: $nav-done-primary-color;
cursor: pointer;
&::after {
background-color: $nav-done-primary-color;
}
}
&.disabled {
color: $nav-disabled-primary-color;
cursor: not-allowed;
&::after {
background-color: $nav-disabled-primary-color;
}
}
&.danger {
color: $nav-danger-primary-color;
cursor: pointer;
&::after {
background-color: $nav-danger-primary-color;
}
}
}
}
// Dark mode style
&.sw-dark {
color: rgba(255, 255, 255, 0.95);
background: #000;
& > .nav {
&::before {
background-color: darken($container-border-color, 70%);
}
.nav-link {
&::before {
background: darken($nav-line-bg-color, 70%);
color: darken($nav-line-text-color, 70%);
}
}
}
}
}

View File

@ -0,0 +1,164 @@
// Color Settings
$container-border-color : #eeeeee;
$toolbar-text-color : #ffffff;
$toolbar-bg-color : #f9f9f9;
$toolbar-btn-bg-color : #17a2b8;
$nav-active-primary-color : #ffffff; // #17a2b8 #5bc0de
$nav-active-secondary-color : #5cb85c;
$nav-inactive-primary-color : #f8f8f8;
$nav-inactive-secondary-color : #999999;
$nav-done-primary-color : #ffffff;
$nav-done-secondary-color : #5cb85c;
$nav-disabled-primary-color : #dddddd;
$nav-disabled-secondary-color : #f9f9f9;
$nav-danger-primary-color : #ffffff;
$nav-danger-secondary-color : #d9534f;
.sw-theme-progress {
border: 1px solid $container-border-color;
// Content style
& > .tab-content {
& > .tab-pane {
padding: 10px;
}
}
// Toolbar style
& .toolbar {
& > .btn {
color: $toolbar-text-color;
background-color: $toolbar-btn-bg-color;
border: 1px solid $toolbar-btn-bg-color;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400;
}
}
// Navigation style
& > .nav {
box-shadow: 0 .125rem .25rem rgba(0,0,0,.1)!important;
.nav-link {
position: relative;
height: 100%;
min-height: 100%;
background: transparent;
overflow: hidden;
z-index: 2;
&::after {
content: "";
position: absolute;
height: 150%;
width: 0;
left: 0;
top: 0;
background: $nav-active-primary-color;
z-index: -1;
transition: all .35s ease .10s;
}
&.inactive {
color: $nav-inactive-secondary-color;
cursor: not-allowed;
}
&.active {
color: $nav-active-primary-color !important;
cursor: pointer;
&::after {
background-color: $nav-active-secondary-color;
width: 100%;
}
}
&.done {
color: $nav-done-primary-color !important;
cursor: pointer;
&::after {
background: $nav-done-secondary-color;
width: 100%;
}
}
&.disabled {
color: $nav-disabled-primary-color !important;
cursor: not-allowed;
&::after {
background: $nav-disabled-secondary-color;
width: 100%;
}
}
&.danger {
color: $nav-danger-primary-color !important;
cursor: pointer;
&::after {
background: $nav-danger-secondary-color;
width: 100%;
}
}
}
}
// Dark mode style
&.sw-dark {
color: rgba(255, 255, 255, 0.95);
& > .nav {
.nav-link {
&.active {
color: lighten($nav-active-primary-color, 10%);
&::after {
background-color: #333;
}
}
&.done {
color: $nav-done-primary-color !important;
&::after {
background: #333;
}
}
&.disabled {
color: darken($nav-disabled-primary-color, 70%) !important;
&::after {
background: darken($nav-disabled-secondary-color, 70%);
}
}
&.danger {
color: $nav-danger-primary-color !important;
&::after {
background: $nav-danger-secondary-color;
}
}
}
}
}
}

View File

@ -0,0 +1,50 @@
<!DOCTYPE html>
<html>
<head>
<title>jQuery Smart Wizard test file</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div id="smartwizard">
<ul class="nav">
<li class="nav-item">
<a class="nav-link" href="#step-1">
<strong>Step 1</strong> This is step description
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#step-2">
<strong>Step 2</strong> This is step description
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#step-3">
<strong>Step 3</strong> This is step description
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#step-4">
<strong>Step 4</strong> This is step description
</a>
</li>
</ul>
<div class="tab-content">
<div id="step-1" class="tab-pane" role="tabpanel" aria-labelledby="step-1">
Step 1 Content
</div>
<div id="step-2" class="tab-pane" role="tabpanel" aria-labelledby="step-2">
Step 2 Content
</div>
<div id="step-3" class="tab-pane" role="tabpanel" aria-labelledby="step-3">
Step 3 Content
</div>
<div id="step-4" class="tab-pane" role="tabpanel" aria-labelledby="step-4">
Step 4 Content
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,57 @@
describe('SmartWizard Default Options', function() {
var el;
beforeEach(function(){
jasmine.getFixtures().fixturesPath = 'base/test';
loadFixtures('test-template.html');
el = $('#smartwizard');
el.smartWizard();
});
afterEach(function(){
el.remove();
el = null;
});
it('should add default class to the element', function() {
expect(el).toHaveClass("sw");
});
it('should add default theme to the element', function() {
expect(el).toHaveClass("sw-theme-default");
});
it('should add toolbar elements', function() {
expect(el.find('.toolbar')).toExist();
expect(el.find('.toolbar').find('.sw-btn-next')).toExist();
expect(el.find('.toolbar').find('.sw-btn-prev')).toExist();
});
});
describe('SmartWizard Navigation', function() {
var el;
beforeEach(function(){
jasmine.getFixtures().fixturesPath = 'base/test';
loadFixtures('test-template.html');
el = $('#smartwizard');
el.smartWizard();
});
afterEach(function(){
el.remove();
el = null;
});
it('should show the first step', function() {
expect(el.find('.nav').find('.nav-link').first()).toHaveClass("active");
});
it('should not show other steps', function() {
expect(el.find('.nav').find('.nav-link:not(:first)')).not.toHaveClass("active");
});
});