/// <summary> /// static method to return the tree init url with the specified parameters /// </summary> /// <param name="startNodeID"></param> /// <param name="treeType"></param> /// <param name="showContextMenu"></param> /// <param name="isDialog"></param> /// <param name="dialogMode"></param> /// <param name="app"></param> /// <param name="nodeKey"></param> /// <param name="functionToCall"></param> /// <returns></returns> public static string GetInitUrl(int?startNodeID, string treeType, bool?showContextMenu, bool?isDialog, TreeDialogModes dialogMode, string app, string nodeKey, string functionToCall) { TreeService treeSvc = new TreeService(startNodeID, treeType, showContextMenu, isDialog, dialogMode, app, nodeKey, functionToCall); return(treeSvc.GetInitUrl()); }
/// <summary> /// Constructor to assign all TreeService properties except nodeKey in one call /// </summary> /// <param name="startNodeID"></param> /// <param name="treeType"></param> /// <param name="showContextMenu"></param> /// <param name="isDialog"></param> /// <param name="dialogMode"></param> /// <param name="app"></param> public TreeService(int?startNodeID, string treeType, bool?showContextMenu, bool?isDialog, TreeDialogModes dialogMode, string app) { StartNodeID = startNodeID ?? -1; TreeType = treeType; ShowContextMenu = showContextMenu ?? true; IsDialog = isDialog ?? false; m_dialogMode = dialogMode; App = app; }
/// <summary> /// Constructor to assign all TreeService properties except nodeKey in one call /// </summary> /// <param name="startNodeID"></param> /// <param name="treeType"></param> /// <param name="showContextMenu"></param> /// <param name="isDialog"></param> /// <param name="dialogMode"></param> /// <param name="app"></param> public TreeService(int? startNodeID, string treeType, bool? showContextMenu, bool? isDialog, TreeDialogModes dialogMode, string app) { StartNodeID = startNodeID ?? -1; TreeType = treeType; ShowContextMenu = showContextMenu ?? true; IsDialog = isDialog ?? false; m_dialogMode = dialogMode; App = app; }
public Dictionary<string, string> GetInitAppTreeData(string app, string treeType, bool showContextMenu, bool isDialog, TreeDialogModes dialogMode, string functionToCall, string nodeKey) { Authorize(); var treeCtl = new TreeControl() { ShowContextMenu = showContextMenu, IsDialog = isDialog, DialogMode = dialogMode, App = app, TreeType = string.IsNullOrEmpty(treeType) ? "" : treeType, //don't set the tree type unless explicitly set NodeKey = string.IsNullOrEmpty(nodeKey) ? "" : nodeKey, //StartNodeID = -1, //TODO: set this based on parameters! FunctionToCall = string.IsNullOrEmpty(functionToCall) ? "" : functionToCall }; var returnVal = new Dictionary<string, string>(); if (string.IsNullOrEmpty(treeType)) { //if there's not tree type specified, then render out the tree as per normal with the normal //way of doing things returnVal.Add("json", treeCtl.GetJSONInitNode()); } else { //since 4.5.1 has a bug in it, it ignores if the treeType is specified and will always only render //the whole APP not just a specific tree. //this is a work around for this bug until it is fixed (which should be fixed in 4.5.2 //get the tree that we need to render var tree = TreeDefinitionCollection.Instance.FindTree(treeType).CreateInstance(); tree.ShowContextMenu = showContextMenu; tree.IsDialog = isDialog; tree.DialogMode = dialogMode; tree.NodeKey = string.IsNullOrEmpty(nodeKey) ? "" : nodeKey; tree.FunctionToCall = string.IsNullOrEmpty(functionToCall) ? "" : functionToCall; //now render it's start node var xTree = new XmlTree(); //we're going to hijack the node name here to make it say content/media var node = tree.RootNode; if (node.Text.Equals("[FilteredContentTree]")) node.Text = ui.GetText("content"); else if (node.Text.Equals("[FilteredMediaTree]")) node.Text = ui.GetText("media"); xTree.Add(node); returnVal.Add("json", xTree.ToString()); } returnVal.Add("app", app); returnVal.Add("js", treeCtl.JSCurrApp); return returnVal; }
public TreeService(int?startNodeID, string treeType, bool?showContextMenu, bool?isDialog, TreeDialogModes dialogMode, string app, string nodeKey, string functionToCall) { StartNodeID = startNodeID ?? -1; TreeType = treeType; ShowContextMenu = showContextMenu ?? true; IsDialog = isDialog ?? false; m_dialogMode = dialogMode; App = app; NodeKey = nodeKey; FunctionToCall = functionToCall; }
public TreeService(int? startNodeID, string treeType, bool? showContextMenu, bool? isDialog, TreeDialogModes dialogMode, string app, string nodeKey, string functionToCall) { StartNodeID = startNodeID ?? -1; TreeType = treeType; ShowContextMenu = showContextMenu ?? true; IsDialog = isDialog ?? false; m_dialogMode = dialogMode; App = app; NodeKey = nodeKey; FunctionToCall = functionToCall; }
public Dictionary<string, string> GetInitAppTreeData(string app, string treeType, bool showContextMenu, bool isDialog, TreeDialogModes dialogMode, string functionToCall, string nodeKey) { AuthorizeRequest(app, true); var treeCtl = new TreeControl() { ShowContextMenu = showContextMenu, IsDialog = isDialog, DialogMode = dialogMode, App = app, TreeType = string.IsNullOrEmpty(treeType) ? "" : treeType, //don't set the tree type unless explicitly set NodeKey = string.IsNullOrEmpty(nodeKey) ? "" : nodeKey, StartNodeID = -1, //TODO: set this based on parameters! FunctionToCall = string.IsNullOrEmpty(functionToCall) ? "" : functionToCall }; var returnVal = new Dictionary<string, string>(); if (string.IsNullOrEmpty(treeType)) { //if there's not tree type specified, then render out the tree as per normal with the normal //way of doing things returnVal.Add("json", treeCtl.GetJSONInitNode()); } else { var tree = LegacyTreeDataConverter.GetLegacyTreeForLegacyServices(Services.ApplicationTreeService, treeType); tree.ShowContextMenu = showContextMenu; tree.IsDialog = isDialog; tree.DialogMode = dialogMode; tree.NodeKey = string.IsNullOrEmpty(nodeKey) ? "" : nodeKey; tree.FunctionToCall = string.IsNullOrEmpty(functionToCall) ? "" : functionToCall; //this would be nice to set, but no parameters :( //tree.StartNodeID = //now render it's start node var xTree = new XmlTree(); xTree.Add(tree.RootNode); returnVal.Add("json", xTree.ToString()); } returnVal.Add("app", app); returnVal.Add("js", treeCtl.JSCurrApp); return returnVal; }
public Dictionary<string, string> GetInitAppTreeData(string app, string treeType, bool showContextMenu, bool isDialog, TreeDialogModes dialogMode, string functionToCall, string nodeKey) { Authorize(); TreeControl treeCtl = new TreeControl() { ShowContextMenu = showContextMenu, IsDialog = isDialog, DialogMode = dialogMode, App = app, TreeType = string.IsNullOrEmpty(treeType) ? "" : treeType, //don't set the tree type unless explicitly set NodeKey = string.IsNullOrEmpty(nodeKey) ? "" : nodeKey, StartNodeID = -1, //TODO: set this based on parameters! FunctionToCall = string.IsNullOrEmpty(functionToCall) ? "" : functionToCall }; Dictionary<string, string> returnVal = new Dictionary<string, string>(); if (string.IsNullOrEmpty(treeType)) { //if there's not tree type specified, then render out the tree as per normal with the normal //way of doing things returnVal.Add("json", treeCtl.GetJSONInitNode()); } else { //get the tree that we need to render var tree = TreeDefinitionCollection.Instance.FindTree(treeType).CreateInstance(); tree.ShowContextMenu = showContextMenu; tree.IsDialog = isDialog; tree.DialogMode = dialogMode; tree.NodeKey = string.IsNullOrEmpty(nodeKey) ? "" : nodeKey; tree.FunctionToCall = string.IsNullOrEmpty(functionToCall) ? "" : functionToCall; //this would be nice to set, but no parameters :( //tree.StartNodeID = //now render it's start node XmlTree xTree = new XmlTree(); xTree.Add(tree.RootNode); returnVal.Add("json", xTree.ToString()); } returnVal.Add("app", app); returnVal.Add("js", treeCtl.JSCurrApp); return returnVal; }
/// <summary> /// static method to return the tree init url with the specified parameters /// </summary> /// <param name="startNodeID"></param> /// <param name="treeType"></param> /// <param name="showContextMenu"></param> /// <param name="isDialog"></param> /// <param name="dialogMode"></param> /// <param name="app"></param> /// <param name="nodeKey"></param> /// <param name="functionToCall"></param> /// <returns></returns> public static string GetInitUrl(int? startNodeID, string treeType, bool? showContextMenu, bool? isDialog, TreeDialogModes dialogMode, string app, string nodeKey, string functionToCall) { TreeService treeSvc = new TreeService(startNodeID, treeType, showContextMenu, isDialog, dialogMode, app, nodeKey, functionToCall); return treeSvc.GetInitUrl(); }
public Dictionary <string, string> GetInitAppTreeData(string app, string treeType, bool showContextMenu, bool isDialog, TreeDialogModes dialogMode, string functionToCall, string nodeKey) { AuthorizeRequest(app, true); var treeCtl = new TreeControl() { ShowContextMenu = showContextMenu, IsDialog = isDialog, DialogMode = dialogMode, App = app, TreeType = string.IsNullOrEmpty(treeType) ? "" : treeType, //don't set the tree type unless explicitly set NodeKey = string.IsNullOrEmpty(nodeKey) ? "" : nodeKey, StartNodeID = -1, //TODO: set this based on parameters! FunctionToCall = string.IsNullOrEmpty(functionToCall) ? "" : functionToCall }; var returnVal = new Dictionary <string, string>(); if (string.IsNullOrEmpty(treeType)) { //if there's not tree type specified, then render out the tree as per normal with the normal //way of doing things returnVal.Add("json", treeCtl.GetJSONInitNode()); } else { var tree = LegacyTreeDataConverter.GetLegacyTreeForLegacyServices(Services.ApplicationTreeService, treeType); tree.ShowContextMenu = showContextMenu; tree.IsDialog = isDialog; tree.DialogMode = dialogMode; tree.NodeKey = string.IsNullOrEmpty(nodeKey) ? "" : nodeKey; tree.FunctionToCall = string.IsNullOrEmpty(functionToCall) ? "" : functionToCall; //this would be nice to set, but no parameters :( //tree.StartNodeID = //now render it's start node var xTree = new XmlTree(); xTree.Add(tree.RootNode); returnVal.Add("json", xTree.ToString()); } returnVal.Add("app", app); returnVal.Add("js", treeCtl.JSCurrApp); return(returnVal); }
public Dictionary <string, string> GetInitAppTreeData(string app, string treeType, bool showContextMenu, bool isDialog, TreeDialogModes dialogMode, string functionToCall, string nodeKey) { Authorize(); TreeControl treeCtl = new TreeControl() { ShowContextMenu = showContextMenu, IsDialog = isDialog, DialogMode = dialogMode, App = app, TreeType = string.IsNullOrEmpty(treeType) ? "" : treeType, //don't set the tree type unless explicitly set NodeKey = string.IsNullOrEmpty(nodeKey) ? "" : nodeKey, StartNodeID = -1, //TODO: set this based on parameters! FunctionToCall = string.IsNullOrEmpty(functionToCall) ? "" : functionToCall }; Dictionary <string, string> returnVal = new Dictionary <string, string>(); if (string.IsNullOrEmpty(treeType)) { //if there's not tree type specified, then render out the tree as per normal with the normal //way of doing things returnVal.Add("json", treeCtl.GetJSONInitNode()); } else { //get the tree that we need to render var tree = TreeDefinitionCollection.Instance.FindTree(treeType).CreateInstance(); tree.ShowContextMenu = showContextMenu; tree.IsDialog = isDialog; tree.DialogMode = dialogMode; tree.NodeKey = string.IsNullOrEmpty(nodeKey) ? "" : nodeKey; tree.FunctionToCall = string.IsNullOrEmpty(functionToCall) ? "" : functionToCall; //this would be nice to set, but no parameters :( //tree.StartNodeID = //now render it's start node XmlTree xTree = new XmlTree(); xTree.Add(tree.RootNode); returnVal.Add("json", xTree.ToString()); } returnVal.Add("app", app); returnVal.Add("js", treeCtl.JSCurrApp); return(returnVal); }
public Dictionary <string, string> GetInitAppTreeData(string app, string treeType, bool showContextMenu, bool isDialog, TreeDialogModes dialogMode, string functionToCall, string nodeKey) { Authorize(); var treeCtl = new TreeControl() { ShowContextMenu = showContextMenu, IsDialog = isDialog, DialogMode = dialogMode, App = app, TreeType = string.IsNullOrEmpty(treeType) ? "" : treeType, //don't set the tree type unless explicitly set NodeKey = string.IsNullOrEmpty(nodeKey) ? "" : nodeKey, //StartNodeID = -1, //TODO: set this based on parameters! FunctionToCall = string.IsNullOrEmpty(functionToCall) ? "" : functionToCall }; var returnVal = new Dictionary <string, string>(); if (string.IsNullOrEmpty(treeType)) { //if there's not tree type specified, then render out the tree as per normal with the normal //way of doing things returnVal.Add("json", treeCtl.GetJSONInitNode()); } else { //since 4.5.1 has a bug in it, it ignores if the treeType is specified and will always only render //the whole APP not just a specific tree. //this is a work around for this bug until it is fixed (which should be fixed in 4.5.2 //get the tree that we need to render var tree = TreeDefinitionCollection.Instance.FindTree(treeType).CreateInstance(); tree.ShowContextMenu = showContextMenu; tree.IsDialog = isDialog; tree.DialogMode = dialogMode; tree.NodeKey = string.IsNullOrEmpty(nodeKey) ? "" : nodeKey; tree.FunctionToCall = string.IsNullOrEmpty(functionToCall) ? "" : functionToCall; //now render it's start node var xTree = new XmlTree(); //we're going to hijack the node name here to make it say content/media var node = tree.RootNode; if (node.Text.Equals("[FilteredContentTree]")) { node.Text = ui.GetText("content"); } else if (node.Text.Equals("[FilteredMediaTree]")) { node.Text = ui.GetText("media"); } xTree.Add(node); returnVal.Add("json", xTree.ToString()); } returnVal.Add("app", app); returnVal.Add("js", treeCtl.JSCurrApp); return(returnVal); }