Skip to content

Commit 11eff78

Browse files
committed
Autoformat JavaScript and css in /kipamedia
Autoformatting is made with prettier.
1 parent 46abc5b commit 11eff78

10 files changed

+2142
-1055
lines changed

web/media/highlight-active-input.js

+33-33
Original file line numberDiff line numberDiff line change
@@ -22,44 +22,44 @@ written by Alf Magne Kalleland.
2222
Alf Magne Kalleland, 2005
2323
Owner of DHTMLgoodies.com
2424
25-
************************************************************************************************************/
26-
25+
************************************************************************************************************/
26+
2727
var currentlyActiveInputRef = false;
2828
var currentlyActiveInputClassName = false;
2929

30-
function highlightActiveInput()
31-
{
32-
if(currentlyActiveInputRef){
33-
currentlyActiveInputRef.className = currentlyActiveInputClassName;
34-
}
35-
currentlyActiveInputClassName = this.className;
36-
this.className = 'inputHighlighted';
37-
currentlyActiveInputRef = this;
38-
39-
30+
function highlightActiveInput() {
31+
if (currentlyActiveInputRef) {
32+
currentlyActiveInputRef.className = currentlyActiveInputClassName;
33+
}
34+
currentlyActiveInputClassName = this.className;
35+
this.className = "inputHighlighted";
36+
currentlyActiveInputRef = this;
4037
}
4138

42-
function blurActiveInput()
43-
{
44-
this.className = currentlyActiveInputClassName;
45-
46-
39+
function blurActiveInput() {
40+
this.className = currentlyActiveInputClassName;
4741
}
4842

43+
function initInputHighlightScript() {
44+
var tags = ["INPUT", "TEXTAREA"];
4945

50-
function initInputHighlightScript()
51-
{
52-
var tags = ['INPUT','TEXTAREA'];
53-
54-
for(tagCounter=0;tagCounter<tags.length;tagCounter++){
55-
var inputs = document.getElementsByTagName(tags[tagCounter]);
56-
for(var no=0;no<inputs.length;no++){
57-
if(inputs[no].className && inputs[no].className=='doNotHighlightThisInput')continue;
58-
59-
if(inputs[no].tagName.toLowerCase()=='textarea' || (inputs[no].tagName.toLowerCase()=='input' && inputs[no].type.toLowerCase()=='text')){
60-
inputs[no].onfocus = highlightActiveInput;
61-
inputs[no].onblur = blurActiveInput;
62-
}
63-
}
64-
}
65-
}
46+
for (tagCounter = 0; tagCounter < tags.length; tagCounter++) {
47+
var inputs = document.getElementsByTagName(tags[tagCounter]);
48+
for (var no = 0; no < inputs.length; no++) {
49+
if (
50+
inputs[no].className &&
51+
inputs[no].className == "doNotHighlightThisInput"
52+
)
53+
continue;
54+
55+
if (
56+
inputs[no].tagName.toLowerCase() == "textarea" ||
57+
(inputs[no].tagName.toLowerCase() == "input" &&
58+
inputs[no].type.toLowerCase() == "text")
59+
) {
60+
inputs[no].onfocus = highlightActiveInput;
61+
inputs[no].onblur = blurActiveInput;
62+
}
63+
}
64+
}
65+
}

web/media/jquery.jgrowl.css

+101-100
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,101 @@
1-
2-
div.jGrowl {
3-
padding: 5px;
4-
z-index: 9999;
5-
color: #fff;
6-
font-size: 12px;
7-
}
8-
9-
/** Normal Style Positions **/
10-
div.jGrowl {
11-
position: absolute;
12-
}
13-
14-
body > div.jGrowl {
15-
position: fixed;
16-
}
17-
18-
div.jGrowl.top-left {
19-
left: 0px;
20-
top: 0px;
21-
}
22-
23-
div.jGrowl.top-right {
24-
right: 0px;
25-
top: 0px;
26-
}
27-
28-
div.jGrowl.bottom-left {
29-
left: 0px;
30-
bottom: 0px;
31-
}
32-
33-
div.jGrowl.bottom-right {
34-
right: 0px;
35-
bottom: 0px;
36-
}
37-
38-
div.jGrowl.center {
39-
top: 0px;
40-
width: 50%;
41-
left: 25%;
42-
}
43-
44-
/** Cross Browser Styling **/
45-
div.center div.jGrowl-notification, div.center div.jGrowl-closer {
46-
margin-left: auto;
47-
margin-right: auto;
48-
}
49-
50-
div.jGrowl div.jGrowl-notification, div.jGrowl div.jGrowl-closer {
51-
background-color: #000; /*#eefcb8;*/
52-
opacity: .85;
53-
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)";
54-
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=85);
55-
zoom: 1;
56-
width: 600px;
57-
padding: 10px;
58-
margin-top: 5px;
59-
margin-bottom: 5px;
60-
font-family: Tahoma, Arial, Helvetica, sans-serif;
61-
font-size: 1em;
62-
text-align: left;
63-
display: none;
64-
-moz-border-radius: 5px;
65-
-webkit-border-radius: 5px;
66-
border: 2px solid #9ac400;
67-
}
68-
69-
div.jGrowl div.jGrowl-notification {
70-
min-height: 15px;
71-
}
72-
73-
div.jGrowl div.jGrowl-notification div.jGrowl-header {
74-
font-weight: bold;
75-
font-size: .85em;
76-
}
77-
78-
div.jGrowl div.jGrowl-notification div.jGrowl-close {
79-
z-index: 99;
80-
float: right;
81-
font-weight: bold;
82-
font-size: 1em;
83-
cursor: pointer;
84-
}
85-
86-
div.jGrowl div.jGrowl-closer {
87-
padding-top: 4px;
88-
padding-bottom: 4px;
89-
cursor: pointer;
90-
font-size: .9em;
91-
font-weight: bold;
92-
text-align: center;
93-
}
94-
95-
/** Hide jGrowl when printing **/
96-
@media print {
97-
div.jGrowl {
98-
display: none;
99-
}
100-
}
1+
div.jGrowl {
2+
padding: 5px;
3+
z-index: 9999;
4+
color: #fff;
5+
font-size: 12px;
6+
}
7+
8+
/** Normal Style Positions **/
9+
div.jGrowl {
10+
position: absolute;
11+
}
12+
13+
body > div.jGrowl {
14+
position: fixed;
15+
}
16+
17+
div.jGrowl.top-left {
18+
left: 0px;
19+
top: 0px;
20+
}
21+
22+
div.jGrowl.top-right {
23+
right: 0px;
24+
top: 0px;
25+
}
26+
27+
div.jGrowl.bottom-left {
28+
left: 0px;
29+
bottom: 0px;
30+
}
31+
32+
div.jGrowl.bottom-right {
33+
right: 0px;
34+
bottom: 0px;
35+
}
36+
37+
div.jGrowl.center {
38+
top: 0px;
39+
width: 50%;
40+
left: 25%;
41+
}
42+
43+
/** Cross Browser Styling **/
44+
div.center div.jGrowl-notification,
45+
div.center div.jGrowl-closer {
46+
margin-left: auto;
47+
margin-right: auto;
48+
}
49+
50+
div.jGrowl div.jGrowl-notification,
51+
div.jGrowl div.jGrowl-closer {
52+
background-color: #000; /*#eefcb8;*/
53+
opacity: 0.85;
54+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)";
55+
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=85);
56+
zoom: 1;
57+
width: 600px;
58+
padding: 10px;
59+
margin-top: 5px;
60+
margin-bottom: 5px;
61+
font-family: Tahoma, Arial, Helvetica, sans-serif;
62+
font-size: 1em;
63+
text-align: left;
64+
display: none;
65+
-moz-border-radius: 5px;
66+
-webkit-border-radius: 5px;
67+
border: 2px solid #9ac400;
68+
}
69+
70+
div.jGrowl div.jGrowl-notification {
71+
min-height: 15px;
72+
}
73+
74+
div.jGrowl div.jGrowl-notification div.jGrowl-header {
75+
font-weight: bold;
76+
font-size: 0.85em;
77+
}
78+
79+
div.jGrowl div.jGrowl-notification div.jGrowl-close {
80+
z-index: 99;
81+
float: right;
82+
font-weight: bold;
83+
font-size: 1em;
84+
cursor: pointer;
85+
}
86+
87+
div.jGrowl div.jGrowl-closer {
88+
padding-top: 4px;
89+
padding-bottom: 4px;
90+
cursor: pointer;
91+
font-size: 0.9em;
92+
font-weight: bold;
93+
text-align: center;
94+
}
95+
96+
/** Hide jGrowl when printing **/
97+
@media print {
98+
div.jGrowl {
99+
display: none;
100+
}
101+
}

