-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathopdJabatan.html
219 lines (188 loc) · 7.12 KB
/
opdJabatan.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Basic Page Needs
================================================== -->
<meta charset="utf-8">
<title>yeon</title>
<meta name="description" content="">
<meta name="author" content="">
<!-- Mobile Specific Metas
================================================== -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- CSS
================================================== -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Favicons
================================================== -->
<!-- <link rel="shortcut icon" href="images/favicon.ico"> -->
<!-- <link rel="apple-touch-icon" href="images/apple-touch-icon.png"> -->
<!-- <link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png"> -->
<!-- <link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png"> -->
<!-- Included CSS files
================================================== -->
<link rel="stylesheet" type="text/css" href="assets/css/morph.css">
<!-- Fonts -->
<!-- <link rel="stylesheet" href="http://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css"> -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900italic,900' rel='stylesheet' type='text/css'>
<!-- Included javascript files
================================================== -->
<script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
</head>
<body>
<input type="checkbox" name="user" id="user-profile">
<label class="user-profile" for="user-profile">
<div class="user-profile-img">
<img src="">
</div>
<span class="user-profile-name">
John Doe of The Crimson Heaven
</span>
</label>
<label class="side-menu" for="user-profile">
<!-- <a href="templates.html">Templates</a> -->
<a href="users.html">Users</a>
<a href="roles.html">Roles</a>
<a href="opd.html">OPD</a>
<hr>
<a href="login.html">Log out</a>
<div class="base-layer"></div>
</label>
<header>
<nav>
<a href="index.html" class="button theme">
<i>home</i>
<span>Beranda</span>
</a>
<a href="newJabatan.html" class="button theme">
<i>add</i>
<span>Jabatan baru</span>
</a>
</nav>
</header>
<div class="popup hidden">
<div class="modal form-default">
<!-- content here -->
<span class="section-title">
Jabatan <a id="jabatan"></a>
</span>
<form class="form-default">
<label>
Diisi oleh
<select id="nama">
<option value="" disabled>Pilih salah satu</option>
<option value="Proto Man">Proto Man</option>
<option value="Dr Willy">Dr Willy</option>
<option value="Axl">Axl</option>
<option value="Snake Man">Snake Man</option>
</select>
</label>
<button class="button theme form">Simpan data</button>
<a href="newJabatan.html" class="button pink form">Edit jabatan ini</a>
</form>
</div>
<div class="modal-close popup-toggle"><i>close</i></div>
</div>
<div class="main">
<div class="container">
<span class="section-title">Daftar Jabatan [OPD]</span>
<ul class="simple-hi">
<li class="post">
<span>
<small>bos</small>
Sigma
</span>
<ul>
<li>
<span>
<small>sub bos</small>
Dr Willy
</span>
<ul>
<li>
<span>
<small>mini bos</small>
Proto Man
</span>
<ul>
<li>
<span>
<small>somebody else</small>
Thunder Ball
</span>
</li>
</ul>
</li>
</ul>
</li>
<li>
<span>
<small>sub bos</small>
Dr E
</span>
<ul>
<li>
<span>
<small>mini bos</small>
Axl
</span>
<ul>
<li>
<span>
<small>somebody else</small>
Wood Man
</span>
</li>
<li>
<span>
<small>somebody else</small>
Snake Man
</span>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</body>
<script type="text/javascript">
$(document).on('click', '.popup-toggle', function() {
togglePopup();
});
$(document).on('click', '.simple-hi li span', function() {
// get Jabatan
var small_text = $(this).find("small")[0].textContent;
// get Name
var text = $(this)
.clone() //clone the element
.children() //select all the children
.remove() //remove all the children
.end() //again go back to selected element
.text() //get the text of element
.trim() //removes whitespace from both sides of a string
;
console.log( small_text, text );
togglePopup( small_text, text );
});
function togglePopup( post, name )
{
$('.popup').toggleClass( 'hidden' );
$('.popup #jabatan').text(post);
// if no one selected
$('#nama option').filter(function(){
return this.value == "";
}).prop("selected", true);
// if someone were
$('#nama option').filter(function(){
return this.value == name;
}).prop("selected", true);
}
</script>
</html>