-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore - add travel itinerary as another example
- Loading branch information
My Computer
authored and
My Computer
committed
Dec 22, 2017
1 parent
b88ab27
commit 7edf483
Showing
4 changed files
with
234 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
<!doctype html> | ||
<html ng-app="Checklist"> | ||
|
||
<head> | ||
<link rel="stylesheet" type="text/css" href="../../lib/css/bootswatch.css"> | ||
<link rel="stylesheet" type="text/css" href="../../lib/css/checklist.css"> | ||
<script src="../../lib/js/jquery.js"></script> | ||
<script src="../../lib/js/bootstrap.min.js"></script> | ||
<script src="../../lib/js/angular.min.js"></script> | ||
<script src="../../lib/ng-repeat-array/AngularRepeatArray.js"></script> | ||
|
||
<!-- Add your config js file here --> | ||
<script src="config.js"></script> | ||
<!-- Add your config js file here --> | ||
|
||
<script src="../../lib/js/checklist.js"></script> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
</head> | ||
|
||
<body class="container" ng-controller="Controller as checklist"> | ||
|
||
<ul class="nav nav-tabs"> | ||
<li class="active"><a href="#questions" data-toggle="tab" aria-expanded="false">Questions</a></li> | ||
<li class=""><a href="#roles" data-toggle="tab" aria-expanded="false">Roles</a></li> | ||
<li class=""><a href="#checklist" data-toggle="tab" aria-expanded="false">Checklist</a></li> | ||
</ul> | ||
|
||
<div id="myTabContent" class="tab-content"> | ||
|
||
<div class="tab-pane fade active in" id="questions"> | ||
|
||
<h1> {{checklist.questionsSectionTitle}} </h1> | ||
|
||
<table class="table table-striped table-hover "> | ||
<tbody> | ||
<thead> | ||
<tr> | ||
<th>Question</th> | ||
<th>Answer</th> | ||
</tr> | ||
</thead> | ||
|
||
<tr ng-repeat="question in checklist.questions"> | ||
<td> | ||
{{question.text}} | ||
</td> | ||
<td> | ||
<button | ||
class="btn btn-{{checklist.getBtnStyle(question)}}" | ||
ng-click = "checklist.flipBtnStatus(question)"> | ||
{{checklist.getBtnText(question)}} | ||
</button> | ||
</ditdv> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
</div> | ||
<div class="tab-pane fade in" id="roles"> | ||
<h1> {{checklist.rolesSectionTitle}} </h1> | ||
|
||
<table class="table table-striped table-hover "> | ||
<tbody> | ||
<thead> | ||
<tr> | ||
<th>Role</th> | ||
<th>Person</th> | ||
|
||
</tr> | ||
</thead> | ||
|
||
<tr ng-repeat="role in checklist.roles"> | ||
|
||
<td> | ||
<h4>{{role.role}}</h4> | ||
</td> | ||
|
||
<td> | ||
<input ng-model =newObject[role.role].name ng-change="checklist.changeRoleValue(checklist.roles,'role',role,'name',newObject[role.role].name)"}></input> | ||
</td> | ||
|
||
<!-- Example if you wanted username as well --> | ||
<!--<input ng-model =newObject[role.role].username ng-change="checklist.changeRoleValue(checklist.roles,'role',role,'username',newObject[role.role].username)"}></input>--> | ||
</tr> | ||
<tbody> | ||
</table> | ||
</div> | ||
<div class="tab-pane fade in" id="checklist"> | ||
<h1> {{checklist.checklistSectionTitle}} </h1> | ||
<hr> | ||
|
||
<div ng-repeat="type in checklist.ngArrLoop(checklist.getTypes(),1) track by $index"> | ||
<table class="table table-striped table-hover "> | ||
<thead> | ||
<tr> | ||
<th>Completed</th> | ||
<th>Task</th> | ||
<th>Owner</th> | ||
</tr> | ||
</thead> | ||
<tr> | ||
<td> | ||
</td> | ||
<td> | ||
<h3>{{checklist.ngArrProp(checklist.getTypes(),$index,1,1,'value')}}</h3> | ||
</td> | ||
<td> | ||
</td> | ||
</tr> | ||
<tr ng-repeat="item in checklist.getValidTasks(checklist.getTypes()[$index])"> | ||
<td> | ||
<!-- If using jira just use html <li class="checkbox" data-inline-task-id="0"><span> </span></li> --> | ||
<!-- If not using jira just use html <input type="checkbox"></input> --> | ||
<input type="checkbox"></input> | ||
|
||
</td> | ||
<td> | ||
{{item.task}} | ||
</td> | ||
<td class="text-right"> | ||
{{checklist.getOwnerProperty(checklist.roles,'role',item.role,'name')}} | ||
</td> | ||
</tr> | ||
</table> | ||
<br> | ||
<br> | ||
<br> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
function checklistSectionTitle() { | ||
return "Travel Checklist"; | ||
} | ||
|
||
function rolesSectionTitle() { | ||
return "Fill Out Who Is Covering Each Role";; | ||
} | ||
|
||
function questionsSectionTitle() { | ||
return "Travel Questionaire"; | ||
} | ||
|
||
function questionTypes() { | ||
return [ | ||
{value:'Day Before'}, | ||
{value:'Night Before'}, | ||
{value:'Day Of'} | ||
]; | ||
} | ||
|
||
function QuestonButtonText() { | ||
var btnMapping = { | ||
defaultFalse:'No', | ||
defaultTrue:'Yes' | ||
}; | ||
return btnMapping; | ||
} | ||
|
||
function roles() { | ||
return [ | ||
{role:'Nick'}, | ||
{role:'Other'} | ||
]; | ||
} | ||
|
||
function questions() { | ||
return [ | ||
{id:1,text:'Are you taking a plane?',description:'',default:false}, | ||
{id:2,text:'Do you have bread?',description:'',default:false} | ||
]; | ||
} | ||
|
||
function tasks(){ | ||
return [ | ||
|
||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Before',task:'Notify Any Mail Service You Are Going Away'}, | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Before',task:'Wash Any Clothes You Want To Wear'}, | ||
|
||
// Travel | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Night Before',task:'Pack Suitcase'}, | ||
{questionsRequiredYes:[1],questionsRequiredNo:[],questionsAnyYes:[],questionsAnyNo:[],role:'Nick',type:'Night Before',task:'Take Screenshot / Print Boarding Pass'}, | ||
{questionsRequiredYes:[1],questionsRequiredNo:[],questionsAnyYes:[],questionsAnyNo:[],role:'Nick',type:'Night Before',task:'Set Out Keys / Phone'}, | ||
|
||
// Day Of Time Management | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Night Before',task:'Print An Itinerary https://cdn.rawgit.com/clickthisnick/itinerary/master/itinerary.html'}, | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Night Before',task:'Set Alarm To Wake Up'}, | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Night Before',task:'Set Alarm 5 Minutes Before Having To Leave'}, | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Night Before',task:'Set Alarm At Time Have To Leave'}, | ||
|
||
|
||
// Tech For Tomorrow | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Night Before',task:'Charge Phone'}, | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Night Before',task:'Charge Phone Battery Pack'}, | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Night Before',task:'Charge Computer'}, | ||
|
||
// Cleanup Before Gone For Awhile | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Night Before',task:'Eat / Remove Perishable Fridgerator / Cupboard Items You Wont Eat Day Of Travel'}, | ||
|
||
// Phone | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Phone Charger'}, | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Phone Charger Cord'}, | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Phone Battery Pack'}, | ||
|
||
// Bathroom | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Toothbrush'}, | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Toothbrush Charger'}, | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Toothpaste'}, | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Floss'}, | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Hairgel'}, | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Retainer'}, | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Deordorant'}, | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Cologne'}, | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Face Trimmer'}, | ||
|
||
// Misc | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Computer'}, | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Computer Charger'}, | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Check You Have Drivers License'}, | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Turn Off Air Conditioners / Heaters'}, | ||
|
||
// Clean Up | ||
{questionsRequiredYes:[2],questionsRequiredNo:[],questionsAnyYes:[],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Put Any Bread In Freezer'}, | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Eat / Remove Perishable Fridgerator / Cupboard Items'}, | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Take Out Trash'}, | ||
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Clean Sink'}, | ||
]; | ||
} |