Skip to content

Commit

Permalink
Autoformat JavaScript and css in /kipamedia
Browse files Browse the repository at this point in the history
Autoformatting is made with prettier.
  • Loading branch information
ilesoft committed Dec 21, 2024
1 parent a0dfa1d commit 01f6a19
Show file tree
Hide file tree
Showing 10 changed files with 2,142 additions and 1,055 deletions.
66 changes: 33 additions & 33 deletions web/media/highlight-active-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,44 +22,44 @@ written by Alf Magne Kalleland.
Alf Magne Kalleland, 2005
Owner of DHTMLgoodies.com
************************************************************************************************************/
************************************************************************************************************/

var currentlyActiveInputRef = false;
var currentlyActiveInputClassName = false;

function highlightActiveInput()
{
if(currentlyActiveInputRef){
currentlyActiveInputRef.className = currentlyActiveInputClassName;
}
currentlyActiveInputClassName = this.className;
this.className = 'inputHighlighted';
currentlyActiveInputRef = this;


function highlightActiveInput() {
if (currentlyActiveInputRef) {
currentlyActiveInputRef.className = currentlyActiveInputClassName;
}
currentlyActiveInputClassName = this.className;
this.className = "inputHighlighted";
currentlyActiveInputRef = this;
}

function blurActiveInput()
{
this.className = currentlyActiveInputClassName;


function blurActiveInput() {
this.className = currentlyActiveInputClassName;
}

function initInputHighlightScript() {
var tags = ["INPUT", "TEXTAREA"];

function initInputHighlightScript()
{
var tags = ['INPUT','TEXTAREA'];

for(tagCounter=0;tagCounter<tags.length;tagCounter++){
var inputs = document.getElementsByTagName(tags[tagCounter]);
for(var no=0;no<inputs.length;no++){
if(inputs[no].className && inputs[no].className=='doNotHighlightThisInput')continue;

if(inputs[no].tagName.toLowerCase()=='textarea' || (inputs[no].tagName.toLowerCase()=='input' && inputs[no].type.toLowerCase()=='text')){
inputs[no].onfocus = highlightActiveInput;
inputs[no].onblur = blurActiveInput;
}
}
}
}
for (tagCounter = 0; tagCounter < tags.length; tagCounter++) {
var inputs = document.getElementsByTagName(tags[tagCounter]);
for (var no = 0; no < inputs.length; no++) {
if (
inputs[no].className &&
inputs[no].className == "doNotHighlightThisInput"
)
continue;

if (
inputs[no].tagName.toLowerCase() == "textarea" ||
(inputs[no].tagName.toLowerCase() == "input" &&
inputs[no].type.toLowerCase() == "text")
) {
inputs[no].onfocus = highlightActiveInput;
inputs[no].onblur = blurActiveInput;
}
}
}
}
201 changes: 101 additions & 100 deletions web/media/jquery.jgrowl.css
Original file line number Diff line number Diff line change
@@ -1,100 +1,101 @@

div.jGrowl {
padding: 5px;
z-index: 9999;
color: #fff;
font-size: 12px;
}

/** Normal Style Positions **/
div.jGrowl {
position: absolute;
}

body > div.jGrowl {
position: fixed;
}

div.jGrowl.top-left {
left: 0px;
top: 0px;
}

div.jGrowl.top-right {
right: 0px;
top: 0px;
}

div.jGrowl.bottom-left {
left: 0px;
bottom: 0px;
}

div.jGrowl.bottom-right {
right: 0px;
bottom: 0px;
}

div.jGrowl.center {
top: 0px;
width: 50%;
left: 25%;
}

/** Cross Browser Styling **/
div.center div.jGrowl-notification, div.center div.jGrowl-closer {
margin-left: auto;
margin-right: auto;
}

div.jGrowl div.jGrowl-notification, div.jGrowl div.jGrowl-closer {
background-color: #000; /*#eefcb8;*/
opacity: .85;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)";
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=85);
zoom: 1;
width: 600px;
padding: 10px;
margin-top: 5px;
margin-bottom: 5px;
font-family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 1em;
text-align: left;
display: none;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border: 2px solid #9ac400;
}