web/media/keyhandler.js

+40-41
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,41 @@
11
function checkForEnter(event) {
2-
switch(event.keyCode)
3-
{
4-
// up arrow
5-
case 40:
6-
$(this).parent()
7-
.parent()
8-
.next()
9-
.children("td")
10-
.children("input[class="
11-
+$(this).attr("class")+"]")
12-
.focus()
13-
.select();
14-
break;
15-
16-
// down arrow
17-
case 38:
18-
$(this).parent()
19-
.parent()
20-
.prev()
21-
.children("td")
22-
.children("input[class="
23-
+$(this).attr("class")+"]")
24-
.focus()
25-
.select();
26-
break;
27-
28-
// Enter key
29-
case 13:
30-
$(this).parent()
31-
.parent()
32-
.next()
33-
.children("td")
34-
.children("input[class="
35-
+$(this).attr("class")+"]")
36-
.focus()
37-
.select();
38-
event.preventDefault();
39-
return false;
40-
break;
41-
}
42-
}
2+
switch (event.keyCode) {
3+
// up arrow
4+
case 40:
5+
$(this)
6+
.parent()
7+
.parent()
8+
.next()
9+
.children("td")
10+
.children("input[class=" + $(this).attr("class") + "]")
11+
.focus()
12+
.select();
13+
break;
14+
15+
// down arrow
16+
case 38:
17+
$(this)
18+
.parent()
19+
.parent()
20+
.prev()
21+
.children("td")
22+
.children("input[class=" + $(this).attr("class") + "]")
23+
.focus()
24+
.select();
25+
break;
26+
27+
// Enter key
28+
case 13:
29+
$(this)
30+
.parent()
31+
.parent()
32+
.next()
33+
.children("td")
34+
.children("input[class=" + $(this).attr("class") + "]")
35+
.focus()
36+
.select();
37+
event.preventDefault();
38+
return false;
39+
break;
40+
}
41+
}

0 commit comments

Comments
 (0)