Skip to content

Commit 5a17a97

Browse files
authored
Merge pull request #27 from juvander/fix26
Fix for issue #26
2 parents 6b372a8 + 0ab9f22 commit 5a17a97

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

Form.ascx.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -605,15 +605,15 @@ private void CreateInputForm()
605605
PlaceHolder.Controls.Add(objDeleteButton);
606606
break;
607607
case "CATEGORIES":
608-
RepositoryCategoryController categories = new RepositoryCategoryController();
608+
RepositoryCategoryController categories = new RepositoryCategoryController();
609609
RepositoryCategoryInfo category = null;
610610
RepositoryObjectCategoriesController repositoryObjectCategories = new RepositoryObjectCategoriesController();
611611
RepositoryObjectCategoriesInfo repositoryObjectCategory = null;
612612
object obj = null;
613613
// get control type for categories
614614
string controlType = oRepositoryBusinessController.GetSkinAttribute(xmlDoc, "Categories", "Select", "MULTIPLE");
615615
if (controlType == "TREE") {
616-
var objTree = new DnnTree();
616+
var objTree = new DnnTree();
617617
objTree.ID = "__Categories";
618618
objTree.SystemImagesPath = ResolveUrl("~/images/");
619619
objTree.ImageList.Add(ResolveUrl("~/images/folder.gif"));
@@ -623,9 +623,9 @@ private void CreateInputForm()
623623
objTree.EnableViewState = true;
624624
objTree.CheckBoxes = true;
625625
ArrayList ArrCategories = categories.GetRepositoryCategories(ModuleId, -1);
626-
oRepositoryBusinessController.AddCategoryToTreeObject(ModuleId, itemId, ArrCategories, objTree.TreeNodes[0], "", false);
627-
PlaceHolder.Controls.Add(objTree);
628-
} else {
626+
oRepositoryBusinessController.AddCategoryToTreeObject(ModuleId, itemId, ArrCategories, objTree.TreeNodes, "", false);
627+
PlaceHolder.Controls.Add(objTree);
628+
} else {
629629
switch (Strings.UCase(controlType)) {
630630
case "SINGLE":
631631
var objSingle = new RadioButtonList();
@@ -688,7 +688,7 @@ private void CreateInputForm()
688688
}
689689

690690
}
691-
break;
691+
break;
692692
case "ATTRIBUTES":
693693
RepositoryAttributesController attributes = new RepositoryAttributesController();
694694
RepositoryAttributesInfo attribute = null;

Helpers.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ public string ExtractFileName(string filename, bool ExtractGuid)
708708

709709
}
710710

711-
public void AddCategoryToTreeObject(int moduleid, int itemid, ArrayList arr, DotNetNuke.UI.WebControls.TreeNode obj, string prefix, bool showCount)
711+
public void AddCategoryToTreeObject(int moduleid, int itemid, ArrayList arr, DotNetNuke.UI.WebControls.TreeNodeCollection obj, string prefix, bool showCount)
712712
{
713713
RepositoryObjectCategoriesController cc = new RepositoryObjectCategoriesController();
714714
RepositoryObjectCategoriesInfo cv = null;
@@ -733,10 +733,10 @@ public void AddCategoryToTreeObject(int moduleid, int itemid, ArrayList arr, Dot
733733
newNode.Selected = false;
734734
}
735735

736-
obj.TreeNodes.Add(newNode);
736+
obj.Add(newNode);
737737
arr2 = cController.GetRepositoryCategories(moduleid, cat.ItemId);
738738
if (arr2.Count > 0) {
739-
AddCategoryToTreeObject(moduleid, itemid, arr2, newNode, "", showCount);
739+
AddCategoryToTreeObject(moduleid, itemid, arr2, newNode.TreeNodes, "", showCount);
740740
}
741741
}
742742
}

Repository.ascx.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2199,7 +2199,7 @@ private void ParseHeaderTemplate()
21992199
obj.CheckBoxes = false;
22002200
obj.NodeClick += TreeNodeClick;
22012201
bool bShowCount = bool.Parse(oRepositoryBusinessController.GetSkinAttribute(xmlDoc, "CATEGORY", "ShowCount", "False"));
2202-
oRepositoryBusinessController.AddCategoryToTreeObject(ModuleId, -1, categories, obj.TreeNodes[0], "", bShowCount);
2202+
oRepositoryBusinessController.AddCategoryToTreeObject(ModuleId, -1, categories, obj.TreeNodes, "", bShowCount);
22032203
hPlaceHolder.Controls.Add(obj);
22042204
break;
22052205
}

RepositoryDashboard.ascx.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ private void InjectDNNTreeToken(RepositoryCategoryController categories)
996996
Arr = RecalcCategoryCount(Arr);
997997

998998
CheckForAllItems(Arr);
999-
oRepositoryBusinessController.AddCategoryToTreeObject(m_RepositoryId, -1, Arr, obj.TreeNodes[0], "", bShowCount);
999+
oRepositoryBusinessController.AddCategoryToTreeObject(m_RepositoryId, -1, Arr, obj.TreeNodes, "", bShowCount);
10001000
objPlaceHolder.Controls.Add(obj);
10011001
m_hasTree = true;
10021002
}

0 commit comments

Comments
 (0)