From d10317784bb2f0609f1ae05e8ee52313abbc0d97 Mon Sep 17 00:00:00 2001 From: Joe Davis Date: Mon, 15 Oct 2018 16:35:44 -0500 Subject: [PATCH] Button and grid cleanup --- WebStore.UI/WebStore.UI.csproj | 8 + WebStore.UI/WebStore/AdminCartBrowser.aspx | 19 ++- WebStore.UI/WebStore/AdminDiscountEdit.aspx | 142 +++++++++--------- .../AdminDiscountEdit.aspx.designer.cs | 18 --- WebStore.UI/WebStore/AdminDiscounts.aspx | 2 +- WebStore.UI/WebStore/AdminDownloadTerms.aspx | 10 +- WebStore.UI/WebStore/AdminOffer.aspx | 2 +- WebStore.UI/WebStore/AdminOfferEdit.aspx | 41 ++--- .../WebStore/AdminOfferEdit.aspx.designer.cs | 18 --- WebStore.UI/WebStore/AdminOrderEntry.aspx | 28 ++-- WebStore.UI/WebStore/AdminProduct.aspx | 2 +- WebStore.UI/WebStore/AdminProductEdit.aspx | 4 +- WebStore.UI/WebStore/AdminStoreSettings.aspx | 10 +- .../AdminStoreSettings.aspx.designer.cs | 18 --- WebStore.UI/WebStore/Cart.aspx.cs | 1 + WebStore.UI/WebStore/Controls/CartList.ascx | 8 +- .../WebStore/Controls/CartList.ascx.cs | 48 ++---- .../Controls/WebStoreDisplaySettings.cs | 2 + WebStore.UI/WebStore/ProductDetail.aspx | 4 +- 19 files changed, 154 insertions(+), 231 deletions(-) diff --git a/WebStore.UI/WebStore.UI.csproj b/WebStore.UI/WebStore.UI.csproj index e7a05de..9e62f0b 100644 --- a/WebStore.UI/WebStore.UI.csproj +++ b/WebStore.UI/WebStore.UI.csproj @@ -164,6 +164,7 @@ ..\..\mojoPortal-RepoTest\packages\log4net.2.0.3\lib\net40-full\log4net.dll + False False @@ -545,30 +546,37 @@ {4ead30ec-4f97-4f38-8530-1b7eddb8fc8e} mojoPortal.Business.WebHelpers + False {8582d51e-126b-4d64-b080-07ad8245b38f} mojoPortal.Business + False {30916752-1a97-49ca-95d6-81a5f784eeb5} mojoPortal.Net + False {a2dcd1e2-a5c3-4e37-a5f2-093659bc1c38} mojoPortal.Web.Controls + False {4f6dda2c-c9b8-45b2-aada-3ff922317661} mojoPortal.Web.Editor + False {e0d12031-bfdd-4069-9024-8b00a2aa6dbc} mojoPortal.Web.Framework + False {8e511d65-4779-4689-82d4-811d3fe6866e} mojoPortal.Web + False {58B4BA40-343B-4B4A-8A7B-AB92D2D60BBC} diff --git a/WebStore.UI/WebStore/AdminCartBrowser.aspx b/WebStore.UI/WebStore/AdminCartBrowser.aspx index ad3e545..0c4decb 100644 --- a/WebStore.UI/WebStore/AdminCartBrowser.aspx +++ b/WebStore.UI/WebStore/AdminCartBrowser.aspx @@ -1,7 +1,7 @@ <%@ Page Language="C#" AutoEventWireup="false" MasterPageFile="~/App_MasterPages/layout.Master" CodeBehind="AdminCartBrowser.aspx.cs" Inherits="WebStore.UI.AdminCartBrowserPage" %> - - + + @@ -48,15 +48,14 @@
-
+

