Exception in template (Designs/Dwsimple/_parsed/OrderDetail_AX.parsed.cshtml): System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.cdccabaffdbf.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context)
   at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag)
   at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName)
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()
@inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @using System @using System.Web @using System.Globalization @using Dynamicweb.Frontend.Devices @using System.Text.RegularExpressions @using Dynamicweb.Environment.Helpers @using Dynamicweb.Rendering @using System.Text.RegularExpressions @using System.Web @functions{ public class WrapMethods { //Gets the contrasting color public static string getContrastYIQ(string hexcolor) { if (hexcolor != "") { hexcolor = Regex.Replace(hexcolor, "[^0-9a-zA-Z]+", ""); int r = Convert.ToByte(hexcolor.Substring(0, 2), 16); int g = Convert.ToByte(hexcolor.Substring(2, 2), 16); int b = Convert.ToByte(hexcolor.Substring(4, 2), 16); int yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000; if (yiq >= 128) { return "black"; } else { return "white"; } } else { return "black"; } } //Truncate text public static string Truncate (string value, int count, bool strip=true) { if (strip == true){ value = StripHtmlTagByCharArray(value); } if (value.Length > count) { value = value.Substring(0, count - 1) + "..."; } return value; } //Strip text from HTML public static string StripHtmlTagByCharArray(string htmlString) { char[] array = new char[htmlString.Length]; int arrayIndex = 0; bool inside = false; for (int i = 0; i < htmlString.Length; i++) { char let = htmlString[i]; if (let == '<') { inside = true; continue; } if (let == '>') { inside = false; continue; } if (!inside) { array[arrayIndex] = let; arrayIndex++; } } return new string(array, 0, arrayIndex); } //Make the correct count of columns public static string ColumnMaker(int Col, string ScreenSize) { string Columns = ""; switch (Col) { case 1: Columns = "col-"+ScreenSize+"-12"; break; case 2: Columns = "col-"+ScreenSize+"-6"; break; case 3: Columns = "col-"+ScreenSize+"-4"; break; case 4: Columns = "col-"+ScreenSize+"-3"; break; default: Columns = "col-"+ScreenSize+"-3"; break; } return Columns; } private string Custom(string firstoption, string secondoption) { if (firstoption == "custom") { return secondoption; } else { return firstoption; } } } } @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @helper MiniCart() { <div class="dropdown-cart"> @if (GetInteger("Ecom:Order.OrderLines.TotalProductQuantity") > 0) { <div id="full-cart"> <div class="col-md-12 col-sm-12 col-xs-12"> <div class="row" id="minicart-content"> <span class="cart-items">@Translate("You have", "You have") <span id="mincart-total-items"></span> @Translate("items in your cart", "items in your cart")</span> <table class="table table-cart"> <thead> <tr> <th></th> <th>@Translate("Product", "Product")</th> <th class="text-center">@Translate("Qty", "Qty")</th> <th class="text-right">@Translate("Total", "Total")</th> </tr> </thead> <tbody> @* Orderlines are rendered from the Ajax template *@ </tbody> <tfoot> <tr> <td class="text-center"><i class="fa fa-credit-card"></i></td> <td id="minicart-payment"></td> <td class="text-center"></td> <td class="text-right" id="minicart-paymentfee"></td> </tr> <tr> <td class="text-center"><i class="fa fa-truck"></i></td> <td id="minicart-shipping"></td> <td class="text-center"></td> <td class="text-right" id="minicart-shippingfee"></td> </tr> <tr> <td></td> <td><strong>@Translate("Total", "Total")</strong></td> <td class="text-center" id="minicart-total"></td> <td class="text-right" id="minicart-totalprice"></td> </tr> </tfoot> </table> </div> </div> <div class="col-md-12 col-sm-12 col-xs-12"> <div class="row"> <div class="col-md-8"> <button class="btn btn-xs btn-secondary pull-left" onclick="EmptyCart();">@Translate("Empty cart", "Empty cart")</button> </div> <div class="col-md-4"> @{ var cartid = GetValue("DwAreaCartPageID"); } <a href="Default.aspx?ID=@cartid" class="btn btn-xs btn-primary pull-right">@Translate("Proceed to checkout", "Proceed to checkout")</a> <span class="clearfix"></span> </div> </div> <div class="row">&nbsp;</div> </div> </div> } else { <span class="cart-items" id="empty-cart">@Translate("Your shopping cart is empty", "Your shopping cart is empty")</span> } </div> } <!DOCTYPE html> <html lang="no"> <head> <!-- Global site tag (gtag.js) - Google Analytics --> <script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-27549427-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-27549427-1'); </script> <meta charset="utf-8"> <title>@GetValue("Title")</title> @GetValue("MetaTags") @GetValue("CopyRightNotice") <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> <meta name="robots" content="index, follow"> @{ string MetaDescription = GetString("Meta.Description"); string MetaKeywords = GetString("Meta.Keywords"); string GoogleTagManagerId = GetString("Item.Area.GoogleTagManagerId"); string favicon = GetString("Item.Area.Favicon"); string currentpageid = GetString("DwPageID"); string firstpageid = GetString("DwAreaFirstActivePageID"); string logoutid = GetString("Item.Area.LogOutId"); string searchplaceholder = Translate("Search products", "Search products"); string newsletterid = GetString("Item.Area.NewsletterSignUpFormParagrahId"); string downloadLink = GetString("Item.Area.DowloadsLink"); string pressLink = GetString("Item.Area.PressLink"); } @* GOOGLE TAG MANAGER *@ <script> (function (w, d, s, l, i) { w[l] = w[l] || []; w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' }); var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); })(window, document, 'script', 'dataLayer', '@GoogleTagManagerId'); </script> @* FACEBOOK ADMIN *@ @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.FacebookCommendAdmin"))) { string fbadmin = GetString("Item.Area.FacebookCommendAdmin"); <meta property="fb:admins" content="@fbadmin"> } @* ESSENTIAL STYLES *@ <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.4/css/bootstrap.min.css" type="text/css"> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css"> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/fancybox/3.1.20/jquery.fancybox.min.css" media="screen"> <link href="/Files/Templates/Designs/Dwsimple/css/bootstrap-datetimepicker.min.css" rel="stylesheet"> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/flag-icon-css/2.5.0/css/flag-icon.min.css" type="text/css"> @* MOBILE MENU STYLES *@ <link href="//cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/css/jasny-bootstrap.min.css" rel="stylesheet" type="text/css" media="screen"> @* FAVICON *@ <link href="@favicon" rel="icon" type="image/png"> @* VARIABLES *@ @{ var attrValue = ""; var cartid = GetValue("DwAreaCartPageID"); var searchpage = GetString("Item.Area.ShowSearchPage"); //DateTime areaUpdated = (DateTime)Pageview.Area.get_Value("AreaUpdatedDate"); DateTime areaUpdated = DateTime.Now; string cssPath = HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.min.css"); DateTime lastWriteTime = System.IO.File.GetLastWriteTime(cssPath); bool writeCss = false; string css = String.Empty; //if (areaUpdated > lastWriteTime) //{ // writeCss = true; //} if (areaUpdated > lastWriteTime.AddMinutes(1)) { writeCss = true; } bool IsNotLoggedIn = !string.IsNullOrWhiteSpace(GetString("DW_extranet_error_uk")) ? false : true; } @* FONT SETTINGS *@ @{ } @functions{ public class FontSettings { public class Logo { public static string FontFamily { get; set; } public static string FontSize { get; set; } public static string FontWeight { get; set; } public static string Color { get; set; } public static string LineHeight { get; set; } public static string Casing { get; set; } public static string LetterSpacing { get; set; } } public class Slogan { public static string FontFamily { get; set; } public static string FontSize { get; set; } public static string FontWeight { get; set; } public static string Color { get; set; } public static string LineHeight { get; set; } public static string Casing { get; set; } public static string LetterSpacing { get; set; } } public class H1 { public static string FontFamily { get; set; } public static string FontSize { get; set; } public static string FontWeight { get; set; } public static string Color { get; set; } public static string LineHeight { get; set; } public static string Casing { get; set; } public static string LetterSpacing { get; set; } } public class H2 { public static string FontFamily { get; set; } public static string FontSize { get; set; } public static string FontWeight { get; set; } public static string Color { get; set; } public static string LineHeight { get; set; } public static string Casing { get; set; } public static string LetterSpacing { get; set; } } public class H3 { public static string FontFamily { get; set; } public static string FontSize { get; set; } public static string FontWeight { get; set; } public static string Color { get; set; } public static string LineHeight { get; set; } public static string Casing { get; set; } public static string LetterSpacing { get; set; } } public class H4 { public static string FontFamily { get; set; } public static string FontSize { get; set; } public static string FontWeight { get; set; } public static string Color { get; set; } public static string LineHeight { get; set; } public static string Casing { get; set; } public static string LetterSpacing { get; set; } } public class Body { public static string FontFamily { get; set; } public static string FontSize { get; set; } public static string FontWeight { get; set; } public static string Color { get; set; } public static string LineHeight { get; set; } public static string Casing { get; set; } public static string LetterSpacing { get; set; } } } private void InitFontSettings() { //LOGO FontSettings.Logo.FontFamily = CustomFont(GetString("Item.Area.LogoFont.Font"), GetString("Item.Area.LogoFont.CustomFont")); FontSettings.Logo.FontSize = GetString("Item.Area.LogoFont.Size") + "px"; FontSettings.Logo.FontWeight = CheckExistence(GetString("Item.Area.LogoFont.Weight"), "normal"); FontSettings.Logo.LineHeight = CheckExistence(GetString("Item.Area.LogoFont.LineHeight"), "1"); FontSettings.Logo.LetterSpacing = GetString("Item.Area.LogoFont.LetterSpacing") + "px"; FontSettings.Logo.Casing = GetString("Item.Area.LogoFont.Casing"); FontSettings.Logo.Color = GetString("Item.Area.LogoFont.Color.Color"); //SLOGAN FontSettings.Slogan.FontFamily = CustomFont(GetString("Item.Area.LogoSloganFont.Font"), GetString("Item.Area.LogoSloganFont.CustomFont")); FontSettings.Slogan.FontSize = GetString("Item.Area.LogoSloganFont.Size") + "px"; FontSettings.Slogan.FontWeight = CheckExistence(GetString("Item.Area.LogoSloganFont.Weight"), "normal"); FontSettings.Slogan.LineHeight = CheckExistence(GetString("Item.Area.LogoSloganFont.LineHeight"), "1"); FontSettings.Slogan.LetterSpacing = GetString("Item.Area.LogoSloganFont.LetterSpacing") + "px"; FontSettings.Slogan.Casing = GetString("Item.Area.LogoSloganFont.Casing"); FontSettings.Slogan.Color = GetString("Item.Area.LogoSloganFont.Color.Color"); //HEADINGS FontSettings.H1.FontFamily = CustomFont(GetString("Item.Area.HeadingsH1.Font"), GetString("Item.Area.HeadingsH1.CustomFont")); FontSettings.H1.FontSize = GetString("Item.Area.HeadingsH1.Size") + "px"; FontSettings.H1.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH1.Weight"), "normal"); FontSettings.H1.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH1.LineHeight"), "1"); FontSettings.H1.LetterSpacing = GetString("Item.Area.HeadingsH1.LetterSpacing") + "px"; FontSettings.H1.Casing = GetString("Item.Area.HeadingsH1.Casing"); FontSettings.H1.Color = GetString("Item.Area.HeadingsH1.Color.Color"); FontSettings.H2.FontFamily = CustomFont(GetString("Item.Area.HeadingsH2.Font"), GetString("Item.Area.HeadingsH2.CustomFont")); FontSettings.H2.FontSize = GetString("Item.Area.HeadingsH2.Size") + "px"; FontSettings.H2.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH2.Weight"), "normal"); FontSettings.H2.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH2.LineHeight"), "1"); FontSettings.H2.LetterSpacing = GetString("Item.Area.HeadingsH2.LetterSpacing") + "px"; FontSettings.H2.Casing = GetString("Item.Area.HeadingsH2.Casing"); FontSettings.H2.Color = GetString("Item.Area.HeadingsH2.Color.Color"); FontSettings.H3.FontFamily = CustomFont(GetString("Item.Area.HeadingsH3.Font"), GetString("Item.Area.HeadingsH3.CustomFont")); FontSettings.H3.FontSize = GetString("Item.Area.HeadingsH3.Size") + "px"; FontSettings.H3.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH3.Weight"), "normal"); FontSettings.H3.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH3.LineHeight"), "1"); FontSettings.H3.LetterSpacing = GetString("Item.Area.HeadingsH3.LetterSpacing") + "px"; FontSettings.H3.Casing = GetString("Item.Area.HeadingsH3.Casing"); FontSettings.H3.Color = GetString("Item.Area.HeadingsH3.Color.Color"); FontSettings.H4.FontFamily = CustomFont(GetString("Item.Area.HeadingsH4.Font"), GetString("Item.Area.HeadingsH4.CustomFont")); FontSettings.H4.FontSize = GetString("Item.Area.HeadingsH4.Size") + "px"; FontSettings.H4.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH4.Weight"), "normal"); FontSettings.H4.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH4.LineHeight"), "1"); FontSettings.H4.LetterSpacing = GetString("Item.Area.HeadingsH4.LetterSpacing") + "px"; FontSettings.H4.Casing = GetString("Item.Area.HeadingsH4.Casing"); FontSettings.H4.Color = GetString("Item.Area.HeadingsH4.Color.Color"); //BODY FontSettings.Body.FontFamily = CustomFont(GetString("Item.Area.BodyFont.Font"), GetString("Item.Area.BodyFont.CustomFont")); FontSettings.Body.FontSize = GetString("Item.Area.BodyFont.Size") + "px"; FontSettings.Body.FontWeight = CheckExistence(GetString("Item.Area.BodyFont.Weight"), "normal"); FontSettings.Body.LineHeight = CheckExistence(GetString("Item.Area.BodyFont.LineHeight"), "1"); FontSettings.Body.LetterSpacing = GetString("Item.Area.BodyFont.LetterSpacing") + "px"; FontSettings.Body.Casing = GetString("Item.Area.BodyFont.Casing"); FontSettings.Body.Color = GetString("Item.Area.BodyFont.Color.Color"); gfonts.Add(FontSettings.Logo.FontFamily, ""); if (!gfonts.ContainsKey(FontSettings.Slogan.FontFamily)) { gfonts.Add(FontSettings.Slogan.FontFamily, ""); } if (!gfonts.ContainsKey(FontSettings.H1.FontFamily)) { gfonts.Add(FontSettings.H1.FontFamily, ""); } if (!gfonts.ContainsKey(FontSettings.H2.FontFamily)) { gfonts.Add(FontSettings.H2.FontFamily, ""); } if (!gfonts.ContainsKey(FontSettings.H3.FontFamily)) { gfonts.Add(FontSettings.H3.FontFamily, ""); } if (!gfonts.ContainsKey(FontSettings.H4.FontFamily)) { gfonts.Add(FontSettings.H4.FontFamily, ""); } if (!gfonts.ContainsKey(FontSettings.Body.FontFamily)) { gfonts.Add(FontSettings.Body.FontFamily, ""); } } private string CustomFont(string firstfont, string secondfont) { if (firstfont == "custom") { return secondfont; } else { return firstfont; } } private string CheckExistence(string stringitem, string defaultvalue) { if (!string.IsNullOrWhiteSpace(stringitem)) { return stringitem; } else { return defaultvalue; } } private System.Collections.Generic.Dictionary<string, object> gfonts = new System.Collections.Generic.Dictionary<string, object> (); } @{ InitFontSettings(); } @helper GoogleFonts() { if (gfonts != null) { foreach (var item in gfonts) { string fontName = item.Key.Replace(" ", "+"); if (fontName.Contains("MetaPro-Norm") || fontName.Contains("MetaPro-Black")) { <link rel="stylesheet" href="/Files/Templates/Designs/Dwsimple/css/font.css" type="text/css"> } else { <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=@item.Key:100,200,300,400,500,600,700,800,900"> } } } } @functions{ public string FontStylesCSS() { string CssString = @" .dw-logotext { font-family: " + FontSettings.Logo.FontFamily + @", sans-serif; font-size: " + FontSettings.Logo.FontSize + @"; font-weight: " + FontSettings.Logo.FontWeight + @"; line-height: " + FontSettings.Logo.LineHeight + @" !important; letter-spacing: " + FontSettings.Logo.LetterSpacing + @"; text-transform: " + FontSettings.Logo.Casing + @"; color: " + FontSettings.Logo.Color + @"; } .dw-slogantext { font-family: " + FontSettings.Slogan.FontFamily + @", sans-serif; font-size: " + FontSettings.Slogan.FontSize + @"; font-weight: " + FontSettings.Slogan.FontWeight + @"; line-height: " + FontSettings.Slogan.LineHeight + @" !important; letter-spacing: " + FontSettings.Slogan.LetterSpacing + @"; text-transform: " + FontSettings.Slogan.Casing + @"; color: " + FontSettings.Slogan.Color + @"; } h1 { font-family: " + FontSettings.H1.FontFamily + @", sans-serif !important; font-size: " + FontSettings.H1.FontSize + @"; color: " + FontSettings.H1.Color + @"; line-height: " + FontSettings.H1.LineHeight + @" !important; text-transform: " + FontSettings.H1.Casing + @"; font-weight: " + FontSettings.H1.FontWeight + @"; letter-spacing: " + FontSettings.H1.LetterSpacing + @" !important; } h3 { font-family: " + FontSettings.H3.FontFamily + @", sans-serif !important; font-size: " + FontSettings.H3.FontSize + @"; color: " + FontSettings.H3.Color + @"; line-height: " + FontSettings.H3.LineHeight + @" !important; text-transform: " + FontSettings.H3.Casing + @"; font-weight: " + FontSettings.H3.FontWeight + @"; letter-spacing: " + FontSettings.H3.LetterSpacing + @" !important; } h4 { font-family: " + FontSettings.H4.FontFamily + @", sans-serif !important; font-size: " + FontSettings.H4.FontSize + @"; color: " + FontSettings.H4.Color + @"; line-height: " + FontSettings.H4.LineHeight + @" !important; text-transform: " + FontSettings.H4.Casing + @"; font-weight: " + FontSettings.H4.FontWeight + @"; letter-spacing: " + FontSettings.H4.LetterSpacing + @" !important; } h2, h5, h6 { margin-top: 0.7em; margin-bottom: 0.7em; font-family: " + FontSettings.H2.FontFamily + @", sans-serif !important; font-size: " + FontSettings.H2.FontSize + @"; color: " + FontSettings.H2.Color + @"; line-height: " + FontSettings.H2.LineHeight + @"; text-transform: " + FontSettings.H2.Casing + @" !important; font-weight: " + FontSettings.H2.FontWeight + @" !important; letter-spacing: " + FontSettings.H2.LetterSpacing + @" !important; } h5, h6 { font-size: 16px !important; } body { font-family: " + FontSettings.Body.FontFamily + @", sans-serif !important; font-size: " + FontSettings.Body.FontSize + @"; color: " + FontSettings.Body.Color + @"; line-height: " + FontSettings.Body.LineHeight + @" !important; text-transform: " + FontSettings.Body.Casing + @"; font-weight: " + FontSettings.Body.FontWeight + @"; letter-spacing: " + FontSettings.Body.LetterSpacing + @" !important; } .navbar-wp .navbar-nav > li > a { font-family: " + FontSettings.Body.FontFamily + @", sans-serif !important; } .section-title { margin-top: 0; margin-bottom: 0.7em; } "; return CssString; } } @GoogleFonts() @* GENERAL/COLOR SETTINGS *@ @functions{ public class ColorSettings { public class Color { public static string Primary { get; set; } public static string Secondary { get; set; } public static string NavbarFont { get; set; } public static string Footer { get; set; } public static string Address { get; set; } public static string FooterFont { get; set; } public static string Sticker { get; set; } public static string Price { get; set; } public static string Cart { get; set; } } } private void InitColorSettings() { ColorSettings.Color.Primary = GetString("Item.Area.ColorsPrimary.Color"); ColorSettings.Color.Secondary = GetString("Item.Area.ColorsSecondary.Color"); ColorSettings.Color.NavbarFont = GetString("Item.Area.NavbarFontColor"); if (string.IsNullOrWhiteSpace(ColorSettings.Color.NavbarFont)) { ColorSettings.Color.NavbarFont = WrapMethods.getContrastYIQ(ColorSettings.Color.Secondary); } ColorSettings.Color.Footer = GetString("Item.Area.ColorsFooterColor.Color"); ColorSettings.Color.Address = GetString("Item.Area.AddressBarBackgroundColor.Color"); ColorSettings.Color.FooterFont = WrapMethods.getContrastYIQ(ColorSettings.Color.Footer); ColorSettings.Color.Price = GetString("Item.Area.EcommercePriceColor.Color"); ColorSettings.Color.Sticker = GetString("Item.Area.EcommerceDiscountStickerColor.Color"); ColorSettings.Color.Cart = GetString("Item.Area.EcommerceCartButtonColor.Color"); } public string GetColorSettings() { string CssString = @" a:hover, a:focus, a:active { color: @Primary; } .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a { color: @NavbarFont; } .navbar-wp .navbar-nav > .active > a, .navbar-wp .navbar-nav > .active > a:hover, .navbar-wp .navbar-nav > .active > a:focus { color: @NavbarFont; } .navbar-wp .navbar-nav > li > a:hover, .navbar-wp .navbar-nav > li > a:focus { border-top: 0px solid @Secondary; color: @NavbarFont; } .navbar-wp .navbar-nav > li > a span:after { background-color: @Primary; } .navbar-wp .megamenu > li:hover > a { color: @Primary !important; } .btn-dw-primary { color: #FFF; background-color: @Primary; border-color: @Primary; } .btn-dw-secondary { color: @NavbarFont; background-color: @Secondary; border-color: @Secondary; } .btn-dw-cart { color: #FFF; background-color: @Cart; border-color: @Cart; } .dw-section-title { border-color: @Secondary; } .dw-minicart-update { color: #FFF !important; background-color: @Primary; transition: all 0.3s ease-in-out 0s; } .pagination > li > a, .pagination > li > a:hover, .pagination > li > a:focus, .pagination > li > a:active { color: @Primary; } .form-control:hover, .form-control:focus, .form-control:active { border-color: @Primary !important; } .bg-2 { background: @Primary !important; } .blockquote-1:hover { border-color: @Primary !important; } .navbar-wp .navbar-nav > li > a.dropdown-form-toggle, .navbar-wp .navbar-nav > li > a.dropdown-form-toggle:hover, .navbar-wp .navbar-nav > li > a.dropdown-form-toggle:focus { color: @Primary; } .navbar-wp .navbar-nav > .open > a.dropdown-form-toggle, .navbar-wp .navbar-nav > .open > a.dropdown-form-toggle:hover, .navbar-wp .navbar-nav > .open > a.dropdown-form-toggle:focus { color: @Primary; } .navbar-wp .navbar-nav > li > a:hover, .navbar-wp .navbar-nav > li > a:focus { border: 0px solid @Primary; } .navbar-wp .navbar-toggle:hover, .navbar-wp .navbar-toggle:focus { background-color: @Primary !important; border-color: @Primary !important; } .navbar-wp .dropdown-menu { border-top: 1px solid @Primary !important; border-bottom: 3px solid @Primary !important; } .navbar-wp .dropdown-menu > li > a:hover { background: @Primary !important; color: #fff; } .navbar-wp .dropdown-menu .active { background: @Primary !important; color: #fff; } .navbar-wp.navbar-contrasted .dropdown-menu > li > a:hover { background: @Primary !important; } .nav > ul > li > a:hover { color: @Primary; } .lw .w-box.w-box-inverse .thmb-img i { color: @Primary !important; } .w-box.w-box-inverse .thmb-img:hover i { background: @Primary !important; } .c-box { border: 1px solid @Primary !important; } .c-box .c-box-header { background: @Primary !important; } .w-section .aside-feature:hover .icon-feature, .w-section .aside-feature:hover h4 { color: @Primary !important; } .layer-slider-wrapper .title.title-base { background: @Primary !important; } .layer-slider-wrapper .subtitle { color: @Primary !important; } .layer-slider-wrapper .list-item { color: @Primary !important; } .box-element.box-element-bordered { border: 1px solid @Primary !important; } .carousel-2 .carousel-indicators .active { background-color: @Primary !important; } .carousel-2 .carousel-nav a { color: @Primary !important; } .carousel-2 .carousel-nav a:hover { background: @Primary !important; } .carousel-3 .carousel-nav a { color: @Primary !important; } .carousel-3 .carousel-nav a:hover { background: @Primary !important; } .like-button .button.liked i { color: @Primary !important; } ul.list-listings li.featured { border-color: @Primary !important; } ul.list-check li i { color: @Primary !important; } ul.dw-categories li a:hover, ul.dw-categories a:focus, ul.dw-categories a:active{ color: @NavbarFont; background-color: @Primary; border-color: @Primary; } ul.categories li a:hover, ul.categories a:focus, ul.categories a:active{ color: @NavbarFont; background-color: @Primary; border-color: @Primary; } .timeline .event:nth-child(2n):before { background-color: @Primary !important; } .timeline .event:nth-child(2n-1):before { background-color: @Primary !important; } #toTopHover { background-color: @Primary !important; } .tags-list li { border: 1px solid @Primary !important; color: @Primary !important; } .tags-list li:hover, a.open-panel { background-color: @Primary !important; } .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus, .panel-group .panel-heading a i, .tags-list li a { color: @NavbarFont !important; } .nav-pills > li > a:hover, .nav-pills > li > a:focus { color: @NavbarFont !important; background: none repeat scroll 0% 0% @Secondary !important; } footer { background: @Footer !important; } footer h4 { color: @FooterFont !important; } footer a { color: @FooterFont !important; } footer a:hover, footer a:focus, footer a:active { color: @Secondary !important; } footer p { color: @FooterFont !important; } footer ul > li { color: @FooterFont !important; } footer hr { border-color: @FooterFont } /* Button colors */ .btn-base { color: @NavbarFont !important; background-color: @Secondary !important; border: 1px solid @Secondary !important; } .btn-dw-cart:focus{ background-color: @Secondary; } .btn-base:before { background-color: @Secondary !important; } .btn-base:hover:before, .btn-base:focus:before, .btn-base:active:before { color: @NavbarFont !important; background-color: @Primary !important; border-color: @Primary !important; } .btn-icon:before { transition: none !important; } .btn-base:hover, .btn-base:focus, .btn-base:active, .btn-base.active, .open .dropdown-toggle.btn-base { color: @NavbarFont !important; background-color: @Primary !important; border-color: @Primary !important; } .btn-primary { background-color: @Primary !important; border-color: @Primary !important; } .open .dropdown-toggle.btn-primary { background-color: @Primary !important; border-color: @Primary !important; } /* Dropdown-menu */ .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { background: @Primary !important; color: #fff !important; } /* Ecom settings */ .ribbon.base, .ball { background: @Sticker !important; color: #fff; border-right: 5px solid @Sticker !important; } .ribbon.base:before { border-top: 27px solid @Sticker !important; } .ribbon.base:after { border-bottom: 27px solid @Sticker !important; } .price { color: @Price !important; } .discount-sticker { background-color: @Sticker !important; } .bs-callout-primary { border-left-color: @Primary !important; } .ratings .fa-star { color: @Secondary !important; } .feature-label { color: @Secondary !important; } .navbar-wp .megamenu.navbar-nav > li.active > a { border-color: @Primary !important; } .dw-section-title { border-color: @Primary !important; } .boxImageTextModule .box-size .desc-wrapper { border-color: @Primary !important; } .qoute .btn, .qoute .btn-span { border-color: @Primary !important; } .Multy-module .section-top h2.line { border-color: @Primary !important; } .row:nth-child(2n+2) .box { border-color: @Primary !important; } .row:nth-child(2n+2) .box .year:before, .history-module .row .box .box-inner .year:after { background-color: @Primary !important; } .history-module .arrow .fa, .history-module .row .box .box-inner .year { color: @Primary !important; } .history-module .row .box { border-color: @Primary !important; } .thankyouNewsletter { background: @Primary !important; } .slideToggle { background-color: @Primary !important; } .shere-social { border-color: @Primary !important; } .dw-breadcrumb a, .pg-opt .breadcrumb, .pg-opt .goHome { color: @NavbarFont !important; } .panel-default > .panel-heading { color: @NavbarFont !important; } .panel-group { border-bottom: 1px solid @Primary !important; } .list-news .list-body .read-more, .news-detail .post-item p a, .searchContent ul li h3 a { color: @Primary !important; } .searchContent ul li { border-color: @Primary !important; } .searchContent > p { border-bottom: 1px solid @Primary !important; } .nav.nav-pills li.offcanvas-menubtn .mobileMenuFix { color: @Primary !important; } .dealer-shops, .dynamicweb-map .list { background: @Address !important; } .dealer-shops ul li:hover, .dynamicweb-map .list ol li:hover, .dynamicweb-map .list ul li:hover, .dynamicweb-map .list ol li.current, .dynamicweb-map .list ul li.current { background: @Primary !important; color: #fff !important; } .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default, .ui-button, html .ui-button.ui-state-disabled:hover, html .ui-button.ui-state-disabled:active { background: @Primary !important; } .ui-widget-content { background: @Address !important; } .lang-sug .langMenu li:hover { background: @Primary !important; } .btn-dw-primary.searchFieldShow:focus, .btn-dw-primary.searchFieldShow:active{ background-color: @Primary !important; } .customer-info-section{ border-top: 1px solid @Primary; border-bottom: 1px solid @Primary; } .dealers-customers-user-edit .modal-body input{ border-color: @Primary; } .dealers-customers-user-edit .modal-header{ background-color: @Primary; } #buy-all-modal .modal-header{ background-color: @Primary; } #credit-limit .modal-header{ background-color: @Primary; } .buy-all-modal-btn{ background-color: @Primary; } #buy-all-modal .price{ border-color: @Primary; } #credit-limit .space{ border-color: @Primary; } .dealers-customers-list table tr th { background-color: @Primary; } .dealers-customers-list table tr:nth-of-type(2n+1){ background: @Address; } tr.resultLine:nth-of-type(2n+2){ background: @Address!important; } .QuoteList thead tr, #orderlist thead tr{ background-color: @Primary; } .QuoteList tbody tr.pagging, #orderlist tbody tr.pagging{ background-color: @Footer !important; } .QuoteList tbody tr:nth-of-type(2n+1), #orderlist tbody tr:nth-of-type(2n+1){ background: @Address; } .QuoteDetail .header-tr th{ background-color: @Primary; } .TotalPrice { background-color: @Footer; } .OrderDetailTable tr.headerOrder{ background-color: @Primary; } #invoice .invoice-financials table > tbody > tr:nth-of-type(2n+2){ background: @Address; } .specification .specification-text{ background: @Address; } .navbar-wp .megamenu .dropdown-menu { background-color: @Address; } .list-news{ background-color: @Address; } .modal-header{ background-color: @Address; } .QuoteDetail .SelectFile .fa{ color: @Primary; } .QuoteDetail .AddProductsList .AddProducts input{ border-color: @Primary!important; } .QuoteDetail .EditCustomerInfo{ background-color: @Primary; } .QuoteDetail #editUser .modal-header{ background-color: @Primary !important; } #ProductsModal .modal-header{ background-color: @Primary !important; } .QuoteDetail #editUser .modal-footer{ border-color: @Primary !important; } .QuoteDetail .SelectFile:after{ background-color: @Primary; } .SelectCustomerList select{ border-color: @Primary; } .customer-information-section input, textarea{ border: 1px solid @Primary; } .SelectCustomerList:after{ background-color: @Primary; } .QuoteDetail .SelectFile select{ border-color: @Primary; } .QuoteDetail #editUser textarea{ border-color: @Primary !important; } .QuoteDetail #editUser input{ border-color: @Primary !important; } .QuoteDetail .select-delivery-address{ border-color: @Primary !important; } .modalbtnProducts{ background-color: @Primary; } .productNavigationModal li{ background-color: @Address; } .productNavigation.secondLevel li{ background-color: @Address; } .sectionFiles{ border-color: @Primary!important; } .sectionFiles div.hiddenPrint{ border-color: @Primary!important; } .productNavigationModal li.list-open-active{ background-color: @Primary; } .history-module .row .modal-open { color: @Primary !important; }"; return ParseCSSToString(CssString); } private string ParseCSSToString(string TheString) { TheString = TheString.Replace("@Primary", ColorSettings.Color.Primary); TheString = TheString.Replace("@Secondary", ColorSettings.Color.Secondary); TheString = TheString.Replace("@NavbarFont", ColorSettings.Color.NavbarFont); TheString = TheString.Replace("@FooterFont", ColorSettings.Color.FooterFont); TheString = TheString.Replace("@Footer", ColorSettings.Color.Footer); TheString = TheString.Replace("@Address", ColorSettings.Color.Address); TheString = TheString.Replace("@Sticker", ColorSettings.Color.Sticker); TheString = TheString.Replace("@Price", ColorSettings.Color.Price); TheString = TheString.Replace("@Cart", ColorSettings.Color.Cart); System.Text.StringBuilder sb = new System.Text.StringBuilder(); foreach(var item in TheString.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries)) { sb.AppendLine(item); } return sb.ToString(); } } @{ InitColorSettings(); } @using System.Drawing @using System.Net @functions{ public class GeneralSettings { public class Header { public static string Mode { get; set; } public static string Classes { get; set; } public static bool Show { get; set; } public static string Background { get; set; } public static bool ShowFrontpageImage { get; set; } } public class Logo { public static string Image { get; set; } public static string ContrastImage { get; set; } public static string Text { get; set; } public static string Slogan { get; set; } public static string SecondaryColor { get; set; } } public class Navigation { public static string Position { get; set; } public static bool IsMegamenu { get; set; } public static bool IsAnimateNavigation { get; set; } public static string InvertedPosition { get; set; } public static string StickyMenu { get; set; } public static string SelectionMode { get; set; } public static string SelectionStyle { get; set; } public static int SelectionWeight { get; set; } public static bool Case { get; set; } public static string BreadcrumbMode { get; set; } public static string BreadcrumbAlign { get; set; } public static string LeftmenuMode { get; set; } public static string ButtonDesign { get; set; } } public class Headings { public static string Mode { get; set; } } public class Background { public static string Color { get; set; } public static string Image { get; set; } public static string CustomImage { get; set; } public static bool GradientColor { get; set; } public static string GradientPercentage { get; set; } public static string Style { get; set; } public static string Position { get; set; } } public class Site { public static bool Shadow { get; set; } public static string LayoutMode { get; set; } } public class Images { public static bool RoundCorners { get; set; } } public class Ecommerce { public static string EcomListDesign { get; set; } public static string EcomCardDesign { get; set; } } } private void InitGeneralSettings() { //Header settings GeneralSettings.Header.Mode = GetString("Item.Area.HeaderLayoutMode"); GeneralSettings.Header.Show = GetBoolean("Item.Area.HeaderShow"); GeneralSettings.Header.Background = GetString("Item.Area.NavigationNavbarBackground"); GeneralSettings.Header.ShowFrontpageImage = GetBoolean("Item.Area.HeaderFrontpageImage"); if (GeneralSettings.Header.Mode == "solid"){ GeneralSettings.Header.Classes = ""; } if (GeneralSettings.Header.Mode == "cover" || GeneralSettings.Header.Mode == "mobile"){ GeneralSettings.Header.Classes = "header-alpha header-cover"; } //Logo settings GeneralSettings.Logo.Image = GetString("Item.Area.GeneralLogo"); GeneralSettings.Logo.Text = GetString("Item.Area.GeneralLogoText"); GeneralSettings.Logo.Slogan = GetString("Item.Area.LogoSlogan"); GeneralSettings.Logo.SecondaryColor = GetString("Item.Area.LogoSecondColor.Color"); if (!string.IsNullOrWhiteSpace(GetString("Item.Area.LogoContrastImage"))) { GeneralSettings.Logo.ContrastImage = GetString("Item.Area.LogoContrastImage"); } else { GeneralSettings.Logo.ContrastImage = GetString("Item.Area.GeneralLogo"); } //Navigation settings GeneralSettings.Navigation.Position = GetString("Item.Area.NavigationPosition"); GeneralSettings.Navigation.StickyMenu = "off"; GeneralSettings.Navigation.IsMegamenu = GetBoolean("Item.Area.IsMegamenu"); GeneralSettings.Navigation.IsAnimateNavigation = GetBoolean("Item.Area.IsAnimateNavigation"); if (GetBoolean("Item.Area.NavigationSticky")) { if (GeneralSettings.Header.Show) { if (GeneralSettings.Header.Mode == "cover") { GeneralSettings.Navigation.StickyMenu = "44"; //"data-spy=\"affix\" data-offset-top=\"44\" data-offset-bottom=\"300\""; } else { int offset = ImageHeight()+28; GeneralSettings.Navigation.StickyMenu = offset.ToString(); // "data-spy=\"affix\" data-offset-top=\"" + offset.ToString() + "\" data-offset-bottom=\"300\""; } } else { GeneralSettings.Navigation.StickyMenu = "5"; // "data-spy=\"affix\" data-offset-top=\"5\" data-offset-bottom=\"300\""; } } if (GeneralSettings.Navigation.Position == "left") { GeneralSettings.Navigation.InvertedPosition = "right"; } else { GeneralSettings.Navigation.InvertedPosition = "left"; } GeneralSettings.Navigation.SelectionMode = GetString("Item.Area.NavigationSelectionMode"); GeneralSettings.Navigation.SelectionStyle = ""; GeneralSettings.Navigation.SelectionWeight = GetInteger("Item.Area.SelectionWeight"); if (GeneralSettings.Navigation.SelectionMode == "arrow") { GeneralSettings.Navigation.SelectionStyle = "navbar-arrow"; } GeneralSettings.Navigation.Case = GetBoolean("Item.Area.NavigationUppercase"); GeneralSettings.Navigation.BreadcrumbMode = GetString("Item.Area.NavigationBreadcrumbLayout"); GeneralSettings.Navigation.BreadcrumbAlign = GetString("Item.Area.NavigationBreadcrumbAlign"); GeneralSettings.Navigation.LeftmenuMode = GetString("Item.Area.NavigationLeftNavigationMode"); GeneralSettings.Navigation.ButtonDesign = GetString("Item.Area.NavigationButtonDesign"); //Background settings GeneralSettings.Background.Image = GetString("Item.Area.BackgroundImage.Image.Image"); GeneralSettings.Background.CustomImage = GetString("Item.Area.BackgroundImage.Image.CustomImage"); GeneralSettings.Background.Color = GetString("Item.Area.BackgroundImage.Color.Color"); GeneralSettings.Background.GradientColor = GetBoolean("Item.Area.BackroundGradientColor"); GeneralSettings.Background.GradientPercentage = GetString("Item.Area.GradientPercentage"); if (@GetString("Item.Area.BackgroundFixed") == "True") { GeneralSettings.Background.Position = "fixed"; } else { GeneralSettings.Background.Position = ""; } if (GeneralSettings.Background.Image == "none") { GeneralSettings.Background.Style = ""; } else if (GeneralSettings.Background.Image == "custom") { if (!string.IsNullOrWhiteSpace(GeneralSettings.Background.CustomImage)) { GeneralSettings.Background.Style = "background: url('/Admin/Public/GetImage.ashx?width=1920&amp;Crop=1&amp;Compression=75&amp;image=" + GeneralSettings.Background.CustomImage + "') " + GeneralSettings.Background.Position + " !important; "; } } else { GeneralSettings.Background.Style = "background: url('/Admin/Public/GetImage.ashx?width=1920&amp;Crop=1&amp;Compression=75&amp;image=/Files/Templates/Designs/Dwsimple/images/background/" + GeneralSettings.Background.Image + "') " + GeneralSettings.Background.Position + " !important; "; } //Headings settings GeneralSettings.Headings.Mode = GetString("Item.Area.AdvHeadingsMode"); //Site settings GeneralSettings.Site.Shadow = GetBoolean("Item.Area.BackgroundSiteShadow"); GeneralSettings.Site.LayoutMode = GetString("Item.Area.LayoutMode"); if (GeneralSettings.Site.LayoutMode == "boxed"){ GeneralSettings.Site.LayoutMode = "body-" + GeneralSettings.Site.LayoutMode; GeneralSettings.Header.Classes += " header-boxed"; } //Image settings GeneralSettings.Images.RoundCorners = GetBoolean("Item.Area.LayoutRoundCorners"); //Ecommerce settings GeneralSettings.Ecommerce.EcomListDesign = GetString("Item.Area.EcommerceProductCardDesign"); GeneralSettings.Ecommerce.EcomCardDesign = GetString("Item.Area.EcommerceProductCardDesign"); } public string GetGeneralCSS() { string CssString = ""; int SelectionWeight = GeneralSettings.Navigation.SelectionWeight; //Site settings if (GetString("Item.Area.LogoFont.Color.Color") == "#FFF" || GetString("Item.Area.LogoFont.Color.Color") == "#FFFFFF") { int offset = ImageHeight()+28; CssString += @" .dw-offsetmenu-logo { color: #333 !important; }"; } if (!string.IsNullOrWhiteSpace(GeneralSettings.Background.Color)) { CssString += @" body { background-color: " + GeneralSettings.Background.Color + @"; background-size: cover; overflow-y: scroll; }"; } if (GeneralSettings.Background.GradientColor) { CssString += @" body { background: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); background: -o-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); background: -ms-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); background: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); background: linear-gradient(to top, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); background-attachment: fixed; background-color: " + GeneralSettings.Background.Color + @" !important; }"; } if (GeneralSettings.Site.Shadow) { CssString += @" .shad { -webkit-box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75); -moz-box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75); box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75); }"; } //Image settings if (GeneralSettings.Images.RoundCorners) { CssString += @" img { border-radius: 6px; -webkit-border-radius: 6px; -moz-border-radius: 6px; }"; } //Navbar and header custom settings if (GeneralSettings.Header.Mode == "cover") { CssString += @" .navbar-wp { background-color: none !important; }"; if (!GeneralSettings.Header.Show || GeneralSettings.Header.Mode == "mobile") { CssString += @" .header-cover .navbar-wp { top: 0px !important; }"; } } else { if (GeneralSettings.Header.Show) { CssString += @" .navbar-wp.affix .navbar-nav > li > a { padding: 16px 16px !important; }"; } } if (GeneralSettings.Header.Background == "colorline") { CssString += @" .navbar-wp, .navbar-wp.affix { border-bottom: 4px solid " + ColorSettings.Color.Primary + @" !important; } .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a { background-color: #FFF; color: #333; } .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus { color: " + ColorSettings.Color.NavbarFont + @"; } .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo { color: " + GeneralSettings.Logo.SecondaryColor + @" !important; }"; } else if (GeneralSettings.Header.Background == "neutral") { CssString += @" .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a { background-color: #f1f1f1; } .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a { color: #333; } .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus { color: " + ColorSettings.Color.NavbarFont + @"; } .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo { color: " + GeneralSettings.Logo.SecondaryColor + @" !important; }"; } else if (GeneralSettings.Header.Background == "transparent") { CssString += @" .navbar-wp, .navbar-wp.affix { background-color: #FFF; opacity: 0.9; filter: alpha(opacity=90); /* For IE8 and earlier */ } .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a { color: #333; } .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus { color: " + ColorSettings.Color.NavbarFont + @"; } .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo { color: " + GeneralSettings.Logo.SecondaryColor + @" !important; }"; } else { CssString += @" .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a { background-color: " + ColorSettings.Color.Secondary + @"; } .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo { color: " + GeneralSettings.Logo.SecondaryColor + @" !important; }"; } if (GeneralSettings.Navigation.SelectionMode == "background" || GeneralSettings.Navigation.SelectionMode == "arrow"){ CssString += NavbarPosition(false, SelectionWeight); CssString += @" .dw-navbar-button > a { background-color: transparent !important; } .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { background-color: " + ColorSettings.Color.Primary + @" !important; }"; } if (GeneralSettings.Navigation.SelectionMode == "underline"){ CssString += NavbarPosition(true); CssString += ClearBackground(); CssString += @" .dw-navbar-button > a span:after { position: absolute; content: ''; left: 0px; bottom: 0px; height: " + SelectionWeight + @"px; width: 100%; transform: scaleX(0); transition: all 0.3s ease-in-out 0s; } .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { color: " + ColorSettings.Color.Primary + @" !important; } .dw-navbar-button > a:hover span:after, dw-navbar-button > a:active span:after, dw-navbar-button > a:focus span:after, .active > a span:after { color: " + ColorSettings.Color.Primary + @" !important; transform: scaleX(1); transition: all 0.3s ease-in-out 0s; }"; } if (GeneralSettings.Navigation.SelectionMode == "boxed"){ CssString += NavbarPosition(true, SelectionWeight); CssString += @" .dw-navbar-button > a { background-color: transparent !important; } .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { background-color: " + ColorSettings.Color.Primary + @" !important; transition: all 0.3s ease-in-out 0s; }"; } if (GeneralSettings.Navigation.SelectionMode == "border"){ CssString += NavbarPosition(true, 6, SelectionWeight); CssString += ClearBackground(); CssString += @" .dw-navbar-button > a { border: " + SelectionWeight + @"px solid transparent !important; transition: None !important; } .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { border-width: " + SelectionWeight + @"px !important; border-color: " + ColorSettings.Color.Primary + @" !important; transition: all 0.3s ease-in-out 0s; }"; } if (GeneralSettings.Navigation.SelectionMode == "font"){ CssString += NavbarPosition(); CssString += ClearBackground(); SelectionWeight = (SelectionWeight*100); CssString += @" .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { color: " + ColorSettings.Color.Primary + @" !important; font-weight: " + SelectionWeight + @" !important; transition: all 0.3s ease-in-out 0s; }"; } if (GeneralSettings.Navigation.Case){ CssString += @" .dw-navbar-button > a { text-transform: uppercase !important; }"; } else { CssString += @" .dw-navbar-button > a { text-transform: none !important; }"; } //Breadcrumb custom settings if (GeneralSettings.Navigation.BreadcrumbMode == "light") { CssString += @" .pg-opt { border-bottom: 0px; background: none repeat scroll 0% 0% #FFF; } .dw-breadcrumb-title { font-size: 14px !important; padding: 5px 0px 5px 0px !important; } .dw-breadcrumb { padding: 5px 0px 5px 0px !important; }"; } if (GeneralSettings.Navigation.BreadcrumbMode == "normal") { CssString += @" .dw-breadcrumb-title { font-size: 14px !important; padding: 5px 0px 5px 0px !important; } .dw-breadcrumb a, .pg-opt .breadcrumb { padding: 5px !important; }"; } if (GeneralSettings.Navigation.BreadcrumbMode == "large") { CssString += @" .dw-breadcrumb-title { font-size: 22px !important; padding: 15px 0px 15px 0px !important; } .dw-breadcrumb { padding: 15px !important; }"; } if (GeneralSettings.Navigation.BreadcrumbAlign == "right") { CssString += @" .dw-breadcrumb { float: right !important; }"; } else { CssString += @" .dw-breadcrumb { float: left !important; }"; } //Left menu custom settings if (GeneralSettings.Navigation.LeftmenuMode == "light" || GeneralSettings.Navigation.LeftmenuMode == "light-color") { CssString += @" ul.dw-categories, ul.dw-categories > li, ul.dw-categories > li > ul > li { border: 0px solid #EEE; } ul.dw-categories > li > ul { background: none repeat scroll 0% 0% #FFF; } ul.dw-categories li a:hover, ul.dw-categories li a:focus, ul.dw-categories li a:active { background-color: #FFF !important; color: " + ColorSettings.Color.Primary + @" !important; } .list-active, .list-active > a { background-color: #FFF; color: " + ColorSettings.Color.Primary + @" !important; } .list-open-active { background-color: #FFF; color: " + ColorSettings.Color.Primary + @" !important; }"; } if (GeneralSettings.Navigation.LeftmenuMode == "lines") { CssString += @" ul.dw-categories > li { border-bottom: 1px solid #EEE; } ul.dw-categories { border: 0px solid #EEE; } ul.dw-categories > li > ul { background: none repeat scroll 0% 0% #FFF; } ul.dw-categories li a:hover, a:focus, a:active { background-color: #FFF !important; color: " + ColorSettings.Color.Primary + @" !important; } .list-active, .list-active > a { background-color: #FFF; color: " + ColorSettings.Color.Primary + @" !important; } .list-open-active { background-color: #FFF; color: " + ColorSettings.Color.Primary + @" !important; }"; } if (GeneralSettings.Navigation.LeftmenuMode == "boxed") { CssString += @" ul.dw-categories, ul.dw-categories > li, ul.dw-categories > li > ul > li { border: 0px solid #EEE; } .list-active, .list-active > a { background-color: " + ColorSettings.Color.Primary + @" !important; color: #FFF; }"; } if (GeneralSettings.Navigation.LeftmenuMode == "border") { CssString += @" ul.dw-categories > li { border: 1px solid #EEE; } ul.dw-categories > li > ul > li { border-top: 1px solid #EEE; } .list-active, .list-active > a { background-color: " + ColorSettings.Color.Primary + @" !important; color: #FFF; }"; } if (GeneralSettings.Navigation.LeftmenuMode == "light-color") { CssString += @" ul.dw-categories li a:hover, ul.dw-categories a:focus, ul.dw-categories a:active { border-left: 6px solid " + ColorSettings.Color.Primary + @"; } ul.dw-categories .M2 > li > a:hover, ul.dw-categories .M2 > li > a:focus, ul.dw-categories .M2 > li > a:active, ul.dw-categories .M2 > .list-active > a { padding-left: 20px; } ul.dw-categories .M3 > li > a:hover, ul.dw-categories .M3 > li > a:focus, ul.dw-categories .M3 > li > a:active, ul.dw-categories .M3 > .list-active > a { padding-left: 30px; } ul.dw-categories .M4 > li > a:hover, ul.dw-categories .M4 > li > a:focus, ul.dw-categories .M4 > li > a:active, ul.dw-categories .M4 > .list-active > a { padding-left: 40px; } ul.dw-categories .M5 > li > a:hover, ul.dw-categories .M5 > li > a:focus, ul.dw-categories .M5 > li > a:active, ul.dw-categories .M5 > .list-active > a { padding-left: 50px; } ul.dw-categories .M6 > li > a:hover, ul.dw-categories .M6 > li > a:focus, ul.dw-categories .M6 > li > a:active, ul.dw-categories .M6 > .list-active > a { padding-left: 50px; } ul.dw-categories .M7 > li > a:hover, ul.dw-categories .M7 > li > a:focus, ul.dw-categories .M7 > li > a:active, ul.dw-categories .M7 > .list-active > a { padding-left: 50px; } ul.dw-categories .M8 > li > a:hover, ul.dw-categories .M8 > li > a:focus, ul.dw-categories .M8 > li > a:active, ul.dw-categories .M8 > .list-active > a { padding-left: 50px; } ul.dw-categories .list-active > a { border-left: 6px solid " + ColorSettings.Color.Primary + @"; } .btn-dw:hover, .btn-dw:focus, .btn-dw:active { }"; } //Buttons custom designs if (GeneralSettings.Navigation.ButtonDesign == "light-rounded") { CssString += @" .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { border-width: 0px; } .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { background-color: " + ColorSettings.Color.Secondary + @"; color: #FFF; border-width: 0px; } .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { background-color: " + ColorSettings.Color.Primary + @"; color: #FFF; border-width: 0px; } .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; color: #FFF; border-width: 0px; }"; } if (GeneralSettings.Navigation.ButtonDesign == "corners") { CssString += @" .btn-dw-primary, .btn-dw-secondary, btn-dw-cart , .btn-dw-cart { border-radius: 0px !important; border-width: 0px; } .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { background-color: " + ColorSettings.Color.Secondary + @"; color: #FFF; border-width: 0px; } .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { background-color: " + ColorSettings.Color.Primary + @"; color: #FFF; border-width: 0px; } .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; color: #FFF; border-width: 0px; }"; } if (GeneralSettings.Navigation.ButtonDesign == "round") { CssString += @" .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { padding: 5px 15px; border-radius: 200px !important; border-width: 0px !important; } .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { background-color: " + ColorSettings.Color.Secondary + @"; color: #FFF; border-width: 0px !important; } .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { background-color: " + ColorSettings.Color.Primary + @"; color: #FFF; border-width: 0px !important; } .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; color: #FFF; border-width: 0px !important; }"; } if (GeneralSettings.Navigation.ButtonDesign == "border") { CssString += @" .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { background-color: transparent; } .btn-dw-primary { border-width: 4px; padding: 3px 10px; color: " + ColorSettings.Color.Primary + @"; } .btn-dw-secondary { border-width: 2px; color: " + ColorSettings.Color.Secondary + @"; } .btn-dw-cart { border-width: 4px; padding: 3px 10px; color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; } .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { background-color: " + ColorSettings.Color.Primary + @"; border-width: 4px; padding: 3px 10px; border-color: " + ColorSettings.Color.Primary + @"; color: #FFF; } .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { background-color: " + ColorSettings.Color.Primary + @"; border-width: 2px; color: #FFF; border-color: #FFF; } .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; border-width: 4px; padding: 3px 10px; border-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; color: #FFF; }"; } if (GeneralSettings.Navigation.ButtonDesign == "border-sharp" || GeneralSettings.Navigation.ButtonDesign == "border-round") { CssString += @" .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { background-color: transparent; } .btn-dw-primary { border-width: 4px; padding: 3px 15px; color: " + ColorSettings.Color.Primary + @"; } .btn-dw-secondary { border-width: 2px; padding: 5px 15px; color: " + ColorSettings.Color.Secondary + @"; } .btn-dw-cart { border-width: 4px; padding: 3px 15px; color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; } .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { background-color: " + ColorSettings.Color.Primary + @"; border-width: 4px; color: #FFF; padding: 3px 15px; border-color: " + ColorSettings.Color.Primary + @"; } .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { background-color: " + ColorSettings.Color.Primary + @"; border-width: 2px; color: #FFF; padding: 5px 15px; border-color: #FFF; } .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; border-width: 4px; color: #FFF; padding: 3px 15px; border-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; }"; } if (GeneralSettings.Navigation.ButtonDesign == "border-sharp") { CssString += @" .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart, .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active, .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active, .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { border-radius: 0px !important; }"; } if (GeneralSettings.Navigation.ButtonDesign == "border-round") { CssString += @" .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart, .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active, .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active, .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { border-radius: 200px !important; }"; } //Headings custom settings if (GeneralSettings.Headings.Mode == "underline") { CssString += @" .dw-section-title { border-bottom: 2px solid; margin-bottom: 15px; }"; } if (GeneralSettings.Headings.Mode == "boxed" || GeneralSettings.Headings.Mode == "boxed-line") { CssString += @" .dw-section-title span { background-color: " + GetString("Item.Area.HeadingsH1.Color.Color") + @"; display: inline-block; padding: 8px 16px; color: #FFF; }"; if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color"))) { CssString += @" .dw-section-title { background-color: " + ColorSettings.Color.Primary + @"; }"; } } if (GeneralSettings.Headings.Mode == "boxed-line") { CssString += @" .dw-section-title span { margin-bottom: 2px; } .dw-section-title { border-bottom: 2px solid " + GetString("Item.Area.HeadingsH1.Color.Color") + @"; margin-bottom: 10px; }"; if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color"))) { CssString += @" .dw-section-title { border-bottom: 2px solid " + ColorSettings.Color.Primary + @"; }"; } } if (GeneralSettings.Headings.Mode == "outline") { CssString += @" .dw-section-title { color: #FFF; text-shadow: -1px -1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @", 1px -1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @", -1px 1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @", 1px 1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @"; }"; if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color"))) { CssString += @" .dw-section-title { text-shadow: -1px -1px 0 #1A1A1A, 1px -1px 0 #1A1A1A, -1px 1px 0 #1A1A1A, 1px 1px 0 #1A1A1A; }"; } } if (GeneralSettings.Headings.Mode == "backline") { CssString += @" .dw-section-title { font-size: 18px; text-align: center; border-bottom: 2px solid; padding: 0; margin: 8px 0 20px; line-height: 0em !important; } .dw-section-title > span { background-color: #FFF; padding: 0 16px; } .dw-section-title-small { margin: 8px 0 20px; }"; } if (GeneralSettings.Ecommerce.EcomCardDesign == "one") { } if (GeneralSettings.Ecommerce.EcomCardDesign == "two") { CssString += @" .product { border: 1px solid #E5E5E5; }"; } return CssString; } private string ClearBackground() { string CssString = ""; CssString += @" .dw-navbar-button > a { background-color: rgba(0, 0, 0, 0.0) !important; } .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { background-color: rgba(0, 0, 0, 0.0) !important; }"; return CssString; } private string NavbarPosition(bool margin=false, int specialpadding=6, int extramargin=0) { int LogoHeight = 0; string CssString = ""; int Centerpos = 0; if (GeneralSettings.Header.Mode != "solid"){ if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) { LogoHeight = ImageHeight(); } else { LogoHeight = GetInteger("Item.Area.LogoFont.Size"); } } else { if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) { LogoHeight = 18; } else { LogoHeight = GetInteger("Item.Area.LogoFont.Size")-10; } } if (margin == false) { Centerpos = (LogoHeight/2) + 6; CssString += @" .dw-navbar-button > a, .navbar-wp.affix .navbar-nav > li > a { padding: " + Centerpos + @"px " + (specialpadding+4) + @"px " + Centerpos + @"px " + (specialpadding+4) + @"px !important; margin: " + extramargin + @"px " + extramargin + @"px !important; }"; } else { Centerpos = ((LogoHeight/2)+6)-(specialpadding+extramargin); CssString += @" .dw-navbar-button > a, .navbar-wp.affix .navbar-nav > li > a { padding: " + specialpadding + @"px " + (specialpadding+4) + @"px " + specialpadding + @"px " + (specialpadding+4) + @"px !important; margin: " + Centerpos + @"px 4px 0px 4px !important; }"; } return CssString; } private int ImageHeight () { int LogoHeight = 0; if (!string.IsNullOrWhiteSpace(GetString("Item.Area.GeneralLogo"))) { string imageUrl = "http://" + HttpContext.Current.Request.Url.Authority + GetString("Item.Area.GeneralLogo"); WebRequest request = WebRequest.Create(imageUrl); WebResponse response = request.GetResponse(); Image image = Image.FromStream(response.GetResponseStream()); LogoHeight = image.Height; } else { LogoHeight = 38; } return LogoHeight; } } @{ InitGeneralSettings(); } @if (writeCss) { css += FontStylesCSS() + "/*Colors*/" + Environment.NewLine + GetColorSettings() + Environment.NewLine + "/*General*/" + Environment.NewLine + GetGeneralCSS(); Dynamicweb.Core.Helpers.TextFileHelper.WriteTextFile(css, HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.css"), false); Dynamicweb.Core.Helpers.TextFileHelper.WriteTextFile(RemoveWhiteSpaceFromStylesheets(Dynamicweb.Core.Helpers.TextFileHelper.ReadTextFile(HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Dwsimple/css/DWGlobalStyles.css"))), HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Dwsimple/css/DWGlobalStyles.min.css"), false); Dynamicweb.Core.Helpers.TextFileHelper.WriteTextFile(RemoveWhiteSpaceFromStylesheets(css), cssPath, false); } @functions{ public static string RemoveWhiteSpaceFromStylesheets(string body) { body = Regex.Replace(body, @"[a-zA-Z]+#", "#"); body = Regex.Replace(body, @"[\n\r]+\s*", string.Empty); body = Regex.Replace(body, @"\s+", " "); body = Regex.Replace(body, @"\s?([:,;{}])\s?", "$1"); body = body.Replace(";}", "}"); body = Regex.Replace(body, @"([\s:]0)(px|pt|%|em)", "$1"); // Remove comments from CSS body = Regex.Replace(body, @"/\*[\d\D]*?\*/", string.Empty); return body; } } @* TEMPLATE STYLES *@ <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/DWGlobalStyles.min.css" id="dwStylesheet" media="screen"> <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/invoice.min.css"> <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/owl.carousel.min.css"> <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/owl.theme.default.min.css"> <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/print.min.css" media="print"> <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/typeahead.min.css"> <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/fjerdingstad.css"> @{ string cssAutoPath = "/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.min.css?t=@areaUpdated.Ticks"; } <link rel="stylesheet" type="text/css" href="@cssAutoPath"> <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/product.min.css"> <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/style.min.css"> <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/styles.min.css"> @* ANALYTICS CODE *@ @GetValue("Item.Area.OtherAnalyticsCode") <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="//code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.9.2/jquery.ui.mouse.min.js"></script> <script src="/Files/Templates/Designs/Dwsimple/js/jquery.ui.touch-punch.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script> @foreach (var lang in GetLoop("WebsiteLanguages")) { bool IsMaster = lang.GetBoolean("IsMaster"); if (IsMaster) { string langCode = lang.GetString("Culture").Substring(3).ToUpper(); <text> <script> var $langCode = "@langCode"; </script> </text> } } @if (GeneralSettings.Navigation.IsMegamenu) { <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/megamenu.min.css"> } @* CONFIGURING DYNAMICALLY STYLES WHICH COMES FROM CUSTOM MODULES *@ <style> @RenderSnippet("StylesHead") </style> @GetValue("Stylesheets") @GetValue("Javascripts") </head> <body style="@GeneralSettings.Background.Style" id="sitecontent"> @* GOOGLE TAG MANAGER (NOSCRIPT) *@ <noscript> <iframe src="https://www.googletagmanager.com/ns.html?id=@GoogleTagManagerId" height="0" width="0" style="display:none;visibility:hidden"></iframe> </noscript> @* END GOOGLE TAG MANAGER (NOSCRIPT) *@ @* MODALS *@ @{ var request = HttpContext.Current.Request; } <div class="modal fade" id="login" tabindex="-1" role="dialog" aria-labelledby="loginLabel" aria-hidden="true"> <div class="modal-dialog mdl-custom"> <div class="modal-content"> <div class="modal-header" id="loginModalDiv"> <h4 class="modal-title" id="myModalLabel">@Translate("Login", "Login")</h4> </div> <form name="form" id="loginform" method="post"> <div class="modal-body"> <input type="hidden" name="ID" value="@Pageview.ID"> <input type="hidden" name="DWExtranetUsernameRemember" value="True"> <input type="hidden" name="DWExtranetPasswordRemember" value="True"> <div class="form-group2"> @{ attrValue = Translate("Enter email", "Enter email"); var username2 = @GetValue("DWExtranetUsername"); } <input type="text" class="form-control" name="username" id="username" placeholder="@attrValue" value="@username2" required=""> </div> <div class="form-group2"> @{ attrValue = Translate("Enter password", "Enter password"); }<input type="password" class="form-control" name="password" id="password" placeholder="@attrValue" required=""> </div> @if (!string.IsNullOrWhiteSpace(GetString("DW_extranet_error_uk")) && !string.IsNullOrWhiteSpace(request["username"])) { <h5 class="text-center" id="loginModalValidationMessage">@GetValue("DW_extranet_error_uk")</h5> } <div class="form-group2"> <button type="submit" class="btn btn-xs btn-base login-btn pull-right">@Translate("Sign in", "Sign in")</button> </div> </div> <div class="row"> <div class="col-md-12 4letter"> <div class="col-md-6 checkbox pull-left"> <label> <input type="checkbox" name="Autologin" checked="checked" value="True"> @Translate("Remember me", "Remember me") </label> </div> <div class="col-md-6"> <a class="pull-left" href='/Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]&LoginAction=Recovery'>@Translate("Forgot your password?", "Forgot your password?")</a> <a class="pull-left" href='/Default.aspx?ID=@Pageview.Area.Item["CreateNewUser"]'>@Translate("Create new user", "Create new user")</a> <p>&nbsp;</p> <br> </div> </div> </div> </form> </div> </div> </div> @* MOBILE MENU *@ @{ var offsetmenuplace = "left"; if (GeneralSettings.Header.Mode == "mobile") { offsetmenuplace = GeneralSettings.Navigation.Position; } } <div id="myNavmenu" class="navmenu navmenu-default navmenu-fixed-@offsetmenuplace offcanvas"> <div class="col-sm-12 col-xs-12 offcanvas-col"> <div class="row offcanvas-row">&nbsp;</div> <div class="offcanvas-row pull-right"> <button type="button" class="btn btn-sm btn-dw-primary close-menu" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body"> <img src="/Files/Templates/Designs/Dwsimple/images/icons/close.png" alt="close"> <span> @Translate("Menu", "Menu") </span> </button> </div> <div class="row offcanvas-row hidden"> <div class="col-sm-12 col-xs-12 offcanvas-col"> <a href="/Default.aspx?ID=@firstpageid" class="brand"> @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) { <div class="img-responsive dw-offsetmenu-logo pull-left"> @if (GeneralSettings.Logo.ContrastImage != GeneralSettings.Logo.Image) { <img src="@GeneralSettings.Logo.ContrastImage" alt="Logo"> } else { <img class="img-responsive" src="@GeneralSettings.Logo.Image" alt="Logo"> } </div> } @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text)) { <div class="dw-logotext dw-offsetmenu-logo pull-left">@GeneralSettings.Logo.Text</div> } </a> </div> </div> <div class="row offcanvas-row">&nbsp;</div> </div> <div class="col-sm-12 col-xs-12 offcanvas-col"> @if (GetBoolean("Item.Area.EcomEnabled")) { <div class="row offcanvas-row">&nbsp;</div> <div class="row offcanvas-row"> <div class="col-sm-12 col-xs-12 offcanvas-col"> @if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) { <div class="pull-left hidden"> <a href='Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]' class="btn btn-sm btn-default">@Translate("Sign in", "Sign in")</a> <a href='Default.aspx?ID=@Pageview.Area.Item["SignUpPageId"]' class="btn btn-sm btn-default">@Translate("Opret brugerprofil", "Opret brugerprofil")</a> </div> } @if (Dynamicweb.Frontend.PageView.Current().Device == Dynamicweb.Frontend.Devices.DeviceType.Desktop) { if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) { <div class="pull-left"> <a href='Default.aspx?ID=@Pageview.Area.Item["OrdersPageId"]' class="btn btn-sm btn-default"> <i class="fa fa-user"></i> <strong>@GetGlobalValue("Global:Extranet.Name")</strong> </a> </div> <div class="pull-left"> <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.ID"><button class="btn btn-sm btn-default"><i class="fa fa-sign-out"></i> @Translate("Sign out", "Sign out")</button></a> </div> } } @if (GetLoop("DWExtranetSecondaryUsers").Count > 0 || !string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) { <p>&nbsp;</p> <form method="post"> <div class="pull-left"> @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) { <select id="DWExtranetSecondaryUserSelector" name="DWExtranetSecondaryUserSelector" title="Impersonate selected user"> @foreach (var user in GetLoop("DWExtranetSecondaryUsers")) { <option value='@user.GetValue("UserID")'>@user.GetValue("UserName")</option> } </select> <input type="submit" class="btn btn-xs" tabindex="3" value="OK"> } else { string impersonateUser = @GetGlobalValue("Global:Extranet.SecondaryUser.UserName") + " is impersonated by " + @Pageview.User.UserName; <span title="@impersonateUser" class="btn btn-xs impersonation-btn"><i class="fa fa-user-secret"></i> @GetGlobalValue("Global:Extranet.SecondaryUser.UserName")</span> <input type="submit" class="btn btn-xs" name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" value="Stop impersonation"> } </div> </form> } </div> </div> <div class="row offcanvas-row">&nbsp;</div> } </div> <div class="row offcanvas-row"> <div class="col-sm-12 col-xs-12 offcanvas-col"> @GetValue("DwNavigation(drawernavigation)") </div> </div> @if (!GetBoolean("Item.Area.OnlyOneLanguage")) { <div class="langMobile"> <div class="lang-sug"> <img class="closeLang" src="/Files/Templates/Designs/Dwsimple/images/icons/close-black.png" alt="close"> <p>@Translate("Change language", "Change language"):</p> <ul class="langMenu langMobile" area-labelledby="language"> @foreach (var lang in GetLoop("WebsiteLanguages")) { string isActive = (lang.GetBoolean("IsCurrent") ? "activeArea" : ""); <li id='@lang.GetValue("ID")area' class="@isActive"> @*@if (GetInteger("Ecom:Order.OrderLines.Count") <= 0)*@ @{ string langCode = lang.GetString("Culture").Substring(0, 2).ToLower(); if (lang.GetBoolean("IsCurrent")) { <a data-lang="current" data-code="@langCode" class="activeArea langSelected" href='Default.aspx?ID=@lang.GetValue("FirstActivePageID")'> @lang.GetString("Culture") </a> } else { <a class="langSelected" data-lang="none" data-code="@langCode" href='Default.aspx?ID=@lang.GetValue("FirstActivePageID")'> @lang.GetString("Culture") </a> } } </li> } </ul> </div> </div> } <div> <ul class="top-menu"> @foreach (LoopItem headerLink in GetLoop("Item.Area.HeaderLinks")) { string Link = headerLink.GetString("Item.Area.HeaderLinks.Link"); string LinkText = headerLink.GetString("Item.Area.HeaderLinks.LinkText"); string LinkIcon = headerLink.GetString("Item.Area.HeaderLinks.LinkIcon"); string LinkTarget = headerLink.GetString("Item.Area.HeaderLinks.LinkTarget"); <li> <a href="@Link" title="@LinkText" target="@LinkTarget"> <span class="link-icon" style='background-image: url("@LinkIcon")'></span> <span class="link-txt">@LinkText</span> </a> </li> } @if (!GetBoolean("Item.Area.OnlyOneLanguage")) { <li class="LangLing"> <a href="#"> <span class="link-icon" style='background-image: url("@GetString("Item.Area.LanguageIcon")")'></span> <span class="link-txt">@GetString("Item.Area.LanguageText")</span> </a> </li> } <!-- Ecommerce user menu --> @if (GetBoolean("Item.Area.EcomEnabled")) { if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) { <text> <li class="LoginLink"> <a href='Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]'> <span>@Translate("Login", "Login")</span> </a> </li> </text> } if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) { <text> <li class="loggedIn"> <a href='Default.aspx?ID=@Pageview.Area.Item["UserProfilePageId"]'> <nobr> <i class="fa fa-user"></i> <strong>@GetGlobalValue("Global:Extranet.Name")</strong> </nobr> </a> </li> @if (GetLoop("DWExtranetSecondaryUsers").Count > 0 || !string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) { <li> <form method="post"> <span> @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) { string impersonateTranslation = Translate("Impersonate selected user"); <select id="DWExtranetSecondaryUserSelector" name="DWExtranetSecondaryUserSelector" title="@impersonateTranslation"> @foreach (var user in GetLoop("DWExtranetSecondaryUsers")) { <option value='@user.GetValue("UserID")'>@user.GetValue("UserName")</option> } </select> <input type="submit" class="btn btn-xs" tabindex="3" value="OK"> } else { string impersonateUser = GetGlobalValue("Global:Extranet.SecondaryUser.UserName") + " " + Translate("is impersonated by") + " " + Pageview.User.UserName; string stopImpersonateTranslation = Translate("Stop impersonation"); <span title="@impersonateUser" class="btn btn-xs impersonation-btn"><i class="fa fa-user-secret"></i> @GetGlobalValue("Global:Extranet.SecondaryUser.UserName")</span> <input type="submit" class="btn btn-xs" name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" value="@stopImpersonateTranslation"> } </span> </form> </li> } <li class="LogOut"> <a href='/Admin/Public/ExtranetLogoff.aspx?ID=@logoutid'>@Translate("Logout", "Logout")</a> </li> </text> } } <!-- Ecommerce Cart --> @if ((Dynamicweb.Frontend.PageView.Current().Device == Dynamicweb.Frontend.Devices.DeviceType.Mobile) || (Dynamicweb.Frontend.PageView.Current().Device == Dynamicweb.Frontend.Devices.DeviceType.Tablet)) { if (GetBoolean("Item.Area.EcomEnabled")) { <li class="dropdown animate-hover" data-animate="animated fadeInUp"> <a href="Default.aspx?ID=@cartid" title="" id="minipagecart" class="dw-minicart"><i class="fa fa-shopping-cart"></i> @GetValue("Ecom:Order.OrderLines.TotalProductQuantity") <span>@GetValue("Ecom:Order.OrderLines.Total.PriceWithoutVAT")</span></a> <ul class="sub-menu"> <li id="minicart"> @MiniCart() </li> </ul> </li> } } </ul> </div> </div> @* HEADER AND CONTENT *@ <div class="body-wrap shad @GeneralSettings.Site.LayoutMode"> @* HEADER *@ <div id="divHeaderWrapper"> <header class="header nav-down @GeneralSettings.Header.Classes"> <div class="headerLeft pull-left"> <!-- TOP HEADER --> @if (GeneralSettings.Header.Show) { <div class="top-header"> <div class="row"> @if (!GetBoolean("Item.Area.OnlyOneLanguage")) { <div class="lang-sug"> <img class="closeLang" src="/Files/Templates/Designs/Dwsimple/images/icons/close-black.png" alt="close"> <div class="container"> <p>@Translate("Change language", "Change language"):</p> <div id="partnercountry"> </div> <ul class="langMenu" area-labelledby="language"> @foreach (var lang in GetLoop("WebsiteLanguages")) { string isActive = (lang.GetBoolean("IsCurrent") ? "activeArea" : ""); <li id='@lang.GetValue("ID")area' class="@isActive"> @*@if (GetInteger("Ecom:Order.OrderLines.Count") <= 0)*@ @{ string langCode = lang.GetString("Culture").Substring(0, 2).ToLower(); if (lang.GetBoolean("IsCurrent")) { <a data-lang="current" data-code="@langCode" class="activeArea langSelected" href='Default.aspx?ID=@lang.GetValue("FirstActivePageID")'> @lang.GetString("Culture") </a> } else { <a class="langSelected" data-lang="none" data-code="@langCode" href='Default.aspx?ID=@lang.GetValue("FirstActivePageID")'> @lang.GetString("Culture") </a> } } </li> } </ul> </div> </div> } </div> <div class="row"> <div class="col-xs-4 col-sm-4 col-md-3 logobox"> @if (GeneralSettings.Header.Mode == "solid") { <a href="/Default.aspx?ID=@firstpageid" class="brand"> @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) { <img class="img-responsive dw-logoimage pull-left" src="@GeneralSettings.Logo.Image" alt="Logo"> } @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text)) { <div class="dw-logotext pull-left">@GeneralSettings.Logo.Text</div> } </a> if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Slogan)) { <div class="dw-slogantext pull-left">@GeneralSettings.Logo.Slogan</div> } } </div> <div class="col-xs-8 col-sm-8 col-md-9 logobox"> <div class="row"> <div class="hidden-xs hidden-sm hidden-md col-lg-12 search-right"> <div class="searchIcon hidden-xs hidden-sm pull-right"> <span class="buttonIconSearch"> <button class="btn btn-dw-primary searchFieldShow" type="submit"> <img src="/Files/Templates/Designs/Dwsimple/images/icons/search-white.png" class="img-center" alt=""> <span> @Translate("Search", "Search") </span> </button> </span> </div> <div class="pull-right navBar"> <nav class="top-header-menu hidden-sm hidden-xs hidden-md"> <ul class="top-menu"> @* @if(GetInteger("DwAreaFirstPageID") == 8398) { <li><a href="Default.aspx?ID=11424"><img alt="" src="/Files/Images/Ikoner/English.png" style="height:25px; width:50px"></a></li> <li><a href="Default.aspx?ID=11837"><img alt="" src="/Files/Images/Ikoner/PolishNew.png" style="height:25px; width:50px"></a></li> } @if(GetInteger("DwAreaFirstPageID") == 11424) { <li><a href="Default.aspx?ID=8398"><img alt="" src="/Files/Images/Ikoner/Norwegian.png" style="height:25px; width:50px"></a></li> <li><a href="Default.aspx?ID=11837"><img alt="" src="/Files/Images/Ikoner/PolishNew.png" style="height:25px; width:50px"></a></li> } @if(GetInteger("DwAreaFirstPageID") == 11586) { <li><a href="Default.aspx?ID=11424"><span class"link-txt"="">@Translate("Norwood.UK","Norwood.UK")<img alt="" src="/Files/Images/Ikoner/English.png" style="height:25px; width:50px"></span></a></li> <li><a href="Default.aspx?ID=11837"><img alt="" src="/Files/Images/Ikoner/English.png" style="height:25px; width:50px"></a></li> <li><a href="Default.aspx?ID=11837">@Translate("English language","English language")</a></li> <li><a href="Default.aspx?ID=8398"><img alt="" src="/Files/Images/Ikoner/Norwegian.png" style="height:25px; width:50px"></a></li> } @if(GetInteger("DwAreaFirstPageID") == 11837) { <li><a href="Default.aspx?ID=11424"><span class"link-txt"="">@Translate("Norwood.UK","Norwood.UK")<img alt="" src="/Files/Images/Ikoner/English.png" style="height:25px; width:50px"></span></a></li> <li><a href="Default.aspx?ID=11586"><img alt="" src="/Files/Images/Ikoner/PolishNew.png" style="height:25px; width:50px"></a></li> <li><a href="Default.aspx?ID=11586">@Translate("Polish language","Polish language")</a></li> <li><a href="Default.aspx?ID=11424"><img alt="" src="/Files/Images/Ikoner/English.png" style="height:25px; width:50px"></a></li> <li><a href="Default.aspx?ID=8398"><img alt="" src="/Files/Images/Ikoner/Norwegian.png" style="height:25px; width:50px"></a></li> } *@ @foreach (LoopItem headerLink in GetLoop("Item.Area.HeaderLinks")) { string Link = headerLink.GetString("Item.Area.HeaderLinks.Link"); string LinkText = headerLink.GetString("Item.Area.HeaderLinks.LinkText"); string LinkIcon = headerLink.GetString("Item.Area.HeaderLinks.LinkIcon"); string LinkTarget = headerLink.GetString("Item.Area.HeaderLinks.LinkTarget"); <li> <a href="@Link" title="@LinkText" target="@LinkTarget"> <span class="link-icon" style='background-image: url("@LinkIcon")'></span> <span class="link-txt">@LinkText</span> </a> </li> } @if (!GetBoolean("Item.Area.OnlyOneLanguage")) { <li class="LangLing"> <a href="#"> <span class="link-icon" style='background-image: url("@GetString("Item.Area.LanguageIcon")")'></span> <span class="link-txt">@GetString("Item.Area.LanguageText")</span> </a> </li> } <!-- Ecommerce user menu --> @if (GetBoolean("Item.Area.EcomEnabled")) { if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) { <text> <li class="LoginLink"> <a href="#" data-toggle="modal" data-target="#login"> <span>@Translate("Login", "Login")</span> </a> </li> @*@GetValue("DwNavigation(toolsnavigationNotloggedin)")*@ </text> } if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) { <text> <li class="loggedIn"> <a id="dLabel" role="button" href='Default.aspx?ID=@Pageview.Area.Item["UserProfilePageId"]'> <nobr> <i class="fa fa-user"></i>@GetGlobalValue("Global:Extranet.Name") </nobr> </a> @GetValue("DwNavigation(MyProfileMenu)") <span class="TitleWelcome" style="display: none;">@Translate("Welcome", "Welcome") @GetGlobalValue("Global:Extranet.Name")</span> </li><li class="logOut" style="display: none;"> <a href='/Admin/Public/ExtranetLogoff.aspx?ID=@logoutid'> @*<i class="fa fa-sign-out"></i>*@ @Translate("Logout", "Logout") </a> </li> @if (GetLoop("DWExtranetSecondaryUsers").Count > 0 || !string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) { <li> <form method="post"> <span> @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) { string impersonateTranslation = Translate("Impersonate selected user"); <select id="DWExtranetSecondaryUserSelector" name="DWExtranetSecondaryUserSelector" title="@impersonateTranslation"> @foreach (var user in GetLoop("DWExtranetSecondaryUsers")) { <option value='@user.GetValue("UserID")'>@user.GetValue("UserName")</option> } </select> <input type="submit" class="btn btn-xs" tabindex="3" value="OK"> } else { string impersonateUser = GetGlobalValue("Global:Extranet.SecondaryUser.UserName") + " " + Translate("is impersonated by") + " " + Pageview.User.UserName; string stopImpersonateTranslation = Translate("Stop impersonation"); <span title="@impersonateUser" class="btn btn-xs impersonation-btn"><i class="fa fa-user-secret"></i> @GetGlobalValue("Global:Extranet.SecondaryUser.UserName")</span> <input type="submit" class="btn btn-xs" name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" value="@stopImpersonateTranslation"> } </span> </form> </li> } </text> } } <!-- Ecommerce Cart --> @if (GetBoolean("Item.Area.EcomEnabled")) { <li class="dropdown animate-hover hidden" data-animate="animated fadeInUp"> <a href="Default.aspx?ID=@cartid" title="" id="minipagecart" class="dw-minicart"><i class="fa fa-shopping-cart"></i> @GetValue("Ecom:Order.OrderLines.TotalProductQuantity") <span>@GetValue("Ecom:Order.OrderLines.Total.PriceWithoutVAT")</span></a> <ul class="sub-menu"> <li id="minicart"> @MiniCart() </li> </ul> </li> } </ul> </nav> <!-- MAIN NAV --> @{ var sticky = GeneralSettings.Navigation.StickyMenu; var stickyTrigger = "affix"; var navbarpos = GeneralSettings.Navigation.Position; var selectionstyle = GeneralSettings.Navigation.SelectionStyle; if (sticky == "off") { stickyTrigger = ""; } } <div id="navOne" class="navbar navbar-wp @selectionstyle navbar-fixed affix-top" role="navigation" data-spy="@stickyTrigger" data-offset-top="@sticky" data-offset-bottom="300"> @if (GeneralSettings.Header.Mode != "solid" || !GeneralSettings.Header.Show) { <div class="navbar-header pull-@GeneralSettings.Navigation.InvertedPosition"> <div class="hidden-sm hidden-xs"> <a href="/Default.aspx?ID=@firstpageid" class="brand"> @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) { if (GeneralSettings.Logo.ContrastImage != GeneralSettings.Logo.Image) { <img class="img-responsive dw-logoimage dw-logoimage-normal pull-left" src="@GeneralSettings.Logo.Image" alt="Logo"> <img class="img-responsive dw-logoimage dw-logoimage-contrast pull-left" src="@GeneralSettings.Logo.ContrastImage" alt="Logo"> } else { <img class="img-responsive dw-logoimage pull-left" src="@GeneralSettings.Logo.Image" alt="Logo"> } } @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text)) { <div class="dw-logotext pull-left">@GeneralSettings.Logo.Text</div> } </a> @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Slogan)) { <div class="dw-slogantext pull-left">@GeneralSettings.Logo.Slogan</div> } </div> </div> } @if (GeneralSettings.Header.Mode != "mobile") { <!-- Big screen header --> <div class="navbar-navigation"> <div class="hidden-sm hidden-xs"> <nav class="col-md-10 col-sm-10 col-xs-10 p-0 navbar-collapse collapse navbar-@navbarpos"> @if (GeneralSettings.Navigation.IsMegamenu) { @GetValue("DwNavigation(topnavigationmegamenu)") } else { @GetValue("DwNavigation(topnavigation)") } <!-- Extra navigation when no header is shown --> @if (GetBoolean("Item.Area.EcomEnabled")) { if (!GeneralSettings.Header.Show) { <ul class="nav navbar-nav"> <li>&nbsp;&nbsp;&nbsp;</li> @if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) { <li class="dw-navbar-button"><a href="#" data-toggle="modal" data-target="#login" data-hover="dropdown"><i class="fa fa-sign-in"></i><span></span></a></li> <li class="dw-navbar-button"><a href="/not-logged-in/create-user-profile" data-hover="dropdown"><i class="fa fa-user"></i><span></span></a></li> } @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) { <li class="dw-navbar-button"> <a href='Default.aspx?ID=@Pageview.Area.Item["OrdersPageId"]' data-hover="dropdown"> <nobr> <strong><i class="fa fa-user"></i></strong> </nobr> <span></span> </a> </li> <li class="dw-navbar-button"> <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.Page.ID" data-hover="dropdown"><i class="fa fa-sign-out"></i><span></span></a> </li> } </ul> } if (GeneralSettings.Header.Mode != "solid") { <ul class="nav navbar-nav"> <li class="dropdown dropdown-aux animate-click dw-navbar-button" data-animate-in="animated bounceInUp" data-animate-out="animated fadeOutDown" style="z-index:500;"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown"><i class="fa fa-search"></i><span></span></a> <ul class="dropdown-menu dropdown-menu-user animate-wr"> <li id="dropdownForm"> <div class="dropdown-form"> <form class="form-light p-15" role="form" method="get" action="Default.aspx"> <input type="hidden" name="ID" value='@searchpage'> <div class="input-group remote"> <input type="text" class="form-control typeahead" name="q" placeholder="@searchplaceholder"> <span class="input-group-btn" style="top:-1px !important;"> <button class="btn btn-base" type="submit"><i class="fa fa-search"></i></button> </span> </div> </form> </div> </li> </ul> </li> </ul> } } </nav> </div> @*@if (GetBoolean("Item.Area.EcomEnabled")) { if (GeneralSettings.Header.Mode == "solid" && GeneralSettings.Header.Show) { <div class="hidden-sm hidden-xs"> <div class="col-md-2 col-sm-2 col-xs-2 pull-@GeneralSettings.Navigation.InvertedPosition"> <form method="get" action="Default.aspx"> <input type="hidden" name="ID" value='@Pageview.Area.Item["ProductsPageId"]'> <div id="remote" class="input-group pull-@GeneralSettings.Navigation.InvertedPosition dw-top-search"> <input type="text" class="form-control typeahead" name="Search" tabindex="1" placeholder="@searchplaceholder"> <span class="input-group-btn" style="top:0px !important;"> <button class="btn btn-primary" type="submit"><i class="fa fa-search"></i></button> </span> </div> </form> </div> </div> } }*@ </div> } else { <!-- Using only mobile navigation --> <div class="pull-@GeneralSettings.Navigation.Position"> <ul class="nav navbar-nav"> <li class="dw-navbar-button" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body"> <a><i class="fa fa-bars fa-2x"></i><span></span></a> </li> </ul> </div> } </div> </div> </div> </div> <div class="col-xs-12 mobileMenu hidden-lg"> <span class="buttonIconSearch pull-right "> <button class="btn btn-dw-primary searchFieldShow" type="submit"> <img src="/Files/Templates/Designs/Dwsimple/images/icons/search-white.png" class="img-center" alt=""> <span> @Translate("Search", "Search") </span> </button> </span> <!-- Small screen header --> <div class="hidden-lg"> <div class="pull-right hamb"> <button type="button" class="btn btn-sm btn-base" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body"> <i class="fa fa-bars"></i> <span> @Translate("Menu", "Menu") </span> </button> </div> <div class="pull-right"> @if(GetInteger("DwAreaFirstPageID") == 8398) { <a href="Default.aspx?ID=11424"><img alt="" src="/Files/Images/Ikoner/English.png" style="height:25px; width:50px"></a> } @if(GetInteger("DwAreaFirstPageID") == 11424) { <a href="Default.aspx?ID=8398"><img alt="" src="/Files/Images/Ikoner/Norwegian.png" style="height:25px; width:50px"></a> } </div> <div class="hidden-xs hidden-sm hidden-md pull-left"> <h2 class="dw-header-sm-title">@GetGlobalValue("Global:Page.Top.Name")</h2> </div> @if (GetBoolean("Item.Area.EcomEnabled")) { @*<div class="pull-right hidden-sm"> <ul class="top-menu"> <li class="hidden-xs"> <a href="Default.aspx?ID=@cartid" title="" class="btn btn-sm btn-base dw-minicart " id="minipagecart-mobile"><i class="fa fa-shopping-cart"></i><strong> @GetValue("Ecom:Order.OrderLines.TotalProductQuantity") <span class="amount">@GetValue("Ecom:Order.OrderLines.Total.PriceWithoutVAT")</span></strong></a> </li> </ul> </div>*@ if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) { <div class="hidden-xs hidden-sm pull-right "> <a href='/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.Page.ID'><button class="btn btn-sm btn-base"><i class="fa fa-sign-out"></i></button></a> &nbsp; </div> <div class="hidden-xs pull-right userNameBox"> <a href='Default.aspx?ID=@Pageview.Area.Item["UserProfilePageId"]' class="btn btn-sm btn-base"> <i class="fa fa-user"></i> <strong>@GetGlobalValue("Global:Extranet.Name")</strong> </a> &nbsp; </div> } if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) { <div class="hidden-xs hidden-sm pull-right"> <a href='Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]' class="btn btn-sm btn-base"><i class="fa fa-sign-in"></i></a> &nbsp; </div> } } </div> <div class="clearfix"></div> </div> </div> <div class="clearfix"></div> </div> </div> } @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.HeaderLayoutImage"))) { if (currentpageid != firstpageid) { var coverimage = GetString("Item.Area.HeaderLayoutImage"); <div class="container-fluid dw-header-image"> <div class="row"> <section class="carousel carousel-1 slice fluid" style="height: 160px !important; background: url('/Admin/Public/Getimage.ashx?width=1920&amp;compression=75&amp;Crop=5&amp;image=@coverimage') no-repeat; background-size: cover !important; background-color: @ColorSettings.Color.Secondary"></section> </div> </div> } else if (GeneralSettings.Header.ShowFrontpageImage) { var coverimage = GetString("Item.Area.HeaderLayoutImage"); <div class="container-fluid dw-header-image"> <div class="row"> <section class="carousel carousel-1 slice fluid" style="height: 160px !important; background: url('/Admin/Public/Getimage.ashx?width=1920&amp;compression=75&amp;Crop=5&amp;image=@coverimage') no-repeat; background-size: cover !important; background-color: @ColorSettings.Color.Secondary"></section> </div> </div> } } else if (GeneralSettings.Header.Mode != "solid") { if (currentpageid != firstpageid) { <div class="container-fluid dw-header-image"> <div class="row"> <section class="carousel carousel-1 slice fluid" style="height: 160px !important; background-color: transparent; background-size: cover !important;"></section> </div> </div> } } </div> <div class="clearfix"></div> @if (GeneralSettings.Header.Mode == "solid" && GeneralSettings.Header.Show) { <div class="searchRight clearfix"> <div class="slideToggle col-md-12 col-sm-12"> <form method="get" action="Default.aspx"> <input type="hidden" name="ID" value='@searchpage'> <div id="remote" class="input-group top-search"> <div class="remoteR"> <input type="hidden" name="qurlencoded" id="qurlencoded" value=''> <input type="text" class="form-control typeahead" name="q" placeholder='@Translate("What are you searching for?")' data-encode=""> <span class="input-group-btn"> <button class="btn btn-primary " type="submit"> <i class="fa fa-angle-double-right"></i> </button> </span> </div> </div> </form> </div> </div> <div class="clearfix"></div> } </header> @{ var current = ""; var currentWhole = ""; } @foreach (var lang in GetLoop("Languages")) { if (lang.GetBoolean("IsCurrent")) { string input = lang.GetString("Culture"); int index = input.IndexOf("-"); if (index > 0) { current = input.Substring(0, index); } currentWhole = lang.GetString("Culture").ToLower(); } } </div> @* MAIN CONTENT *@ @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @using DW_AX_ConnectorLib; @{ var orderId = HttpContext.Current.Request["o"]; var ddIndex = "&i=" + HttpContext.Current.Request["i"]; string mytilbudpage = Pageview.Area.Item["QuoteList"].ToString(); string currencyValue = GetGlobalValue("Global:eCommerce.CurrencyCode").ToString(); var dealerNameField = Pageview.User.CustomFieldValues.FirstOrDefault(cfv => cfv.CustomField.Name.Equals("DealerName", StringComparison.InvariantCultureIgnoreCase)); var dealerName = string.Empty; if (dealerNameField != null) { dealerName = dealerNameField.Value.ToString(); } var userDefaultDiscount = Pageview.User.CustomFieldValues.FirstOrDefault(cfv => cfv.CustomField.Name.Equals("DefaultDiscount", StringComparison.InvariantCultureIgnoreCase)); var defaultDiscount = string.Empty; if (userDefaultDiscount != null) { defaultDiscount = userDefaultDiscount.Value.ToString(); } string userID = Pageview.User.ExternalID;// Name;// "P-008136"; string company = "fjt"; string url = HttpContext.Current.Request.Url.ToString(); if (string.IsNullOrEmpty(url) == false) { if (url.Contains("fjerdingstad.no") || url.Contains("ID=11990")) { company = "fjt"; } else if (url.Contains("norwood.pl") || url.Contains("ID=12203")) { company = "pln"; } } DW_AX_ConnectorLib.clsDW_AX_ConnectorLib axConnector = new DW_AX_ConnectorLib.clsDW_AX_ConnectorLib(company); DW_AX_ConnectorLib.clsQuotationHeader order = axConnector.GetSingleOrderConfirmed(orderId); //connector.GetSingleOrder(orderId); } <style> @@media screen, print { .text-centerImp { text-align: center !important; } table > tbody > tr:nth-of-type(2n+1) { background-color: #fff; } #invoice tr td:last-child { width: initial; text-align: right; } .TotalPrice { margin: 30px 0; padding: 20px 0; font-size: 14px; color: #fff; text-align: right; } table { width: 100%; } table.customer-info { margin-top: 15px; } table.customer-info td { vertical-align: top; } .vcard div { margin: 7px 0; } .invoice-financials { margin-top: 20px; } .invoice-financials table.table-cart td { border-top: 0; } .invoice-financials table.table-cart th { border-bottom: 1px solid #ddd; } .invoice-financials table.table-cart tr.b-top td { border-top: 1px solid #ddd; } .invoice-financials table.table-cart .tl { text-align: left; } .invoice-financials table.table-cart .tr { text-align: right; } #invoice ul.info li { margin-bottom: 5px; list-style: none; } } @@media print { body { font-family: sans-serif; } * { padding: 0; margin: 0; } h3.dw-section-title { font-weight: bold; margin-bottom: 15px; font-size: 16px; } h4 { font-weight: bold; font-size: 16px; margin-top: 15px; margin-bottom: 10px; } ul.info li { margin: 7px 0; list-style: none; } ul.info li b { display: inline-block; width: 180px; } table.customer-info { padding: 0; } table.table-cart { border-collapse: collapse; width: 100%; margin-top: 25px; } table.table-cart th { border-top: 1px solid #ddd; } table.table-cart td, table.table-cart th { padding: 8px; } table.table-cart td a { color: inherit; text-decoration: none; } h3.dw-section-title { margin-top: 20px; } } </style> @functions{ public string ShowWithDecimals(double val) { return String.Format("{0:0.00}", val); } } @if (string.IsNullOrEmpty(order.ErrorMessage) == false) { <!-- Modal Error --> <div class="modal fade" id="modalError" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header btn-primary"><h4 style="color:wheat">Error</h4></div> <div class="modal-body"> <div class="row"> <div class="col-md-12"> <strong>Kan ikke vise ordre.</strong><br> <br> <span id="modalErrorMessage">@order.ErrorMessage</span> </div> </div> </div> <div class="modal-footer"> <a id="" href="Default.aspx?ID=@mytilbudpage" class="hiddenPrint btn btn-sm btn-dw-cart hidden-print">@Translate("Back to list")</a> </div> </div> </div> </div> <script> $(window).on('load', function () { $('#modalError').modal({ backdrop: 'static', keyboard: false }, 'show'); }); </script> } <div class="container"> <br><br> <section class="slice white"> <div id="invoice" class="new hideTab OrderDetailTable"> <div class="title clearfix"> <h3 class=""> <span>Ordre:&nbsp;@orderId</span> <span class="dw-section-title dw-section-title-small pull-right">@Translate("Order date", "Order date"): @order.OrderDate.ToString("dd/MM/yyyy")</span> </h3> </div> <table class="customer-info"> <tr> <td width="50%"> <div>&nbsp;</div> <h4>@Translate("Billing address", "Billing address")</h4> <div>&nbsp;</div> <div class="vcard"> <div>@Translate("Name"): <b>@order.OrderCustomerName</b></div> @if (!string.IsNullOrWhiteSpace(order.OrderCustomerEmail)) { <div>@Translate("E-mail"): <b>@order.OrderCustomerEmail</b></div> } @if (!string.IsNullOrWhiteSpace(order.OrderCustomerPhone)) { <div>@Translate("Phone"): <b>@order.OrderCustomerPhone</b></div> } <div>@Translate("Expires"): <b>@order.OrderExpiryDate.ToShortDateString()</b></div> <div>@Translate("Requisition number", "Rekvisisjon nr."): <b>@order.OrderRequisitionNumber</b></div> <div>@Translate("Kommentar", "Kommentar"): <b>@order.OrderComment</b></div> <div>@Translate("Default discount on new orderlines"): <b>@defaultDiscount</b></div> <div>&nbsp;</div> <div>@Translate("Expected delivery date", "Forventet leveringsdato ca. 4 uker fra bestilling")</div> </div> </td> <td width="50%" style="text-align:left;"> <div>&nbsp;</div> <h4>@Translate("Delivery address", "Delivery Address")</h4> <div>&nbsp;</div> <div class="vcard"> @if (order.OrderEndAddressType == 0) { //Show forhandler address <div>@Translate("Delivery address type"): <b>@Translate("Delivery to Dealer Address")</b></div> <div>@Translate("Dealer name"): <b>@dealerName</b></div> <div>@Translate("Address"): <b>@order.OrderCustomerAddress</b></div> <div>@Translate("Zip"): <b>@order.OrderCustomerZip</b></div> <div>@Translate("City"): <b>@order.OrderCustomerCity</b></div> } else if (order.OrderEndAddressType == 1) { <div>@Translate("Delivery address type"):<b> @Translate("Delivery to Project Address")</b></div> <div>@Translate("Leveringsadresse", "Leveringsadresse"): <b>@order.OrderDeliveryAddress</b></div> <div>@Translate("Poststed", "Poststed"): <b>@order.OrderDeliveryCity</b></div> <div>@Translate("Postnummer", "Postnummer"): <b>@order.OrderDeliveryZip</b></div> <div>@Translate("Leveringsted kontaktperson", "Leveringsted kontaktperson"): <b>@order.OrderDeliveryContactName</b></div> <div>@Translate("Leveringsted telefon", "Leveringsted telefon"): <b>@order.OrderDeliveryContactNumber</b></div> } else { <div>@Translate("Delivery address type"): <b>@Translate("Pickup at Fjerdingstad")</b></div> <div>@Translate("Dealer name"): <b>H-vinduet Fjerdingstad AS</b></div> <div>@Translate("Address"): <b>Loesdalsveien 51</b></div> <div>@Translate("Zip"): <b>3300</b></div> <div>@Translate("City"): <b>Hokksund</b></div> } </div> </td> </tr> </table> <section class="invoice-financials"> <div class="table-responsive"> <table class="table table-cart"> <tr class="headerOrder"> <th class="tl">@Translate("Product number")</th> <th class="tl">@Translate("NOBB Number")</th> <th class="tl">@Translate("Product name")</th> <th class="tr">@Translate("Width")</th> <th class="tr">@Translate("Height")</th> <th class="tr">@Translate("Qty")</th> <th class="tr">@Translate("Recommended sales price")</th> <th class="tr">@Translate("Discount %")</th> <th class="tr">@Translate("Price")</th> @*<th class="tr">@Translate("Total")</th>*@ </tr> @{ var productcatalog = Pageview.Area.Item["ProductsPageId"]; } @if (order.Items != null && order.Items.Length > 0) { foreach (var orderline in order.Items) { <tr class="bodyTable"> <td> @orderline.OrderLineProductNumber @if (orderline.OrderLineType == 1) { <small>@Translate("Discount", "Discount")</small> } </td> <td>@orderline.OrderLineNobbNumber</td> <td>@orderline.OrderLineItemName</td> <td class="tr">@orderline.OrderLineWidth</td> <td class="tr">@orderline.OrderLineHeight</td> <td class="tr">@orderline.OrderLineQuantity</td> <td class="tr">@ShowWithDecimals(orderline.OrderLineRetailPrice)</td> <td class="tr">@orderline.OrderLineDiscount</td> <td class="tr">@ShowWithDecimals(orderline.OrderLineSalesPrice)</td> </tr> } } </table> </div> <div class="row">&nbsp;</div> <div> <div class="TotalPrice col-xs-12 col-sm-12 col-md-12"> <div class="clearfix"> <div class="col-xs-6 col-sm-10 col-md-10 left">@Translate("Gross price including PCB")</div> <div class="col-xs-6 col-sm-2 col-md-2 TotalPriceRight">@ShowWithDecimals(order.OrderSalesPriceWithoutVAT) @currencyValue</div> </div> <div class="clearfix"> <div class="col-xs-6 col-sm-10 col-md-10 left">@Translate("PCB")</div> <div class="col-xs-6 col-sm-2 col-md-2 TotalPriceRight">@ShowWithDecimals(order.PCBmiljoetillaegg) @currencyValue</div> </div> <div class="clearfix"> <div class="col-xs-6 col-sm-10 col-md-10 left">@Translate("Gross VAT")</div> <div class="col-xs-6 col-sm-2 col-md-2 TotalPriceRight">@ShowWithDecimals(order.OrderSalesPriceWithVAT) @currencyValue</div> </div> <div class="clearfix"> <div class="col-xs-6 col-sm-10 col-md-10 left">@Translate("Gross price including VAT")</div> <div class="col-xs-6 col-sm-2 col-md-2 TotalPriceRight">@ShowWithDecimals(order.OrderSalesPriceWithVAT) @currencyValue</div> </div> </div> </div> <div class="row">&nbsp;</div> </section> <a id="backLink" href="Default.aspx?ID=@mytilbudpage@ddIndex" class="hiddenPrint btn btn-sm btn-dw-cart hidden-print">@Translate("Back to list")</a> </div> </section> </div> @* FOOTER *@ @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @using System @using System.Web @using System.Globalization @using Dynamicweb.Frontend.Devices @using System.Text.RegularExpressions @using Dynamicweb.Environment.Helpers @using Dynamicweb.Rendering <footer class="footer"> @if (GetBoolean("Item.Area.FooterShowContactInfo")) { <div class="footer-section"> <div class="container"> <div class="row"> <div class="col-xs-12 col-md-4 links"> <div class="col"> <h3>@GetString("Item.Area.HeadingColumnOne")</h3> <ul> @foreach (LoopItem linksfooter in GetLoop("Item.Area.FooterLinks")) { var footertitle = linksfooter.GetString("Item.Area.FooterLinks.Title"); var footerlinks = linksfooter.GetString("Item.Area.FooterLinks.Link.Value"); if (footerlinks != "") { <li> <a href="@footerlinks">@footertitle</a> </li> } } </ul> </div> </div> <div class="col-xs-12 col-md-4 links"> <div class="col"> <h3>@GetString("Item.Area.HeadingColumnTwo")</h3> <ul> @foreach (LoopItem linksfooter in GetLoop("Item.Area.ServicesLinks")) { var footertitle = linksfooter.GetString("Item.Area.ServicesLinks.Title"); var footerlinks = linksfooter.GetString("Item.Area.ServicesLinks.Link.Value"); if (footerlinks != "") { <li> <a href="@footerlinks">@footertitle</a> </li> } } </ul> </div> </div> <div class="col-xs-12 col-md-4 socials"> <div class="col"> @if (GetBoolean("Item.Area.SocialLinksInFooter")) { string sicon = ""; string slink = ""; <h3>@GetString("Item.Area.HeadingColumnThree")</h3> <p> @foreach (LoopItem socialitem in GetLoop("Item.Area.SocialIconsInTheFooter")) { sicon = socialitem.GetString("Item.Area.SocialIconsInTheFooter.Icon"); slink = socialitem.GetString("Item.Area.SocialIconsInTheFooter.Link"); <a href="@slink"><i class="fa @sicon"></i></a> } </p> } </div> @if (GetBoolean("Item.Area.FooterNewsletterSignUp")) { string NavTag = GetGlobalValue("Global:Page.NavigationTag").ToString(); string CurrentPageName = GetGlobalValue("Global:Page.Name").ToString(); if (NavTag != CurrentPageName) { int NewsletterInfoParagraphID = System.Convert.ToInt32(Pageview.Area.Item["NewsletterSignUpFormParagraph"].ToString()); <div class="col"> <p>@Translate("Sign up if you would like to receive occasional treats from us", "Sign up if you would like to receive occasional treats from us").</p> @RenderParagraphContent(NewsletterInfoParagraphID) </div> } } </div> @if (GetBoolean("Item.Area.FooterShowSitemap")) { <div class="col-xs-12 col-md-4"> <div class="col"> @GetValue("DwNavigation(footersitemap)") </div> <div>&nbsp;</div> </div> } </div> </div> </div> } @SnippetStart("StylesHead") footer .footer-badges { background-color: @GetString("Item.Area.BadgeListBackgroundColor.Color"); } footer .footer-menu { background-color: @GetString("Item.Area.AddressBarBackgroundColor.Color"); } @SnippetEnd("StylesHead") @if (GetBoolean("Item.Area.BadgeList") && GetLoop("Item.Area.BadgeList").Count > 0) { string blImage = ""; string blLink = ""; string blTarget = ""; <div class="footer-badges"> <div class="container"> <ul> @foreach (LoopItem badgelistitem in GetLoop("Item.Area.BadgeList")) { blImage = badgelistitem.GetString("Item.Area.BadgeList.Image"); blLink = badgelistitem.GetString("Item.Area.BadgeList.Link"); blTarget = badgelistitem.GetString("Item.Area.BadgeList.Target"); <li> @if (!string.IsNullOrWhiteSpace(blLink)) { <a href="@blLink" target="@blTarget"><img src="@blImage" alt=""></a> } else { <img src="@blImage" alt=""> } </li> } </ul> </div> </div> } <div class="footer-menu"> <div class="container"> @*<div class="footer-logo"> @{ var logofooter = GetString("Item.Area.FooterLogo"); string firstpageidFooter = GetString("DwAreaFirstActivePageID"); } @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.FooterLogo"))) { <a href="/Default.aspx?ID=@firstpageidFooter" class="brand"> <img class="img-responsive" src="@logofooter" alt="Logo footer"> </a> } </div>*@ <div class="footer-links"> @GetValue("Item.Area.FooterAddress") @*@{ string footeremail = GetString("Item.Area.FooterEmail"); string footerphone = GetString("Item.Area.FooterPhone").Replace(" ", ""); } <p> @Translate("Phone", "Phone"): <a href="tel:@footerphone">@footerphone</a> @Translate("Email", "Email"): <a href="mailto:@footeremail" title="Email Us">@GetValue("Item.Area.FooterEmail")</a> </p>*@ </div> </div> </div> </footer> <!--[if IE]> <style> .widget.affix { width:21% !important; } </style> <![endif]--> @* ESSENTIALS *@ <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/fancybox/3.1.20/jquery.fancybox.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.5/handlebars.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.4/js/bootstrap.min.js"></script> @*<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/js/bootstrap.min.js"></script>*@ @* ASSETS *@ <script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-hover-dropdown/2.0.10/bootstrap-hover-dropdown.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/spin.js/2.0.1/spin.min.js"></script> @*<script type="text/javascript" src="/Files/Templates/Designs/Dwsimple/js/typeahead.bundle.js"></script>*@ @* SRIPTS FOR INDIVIDUAL PAGES, DEPENDING ON WHAT PLUG-INS ARE USED *@ <script src="//cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/js/jasny-bootstrap.min.js" type="text/javascript"></script> <script src="//connect.facebook.net/en_US/sdk.js"></script> <script src="/Files/Templates/Designs/Dwsimple/js/typeahead.js"></script> <script src="/Files/Templates/Designs/Dwsimple/js/jquery.socialfeed.js"></script> <script src="/Files/Templates/Designs/Dwsimple/js/codebird.js"></script> <script src="/Files/Templates/Designs/Dwsimple/js/doT.min.js"></script> <script src="/Files/Templates/Designs/Dwsimple/js/moment.min.js"></script> <script src="/Files/Templates/Designs/Dwsimple/js/owl.carousel.min.js"></script> <script src="/Files/Templates/Designs/Dwsimple/js/custom.js"></script> @*<script src="/Files/Templates/Designs/Dwsimple/js/filter.js"></script>*@ <script src="/Files/Templates/Designs/Dwsimple/js/GeneralMethods.js"></script> <script src="/Files/Templates/Designs/Dwsimple/js/cart.js"></script> <script src="/Files/Templates/Designs/Dwsimple/js/bootstrap-datetimepicker.js"></script> <script src="/Files/Templates/Designs/Dwsimple/js/jQueryValidation.js"></script> <script> $("input.typeahead").on("change", function () { var qvalue = $(this).val().replace(/æ/g, "&aelig;").replace(/ø/g, "&oslash;").replace(/å/g, "&aring;").replace(/Æ/g, "&AElig;").replace(/Ø/g, "&Oslash;").replace(/Å/g, "&Aring;"); $('input#qurlencoded').val(qvalue) }) </script> <script type="text/html-template" id="OrderlineAjaxTemplate"> <tr> <td class="text-center"><img src="/Admin/Public/GetImage.ashx?width=50&height=50&crop=5&image=Obj.image&Compression=99" class="img-center" alt=""></td> <td> <a href="Obj.link"> Obj.name Obj.variantname </a> </td> <td class="text-center">Obj.quantity</td> <td class="text-right"> <nobr> Obj.totalprice </nobr> </td> </tr> </script> @* INITIALIZE SCROLLING NAVIGATION *@ @if (GeneralSettings.Navigation.IsAnimateNavigation) { <script type="text/javascript"> // Hide Header on on scroll down var didScroll; var lastScrollTop = 0; var delta = 5; var navbarHeight = $('header').outerHeight(); $(window).scroll(function (event) { didScroll = true; }); setInterval(function () { if (didScroll) { hasScrolled(); didScroll = false; } }, 250); function hasScrolled() { var st = $(this).scrollTop(); var $megamenu = $('#topnavigationmegamenu > li.dropdown.ParentShow .dropdown-menu'), $search = $('.searchRight .slideToggle'), $isSearchOpen = ($search.is('.open') ? true : false); // Make sure they scroll more than delta if (Math.abs(lastScrollTop - st) <= delta) return; // If they scrolled down and are past the navbar, add class .nav-up. // This is necessary so you never see what is "behind" the navbar. if (st > lastScrollTop && st > navbarHeight) { // Scroll Down $('header').removeClass('nav-down').addClass('nav-up'); $megamenu.css('top', '0').fadeOut(); if ($isSearchOpen) $search.fadeOut(); } else { // Scroll Up if (st + $(window).height() < $(document).height()) { $('header').removeClass('nav-up').addClass('nav-down'); $megamenu.fadeIn().css('top', '107px'); if ($isSearchOpen) $search.fadeIn(); } } lastScrollTop = st; } </script> } @* INITIALIZE FANCYBOX *@ <script type="text/javascript"> if ($(".fancybox").length > 0) $(".fancybox") .fancybox({ padding: 0 }); $(document).ready(function () { MiniCartInit(@Pageview.Area.Item["JSONFeedForCart"], @Pageview.Area.Item["ProductsPageId"]); if (typeof ProductModal == 'undefined') { console.log('missing variable'); } else ProductModal.init(@Pageview.Area.Item["JSOPNFeedForModal"]); }); </script> @RenderSnippet("JavaScriptBottom") <script type="text/javascript"> $(document).ready(function () { $('.nav-stacked .offcanvas-menubtn').has('ul').addClass('innerMenuMobile'); $("<i class='fa fa-plus mobileMenuFix' onclick='toggleCheck(this)'></i>").insertAfter(".offcanvas-col>.nav-stacked>.offcanvas-menubtn.innerMenuMobile>a"); //$("<i class='fa fa-sort-desc mobileMenuFix' onclick='toggleCheck(this)'></i>").insertAfter(".offcanvas-col>.nav-stacked>.offcanvas-menubtn>.M1>.offcanvas-menubtn>a"); //$("<i class='fa fa-sort-desc mobileMenuFix' onclick='toggleCheck(this)'></i>").insertAfter(".offcanvas-col>.nav-stacked>.offcanvas-menubtn>.M1>.offcanvas-menubtn>.M2>.offcanvas-menubtn>a"); $(".nav-stacked .0 i").remove(); }); function toggleCheck(elem) { jQuery(elem).parent().children("ul").toggle(); jQuery(elem).toggleClass('fa-plus fa-minus') } function toggleCheckTopNav() { $("#toggleTopNav").children("ul").toggle(); } $('.langMenu li').each(function () { var group = $(this); var value = group.children("a"); var date = new Date(); var minutes = 1440; date.setTime(date.getTime() + (minutes * 60 * 1000)); $(value).on('click', function (e) { $.cookie('remember_lang', $(this).attr("data-code"), { expires: date, path: '/' });; }); }); function setLangAuto(filterlang) { var pathname = window.location.pathname; switch (filterlang) { case "fr": pathname = $(".langSelected[data-code='fr']").attr('href'); if ($(".langSelected[data-code='fr']").hasClass("activeArea") || $.cookie('remember_lang') != null) { break; } else { window.location.href = pathname; } case "de": pathname = $(".langSelected[data-code='de']").attr('href'); if ($(".langSelected[data-code='de']").hasClass("activeArea") || $.cookie('remember_lang') != null) { break; } else { window.location.href = pathname; } case "es": pathname = $(".langSelected[data-code='es']").attr('href'); if ($(".langSelected[data-code='es']").hasClass("activeArea") || $.cookie('remember_lang') != null) { break; } else { window.location.href = pathname; } case "se": pathname = $(".langSelected[data-code='se']").attr('href'); if ($(".langSelected[data-code='se']").hasClass("activeArea") || $.cookie('remember_lang') != null) { break; } else { window.location.href = pathname; } case "da": pathname = $(".langSelected[data-code='da']").attr('href'); if ($(".langSelected[data-code='da']").hasClass("activeArea") || $.cookie('remember_lang') != null) { break; } else { window.location.href = pathname; } default: pathname = $(".langSelected[data-code='en']").attr('href'); if ($(".langSelected[data-code='en']").hasClass("activeArea") || $.cookie('remember_lang') != null) { break; } else { window.location.href = pathname; } } } jQuery(function ($) { if ($.cookie('remember_lang') != "@current" && $.cookie('remember_lang') != null) { var href; $(".langSelected").each(function () { if ($(this).data("code") == $.cookie('remember_lang')) { href = $(this).attr("href"); } }); window.location.href = href; } }); $('[data-toggle="dropdown"]').dropdown(); </script> <script> $('.TitleWelcome').clone().prependTo('#MyProfileMenu'); $('.logOut').clone().appendTo('#MyProfileMenu .M1'); </script> @{ //var productsearch = @Pageview.Area.Item["SearchProductsPage"]; string productpageidsearch = GetString("Item.Area.SearchAllProductsPage"); string showedproducts = GetString("Item.Area.ShowedProducts"); var searchproductitem = Pageview.Area.Item["LinkToSearchProductPageItem"]; string ItemPageIDproducts = searchproductitem.ToString().TrimStart('/'); string seoproductsearch = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(ItemPageIDproducts); string quotecontext = Pageview.Area.Item["QuoteContext"].ToString(); string cartpage = Pageview.Area.Item["QuoteCart"].ToString(); } <script> var searchproducts = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'), queryTokenizer: Bloodhound.tokenizers.whitespace, remote: { url: '/Default.aspx?ID=@seoproductsearch&q=%QUERY', wildcard: '%QUERY' }, }); searchproducts.initialize(); $('#text-input').bind('typeahead:render', function () { $('.tt-suggestion').removeClass('tt-selectable'); }); $('#remoteproduct .form-control').typeahead( { hint: true, highlight: false, minLength: 2 }, { limit: 9999, name: 'name', display: 'name', source: searchproducts, templates: { empty: '<div class="search-header clearfix"><h4 class="product-title pull-left">@Translate("Ingen produkter fundet")</h4></div>', //optional suggestion: function (el) { if (typeof typeaheadAlternative !== 'undefined' && typeaheadAlternative) { return '<div class="row row-striped"><div class="form-group"><div class="col-xs-8"><h5>' + el.name + '</h5></div>' + '<div class="col-xs-2"><small>' + el.price + '</small></div>' + '<div class="col-xs-2 pull-right">' + //'<a href="javascript:void(0)" class="btn btn-success btn-sm pull-right" onclick="QuickAddToQuote_AX(\'' + el.number + '\',$(this))"><i class="fa fa-plus-circle fa-lg"></i><i class="fa fa-pulse"></i></a>'+ '<button type="button" class="btnAddProd btn btn-success btn-sm pull-right" onclick="QuickAddToQuote_AX(\'' + el.number + '\',$(this))" ><i class="fa fa-plus-circle fa-lg"></i> <i class="fa fa-pulse"></i></button>' + '</div>' + '</div>' + '</div>'; } else { return '<div class="clearfix">' + '<span class="name-search pull-left">' + el.name + '</span>' + '<span class="price-search pull-left">' + el.price + '</span><button class="btn-dw-cart QuickAdd pull-right" onclick="QuickAddToQuote(\'' + el.number + '\',$(this))"><i class="fa fa-plus"></i> <i class="fa fa-pulse"></i></button></div>'; } } } } ); // Quickly Add to quote function QuickAddToQuote(product, elm) { var url = "@Dynamicweb.Context.Current.Request.RawUrl&CartCmd=Add&ProductID=" + product + "&OrderContext=@quotecontext"; var allButtons = $('div.QuickAdd'); var spinner = elm.find($('i.fa-plus')); spinner.removeClass('fa-plus'); spinner.addClass('fa-spinner fa-pulse'); elm.addClass('reducedOpacity'); elm.attr('disabled', 'disabled'); allButtons.addClass('reducedOpacity'); allButtons.attr('disabled', 'disabled'); document.location.href = url; //$.ajax({ // type: "GET", // url: url, // success: function () { // update(); // } //}); } // Quickly Add to quote function QuickAddToQuote_AX(productID, elm) { window.dispatchEvent(new CustomEvent("addLine_Event", { detail: { ProductID: productID, Qty : 1, Ele : elm } })); } </script> </div> @if (!string.IsNullOrWhiteSpace(GetString("DW_extranet_error_uk"))) { <script> $('#login').modal('show').addClass("in").attr("aria-hidden", "false").css({ "display": "block", "padding-left": "17px" }); </script> } </body> </html>