div.jGrowl div.jGrowl-notification {
min-height: 15px;
}

div.jGrowl div.jGrowl-notification div.jGrowl-header {
font-weight: bold;
font-size: .85em;
}

div.jGrowl div.jGrowl-notification div.jGrowl-close {
z-index: 99;
float: right;
font-weight: bold;
font-size: 1em;
cursor: pointer;
}

div.jGrowl div.jGrowl-closer {
padding-top: 4px;
padding-bottom: 4px;
cursor: pointer;
font-size: .9em;
font-weight: bold;
text-align: center;
}

/** Hide jGrowl when printing **/
@media print {
div.jGrowl {
display: none;
}
}
div.jGrowl {
padding: 5px;
z-index: 9999;
color: #fff;
font-size: 12px;
}

/** Normal Style Positions **/
div.jGrowl {
position: absolute;
}

body > div.jGrowl {
position: fixed;
}

div.jGrowl.top-left {
left: 0px;
top: 0px;
}

div.jGrowl.top-right {
right: 0px;
top: 0px;
}

div.jGrowl.bottom-left {
left: 0px;
bottom: 0px;
}

div.jGrowl.bottom-right {
right: 0px;
bottom: 0px;
}

div.jGrowl.center {
top: 0px;
width: 50%;
left: 25%;
}

/** Cross Browser Styling **/
div.center div.jGrowl-notification,
div.center div.jGrowl-closer {
margin-left: auto;
margin-right: auto;
}

div.jGrowl div.jGrowl-notification,
div.jGrowl div.jGrowl-closer {
background-color: #000; /*#eefcb8;*/
opacity: 0.85;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)";
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=85);
zoom: 1;
width: 600px;
padding: 10px;
margin-top: 5px;
margin-bottom: 5px;
font-family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 1em;
text-align: left;
display: none;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border: 2px solid #9ac400;
}

div.jGrowl div.jGrowl-notification {
min-height: 15px;
}

div.jGrowl div.jGrowl-notification div.jGrowl-header {
font-weight: bold;
font-size: 0.85em;
}

div.jGrowl div.jGrowl-notification div.jGrowl-close {
z-index: 99;
float: right;
font-weight: bold;
font-size: 1em;
cursor: pointer;
}

div.jGrowl div.jGrowl-closer {
padding-top: 4px;
padding-bottom: 4px;
cursor: pointer;
font-size: 0.9em;
font-weight: bold;
text-align: center;
}

/** Hide jGrowl when printing **/
@media print {
div.jGrowl {
display: none;
}
}
81 changes: 40 additions & 41 deletions web/media/keyhandler.js
Original file line number Diff line number Diff line change
@@ -1,42 +1,41 @@
function checkForEnter(event) {
switch(event.keyCode)
{
// up arrow
case 40:
$(this).parent()
.parent()
.next()
.children("td")
.children("input[class="
+$(this).attr("class")+"]")
.focus()
.select();
break;

// down arrow
case 38:
$(this).parent()
.parent()
.prev()
.children("td")
.children("input[class="
+$(this).attr("class")+"]")
.focus()
.select();
break;

// Enter key
case 13:
$(this).parent()
.parent()
.next()
.children("td")
.children("input[class="
+$(this).attr("class")+"]")
.focus()
.select();
event.preventDefault();
return false;
break;
}
}
switch (event.keyCode) {
// up arrow
case 40:
$(this)
.parent()
.parent()
.next()
.children("td")
.children("input[class=" + $(this).attr("class") + "]")
.focus()
.select();
break;

// down arrow
case 38:
$(this)
.parent()
.parent()
.prev()
.children("td")
.children("input[class=" + $(this).attr("class") + "]")
.focus()
.select();
break;

// Enter key
case 13:
$(this)
.parent()
.parent()
.next()
.children("td")
.children("input[class=" + $(this).attr("class") + "]")
.focus()
.select();
event.preventDefault();
return false;
break;
}
}
Loading

0 comments on commit 01f6a19

Please sign in to comment.