summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ccc0741)
raw | patch | inline | side by side (parent: ccc0741)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 1 Mar 2010 14:51:08 +0000 (14:51 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 1 Mar 2010 14:51:08 +0000 (14:51 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15805 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/html/include/gosa.js | patch | blob | history |
index fd7780f41879092089158f343f8fafd8d6720b89..57176727b41ca5a3339b8645d93d29423d021922 100644 (file)
var tmp = document.getElementsByName(focus_field.arguments[i]);
for(e = 0 ; e < tmp.length ; e ++ ){
- if(tmp[e].disabled != true && tmp[e].type != "none" && tmp[e].type != "hidden" && tmp[e].style.display != ""){
+ if(isVisible(tmp[e])){
found = true;
element = tmp[e];
break;
}
+function isVisible(obj)
+{
+ if (obj == document) return true
+
+ if (!obj) return false
+ if (!obj.parentNode) return false
+ if (obj.style) {
+ if (obj.style.display == 'none') return false
+ if (obj.style.visibility == 'hidden') return false
+ }
+
+ //Try the computed style in a standard way
+ if (window.getComputedStyle) {
+ var style = window.getComputedStyle(obj, "")
+ if (style.display == 'none') return false
+ if (style.visibility == 'hidden') return false
+ }
+
+ //Or get the computed style using IE's silly proprietary way
+ var style = obj.currentStyle
+ if (style) {
+ if (style['display'] == 'none') return false
+ if (style['visibility'] == 'hidden') return false
+ }
+
+ return isVisible(obj.parentNode)
+}
+
+
+
// Global storage for baseSelector timer
var rtimer;