-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
131 lines (105 loc) · 4.92 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<!DOCTYPE html>
<html>
<head >
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>EnchancedCheck sample</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.2/angular.min.js"></script>
<script src="enhancedCheckToggle.js"></script>
<script src="enhancedCheckNgModule.js"></script>
<link href="enhancedCheck.css" rel="stylesheet">
<script>
$(document).ready(function() {
$('#sampleCheckboxToggle').change(function() {
console.log('checkbox changed');
});
});
var app = angular.module('enhancedCheck', ['ui.enhancedCheck']);
app.controller('EnhancedCtrl', function ($scope) {
$scope.checkbox = true;
$scope.combineOne = true;
$scope.combineTwo = true;
$scope.radio = '';
$scope.toggle = false;
$scope.toggleDisabled = false;
});
</script>
</head>
<body ng-app="enhancedCheck">
<div class="container" style="margin-top:20px;" ng-controller="EnhancedCtrl">
<fieldset>
<legend>Simple primary checkboxes</legend>
<div class="enhancedCheck enhancedCheck-primary">
<div>
<input type="checkbox" id="sampleCheckbox" ng-model="checkbox"/>
<label for="sampleCheckbox">Checked</label>
Angular checked: {{checkbox}}
</div>
<div>
<input type="checkbox" id="sampleCheckboxHover"/>
<label for="sampleCheckboxHover">Hover</label>
</div>
<div>
<input type="checkbox" id="sampleCheckboxEmpty"/>
<label for="sampleCheckboxEmpty">Empty</label>
</div>
</div>
</fieldset>
<br/><br/>
<fieldset>
<legend>Combined warning checkboxes</legend>
<div class="enhancedCheck enhancedCheck-inline enhancedCheck-warning enhancedCheck-combine">
<input type="checkbox" id="sampleCombinedCheckbox1" ng-model="combineOne"/>
<label for="sampleCombinedCheckbox1">Combined one</label>
<input type="checkbox" id="sampleCombinedCheckbox2" ng-model="combineTwo"/>
<label for="sampleCombinedCheckbox2">Combined two</label>
<input type="checkbox" id="sampleCombinedCheckboxHover"/>
<label for="sampleCombinedCheckboxHover">Hover</label>
<input type="checkbox" id="sampleCombinedCheckboxEmpty"/>
<label for="sampleCombinedCheckboxEmpty">Empty</label>
Angular combine two: {{combineTwo}}
</div>
</fieldset>
<br/><br/>
<fieldset>
<legend>Radio success buttons</legend>
<div class="enhancedCheck enhancedCheck-inline enhancedCheck-success">
<input type="radio" name="rb" id="sampleRadio1" value="radio" ng-model="rb"/>
<label for="sampleRadio1">Radio</label>
<input type="radio" name="rb" id="sampleRadio1Hover" value="hover" ng-model="rb"/>
<label for="sampleRadio1Hover">Hover</label>
<input type="radio" name="rb" id="sampleRadio1Empty" value="empty" ng-model="rb"/>
<label for="sampleRadio1Empty">Empty</label>
Angular radio: {{rb}}
</div>
</fieldset>
<br/><br/>
<fieldset>
<legend>Checkbox danger animated</legend>
<div class="enhancedCheck enhancedCheck-danger enhancedCheck-animate">
<div>
<input type="checkbox" id="sampleCheckboxAnimate"/>
<label for="sampleCheckboxAnimate">Lightning slowly</label>
</div>
</div>
</fieldset>
<br/><br/>
<fieldset>
<legend>Checkbox toggle</legend>
<input type="checkbox" id="sampleCheckboxToggle" class="enhancedCheck-toggle"
data-on="Enable" data-off="Disable" data-onstyle="success" data-offstyle="danger"
data-style="rounded"
ng-model="toggle" ng-change="toggleChange()" ng-disabled="toggleDisabled"/>
<br/>
<input type="checkbox" ng-model="toggle">
Angular toggle value: {{toggle}}
<br/>
<input type="checkbox" ng-model="toggleDisabled"/>
Angular toggle disabled: {{toggleDisabled}}
</fieldset>
</div>
</body>
</html>