wsp-10311 Add Apply button

This commit is contained in:
me 2015-02-09 13:09:40 +04:00
parent 55d46c6cdb
commit aed8ea323e
10 changed files with 26 additions and 22 deletions

View file

@ -306,8 +306,6 @@ namespace WebsitePanel.Portal.ExchangeServer
messageBox.ShowWarningMessage("ORGANIZATION_USERS_ACTIONS");
}
}
userActions.ResetSelection();
}
}
}

View file

@ -424,8 +424,6 @@ namespace WebsitePanel.Portal.HostedSolution
messageBox.ShowWarningMessage("ORGANIZATION_USERS_ACTIONS");
}
}
userActions.ResetSelection();
}
}
}

View file

@ -141,6 +141,9 @@
<data name="btnVIPOk.Text" xml:space="preserve">
<value>Ok</value>
</data>
<data name="cmdApply.AlternateText" xml:space="preserve">
<value>Apply</value>
</data>
<data name="ddlUserActionsItem.Actions" xml:space="preserve">
<value>- Actions -</value>
</data>

View file

@ -8,15 +8,16 @@
<asp:UpdatePanel ID="tblActions" runat="server" CssClass="NormalBold" UpdateMode="Conditional" ChildrenAsTriggers="true" >
<ContentTemplate>
<asp:DropDownList ID="ddlUserActions" runat="server" CssClass="NormalTextBox" resourcekey="ddlUserActions"
AutoPostBack="True" OnSelectedIndexChanged="ddlUserActions_OnSelectedIndexChanged">
<asp:ListItem Value="0">Actions</asp:ListItem>
<asp:DropDownList ID="ddlUserActions" runat="server" CssClass="NormalTextBox" resourcekey="ddlUserActions" style="margin-right: 0px" >
<%--<asp:ListItem Value="0">Actions</asp:ListItem>--%>
<asp:ListItem Value="1">Disable</asp:ListItem>
<asp:ListItem Value="2">Enable</asp:ListItem>
<asp:ListItem Value="3">SetServiceLevel</asp:ListItem>
<asp:ListItem Value="4">SetVIP</asp:ListItem>
</asp:DropDownList>
<asp:ImageButton ID="cmdApply" Runat="server" meta:resourcekey="cmdApply" SkinID="ApplySmall" CausesValidation="false" OnClick="cmdApply_OnClick"/>
<ajaxToolkit:ModalPopupExtender ID="Modal" runat="server" EnableViewState="true" TargetControlID="FakeModalPopupTarget"
PopupControlID="EnablePanel" BackgroundCssClass="modalBackground" DropShadow="false" />
@ -39,7 +40,7 @@
<asp:Button ID="btnEnableOk" runat="server" CssClass="Button1" meta:resourcekey="btnEnableOk" Text="Ok"
OnClientClick="return CloseAndShowProgressDialog('Enabling users...')" OnClick="btnModalOk_Click" />
<asp:Button ID="btnEnableCancel" runat="server" CssClass="Button1" meta:resourcekey="btnEnableCancel" Text="Cancel"
OnClick="btnModalCancel_OnClick" CausesValidation="false" />
CausesValidation="false" />
</div>
</div>
</asp:Panel>
@ -63,7 +64,7 @@
<asp:Button ID="btnDisableOk" runat="server" CssClass="Button1" meta:resourcekey="btnDisableOk" Text="Ok"
OnClientClick="return CloseAndShowProgressDialog('Disabling users...')" OnClick="btnModalOk_Click" />
<asp:Button ID="btnDisableCancel" runat="server" CssClass="Button1" meta:resourcekey="btnDisableCancel" Text="Cancel"
OnClick="btnModalCancel_OnClick" CausesValidation="false" />
CausesValidation="false" />
</div>
</div>
</asp:Panel>
@ -89,7 +90,7 @@
<asp:Button ID="btnServiceLevelOk" runat="server" CssClass="Button1" meta:resourcekey="btnServiceLevelOk" Text="Ok"
OnClientClick="return CloseAndShowProgressDialog('Setting Service Level...')" OnClick="btnModalOk_Click" />
<asp:Button ID="btnServiceLevelCancel" runat="server" CssClass="Button1" meta:resourcekey="btnServiceLevelCancel" Text="Cancel"
OnClick="btnModalCancel_OnClick" CausesValidation="false" />
CausesValidation="false" />
</div>
</div>
</asp:Panel>
@ -118,7 +119,7 @@
<asp:Button ID="btnVIPOk" runat="server" CssClass="Button1" meta:resourcekey="btnVIPOk" Text="Ok"
OnClientClick="return CloseAndShowProgressDialog('Setting VIP...')" OnClick="btnModalOk_Click" />
<asp:Button ID="btnVIPCancel" runat="server" CssClass="Button1" meta:resourcekey="btnVIPCancel" Text="Cancel"
OnClick="btnModalCancel_OnClick" CausesValidation="false" />
CausesValidation="false" />
</div>
</div>
</asp:Panel>

View file

@ -77,7 +77,7 @@ namespace WebsitePanel.Portal
}
}
protected void ddlUserActions_OnSelectedIndexChanged(object sender, EventArgs e)
protected void cmdApply_OnClick(object sender, ImageClickEventArgs e)
{
switch (SelectedAction)
{
@ -94,6 +94,8 @@ namespace WebsitePanel.Portal
case UserActionTypes.SetVIP:
Modal.PopupControlID = VIPPanel.ID;
break;
default:
return;
}
Modal.Show();
@ -121,15 +123,6 @@ namespace WebsitePanel.Portal
if (ExecutingUserAction != null)
ExecutingUserAction(this, new EventArgs());
}
protected void btnModalCancel_OnClick(object sender, EventArgs e)
{
ResetSelection();
}
public void ResetSelection()
{
ddlUserActions.ClearSelection();
}
protected int ChangeUsersSettings(List<int> userIds, bool? disable, int? serviceLevelId, bool? isVIP)
{

View file

@ -58,6 +58,15 @@ namespace WebsitePanel.Portal {
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlUserActions;
/// <summary>
/// cmdApply control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ImageButton cmdApply;
/// <summary>
/// Modal control.
/// </summary>