|
|
@@ -44,12 +44,15 @@
|
|
|
{
|
|
|
foreach (var i in g.Value)
|
|
|
{
|
|
|
- ViewContext.Writer.WriteLine("popupNames.push(\"" + i.Name + "\");");
|
|
|
- ViewContext.Writer.WriteLine("popupElements[\"" + i.Name + "\"] = \"" + i.Name + "_PW-1\";");
|
|
|
- ViewContext.Writer.WriteLine("popupImages[\"" + i.Name + "\"] = \"" + Url.Content(i.ImageUrl) + "\";");
|
|
|
- ViewContext.Writer.WriteLine("popupDescriptions[\"" + i.Name + "\"] = \"" + i.Description + "\";");
|
|
|
- ViewContext.Writer.WriteLine("popupUrls[\"" + i.Name + "\"] = \"" + Url.RouteUrl(i.RouteName) + "\";");
|
|
|
- ViewContext.Writer.WriteLine("popupMaxOnStartup[\"" + i.Name + "\"] = " + (i.MaximizedOnStart.HasValue ? i.MaximizedOnStart.Value.ToString().ToLower() : "false") + ";");
|
|
|
+ if (Url.RouteCollection[i.RouteName] != null)
|
|
|
+ {
|
|
|
+ ViewContext.Writer.WriteLine("popupNames.push(\"" + i.Name + "\");");
|
|
|
+ ViewContext.Writer.WriteLine("popupElements[\"" + i.Name + "\"] = \"" + i.Name + "_PW-1\";");
|
|
|
+ ViewContext.Writer.WriteLine("popupImages[\"" + i.Name + "\"] = \"" + Url.Content(i.ImageUrl) + "\";");
|
|
|
+ ViewContext.Writer.WriteLine("popupDescriptions[\"" + i.Name + "\"] = \"" + i.Description + "\";");
|
|
|
+ ViewContext.Writer.WriteLine("popupUrls[\"" + i.Name + "\"] = \"" + Url.RouteUrl(i.RouteName) + "\";");
|
|
|
+ ViewContext.Writer.WriteLine("popupMaxOnStartup[\"" + i.Name + "\"] = " + (i.MaximizedOnStart.HasValue ? i.MaximizedOnStart.Value.ToString().ToLower() : "false") + ";");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -376,36 +379,39 @@
|
|
|
{
|
|
|
foreach (var i in g.Value)
|
|
|
{
|
|
|
- Html.DevExpress().PopupControl(s =>
|
|
|
+ if (Url.RouteCollection[i.RouteName] != null)
|
|
|
{
|
|
|
- s.Name = i.Name + "-Popup";
|
|
|
- s.HeaderText = i.Description;
|
|
|
- s.SetHeaderTemplateContent(
|
|
|
- "<div class=\"functionHeader\">" +
|
|
|
- "<img class=\"headerIcon\" src=\"" + Url.Content(i.ImageUrl) + "\" />" +
|
|
|
- "<span class=\"headerText\">" + i.Description + "</span>" +
|
|
|
- "<div class=\"controlContainer\">" +
|
|
|
- "<img class=\"controlIcon\" src=\"" +
|
|
|
- Url.Content("~/Content/Images/minimize-16.png") + "\" onclick=\"hideFunction('" + i.Name + "',true);\" />" +
|
|
|
- "<img class=\"controlIcon\" src=\"" +
|
|
|
- Url.Content("~/Content/Images/maximize-16.png") + "\" onclick=\"toggleMaximizeFunction('" + i.Name + "');\" />" +
|
|
|
- "<img class=\"controlIcon\" src=\"" +
|
|
|
- Url.Content("~/Content/Images/fullScreen-16.png") + "\" onclick=\"toggleFullscreenFunction('" + i.Name + "',this);\" />" +
|
|
|
- "<img class=\"controlIcon\" src=\"" +
|
|
|
- Url.Content("~/Content/Images/close-16.png") + "\" onclick=\"hideFunction('" + i.Name + "',false);\" />" +
|
|
|
- "</div>" +
|
|
|
- "</div>");
|
|
|
- s.ContentUrl = Url.RouteUrl(i.RouteName);
|
|
|
- s.Modal = false;
|
|
|
- s.ShowMaximizeButton = (i.AllowMaximize.HasValue && i.AllowMaximize.Value) ? true : false;
|
|
|
- s.Width = new Unit(i.BaseWidth.Value, UnitType.Pixel);
|
|
|
- s.Height = new Unit(i.BaseHeight.Value, UnitType.Pixel);
|
|
|
- s.MinWidth = new Unit(i.MinWidth.Value, UnitType.Pixel);
|
|
|
- s.MinHeight = new Unit(i.MinHeight.Value, UnitType.Pixel);
|
|
|
- s.CloseAction = CloseAction.None;
|
|
|
- s.AllowDragging = false;
|
|
|
- s.Styles.Header.CssClass += "devExAllowDrag";
|
|
|
- }).GetHtml();
|
|
|
+ Html.DevExpress().PopupControl(s =>
|
|
|
+ {
|
|
|
+ s.Name = i.Name + "-Popup";
|
|
|
+ s.HeaderText = i.Description;
|
|
|
+ s.SetHeaderTemplateContent(
|
|
|
+ "<div class=\"functionHeader\">" +
|
|
|
+ "<img class=\"headerIcon\" src=\"" + Url.Content(i.ImageUrl) + "\" />" +
|
|
|
+ "<span class=\"headerText\">" + i.Description + "</span>" +
|
|
|
+ "<div class=\"controlContainer\">" +
|
|
|
+ "<img class=\"controlIcon\" src=\"" +
|
|
|
+ Url.Content("~/Content/Images/minimize-16.png") + "\" onclick=\"hideFunction('" + i.Name + "',true);\" />" +
|
|
|
+ "<img class=\"controlIcon\" src=\"" +
|
|
|
+ Url.Content("~/Content/Images/maximize-16.png") + "\" onclick=\"toggleMaximizeFunction('" + i.Name + "');\" />" +
|
|
|
+ "<img class=\"controlIcon\" src=\"" +
|
|
|
+ Url.Content("~/Content/Images/fullScreen-16.png") + "\" onclick=\"toggleFullscreenFunction('" + i.Name + "',this);\" />" +
|
|
|
+ "<img class=\"controlIcon\" src=\"" +
|
|
|
+ Url.Content("~/Content/Images/close-16.png") + "\" onclick=\"hideFunction('" + i.Name + "',false);\" />" +
|
|
|
+ "</div>" +
|
|
|
+ "</div>");
|
|
|
+ s.ContentUrl = Url.RouteUrl(i.RouteName);
|
|
|
+ s.Modal = false;
|
|
|
+ s.ShowMaximizeButton = (i.AllowMaximize.HasValue && i.AllowMaximize.Value) ? true : false;
|
|
|
+ s.Width = new Unit(i.BaseWidth.Value, UnitType.Pixel);
|
|
|
+ s.Height = new Unit(i.BaseHeight.Value, UnitType.Pixel);
|
|
|
+ s.MinWidth = new Unit(i.MinWidth.Value, UnitType.Pixel);
|
|
|
+ s.MinHeight = new Unit(i.MinHeight.Value, UnitType.Pixel);
|
|
|
+ s.CloseAction = CloseAction.None;
|
|
|
+ s.AllowDragging = false;
|
|
|
+ s.Styles.Header.CssClass += "devExAllowDrag";
|
|
|
+ }).GetHtml();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -430,6 +436,12 @@
|
|
|
|
|
|
foreach (var g in Model.AvailableFunctions)
|
|
|
{
|
|
|
+ var hasFunctions =
|
|
|
+ g.Value
|
|
|
+ .Any(i => Url.RouteCollection[i.RouteName] != null);
|
|
|
+
|
|
|
+ if (!hasFunctions) continue;
|
|
|
+
|
|
|
s.Groups.Add(n1 =>
|
|
|
{
|
|
|
n1.Name = g.Key.Name;
|
|
|
@@ -438,13 +450,16 @@
|
|
|
|
|
|
foreach (var i in g.Value)
|
|
|
{
|
|
|
- n1.Items.Add(n2 =>
|
|
|
- {
|
|
|
- n2.Name = i.Name;
|
|
|
- n2.Text = i.Description;
|
|
|
- n2.Image.Url = i.ImageUrl;
|
|
|
- n2.Image.UrlHottracked = GreenTree.Nachtragsmanagement.Core.StaticHelper.AddSuffix(i.ImageUrl, "-contrast", true);
|
|
|
- });
|
|
|
+ if (Url.RouteCollection[i.RouteName] != null)
|
|
|
+ {
|
|
|
+ n1.Items.Add(n2 =>
|
|
|
+ {
|
|
|
+ n2.Name = i.Name;
|
|
|
+ n2.Text = i.Description;
|
|
|
+ n2.Image.Url = i.ImageUrl;
|
|
|
+ n2.Image.UrlHottracked = GreenTree.Nachtragsmanagement.Core.StaticHelper.AddSuffix(i.ImageUrl, "-contrast", true);
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
}
|