-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
975 lines (893 loc) · 35.4 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
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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name=viewport content="width=600">
<meta name=description content="University of Kentucky Libraries Faculty Evaluation Form Generator.">
<title>University of Kentucky Libraries Evaluation Form Generator</title>
<!-- universal header/footer metadata start -->
<meta name = "hdr.simple" content = "0" />
<meta name = "hdr.include" content = "1" />
<meta name = "hdr.home.label" content = "UK Libraries Evaluation Form Generator" />
<meta name = "hdr.home.link" content = "" />
<meta name = "hdr.link1.label" content = "" />
<meta name = "hdr.link1.url" content = "" />
<meta name = "hdr.link2.label" content = "" />
<meta name = "hdr.link2.url" content = "" />
<meta name = "hdr.link3.label" content = "" />
<meta name = "hdr.link3.url" content = "" />
<meta name = "hdr.link4.label" content = "" />
<meta name = "hdr.link4.url" content = "" />
<meta name = "hdr.link5.label" content = "" />
<meta name = "hdr.link5.url" content = "" />
<meta name = "hdr.link6.label" content = "" />
<meta name = "hdr.link6.url" content = "" />
<meta name = "hdr.srch.include" content = "0" />
<meta name = "hdr.width" content = "100" />
<meta name = "hdr.alert.include" content = "0" />
<meta name = "hdr.alert.title" content = "" />
<meta name = "hdr.alert.msg" content = "" />
<meta name = "hdr.alert.url.label" content = "" />
<meta name = "hdr.alert.url" content = "" />
<!-- universal header/footer metadata end -->
<!-- universal header/footer files start -->
<link rel="stylesheet" href="https://lib.uky.edu/webparts/ukhdr/2024/css/global_header_footer.css" media="all">
<script src="https://lib.uky.edu/webparts/ukhdr/2024/js/universalheader.js"></script>
<!-- universal header/footer files end -->
<!-- universal header/footer css tweak wider spacing and minimum height -->
<style>.ukl-ext-clamp .slab__wrapper { max-width: 100% !important; }#wrapper { min-height: 1000px; }</style>
<!-- universal header/footer css tweak wider spacing and minimum height end -->
<script>
// Copyright University of Kentucky Libraries, 2020
// Authors: Kathryn Lybarger & Eric Weig
// License: https://creativecommons.org/licenses/by-sa/4.0/
var evaldata;
function evalUpdate() {
// set flag for console output
// set to 1 in order to view output in console
var isConsole = 0;
// set variables for faculty info
var personalName = document.getElementsByName("personalname")[0].value;
var superVisor = document.getElementsByName("supervisor")[0].value;
var jobTitle = document.getElementsByName("jobtitle")[0].value;
var division = document.getElementsByName("division")[0].value;
var department = document.getElementsByName("department")[0].value;
var otherEvals = document.getElementsByName("other_evaluators")[0].value;
var rank = document.getElementsByName("rank")[0].value;
var revYear = document.getElementsByName("review_year")[0].value;
var nxtPromo = document.getElementsByName("next_promo")[0].value;
// set variables for faculty DOE
var doe_001 = document.getElementsByName("doe_inst_ref_serve")[0].value;
var doe_002 = document.getElementsByName("doe_inst_lib_inst")[0].value;
var doe_003 = document.getElementsByName("doe_inst_tech_serve")[0].value;
var doe_004 = document.getElementsByName("doe_inst_info_tech")[0].value;
var doe_005 = document.getElementsByName("doe_inst_coll_mangr")[0].value;
var doe_006 = document.getElementsByName("doe_inst_other_primary")[0].value;
var doe_007 = document.getElementsByName("doe_res_int_fund")[0].value;
var doe_008 = document.getElementsByName("doe_res_ext_fund")[0].value;
var doe_009 = document.getElementsByName("doe_res_gifts")[0].value;
var doe_010 = document.getElementsByName("doe_res_no_fund")[0].value;
var doe_011 = document.getElementsByName("doe_serv_pub")[0].value;
var doe_012 = document.getElementsByName("doe_serv_prof")[0].value;
var doe_013 = document.getElementsByName("doe_serv_coll_dept")[0].value;
var doe_014 = document.getElementsByName("doe_serv_univ")[0].value;
var doe_015 = document.getElementsByName("doe_serv_patient")[0].value;
var doe_016 = document.getElementsByName("doe_serv_qaa")[0].value;
var doe_017 = document.getElementsByName("doe_serv_clinic_serv")[0].value;
var doe_018 = document.getElementsByName("doe_serv_clinic_contract")[0].value;
var doe_019 = document.getElementsByName("doe_serv_hosp")[0].value;
var doe_020 = document.getElementsByName("doe_admin_chair")[0].value;
var doe_021 = document.getElementsByName("doe_admin_other_1")[0].value;
var doe_022 = document.getElementsByName("doe_admin_univ_lv")[0].value;
var doe_023 = document.getElementsByName("doe_admin_cdd")[0].value;
var doe_024 = document.getElementsByName("doe_admin_md")[0].value;
var doe_025 = document.getElementsByName("doe_admin_other_pos")[0].value;
var doe_026 = document.getElementsByName("doe_admin_other_2")[0].value;
var doe_027 = document.getElementsByName("doe_admin_gift")[0].value;
var doe_028 = document.getElementsByName("doe_profdev_sabb")[0].value;
var doe_029 = document.getElementsByName("doe_profdev_leave")[0].value;
var doe_030 = document.getElementsByName("doe_profdev_dev")[0].value;
// add up all the DOE numbers
var doe_total = +doe_001 + +doe_002 + +doe_003 + +doe_004 + +doe_005 + +doe_006 + +doe_007 + +doe_008 + +doe_009 + +doe_010 + +doe_011 + +doe_012 + +doe_013 + +doe_014 + +doe_015 + +doe_016 + +doe_017 + +doe_018 + +doe_019 + +doe_020 + +doe_021 + +doe_022 + +doe_023 + +doe_024 + +doe_025 + +doe_026 + +doe_027 + +doe_028 + +doe_029 + +doe_030;
// display current total for DOE numbers
document.getElementById("doe_total").innerHTML = doe_total;
// build data file for Word Document generation
evaldata = {
ratings: [
'Unsatisfactory',
'Improvement Expected',
'(Provisional)',
'Solid',
'Distinguished'
],
/*
ratings: [
'Needs Improvement',
'Meets Expectations',
'Exceeds Expectations'
],
rare_ratings: [
'Optional:',
'Transitional',
'Special Recognition'
],
*/
person: {
name: personalName,
job_title: jobTitle,
division: division,
department: department,
supervisor: superVisor,
other_evaluators: otherEvals,
rank: rank,
review_year: revYear,
next_pt_date: nxtPromo,
},
DOE: [
{
name: 'Instruction',
subcats: [
{
name: 'Primary Assignment: Reference Services',
percent: doe_001,
},
{
name: 'Primary Assignment: Library Instruction',
percent: doe_002,
},
{
name: 'Primary Assignment: Technical Services',
percent: doe_003,
},
{
name: 'Primary Assignment: Information Technology',
percent: doe_004,
},
{
name: 'Primary Assignment: Collection Management',
percent: doe_005,
},
{
name: 'Primary Assignment: Other Primary Activities',
percent: doe_006,
},
]
},
{
name: 'Research',
subcats: [
{
name: 'Internally funded research',
percent: doe_007,
},
{
name: 'Externally funded research',
percent: doe_008,
},
{
name: 'Gifts',
full_label: 'Research: Gifts',
percent: doe_009,
},
{
name: 'Non-funded research',
percent: doe_010,
},
]
},
{
name: 'Service',
subcats: [
{
name: 'Service to Public',
percent: doe_011,
},
{
name: 'Service to Professions',
percent: doe_012,
},
{
name: 'Service to Institution: College and Department',
percent: doe_013,
},
{
name: 'Service to Institution: University Level',
percent: doe_014,
},
{
name: 'Direct Patient Care and Clinical Service',
percent: doe_015,
},
{
name: 'Quality Assurance Activities',
percent: doe_016,
},
{
name: 'Other Clinical Services',
percent: doe_017,
},
{
name: 'Clinical Contract Work or Other Cash Income',
percent: doe_018,
},
{
name: 'Hospital Physician Service for all Patients',
percent: doe_019,
},
]
},
{
name: 'Administration',
subcats: [
{
name: 'College and Department: Chair, Vice Chair',
percent: doe_020,
},
{
name: 'College and Department: Other',
percent: doe_021,
},
{
name: 'University Level',
full_label: 'Administration: University Level',
percent: doe_022,
},
{
name: 'UK Health Care Enterprise Clinical Division Director',
percent: doe_023,
},
{
name: 'UK Health Care Enterprise Medical Director',
percent: doe_024,
},
{
name: 'UK Health Care Enterprise Other Position',
percent: doe_025,
},
{
name: 'UK Health Care Enterprise Other administrative activities',
percent: doe_026,
},
{
name: 'Fund Raising',
full_label: 'Administration: Fund Raising',
percent: doe_027,
},
]
},
{
name: 'Professional Development',
subcats: [
{
name: 'Sabbatical Leave',
full_label: 'Professional Development: Sabbatical Leave',
percent: doe_028,
},
{
name: 'Other Approved Leave',
full_label: 'Professional Development: Other Approved Leave',
percent: doe_029,
},
{
name: 'Other Development',
full_label: 'Professional Development: Other',
percent: doe_030,
},
]
},
]
}
if(isConsole) {
// echo changes to console for testing
console.log('evaldata', evaldata);
}
}
</script>
<link href="https://fonts.googleapis.com/css?family=Muli&display=swap" rel="stylesheet">
<style>
body {
margin: 0px;
font-family: 'Muli', sans-serif;
font-size: 16px;
}
select {
width: 100%;
}
input[type|="text"] {
width: 100%;
}
#generator_form, #form_help {
padding: 25px 25px 25px 10px;
background: #a5acaf;
}
#submit_button {
position: sticky;
top: 0;
background: aliceblue;
height: 94px;
border-bottom: 1px solid #1B365D;
}
#form_button {
float: left;
top: 0px;
right: 0px;
background: #1897d4;
padding: 22px;
width: 85%;
}
button {
display: block;
text-align: center;
margin-left: auto;
margin-right: auto;
height: 50px;
width: 250px;
font-size: 18px;
}
ul {
list-style-type:none;
}
li {
padding: 5px;
}
h2 {
padding-left: 25px;
}
label:after {
content: ' : ';
}
label {
font-weight: bold;
}
#generator_form {
padding-bottom: 10px;
border-bottom: 1px solid #1B365D;
background: #fff;
}
#doe_form {
padding: 25px;
}
#doe_total {
float: right;
padding-right: 10px;
font-weight: bold;
font-size: 20px;
position: sticky;
top: 0;
}
#doe_total:before {
content: ' % total: ';
}
#form_help {
background: #C8C8C7;
margin-bottom: 0px;
margin-top: 0px;
}
#form_help > label {
color:#1897d4
}
#app_title {
float: right;
color: white;
padding-right: 10px;
font-size: 25px;
}
.faculty-information {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
grid-gap: 1rem;
max-width: 80%;
}
dl, ol, p, table, ul {
margin-bottom: 2em;
}
ol, ul {
list-style: none;
}
.empty > .tooltip {
border-bottom: 0px dotted black;
}
.heading {
margin-left: 40%;
}
.tooltip {
position: static;
display: inline-block;
border-bottom: 1px dotted black;
width: 90%;
display: inline-block;
background: white;
border: 0px;
height: 25px;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 220px;
height: 120px;
background-color: black;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 5px;
/* Position the tooltip */
position: absolute;
z-index: 1;
}
.tooltip:hover .tooltiptext {
visibility: visible;
}
.hide {
display: none;
}
@media only screen and (max-width: 912px) {
.faculty-information {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 0fr));
grid-gap: 1rem;
max-width: 80%;
}
}
@media only screen and (max-width: 750px) {
.faculty-information {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(360px, 0fr));
grid-gap: 1rem;
max-width: 80%;
}
#app_title {
float: left;
color: black;
padding: 30px;
}
#submit_button {
background: #1897d4;
}
li {
margin-left: auto;
margin-right: auto;
}
.heading {
margin-left: 0px;
}
body {
font-size: 18px;
}
input[type|="text"] {
font-size: 25px;
}
label {
font-size: 25px;
}
label:after {
content: ' ';
}
select {
font-size: 25px;
}
}
</style>
</head>
<body>
<div id="content">
<!-- help section start -->
<p id="form_help">
<label>HELP</label> Complete desired form fields before generating your form. Click the button to download your generated evaluation form.
</p>
<!-- help section end -->
<!-- form generator buttom start -->
<div id="submit_button">
<div id="form_button">
<button type="button" id="generate">Generate Evaluation Form</button>
</div><div id="doe_total"></div>
</div>
<!-- form generator buttom end -->
<!-- generator entry faculty info form start -->
<div id="generator_form">
<ul class="faculty-information">
<!-- name -->
<li class="heading" id="faculty-info-0"><label for="personalname"><div class="tooltip">Name<span class="tooltiptext">Enter your full name, i.e. 'Jane Doe'</span></div></label></li>
<li id="faculty-info-1"><input id="personalname" type="text" name="personalname" maxlength="100" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<!-- supervisor -->
<li class="heading" id="faculty-info-2"><label for="review_year"><div class="tooltip">Review Year<span class="tooltiptext">Enter YYYY for the review year.</span></div></label></li>
<li id="faculty-info-3"><input id="review_year" type="text" name="review_year" maxlength="4" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
</ul>
<ul class="faculty-information">
<!-- job title -->
<li class="heading" id="faculty-info-4"><label for="supervisor"><div class="tooltip">Supervisor<span class="tooltiptext">Enter your full name, i.e. 'Joan Smith'</span></div></label></li>
<li id="faculty-info-5"><input id="supervisor" type="text" name="supervisor" maxlength="100" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<!-- other evaluators -->
<li class="heading" id="faculty-info-6"><label for="other_evaluators"><div class="tooltip">Other Evaluators<span class="tooltiptext">Enter additional evaluators with full names separated by a ;.</span></div></label></li>
<li id="faculty-info-7"><input id="other_evaluators" type="text" name="other_evaluators" maxlength="100" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
</ul>
<ul class="faculty-information">
<!-- division/department -->
<li class="heading" id="faculty-info-8"><label for="jobtitle"><div class="tooltip">Job Title<span class="tooltiptext">Enter your formal job title.</span></div></label></li>
<li id="faculty-info-9"><input id="jobtitle" type="text" name="jobtitle" maxlength="100" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<!-- rank -->
<li class="heading" id="faculty-info-10"><label for="rank"><div class="tooltip">Rank<span class="tooltiptext">Enter your rank using the drop down menu.</span></div></label></li>
<li id="faculty-info-11">
<select id="rank" name="rank" onkeyup="evalUpdate()" onchange="evalUpdate()">
<option value="">select rank</option>
<option value="Librarian IV">Librarian IV</option>
<option value="Librarian III">Librarian III</option>
<option value="Librarian II">Librarian II</option>
<option value="Librarian I">Librarian I</option>
</select>
</ul>
<ul class="faculty-information">
<!-- next promotion/tenure date -->
<li class="heading" id="faculty-info-12"><label for="division"><div class="tooltip">Division<span class="tooltiptext">Enter the name of the library division you work in.</span></div></label></li>
<li id="faculty-info-13"><input id="division" type="text" name="division" maxlength="100" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<!-- review year -->
<li class="heading" id="faculty-info-14"><label for="next_promo"><div class="tooltip">Next Promotion Year<span class="tooltiptext">Enter YYYY for your next promotion year.</span></div></label></li>
<li id="faculty-info-15"><input id="next_promo" type="text" name="next_promo" maxlength="4" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
</ul>
<ul class="faculty-information">
<!-- next promotion/tenure date -->
<li class="heading" id="faculty-info-16"><label for="department"><div class="tooltip">Department<span class="tooltiptext">Enter the name of the library department you work in.</span></div></label></li>
<li id="faculty-info-17"><input id="department" type="text" name="department" maxlength="100" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<!-- review year -->
<li id="faculty-info-18" class="empty"><div class="tooltip"></div></li>
<li id="faculty-info-19"></li>
</ul>
</div>
<!-- generator entry faculty info form end -->
<!-- distribution of effort start -->
<div id="doe_form">
<h4>Section I. Instruction</h4>
<ul>
<li>f. Libraries - Primary Assignment</li>
<li><ul>
<li>Reference/Information Service <input type="number" name="doe_inst_ref_serve" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<li>Library Instruction <input type="number" name="doe_inst_lib_inst" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<li>Technical Services <input type="number" name="doe_inst_tech_serve" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<li>Information Technology <input type="number" name="doe_inst_info_tech" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<li>Collection Management <input type="number" name="doe_inst_coll_mangr" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<li>Administration (report in Sect IV)</li>
<li>Other Primary Activities <input type="number" name="doe_inst_other_primary" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
</ul></li>
</ul>
<h4>Section II. Research</h4>
<ul>
<li>a. Internally funded research <input type="number" name="doe_res_int_fund" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<li>b. Externally funded research <input type="number" name="doe_res_ext_fund" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<li>c. Gifts <input type="number" name="doe_res_gifts" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<li>d. Non-funded research (general research efforts) <input type="number" name="doe_res_no_fund" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
</ul>
<h4>Section III. Service</h4>
<ul>
<li>a. Service to Public <input type="number" name="doe_serv_pub" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<li>b. Service to Professions <input type="number" name="doe_serv_prof" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<li>c. Service to Institution</li>
<li>
<ul>
<li>College and Department <input type="number" name="doe_serv_coll_dept" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<li>University Level <input type="number" name="doe_serv_univ" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
</ul></li>
<li class="hide">d. Patient Care Unrelated to Instruction</li>
<li class="hide"><ul>
<li>Direct Patient Care and Clinical Service <input type="number" name="doe_serv_patient" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<li>Quality Assurance Activities <input type="number" name="doe_serv_qaa" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<li>Other Clinical Services <input type="number" name="doe_serv_clinic_serv" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<li>Clinical Contract Work or Other Cash Income <input type="number" name="doe_serv_clinic_contract" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<li>Hospital Physician Service for all Patients <input type="number" name="doe_serv_hosp" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
</ul></li>
</ul>
<h4>Section IV. Administration</h4>
<ul>
<li>a. College and Department</li>
<li><ul>
<li>Chair Vice Chair/equivalent Academic Division Director/Chief Other position (e.g., DGS, DUS) <input type="number" name="doe_admin_chair" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<li>Other administrative activities <input type="number" name="doe_admin_other_1" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
</ul></li>
<li>b. University Level <input type="number" name="doe_admin_univ_lv" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<li class="hide">c. UK Health Care Enterprise</li>
<li class="hide"><ul>
<li>Clinical Division Director/Chief <input type="number" name="doe_admin_cdd" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<li>Medical Director <input type="number" name="doe_admin_md" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<li>Other Position <input type="number" name="doe_admin_other_pos" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<li>Other administrative activities <input type="number" name="doe_admin_other_2" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
</ul></li>
<li>d. Fund Raising (Private Gift Solicitation) <input type="number" name="doe_admin_gift" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
</ul>
<h4>Section V. Professional Development</h4>
<ul>
<li>a. Sabbatical Leave <input type="number" name="doe_profdev_sabb" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<li>b. Other Approved Leave (e.g. TDL, educational, scholarly) <input type="number" name="doe_profdev_leave" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
<li>c. Other Development (e.g. conferences, networking) <input type="number" name="doe_profdev_dev" onkeyup="evalUpdate()" onchange="evalUpdate()"/></li>
</ul>
</div>
<!-- distribution of effort end -->
<!-- generator entry form end -->
</div>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.2.2/jszip.js" integrity="sha256-bBikss7mndcF6KmskR4ihPSlxoyGAxuG4Gf/rzolOTg=" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/FileSaver.min.js" integrity="sha256-u/J1Urdrk3nCYFefpoeTMgI5viU1ujCDu2fXXoSJjhg=" crossorigin="anonymous"></script>
<script>
document.getElementById("generate").addEventListener("click",function() {
const zip = new JSZip();
fetch( "fppa.docx" )
.then( response => response.blob() )
.then( blob => zip.loadAsync(blob) )
.then( () => zip.folder("word").file("document.xml").async("string") )
.then( document_xml_content => transmogrify( document_xml_content, evaldata ) )
.then( new_document_xml_content => zip.folder("word").file("document.xml", new_document_xml_content ) )
.then( () => zip.generateAsync({type:"blob",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"}) )
.then( blob => saveAs( blob, "eval.docx" ) )
});
function fppaTreeEntry( name, indent, percent ) {
return (`
<w:p>
<w:pPr>
<w:numPr>
<w:ilvl w:val="${indent}"/>
<w:numId w:val="6"/>
</w:numPr>
<w:rPr>
<w:color w:val="0000FF"/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:color w:val="0000FF"/>
</w:rPr>
<w:t>${name}${percent>0?" (" + percent + "%)":""}</w:t>
</w:r>
</w:p>
`);
}
function fppaBlocksGrayBar( text ) {
return (`
<w:p>
<w:pPr>
<w:keepNext/>
<w:keepLines/>
<w:pBdr>
<w:top w:val="nil"/>
<w:left w:val="nil"/>
<w:bottom w:val="nil"/>
<w:right w:val="nil"/>
<w:between w:val="nil"/>
</w:pBdr>
<w:shd w:val="clear" w:color="auto" w:fill="D9D9D9"/>
<w:spacing w:before="40" w:line="360" w:lineRule="auto"/>
<w:jc w:val="center"/>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:eastAsia="Calibri" w:hAnsi="Calibri" w:cs="Calibri"/>
<w:b/>
<w:color w:val="000000"/>
<w:sz w:val="24"/>
<w:szCs w:val="24"/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:eastAsia="Calibri" w:hAnsi="Calibri" w:cs="Calibri"/>
<w:b/>
<w:color w:val="000000"/>
<w:sz w:val="24"/>
<w:szCs w:val="24"/>
</w:rPr>
<w:t>${text}</w:t>
</w:r>
</w:p>
`);
}
function fppaBlocksHeading( text ) {
return (`
<w:p>
<w:r>
<w:rPr>
<w:b/>
</w:rPr>
<w:t>${text}</w:t>
</w:r>
</w:p>
`);
}
function fppaBlocksBlankLineForSelf() {
return (`
<w:p>
<w:r>
<w:rPr>
<w:color w:val="0000FF"/>
</w:rPr>
<w:t xml:space="preserve"> </w:t>
</w:r>
</w:p>
`);
}
function fppaBlocksBlankLineForSupervisor() {
return (`
<w:p>
<w:r>
<w:rPr>
<w:color w:val="880088"/>
</w:rPr>
<w:t xml:space="preserve"> </w:t>
</w:r>
</w:p>
`);
}
function fppaBlocksTableCell(text,width,color="0000FF",first=false,last=false) {
return (`
<w:tc>
<w:tcPr>
<w:vAlign w:val="bottom"/>
<w:tcW w:w="450" w:type="dxa"/>
<w:tcMar>
${first?"":'<w:start w:w="0" w:type="dxa"/>'}
<w:end w:w="0" w:type="dxa"/>
</w:tcMar>
</w:tcPr>
<w:p>
<w:r>
<w:rPr>
<w:sz w:val="28"/>
<w:u w:val="thick"/>
<w:color w:val="${color}"/>
</w:rPr>
<w:t>   </w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:vAlign w:val="bottom"/>
<w:tcW w:w="${width}" w:type="dxa"/>
<w:tcMar>
<w:start w:w="0" w:type="dxa"/>
${last?"":'<w:end w:w="0" w:type="dxa"/>'}
</w:tcMar>
</w:tcPr>
<w:p>
<w:r>
<w:rPr>
<w:sz w:val="18"/>
</w:rPr>
<w:t xml:space="preserve">${text}</w:t>
</w:r>
</w:p>
</w:tc>
`);
}
function fppaBlocksTableCell2(text,width,color="0000FF",first=false,last=false) {
return (`
<w:tc>
<w:tcPr>
<w:vAlign w:val="bottom"/>
<w:tcW w:w="450" w:type="dxa"/>
<w:tcMar>
${first?"":'<w:start w:w="0" w:type="dxa"/>'}
<w:end w:w="0" w:type="dxa"/>
</w:tcMar>
</w:tcPr>
<w:p>
<w:r>
<w:rPr>
<w:sz w:val="28"/>
<w:u w:val="thick"/>
<w:color w:val="${color}"/>
</w:rPr>
<w:t>${first?"":'   '}</w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:vAlign w:val="bottom"/>
<w:tcW w:w="${width}" w:type="dxa"/>
<w:tcMar>
<w:start w:w="0" w:type="dxa"/>
${last?"":'<w:end w:w="0" w:type="dxa"/>'}
</w:tcMar>
</w:tcPr>
<w:p>
<w:pPr>
${first?'<w:jc w:val="center"/>':""}
</w:pPr>
<w:r>
<w:rPr>
<w:i/>
<w:sz w:val="18"/>
</w:rPr>
<w:t xml:space="preserve">${text}</w:t>
</w:r>
</w:p>
</w:tc>
`);
}
function fppaBlocksTable( levels, widths, color="0000FF" ) {
return (`
<w:tbl>
<w:tblPr>
<w:tblStyle w:val="a2"/>
<w:tblW w:w="0" w:type="auto"/>
<w:tblLook w:val="04A0" w:firstRow="1" w:lastRow="0" w:firstColumn="1" w:lastColumn="0" w:noHBand="0" w:noVBand="1"/>
</w:tblPr>
<w:tblGrid>${widths.map( w => `<w:gridCol w:w="450"/><w:gridCol w:w="${w}"/>`).join("") }</w:tblGrid>
<w:tr>${levels.map( (lvl,i) => fppaBlocksTableCell( lvl, widths[i], color, i==0, i==levels.length-1 ) ).join("") }</w:tr>
</w:tbl>
`);
}
function fppaBlocksTable2( levels, widths, color="0000FF" ) {
return (`
<w:tbl>
<w:tblPr>
<w:tblStyle w:val="a2"/>
<w:tblW w:w="0" w:type="auto"/>
<w:tblLook w:val="04A0" w:firstRow="1" w:lastRow="0" w:firstColumn="1" w:lastColumn="0" w:noHBand="0" w:noVBand="1"/>
</w:tblPr>
<w:tblGrid>${widths.map( w => `<w:gridCol w:w="450"/><w:gridCol w:w="${w}"/>`).join("") }</w:tblGrid>
<w:tr>${levels.map( (lvl,i) => fppaBlocksTableCell2( lvl, widths[i], color, i==0, i==levels.length-1 ) ).join("") }</w:tr>
</w:tbl>
`);
}
function transmogrify( string_content, evaldata ) {
const widths = [ 1500, 1500, 1500, 1500, 1500 ];
var fppatree = []
var fppablocks = [];
fppatree.push("</w:t></w:r></w:p>");
fppablocks.push("</w:t></w:r></w:p>");
for (const cat of evaldata.DOE) {
if (cat.subcats.some(subcat=>subcat.percent)) {
fppatree.push(fppaTreeEntry( cat.name, 0, 0 ));
for (const subcat of cat.subcats) {
if (subcat.percent) {
fppatree.push(fppaTreeEntry( subcat.name, 1, subcat.percent ));
fppablocks.push( fppaBlocksGrayBar( `${subcat.full_label||subcat.name} (${subcat.percent}%)` ) );
fppablocks.push( "<w:p/>" );
fppablocks.push( fppaBlocksHeading( "Self Rating:" ) );
fppablocks.push( "<w:p/>" );
fppablocks.push( fppaBlocksTable( evaldata.ratings, widths, "0000FF" ) );
//fppablocks.push( fppaBlocksTable2( evaldata.rare_ratings, widths, "0000FF" ) );
fppablocks.push( "<w:p/>" );
fppablocks.push( fppaBlocksHeading( "Description of activities and achievements / justification of rating:" ) );
fppablocks.push( fppaBlocksBlankLineForSelf() );
fppablocks.push( fppaBlocksBlankLineForSelf() );
fppablocks.push( fppaBlocksBlankLineForSelf() );
fppablocks.push( fppaBlocksHeading( "Supervisor Rating:" ) );
fppablocks.push( "<w:p/>" );
fppablocks.push( fppaBlocksTable( evaldata.ratings, widths, "880088" ) );
//fppablocks.push( fppaBlocksTable2( evaldata.rare_ratings, widths, "880088" ) );
fppablocks.push( "<w:p/>" );
fppablocks.push( fppaBlocksHeading( "Supervisor comments and justification of rating:" ) );
fppablocks.push( fppaBlocksBlankLineForSupervisor() );
fppablocks.push( fppaBlocksBlankLineForSupervisor() );
fppablocks.push( fppaBlocksBlankLineForSupervisor() );
fppablocks.push( fppaBlocksHeading( "Recommended action (if required):" ) );
fppablocks.push( fppaBlocksBlankLineForSupervisor() );
fppablocks.push( fppaBlocksBlankLineForSupervisor() );
}
}
}
}
fppatree.push("<w:p><w:r><w:t>");
fppablocks.push("<w:p><w:r><w:t>");
fppatree = fppatree.join("");
fppablocks = fppablocks.join("");
return string_content
.replace(/FPPA_NAME/,clean(evaldata.person.name))
.replace(/FPPA_SUPE/,clean(evaldata.person.supervisor))
.replace(/FPPA_JOB/,clean(evaldata.person.job_title))
.replace(/FPPA_OTHER/,clean(evaldata.person.other_evaluators))
.replace(/FPPA_DIV/,clean(evaldata.person.division))
.replace(/FPPA_DEPT/,clean(evaldata.person.department))
.replace(/FPPA_RANK/,clean(evaldata.person.rank))
.replace(/FPPA_PTDATE/,clean(evaldata.person.next_pt_date))
.replace(/FPPA_REVYEAR/,clean(evaldata.person.review_year))
.replace(/FPPA_TREE/,fppatree)
.replace(/FPPA_BLOCKS/,fppablocks)
}
function clean(str) {
return str
.replace(/&/g,"&")
.replace(/</g,"<")
.replace(/>/g,">")
}
evalUpdate();
</script>
<!-- universal header/footer file part 2 start -->
<script src="https://lib.uky.edu/webparts/ukhdr/2024/js/combofootershared.js"></script>
<!-- universal header/footer files part 2 end -->
</body>
</html>