Commit 4483376e1380539d503152ada466c369054cf172
1 parent
7763136b
(#2684) added showAll function and show all divs before hiding all to fix IE div switching bug
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2481 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
11 additions
and
0 deletions
presentation/lookAndFeel/knowledgeTree/js/divSwitch.js
| ... | ... | @@ -13,8 +13,10 @@ function switchDiv(div_id, object) |
| 13 | 13 | if (style_sheet) |
| 14 | 14 | { |
| 15 | 15 | if (object == "document") { |
| 16 | + showAll(aDocumentDivs); | |
| 16 | 17 | hideAll(aDocumentDivs); |
| 17 | 18 | } else { |
| 19 | + showAll(aFolderDivs); | |
| 18 | 20 | hideAll(aFolderDivs); |
| 19 | 21 | } |
| 20 | 22 | changeObjectVisibility(div_id,"visible"); |
| ... | ... | @@ -34,6 +36,15 @@ function hideAll(aDivs) |
| 34 | 36 | changeObjectVisibility(aDivs[i], "hidden"); |
| 35 | 37 | } |
| 36 | 38 | } |
| 39 | +// function showAll() | |
| 40 | +// shows a bunch of divs | |
| 41 | +// | |
| 42 | +function showAll(aDivs) | |
| 43 | +{ | |
| 44 | + for (var i=0; i<aDivs.length; i++) { | |
| 45 | + changeObjectVisibility(aDivs[i], "visible"); | |
| 46 | + } | |
| 47 | +} | |
| 37 | 48 | |
| 38 | 49 | // function getStyleObject(string) -> returns style object |
| 39 | 50 | // given a string containing the id of an object | ... | ... |