Commit 30681048 authored by Jon Phillips's avatar Jon Phillips
Browse files

added some changes

parent 9bd82a26
Twitter Bootstrap Wizard
============================
This Twitter Bootstrap plugin builds a wizard using a formatted tabbable structure. It allows to build a wizard functionality using buttons to go through the different wizard steps and using events allows to hook into each step individually.
<a href="http://vadimg.com/twitter-bootstrap-wizard-example/" target="_blank">Website & Demo</a>
<a href='https://twitter.com/gabrielva' target='_blank'>Follow @gabrielva</a>
Requirements
-------------
* Requires jQuery v1.3.2 or later
* Bootstrap 2.2.x, 2.3.x, 3.0
Code Examples
-------------
```javascript
//basic wizard
$(document).ready(function() {
$('#rootwizard').bootstrapWizard();
});
```
```javascript
//wizard with options and events
$(document).ready(function() {
$('#rootwizard').bootstrapWizard({
tabClass: 'nav nav-pills',
onNext: function(tab, navigation, index) {
alert('next');
}
});
});
```
```javascript
//calling a method
$('#rootwizard').bootstrapWizard('show',3);
```
Options
-------
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Key</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>tabClass</td>
<td>'nav nav-pills'</td>
<td>ul navigation class</td>
</tr>
<tr>
<td>nextSelector</td>
<td>'.wizard li.next'</td>
<td>next element selector</td>
</tr>
<tr>
<td>previousSelector</td>
<td>'.wizard li.previous'</td>
<td>previous element selector</td>
</tr>
<tr>
<td>firstSelector</td>
<td>'.wizard li.first'</td>
<td>first element selector</td>
</tr>
<tr>
<td>lastSelector</td>
<td>'.wizard li.last'</td>
<td>last element selector</td>
</tr>
</tbody>
</table>
Events
------
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Key</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>onInit</td>
<td>Fired when plugin is initialized</td>
</tr>
<tr>
<td>onShow</td>
<td>Fired when plugin data is shown</td>
</tr>
<tr>
<td>onNext</td>
<td>Fired when next button is clicked (return false to disable moving to the next step)</td>
</tr>
<tr>
<td>onPrevious</td>
<td>Fired when previous button is clicked (return false to disable moving to the previous step)</td>
</tr>
<tr>
<td>onFirst</td>
<td>Fired when first button is clicked (return false to disable moving to the first step)</td>
</tr>
<tr>
<td>onLast</td>
<td>Fired when last button is clicked (return false to disable moving to the last step)</td>
</tr>
<tr>
<td>onTabChange</td>
<td>Fired when a tab is changed (return false to disable moving to that tab and showing its contents)</td>
</tr>
<tr>
<td>onTabClick</td>
<td>Fired when a tab is clicked (return false to disable moving to that tab and showing its contents)</td>
</tr>
<tr>
<td>onTabShow</td>
<td>Fired when a tab content is shown (return false to disable showing that tab content)</td>
</tr>
</tbody>
</table>
Methods
-------
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Key</th>
<th>Parameters</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td></td>
<td>Moves to the next tab</td>
</tr>
<tr>
<td>previous</td>
<td></td>
<td>Moves to the previous tab</td>
</tr>
<tr>
<td>first</td>
<td></td>
<td>Jumps to the first tab</td>
</tr>
<tr>
<td>last</td>
<td></td>
<td>Jumps to the last tab</td>
</tr>
<tr>
<td>show</td>
<td>zero based index</td>
<td>Jumps to the specified tab</td>
</tr>
<tr>
<td>currentIndex</td>
<td></td>
<td>Returns the zero based index number for the current tab</td>
</tr>
<tr>
<td>navigationLength</td>
<td></td>
<td>Returns the number of tabs</td>
</tr>
<tr>
<td>enable</td>
<td>zero based index</td>
<td>Enables a tab, allows a user to click it (removes .disabled if the item has that class)</td>
</tr>
<tr>
<td>disable</td>
<td>zero based index</td>
<td>Disables a tab, disallows a user to click it (adds .disabled to the li element)</td>
</tr>
<tr>
<td>display</td>
<td>zero based index</td>
<td>Displays the li element if it was previously hidden</td>
</tr>
<tr>
<td>hide</td>
<td>zero based index</td>
<td>Hides the li element (will not remove it from the DOM)</td>
</tr>
<tr>
<td>remove</td>
<td>zero based index, optinal bool remove tab-pane element or not false by default</td>
<td>Removes the li element from the DOM if second argument is true will also remove the tab-pane element</td>
</tr>
</tbody>
</table>
<p>&copy; <a href='http://vadimg.com' target="_blank">Vadim Vincent Gabriel</a> <a href='https://twitter.com/gabrielva' target='_blank'>Follow @gabrielva</a> 2012</p>
License
===============
The MIT License (MIT)
Copyright (c) 2013 - Vincent Gabriel & Jason Gill
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.
Contributor License Agreement Chooser
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<title>Twitter Bootstrap Wizard</title>
<meta charset="utf-8">
<title>Contributor License Agreement Chooser</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Twitter Bootstrap Wizard Plugin">
<meta name="author" content="Vincent Gabriel">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="/favicon.png">
<!-- Bootstrap -->
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
<style type="text/css">
body {
padding-top: 60px;
padding-bottom: 40px;
}
.sidebar-nav {
padding: 9px 0;
}
</style>
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="/prettify.css" rel="stylesheet">
<link href="/css/style.css" rel="stylesheet">
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="#">Twitter Bootstrap Wizard</a>
<div class="nav-collapse collapse">
<p class="navbar-text pull-right">
<a href="http://twitter.com/gabrielva" class="navbar-link">@gabrielva</a>
</p>
<ul class="nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#examples">Examples</a></li>
<li><a href="#docs">Documentation</a></li>
<li><a href="#demo">Demo</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<div class="hero-unit">
<h1>Twitter Bootstrap Wizard Plugin</h1>
<p>This twitter bootstrap plugin builds a wizard out of a formatter tabbable structure. It allows to build a wizard functionality using buttons to go through the different wizard steps and using events allows to hook into each step individually.</p>
<p><a class="btn btn-primary btn-large" href="https://github.com/VinceG/twitter-bootstrap-wizard" target="_blank">Fork It &raquo;</a></p>
</div>
<div class="row-fluid">
<div class="row-fluid">
<div class='container'>
<div class="span12">
<section id="wizard">
<div class="page-header">
<h1>Contributor License Agreement Chooser</h1>
<p>Please enter information below in order to build your
Contributor License Agreement. <a href="mailto:support@contributoragreements.org">support@contributoragreements.org</a></p>
</div>
<div class="span12">
<a name="examples"></a>
<h2>Examples</h2>
<p>Following are just a set of examples using this plugin.</p>
<ul>
<li><a href="examples/basic.html">Basic Usage</a></li>
<li><a href="examples/basic-pills.html">Basic Pills Usage</a></li>
<li><a href="examples/basic-inverse.html">Basic Inverse Usage</a></li>
<li><a href="examples/basic-tabsleft.html">Basic Tabs Left Usage</a></li>
<li><a href="examples/basic-custombuttons.html">Wizard With Custom Next/Previous Buttons</a></li>
<li><a href="examples/basic-custombuttonsfirstlast.html">Wizard With Custom Next/Previous Buttons & First and Last buttons</a></li>
<li><a href="examples/basic-progressbar.html">Wizard With Progress Bar using events</a></li>
<li><a href="examples/basic-formvalidation.html">Wizard With Form Validation</a></li>
<li><a href="examples/basic-disabletabclick.html">Wizard With Disabled Tab Click</a></li>
<li><a href="examples/basic-finishbutton.html">Wizard With Finish Button On last tab</a></li>
<li><a href="examples/multiple.html">Multiple Wizards</a></li>
<li><a href="examples/remove-step.html">Disabling/Enabling/Showing/Hiding/Removing Steps</a></li>
<li><a href="examples/validation.html">jQuery Validation Plugin With Step Validation</a></li>
</ul>
</div><!--/span-->
<div class="span11">
<a name="docs"></a>
<h2>Documentation</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Key</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>tabClass</td>
<td>nav nav-pills</td>
<td>ul navigation class</td>
</tr>
<tr>
<td>nextSelector</td>
<td>.wizard li.next</td>
<td>next element selector</td>
</tr>
<tr>
<td>previousSelector</td>
<td>.wizard li.previous</td>
<td>previous element selector</td>
</tr>
<tr>
<td>firstSelector</td>
<td>.wizard li.first</td>
<td>first element selector</td>
</tr>
<tr>
<td>lastSelector</td>
<td>.wizard li.last</td>
<td>last element selector</td>
</tr>
<tr>
<td>onInit</td>
<td>null</td>
<td>Fired when plugin is initialized</td>
</tr>
<tr>
<td>onShow</td>
<td>null</td>
<td>Fired when plugin data is shown</td>
</tr>
<tr>
<td>onNext</td>
<td>null</td>
<td>Fired when next button is clicked (return false to disable moving to the next step)</td>
</tr>
<tr>
<td>onPrevious</td>
<td>null</td>
<td>Fired when previous button is clicked (return false to disable moving to the previous step)</td>
</tr>
<tr>
<td>onFirst</td>
<td>null</td>
<td>Fired when first button is clicked (return false to disable moving to the first step)</td>
</tr>
<tr>
<td>onLast</td>
<td>null</td>
<td>Fired when last button is clicked (return false to disable moving to the last step)</td>
</tr>
<tr>
<td>onTabClick</td>
<td>null</td>
<td>Fired when a tab is clicked (return false to disable moving to that tab and showing it's contents)</td>
</tr>
<tr>
<td>onTabShow</td>
<td>null</td>
<td>Fired when a tab content is shown (return false to disable showing that tab content)</td>
</tr>
</tbody>
</table>
</div><!--/span-->
<div class="span11">
<a name="demo"></a>
<h2>Demo</h2>
<p>Basic Demo Example.</p>
<div id="rootwizard">
<div id="rootwizard">
<div class="navbar">
<div class="navbar-inner">
<div class="container">
<ul>
<li><a href="#tab1" data-toggle="tab">First</a></li>
<li><a href="#tab2" data-toggle="tab">Second</a></li>
<li><a href="#tab3" data-toggle="tab">Third</a></li>
<li><a href="#tab4" data-toggle="tab">Forth</a></li>
<li><a href="#tab5" data-toggle="tab">Fifth</a></li>
<li><a href="#tab6" data-toggle="tab">Sixth</a></li>
<li><a href="#tab7" data-toggle="tab">Seventh</a></li>
<li><a href="#tab1" data-toggle="tab">General</a></li>
<li><a href="#tab2" data-toggle="tab">Copyright</a></li>
<li><a href="#tab3" data-toggle="tab">Patents</a></li>
<li><a href="#tab4" data-toggle="tab">Review</a></li>
</ul>
</div>
</div>
......@@ -186,61 +42,151 @@
</div>
<div class="tab-content">
<div class="tab-pane" id="tab1">
1
<input type='text' name='name' id='name' placeholder='Project Name'>
<input type='text' name='name' id='name' placeholder='Project Website'>
<input type='text' name='name' id='name' placeholder='Project Email'>
<label for="exampleInputFile">Electronic Signature</label>
<input type="file" id="exampleInputFile">
<br /><br />
<div class="field">
<label for="agreement_media">In what jurisdiction is this agreement to be valid?</label><br />
<select size=3 id="jurisdiction" name="jurisdiction[]">
<option value="GFDL-1.1">United States</option>
<option value="GFDL-1.2">Canada</option>
</select>
</div>
</div>
<div class="tab-pane" id="tab2">
2
<div class="field">
<label for="agreement_grant">Which style of contributor agreement would you like?</label><br />
<select id="agreement_grant" name="agreement[grant]"><option value="cla">copyright license (CLA)</option>
<option value="caa">copyright assignment (CAA)</option></select>
</div>
<div class="field">
<label for="agreement_option">Choose an outbound license option:</label><br />
<select id="agreement_option" name="agreement[option]"><option value="1">current license</option>
<option value="2">list of licenses (choose below)</option>
<option value="3">any OSI approved license</option>
<option value="4">any FSF recommended copyleft license</option>
<option value="5">any license</option></select>
</div>
<div class="field">
<select multiple size=3 id="outboundlist" name="outboundlist[]">
<option value="Apache-2.0">Apache License 2.0</option>
<option value="Artistic-1.0">Artistic License 1.0</option>
<option value="Artistic-2.0">Artistic License 2.0</option>
<option value="BSD-2-Clause">BSD "Simplified" License</option>
<option value="BSD-3-Clause">BSD "Revised" License</option>
<option value="CDDL-1.0">Common Development and Distribution License 1.0</option>
<option value="EPL-1.0">Eclipse Public License 1.0</option>
<option value="GPL-2.0">GNU General Public License v2.0</option>
<option value="GPL-3.0">GNU General Public License v3.0</option>
<option value="LGPL-2.0">GNU Lesser General Public License v2.0</option>
<option value="LGPL-2.1">GNU Lesser General Public License v2.1</option>
<option value="LGPL-3.0">GNU Lesser General Public License v3.0</option>
<option value="AGPL-3.0">GNU Affero General Public License v3.0</option>
<option value="MIT">MIT License</option>
<option value="MPL-1.1">Mozilla Public License 1.1</option>
</select>
</div>
<div class="field">
<label for="agreement_media">Would you like to add a media license?</label><br />
<select multiple size=3 id="medialist" name="medialist[]">
<option value="GFDL-1.1">GNU Free Documentation License v1.1</option>
<option value="GFDL-1.2">GNU Free Documentation License v1.2</option>
<option value="GFDL-1.3">GNU Free Documentation License v1.3</option>
<option value="CC-BY-1.0">Creative Commons Attribution 1.0</option>
<option value="CC-BY-2.0">Creative Commons Attribution 2.0</option>
<option value="CC-BY-2.5">Creative Commons Attribution 2.5</option>
<option value="CC-BY-3.0">Creative Commons Attribution 3.0</option>
<option value="CC-BY-ND-1.0">Creative Commons Attribution No Derivatives 1.0</option>
<option value="CC-BY-ND-2.0">Creative Commons Attribution No Derivatives 2.0</option>
<option value="CC-BY-ND-2.5">Creative Commons Attribution No Derivatives 2.5</option>
<option value="CC-BY-ND-3.0">Creative Commons Attribution No Derivatives 3.0</option>
<option value="CC-BY-NC-1.0">Creative Commons Attribution Non Commercial 1.0</option>
<option value="CC-BY-NC-2.0">Creative Commons Attribution Non Commercial 2.0</option>
<option value="CC-BY-NC-2.5">Creative Commons Attribution Non Commercial 2.5</option>
<option value="CC-BY-NC-3.0">Creative Commons Attribution Non Commercial 3.0</option>
<option value="CC-BY-NC-ND-1.0">Creative Commons Attribution Non Commercial No Derivatives 1.0</option>
<option value="CC-BY-NC-ND-2.0">Creative Commons Attribution Non Commercial No Derivatives 2.0</option>
<option value="CC-BY-NC-ND-2.5">Creative Commons Attribution Non Commercial No Derivatives 2.5</option>
<option value="CC-BY-NC-ND-3.0">Creative Commons Attribution Non Commercial No Derivatives 3.0</option>
<option value="CC-BY-NC-SA-1.0">Creative Commons Attribution Non Commercial Share Alike 1.0</option>
<option value="CC-BY-NC-SA-2.0">Creative Commons Attribution Non Commercial Share Alike 2.0</option>
<option value="CC-BY-NC-SA-2.5">Creative Commons Attribution Non Commercial Share Alike 2.5</option>
<option value="CC-BY-NC-SA-3.0">Creative Commons Attribution Non Commercial Share Alike 3.0</option>
<option value="CC-BY-SA-1.0">Creative Commons Attribution Share Alike 1.0</option>
<option value="CC-BY-SA-2.0">Creative Commons Attribution Share Alike 2.0</option>
<option value="CC-BY-SA-2.5">Creative Commons Attribution Share Alike 2.5</option>
<option value="CC-BY-SA-3.0">Creative Commons Attribution Share Alike 3.0</option>
<option value="CC0-1.0">Creative Commons Zero v1.0 Universal</option>
</select>
</div>
</div>
<div class="tab-pane" id="tab3">
3
<br /><br />
<div class="field">
<label for="agreement_media">What type of Patent License do you want in your agreement?</label><br />
<select size=3 id="patenttype" name="patenttype[]">
<option value="GFDL-1.1">Traditional Patent License</option>
<option value="GFDL-1.2">Patent Pledge</option>
</select>
</div>
</div>
<div class="tab-pane" id="tab4">
4
</div>
<div class="tab-pane" id="tab5">
5
</div>
<div class="tab-pane" id="tab6">
6
</div>
<div class="tab-pane" id="tab7">
7
<section id="review">
</section>
</div>
<ul class="pager wizard">
<li class="previous first" style="display:none;"><a href="javascript:;">First</a></li>
<li class="previous"><a href="javascript:;">Previous</a></li>
<li class="next last" style="display:none;"><a href="javascript:;">Last</a></li>
<li class="next"><a href="javascript:;">Next</a></li>
<li class="previous first" style="display:none;"><a href="#">First</a></li>
<li class="previous"><a href="#">Previous</a></li>
<li class="next last" style="display:none;"><a href="#">Last</a></li>
<li class="next"><a href="#">Next</a></li>
</ul>
</div>
</div>
</div><!--/span-->
</div><!--/row-->
</div><!--/span-->
</div><!--/row-->
<hr>
<footer>
<p>&copy; <a href='http://vadimg.com' target="_blank">Vadim Vincent Gabriel</a> 2012</p>
</footer>
</div><!--/.fluid-container-->
</div>
</div>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<script src="jquery.bootstrap.wizard.js"></script>
<script src="/bootstrap/js/bootstrap.min.js"></script>
<script src="/jquery.bootstrap.wizard.js"></script>
<script src="/prettify.js"></script>
<script src="/pagedown/Markdown.Converter.js"></script>
<script>
$(document).ready(function() {
$('#rootwizard').bootstrapWizard({onTabShow: function(tab, navigation, index) {
var $total = navigation.find('li').length;
var $current = index+1;
var $percent = ($current/$total) * 100;
$('#rootwizard').find('.bar').css({width:$percent+'%'});
}});
$('#rootwizard').bootstrapWizard({onNext: function(tab, navigation, index) {
if(index==2) {
// Make sure we entered the name
if(!$('#name').val()) {
alert('You must enter your name');
$('#name').focus();
return false;
}
}
// Set the name for the next tab
// $('#tab3').html('Hello, ' + $('#name').val());
}, onTabShow: function(tab, navigation, index) {
var $total = navigation.find('li').length;
var $current = index+1;
var $percent = ($current/$total) * 100;
$('#rootwizard').find('.bar').css({width:$percent+'%'});
}});
window.prettyPrint && prettyPrint()
});
</script>
<script src="/js/footer.js"></script>
</body>
</html>
\ No newline at end of file
</html>