Commit ddeee49f3cabcb08cd7e0799a0470f8e43cee2b3
1 parent
27aca027
changed from binary to ascii
added support for folder editing (hideAll is passed an array of divs to hide) git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2183 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
15 additions
and
10 deletions
presentation/lookAndFeel/knowledgeTree/js/divSwitch.js
| @@ -3,12 +3,21 @@ | @@ -3,12 +3,21 @@ | ||
| 3 | // and calls the other functions required | 3 | // and calls the other functions required |
| 4 | // to show that div | 4 | // to show that div |
| 5 | // | 5 | // |
| 6 | -function switchDiv(div_id) | 6 | +function switchDiv(div_id, object) |
| 7 | { | 7 | { |
| 8 | + var aDocumentDivs = new Array("documentData", "genericMetaData", "typeSpecificMetaData", | ||
| 9 | + "archiveSettings", "documentRouting", "linkedDocuments"); | ||
| 10 | + var aFolderDivs = new Array("folderData", "folderRouting", "documentTypes", "folderPermissions"); | ||
| 11 | + | ||
| 8 | var style_sheet = getStyleObject(div_id); | 12 | var style_sheet = getStyleObject(div_id); |
| 9 | if (style_sheet) | 13 | if (style_sheet) |
| 10 | { | 14 | { |
| 11 | - hideAll(); | 15 | + if (object == "document") { |
| 16 | + hideAll(aDocumentDivs); | ||
| 17 | + } else { | ||
| 18 | + hideAll(aFolderDivs); | ||
| 19 | + } | ||
| 20 | + | ||
| 12 | changeObjectVisibility(div_id,"visible"); | 21 | changeObjectVisibility(div_id,"visible"); |
| 13 | } | 22 | } |
| 14 | else | 23 | else |
| @@ -20,15 +29,11 @@ function switchDiv(div_id) | @@ -20,15 +29,11 @@ function switchDiv(div_id) | ||
| 20 | // function hideAll() | 29 | // function hideAll() |
| 21 | // hides a bunch of divs | 30 | // hides a bunch of divs |
| 22 | // | 31 | // |
| 23 | - | ||
| 24 | -function hideAll() | 32 | +function hideAll(aDivs) |
| 25 | { | 33 | { |
| 26 | - changeObjectVisibility("documentData","hidden"); | ||
| 27 | - changeObjectVisibility("genericMetaData","hidden"); | ||
| 28 | - changeObjectVisibility("typeSpecificMetaData","hidden"); | ||
| 29 | - changeObjectVisibility("archiveSettings","hidden"); | ||
| 30 | - changeObjectVisibility("documentRouting","hidden"); | ||
| 31 | - changeObjectVisibility("linkedDocuments","hidden"); | 34 | + for (var i=0; i<aDivs.length; i++) { |
| 35 | + changeObjectVisibility(aDivs[i], "hidden"); | ||
| 36 | + } | ||
| 32 | } | 37 | } |
| 33 | 38 | ||
| 34 | // function getStyleObject(string) -> returns style object | 39 | // function getStyleObject(string) -> returns style object |