wsp-10333 HyperV2012 Redesign Layout to the new style. Part 2.
This commit is contained in:
parent
ec10aa7f0c
commit
42f9646c4a
3 changed files with 29 additions and 9 deletions
|
@ -13,8 +13,8 @@
|
||||||
|
|
||||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||||
|
|
||||||
<div class="FormButtonsBarClean">
|
<div class="FormButtonsBar">
|
||||||
<div class="FormButtonsBarCleanLeft">
|
<div class="Left">
|
||||||
<asp:Button ID="btnCreate" runat="server" meta:resourcekey="btnCreate"
|
<asp:Button ID="btnCreate" runat="server" meta:resourcekey="btnCreate"
|
||||||
Text="Create VPS" CssClass="Button1" CausesValidation="False"
|
Text="Create VPS" CssClass="Button1" CausesValidation="False"
|
||||||
onclick="btnCreate_Click" />
|
onclick="btnCreate_Click" />
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
Text="Import VPS" CssClass="Button1" CausesValidation="False"
|
Text="Import VPS" CssClass="Button1" CausesValidation="False"
|
||||||
onclick="btnImport_Click" />
|
onclick="btnImport_Click" />
|
||||||
</div>
|
</div>
|
||||||
<div class="FormButtonsBarCleanRight">
|
<div class="Right">
|
||||||
<wsp:SearchBox ID="searchBox" runat="server" />
|
<wsp:SearchBox ID="searchBox" runat="server" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -27,16 +27,18 @@
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web.UI;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
using WebsitePanel.EnterpriseServer;
|
using WebsitePanel.EnterpriseServer;
|
||||||
using WebsitePanel.WebPortal;
|
using WebsitePanel.WebPortal;
|
||||||
using WebsitePanel.Portal.UserControls;
|
|
||||||
|
|
||||||
|
|
||||||
namespace WebsitePanel.Portal
|
namespace WebsitePanel.Portal
|
||||||
{
|
{
|
||||||
public partial class VpsMenu : VpsMenuControl
|
public partial class VpsMenu : WebsitePanelModuleBase
|
||||||
{
|
{
|
||||||
private const string PID_SPACE_VPS = "SpaceVPS2012";
|
private const string PID_SPACE_VPS = "SpaceVPS2012";
|
||||||
|
|
||||||
|
@ -123,7 +125,11 @@ namespace WebsitePanel.Portal
|
||||||
MenuItem item = new MenuItem();
|
MenuItem item = new MenuItem();
|
||||||
|
|
||||||
item.Text = GetLocalizedString("Text." + text);
|
item.Text = GetLocalizedString("Text." + text);
|
||||||
item.NavigateUrl = PortalUtils.EditUrl("ItemID", ItemID.ToString(), key, "SpaceID=" + PackageId);
|
var hostModule = GetAllControlsOfType<WebsitePanelModuleBase>(this.Page);
|
||||||
|
if (hostModule.Count > 0)
|
||||||
|
{
|
||||||
|
item.NavigateUrl = hostModule.LastOrDefault().EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), key); // PortalUtils.EditUrl("ItemID", ItemID.ToString(), key, "SpaceID=" + PackageId);
|
||||||
|
}
|
||||||
|
|
||||||
//if (img == null)
|
//if (img == null)
|
||||||
// item.ImageUrl = PortalUtils.GetThemedIcon("Icons/tool_48.png");
|
// item.ImageUrl = PortalUtils.GetThemedIcon("Icons/tool_48.png");
|
||||||
|
@ -133,5 +139,22 @@ namespace WebsitePanel.Portal
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<T> GetAllControlsOfType<T>(Control parent) where T : Control
|
||||||
|
{
|
||||||
|
var result = new List<T>();
|
||||||
|
foreach (Control control in parent.Controls)
|
||||||
|
{
|
||||||
|
if (control is T)
|
||||||
|
{
|
||||||
|
result.Add((T) control);
|
||||||
|
}
|
||||||
|
if (control.HasControls())
|
||||||
|
{
|
||||||
|
result.AddRange(GetAllControlsOfType<T>(control));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -332,9 +332,6 @@
|
||||||
<Compile Include="HostedSharePoint\HostedSharePointEnterpriseStorageUsage.ascx.designer.cs">
|
<Compile Include="HostedSharePoint\HostedSharePointEnterpriseStorageUsage.ascx.designer.cs">
|
||||||
<DependentUpon>HostedSharePointEnterpriseStorageUsage.ascx</DependentUpon>
|
<DependentUpon>HostedSharePointEnterpriseStorageUsage.ascx</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="UserControls\VpsMenuControl.cs">
|
|
||||||
<SubType>ASPXCodeBehind</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="VpsMenu.ascx.cs">
|
<Compile Include="VpsMenu.ascx.cs">
|
||||||
<DependentUpon>VpsMenu.ascx</DependentUpon>
|
<DependentUpon>VpsMenu.ascx</DependentUpon>
|
||||||
<SubType>ASPXCodeBehind</SubType>
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue