Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
fix bugs 244: different display of checkbox in IE/firefox and 484: Mi…
…ssing onfocus/onblur in some user section *.tpl and many admin section *.tpl handle FORM elements with a behaviour (inputfix.htc) in IE the behaviour sets onfocus and onblur events too (no longer needed in *.tpl) other browsers use css selector :focus and [type=___] git-svn-id: http://piwigo.org/svn/trunk@1491 68402e56-0260-453c-a942-63ccdbb3a9ee
- Loading branch information
chrisaga
committed
Jul 22, 2006
1 parent
a15839b
commit e3c4d79
Showing
13 changed files
with
108 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<public:attach event="oncontentready" onevent="fixElements()" /> | ||
|
||
<script langage=javascript> | ||
|
||
function setFocusStyle() | ||
{ | ||
this.className += ' focus'; | ||
} | ||
|
||
function setBlurStyle() | ||
{ | ||
this.className = this.className.replace( ' focus', ' nofocus'); | ||
} | ||
|
||
function setClassFromType() | ||
{ | ||
this.className += ' ' + this.type; | ||
} | ||
|
||
function fixElements() | ||
{ | ||
for ( var i=0; i<this.elements.length; i++ ) | ||
{ | ||
var elem=this.elements[i]; | ||
switch ( elem.tagName ) | ||
{ | ||
case "INPUT": | ||
elem.className += ' ' + elem.type; | ||
if ( (elem.type != "radio") && (elem.type != "checkbox") ) | ||
{ /* setting focus/nofocus on those is a mess to handle in css */ | ||
elem.onfocus = setFocusStyle; | ||
elem.onblur = setBlurStyle; | ||
} | ||
break; | ||
case "SELECT": | ||
case "TEXTAREA": | ||
elem.onfocus = setFocusStyle; | ||
elem.onblur = setBlurStyle; | ||
} | ||
} | ||
} | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.