- - - - + + +
@@ -65,6 +64,6 @@
-
- - + + + diff --git a/WebStore.UI/WebStore/AdminDiscountEdit.aspx b/WebStore.UI/WebStore/AdminDiscountEdit.aspx index 29d7e7a..862bb9c 100644 --- a/WebStore.UI/WebStore/AdminDiscountEdit.aspx +++ b/WebStore.UI/WebStore/AdminDiscountEdit.aspx @@ -2,79 +2,77 @@ - - -
-
- - -
-
- - -
-
- - -
-
- - - -
-
- - -
-
- - -
-
- - - -
-
- - - -
-
- - -
-
- - -
-
- - - - - - - - - + +
+
+ + +
+
+ + +
+
+ + +
+
+ + + +
+
+ + +
+
+ + +
+
+ + + +
+
+ + + +
+
+ + +
+
+ + +
+
+ + + + + + + + + -
-
- - - -
-
-
- +
+
+ + + +
+
+
diff --git a/WebStore.UI/WebStore/AdminDiscountEdit.aspx.designer.cs b/WebStore.UI/WebStore/AdminDiscountEdit.aspx.designer.cs index db1a7f9..ae81bbf 100644 --- a/WebStore.UI/WebStore/AdminDiscountEdit.aspx.designer.cs +++ b/WebStore.UI/WebStore/AdminDiscountEdit.aspx.designer.cs @@ -12,15 +12,6 @@ namespace WebStore.UI { public partial class AdminDiscountEditPage { - /// - /// ctop1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::mojoPortal.Web.Controls.CornerRounderTop ctop1; - /// /// pnl1 control. /// @@ -344,14 +335,5 @@ public partial class AdminDiscountEditPage { /// To modify move field declaration from designer file to code-behind file. /// protected global::mojoPortal.Web.UI.mojoButton btnDelete; - - /// - /// cbottom1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::mojoPortal.Web.Controls.CornerRounderBottom cbottom1; } } diff --git a/WebStore.UI/WebStore/AdminDiscounts.aspx b/WebStore.UI/WebStore/AdminDiscounts.aspx index 66b0222..2ed3cca 100644 --- a/WebStore.UI/WebStore/AdminDiscounts.aspx +++ b/WebStore.UI/WebStore/AdminDiscounts.aspx @@ -35,7 +35,7 @@
- +
diff --git a/WebStore.UI/WebStore/AdminDownloadTerms.aspx b/WebStore.UI/WebStore/AdminDownloadTerms.aspx index 061110b..346042a 100644 --- a/WebStore.UI/WebStore/AdminDownloadTerms.aspx +++ b/WebStore.UI/WebStore/AdminDownloadTerms.aspx @@ -17,7 +17,7 @@ - + @@ -59,18 +59,18 @@
+ CommandName="Update" SkinID="SaveButton" /> + CommandName="Delete" SkinID="DeleteButtonSmall"/> + CommandName="Cancel" SkinId="LinkButton"/>
- +
diff --git a/WebStore.UI/WebStore/AdminOffer.aspx b/WebStore.UI/WebStore/AdminOffer.aspx index 62e9fee..232a252 100644 --- a/WebStore.UI/WebStore/AdminOffer.aspx +++ b/WebStore.UI/WebStore/AdminOffer.aspx @@ -39,7 +39,7 @@
- +
diff --git a/WebStore.UI/WebStore/AdminOfferEdit.aspx b/WebStore.UI/WebStore/AdminOfferEdit.aspx index d67cc87..076febc 100644 --- a/WebStore.UI/WebStore/AdminOfferEdit.aspx +++ b/WebStore.UI/WebStore/AdminOfferEdit.aspx @@ -4,7 +4,6 @@ - @@ -74,8 +73,6 @@ ResourceFile="WebStoreResources" ForControl="chkShowDetailLink" /> -
-  
@@ -98,7 +95,7 @@ - @@ -135,11 +132,11 @@ CssClass="forminput" />
+ CommandName="Update" SkinID="SaveButton" /> + CommandName="Delete" SkinID="DeleteButtonSmall" /> + CommandName="Cancel" SkinID="LinkButton" /> + CommandName="Update" SkinID="SaveButton" /> + CommandName="Delete" SkinID="DeleteButtonSmall" /> + CommandName="Cancel" SkinID="LinkButton" /> @@ -310,11 +307,11 @@
+ CommandName="Update" ValidationGroup="metalink" CausesValidation="true" SkinID="SaveButton" /> + CommandName="Delete" CausesValidation="false" SkinID="DeleteButtonSmall" /> + CommandName="Cancel" CausesValidation="false" SkinID="LinkButton" />
@@ -407,11 +404,11 @@
+ CommandName="Update" ValidationGroup="meta" CausesValidation="true" SkinID="SaveButton" /> + CommandName="Delete" CausesValidation="false" SkinID="DeleteButtonSmall" /> + CommandName="Cancel" CausesValidation="false" SkinID="LinkButton" />
@@ -433,8 +430,7 @@ -  +  @@ -444,14 +440,10 @@ -
-  
-  
-
- - + +
- diff --git a/WebStore.UI/WebStore/AdminOfferEdit.aspx.designer.cs b/WebStore.UI/WebStore/AdminOfferEdit.aspx.designer.cs index 4db6f74..708f1d9 100644 --- a/WebStore.UI/WebStore/AdminOfferEdit.aspx.designer.cs +++ b/WebStore.UI/WebStore/AdminOfferEdit.aspx.designer.cs @@ -21,15 +21,6 @@ public partial class AdminOfferEditPage { /// protected global::mojoPortal.Web.UI.OuterWrapperPanel pnlOuterWrap; - /// - /// ctop1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::mojoPortal.Web.Controls.CornerRounderTop ctop1; - /// /// pnlInnerWrap control. /// @@ -632,14 +623,5 @@ public partial class AdminOfferEditPage { /// To modify move field declaration from designer file to code-behind file. /// protected global::mojoPortal.Web.UI.EmptyPanel divCleared; - - /// - /// cbottom1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::mojoPortal.Web.Controls.CornerRounderBottom cbottom1; } } diff --git a/WebStore.UI/WebStore/AdminOrderEntry.aspx b/WebStore.UI/WebStore/AdminOrderEntry.aspx index 4130c4e..8af39ca 100644 --- a/WebStore.UI/WebStore/AdminOrderEntry.aspx +++ b/WebStore.UI/WebStore/AdminOrderEntry.aspx @@ -9,8 +9,7 @@ -

-

+

@@ -29,7 +28,7 @@ <%# string.Format(currencyCulture, "{0:c}",Convert.ToDecimal(Eval("Price"))) %> + Text='<%# Resources.WebStoreResources.AddToCartLink%>' SkindID="AddButton" />
@@ -37,12 +36,14 @@ - -

-

+ +
+

+
- +
+
<%# Resources.WebStoreResources.CartItemsHeading%> @@ -72,18 +73,19 @@ + SkinID="PrimaryButton" /> + CausesValidation="false" SkinID="DeleteButtonSmall" />
+
-
+ diff --git a/WebStore.UI/WebStore/AdminStoreSettings.aspx b/WebStore.UI/WebStore/AdminStoreSettings.aspx index 8b6fd97..6a01286 100644 --- a/WebStore.UI/WebStore/AdminStoreSettings.aspx +++ b/WebStore.UI/WebStore/AdminStoreSettings.aspx @@ -1,5 +1,4 @@ -<%@ Page Language="C#" AutoEventWireup="false" MasterPageFile="~/App_MasterPages/layout.Master" - CodeBehind="AdminStoreSettings.aspx.cs" Inherits="WebStore.UI.AdminStoreSettingsPage" %> +<%@ Page Language="C#" AutoEventWireup="false" MasterPageFile="~/App_MasterPages/layout.Master" CodeBehind="AdminStoreSettings.aspx.cs" Inherits="WebStore.UI.AdminStoreSettingsPage" %> @@ -88,7 +87,6 @@ ResourceFile="WebStoreResources" />
-
 
@@ -110,15 +108,11 @@ ResourceFile="WebStoreResources" />
-
- -
- -   +
diff --git a/WebStore.UI/WebStore/AdminStoreSettings.aspx.designer.cs b/WebStore.UI/WebStore/AdminStoreSettings.aspx.designer.cs index a6d5514..beffb6a 100644 --- a/WebStore.UI/WebStore/AdminStoreSettings.aspx.designer.cs +++ b/WebStore.UI/WebStore/AdminStoreSettings.aspx.designer.cs @@ -390,24 +390,6 @@ public partial class AdminStoreSettingsPage { /// protected global::System.Web.UI.WebControls.CheckBox chkIsClosed; - /// - /// SiteLabel1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::mojoPortal.Web.Controls.SiteLabel SiteLabel1; - - /// - /// lblspacer1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::mojoPortal.Web.Controls.SiteLabel lblspacer1; - /// /// btnSave control. /// diff --git a/WebStore.UI/WebStore/Cart.aspx.cs b/WebStore.UI/WebStore/Cart.aspx.cs index 8e68f10..47b1b99 100644 --- a/WebStore.UI/WebStore/Cart.aspx.cs +++ b/WebStore.UI/WebStore/Cart.aspx.cs @@ -414,6 +414,7 @@ private void LoadSettings() cartList.Store = store; cartList.ShoppingCart = cart; cartList.CurrencyCulture = currencyCulture; + cartList.DisplaySettings = displaySettings; cartListAlt.Store = store; cartListAlt.ShoppingCart = cart; diff --git a/WebStore.UI/WebStore/Controls/CartList.ascx b/WebStore.UI/WebStore/Controls/CartList.ascx index 650b7e3..abde5da 100644 --- a/WebStore.UI/WebStore/Controls/CartList.ascx +++ b/WebStore.UI/WebStore/Controls/CartList.ascx @@ -2,7 +2,7 @@ - +
diff --git a/WebStore.UI/WebStore/Controls/CartList.ascx.cs b/WebStore.UI/WebStore/Controls/CartList.ascx.cs index bab1989..50af583 100644 --- a/WebStore.UI/WebStore/Controls/CartList.ascx.cs +++ b/WebStore.UI/WebStore/Controls/CartList.ascx.cs @@ -23,32 +23,14 @@ namespace WebStore.UI.Controls { public partial class CartList : UserControl { - private Cart cart = null; + public Cart ShoppingCart { get; set; } = null; - public Cart ShoppingCart - { - get { return cart; } - set { cart = value; } - } - - private Store store = null; - - public Store Store - { - get { return store; } - set { store = value; } - } - - - private CultureInfo currencyCulture = CultureInfo.CurrentCulture; + public Store Store { get; set; } = null; - public CultureInfo CurrencyCulture - { - get { return currencyCulture; } - set { currencyCulture = value; } - } + public CultureInfo CurrencyCulture { get; set; } = CultureInfo.CurrentCulture; - protected void Page_Load(object sender, EventArgs e) + public WebStoreDisplaySettings DisplaySettings { get; set; } + protected void Page_Load(object sender, EventArgs e) { if (!Visible) { return; } @@ -58,9 +40,9 @@ protected void Page_Load(object sender, EventArgs e) private void PopulateControls() { if (Page.IsPostBack) { return; } - if (cart == null) { return; } + if (ShoppingCart == null) { return; } - using (IDataReader reader = cart.GetItems()) + using (IDataReader reader = ShoppingCart.GetItems()) { rptCartItems.DataSource = reader; rptCartItems.DataBind(); @@ -71,8 +53,8 @@ private void PopulateControls() private void rptCartItems_ItemCommand(object source, RepeaterCommandEventArgs e) { - if (cart == null) { return; } - if (store == null) { return; } + if (ShoppingCart == null) { return; } + if (Store == null) { return; } string strGuid = e.CommandArgument.ToString(); if (strGuid.Length != 36) { return; } @@ -93,22 +75,22 @@ private void rptCartItems_ItemCommand(object source, RepeaterCommandEventArgs e) } catch (ArgumentException) { } } - cart.UpdateCartItemQuantity(itemGuid, quantity); + ShoppingCart.UpdateCartItemQuantity(itemGuid, quantity); break; case "delete": - cart.DeleteItem(itemGuid); - cart.ResetCartOffers(); - cart.RefreshTotals(); - cart.Save(); + ShoppingCart.DeleteItem(itemGuid); + ShoppingCart.ResetCartOffers(); + ShoppingCart.RefreshTotals(); + ShoppingCart.Save(); break; } - StoreHelper.EnsureValidDiscounts(store, cart); + StoreHelper.EnsureValidDiscounts(Store, ShoppingCart); WebUtils.SetupRedirect(this, Request.RawUrl); diff --git a/WebStore.UI/WebStore/Controls/WebStoreDisplaySettings.cs b/WebStore.UI/WebStore/Controls/WebStoreDisplaySettings.cs index 4d420e7..7f24dfa 100644 --- a/WebStore.UI/WebStore/Controls/WebStoreDisplaySettings.cs +++ b/WebStore.UI/WebStore/Controls/WebStoreDisplaySettings.cs @@ -52,6 +52,8 @@ public class WebStoreDisplaySettings : WebControl public string ProductDetailsRatingPanelDivCssClass { get; set; } = "productratingwrapper"; public string ProductDetailsOffersDivCssClass { get; set; } = "clearpanel offerspanel"; public string AddToCartButtonCssClass { get; set; } = "store-btn-addtocart btn btn-success"; + public string CartTableCssClass { get; set; } = "cartgrid table table-bordered table-striped"; + public string OfferTableCssClass { get; set; } = "offergrid table table-bordered table-striped"; protected override void Render(HtmlTextWriter writer) { if (HttpContext.Current == null) diff --git a/WebStore.UI/WebStore/ProductDetail.aspx b/WebStore.UI/WebStore/ProductDetail.aspx index a3c8ac4..b7abfaa 100644 --- a/WebStore.UI/WebStore/ProductDetail.aspx +++ b/WebStore.UI/WebStore/ProductDetail.aspx @@ -16,7 +16,7 @@ -
@@ -25,9 +25,9 @@ <%# string.Format(CurrencyCulture, "{0:c}", Convert.ToDecimal(Eval("OfferPrice")))%> - - + +
+
@@ -32,7 +32,7 @@ <%--
- +