Error compiling template "Designs/Standard/_parsed/Frontpage.parsed.cshtml"
Line 792: 'Dynamicweb.Content.Area' does not contain a definition for 'Values' and no extension method 'Values' accepting a first argument of type 'Dynamicweb.Content.Area' could be found (are you missing a using directive or an assembly reference?)
Line 793: 'Dynamicweb.Content.Page' does not contain a definition for 'Values' and no extension method 'Values' accepting a first argument of type 'Dynamicweb.Content.Page' could be found (are you missing a using directive or an assembly reference?)
Line 801: The type or namespace name 'Page' does not exist in the namespace 'Dynamicweb.Frontend' (are you missing an assembly reference?)
Line 801: 'Dynamicweb.Frontend.PageView' does not contain a definition for 'PageCollection' and no extension method 'PageCollection' accepting a first argument of type 'Dynamicweb.Frontend.PageView' could be found (are you missing a using directive or an assembly reference?)
Line 825: 'Dynamicweb.Content.Page' does not contain a definition for 'AreaID' and no extension method 'AreaID' accepting a first argument of type 'Dynamicweb.Content.Page' could be found (are you missing a using directive or an assembly reference?)
Line 863: The type or namespace name 'Page' does not exist in the namespace 'Dynamicweb.Frontend' (are you missing an assembly reference?)
Line 863: 'Dynamicweb.Frontend.PageView' does not contain a definition for 'PageCollection' and no extension method 'PageCollection' accepting a first argument of type 'Dynamicweb.Frontend.PageView' could be found (are you missing a using directive or an assembly reference?)
Line 915: 'Dynamicweb.Content.Page' does not contain a definition for 'Values' and no extension method 'Values' accepting a first argument of type 'Dynamicweb.Content.Page' could be found (are you missing a using directive or an assembly reference?)
Line 915: 'Dynamicweb.Content.Page' does not contain a definition for 'Values' and no extension method 'Values' accepting a first argument of type 'Dynamicweb.Content.Page' could be found (are you missing a using directive or an assembly reference?)
Line 915: 'Dynamicweb.Content.Page' does not contain a definition for 'Values' and no extension method 'Values' accepting a first argument of type 'Dynamicweb.Content.Page' could be found (are you missing a using directive or an assembly reference?)
Line 921: 'Dynamicweb.Content.Page' does not contain a definition for 'Values' and no extension method 'Values' accepting a first argument of type 'Dynamicweb.Content.Page' could be found (are you missing a using directive or an assembly reference?)
Line 921: 'Dynamicweb.Content.Page' does not contain a definition for 'Values' and no extension method 'Values' accepting a first argument of type 'Dynamicweb.Content.Page' could be found (are you missing a using directive or an assembly reference?)
Line 921: 'Dynamicweb.Content.Page' does not contain a definition for 'Values' and no extension method 'Values' accepting a first argument of type 'Dynamicweb.Content.Page' could be found (are you missing a using directive or an assembly reference?)
Line 1308: The type or namespace name 'User' does not exist in the namespace 'Dynamicweb.Modules.UserManagement' (are you missing an assembly reference?)
Line 1308: The type or namespace name 'PagePermissionLevels' does not exist in the namespace 'Dynamicweb.Modules.UserManagement' (are you missing an assembly reference?)
Line 1549: 'Dynamicweb.Base' does not contain a definition for 'MD5HashToString'
Line 1551: 'Dynamicweb.Base' does not contain a definition for 'MD5HashToString'
Line 1552: 'Dynamicweb.Base' does not contain a definition for 'MD5HashToString'
Line 1562: 'Dynamicweb.Base' does not contain a definition for 'MD5HashToString'
Line 2140: 'Dynamicweb.Base' does not contain a definition for 'MD5HashToString'
Line 2896: 'Dynamicweb.Frontend.PageView' does not contain a definition for 'AreaCollection' and no extension method 'AreaCollection' accepting a first argument of type 'Dynamicweb.Frontend.PageView' could be found (are you missing a using directive or an assembly reference?)
Line 2896: The type or namespace name 'Area' does not exist in the namespace 'Dynamicweb.Frontend' (are you missing an assembly reference?)
Line 2896: 'Dynamicweb.Frontend.PageView' does not contain a definition for 'AreaCollection' and no extension method 'AreaCollection' accepting a first argument of type 'Dynamicweb.Frontend.PageView' could be found (are you missing a using directive or an assembly reference?)
Line 2933: The type or namespace name 'Page' does not exist in the namespace 'Dynamicweb.Frontend' (are you missing an assembly reference?)
Line 2933: 'Dynamicweb.Frontend.PageView' does not contain a definition for 'PageCollection' and no extension method 'PageCollection' accepting a first argument of type 'Dynamicweb.Frontend.PageView' could be found (are you missing a using directive or an assembly reference?)
Line 3916: 'Dynamicweb.Frontend.PageView' does not contain a definition for 'AreaCollection' and no extension method 'AreaCollection' accepting a first argument of type 'Dynamicweb.Frontend.PageView' could be found (are you missing a using directive or an assembly reference?)
Line 3919: The type or namespace name 'Area' does not exist in the namespace 'Dynamicweb.Frontend' (are you missing an assembly reference?)

1 @using System.IO 2 @using System.Web 3 @helper RenderGoogleConversion(string conversionId, string conversionLanguage, string conversionFormat, string conversionColor, string conversionLabel, string conversionValue, string conversionCurrency, bool remarketingOnly) { 4 var googleConversionId = conversionId; 5 var googleConversionLanguage = string.IsNullOrWhiteSpace(conversionLanguage) ? "en" : conversionLanguage; 6 var googleConversionFormat = string.IsNullOrWhiteSpace(conversionFormat) ? "3" : conversionFormat; 7 var googleConversionColor = string.IsNullOrWhiteSpace(conversionColor) ? "ffffff" : conversionColor; 8 var googleConversionLabel = conversionLabel; 9 var googleConversionValue = string.IsNullOrWhiteSpace(conversionValue) ? "0" : conversionValue; 10 var googleConversionCurrency = string.IsNullOrWhiteSpace(conversionCurrency) ? "DKK" : conversionCurrency; 11 var googleRemarketingOnly = remarketingOnly; 12 13 <!-- Google Code for the Conversion Page --> 14 <script type="text/javascript"> 15 /* <![CDATA[ */ 16 var google_conversion_id = @(googleConversionId); 17 var google_conversion_language = '@(googleConversionLanguage)'; 18 var google_conversion_format = '@(googleConversionFormat)'; 19 var google_conversion_color = '@(googleConversionColor)'; 20 var google_conversion_label = '@(googleConversionLabel)'; 21 var google_conversion_value = @(googleConversionValue); 22 var google_conversion_currency = '@(googleConversionCurrency)'; 23 var google_remarketing_only = @(googleRemarketingOnly ? "true" : "false"); 24 /* ]]> */ 25 </script> 26 <script type="text/javascript" src="https://www.googleadservices.com/pagead/conversion.js"></script> 27 <noscript> 28 <div style="display: inline;"> 29 <img src="https://www.googleadservices.com/pagead/conversion/@(googleConversionId)/?value=@(googleConversionValue)&amp;currency_code=@(googleConversionCurrency)&amp;label=@(googleConversionLabel)&amp;guid=ON&amp;script=0" alt="" width="1" height="1" style="border-style: none;"> 30 </div> 31 </noscript> 32 } 33 @helper RenderGoogleAnalyticsEcommerceTracking(string transactionId, string affiliation, string revenue, string shipping, string tax, string currency, string[][] orderLines) { 34 <script type="text/javascript"> 35 if (!window.skabertrang_ga_ecommerce_callbacks) 36 window.skabertrang_ga_ecommerce_callbacks = []; 37 38 (function() { 39 var orderLines = @(Newtonsoft.Json.JsonConvert.SerializeObject(orderLines)); 40 41 window.skabertrang_ga_ecommerce_callbacks.push(function() { 42 ga('require', 'ecommerce'); 43 44 ga('ecommerce:addTransaction', { 45 'id' : '@(transactionId)', 46 'affiliation' : '@(affiliation)', 47 'revenue' : '@(revenue)', 48 'shipping' : '@(shipping)', 49 'tax' : '@(tax)', 50 'currency' : '@(currency)' 51 }); 52 53 if (orderLines && orderLines.length) { 54 for (var i = 0; i < orderLines.length; i++) { 55 ga('ecommerce:addItem', { 56 'id' : '@(transactionId)', 57 'name' : orderLines[i][1], 58 'sku' : orderLines[i][0], 59 'category' : orderLines[i][2], 60 'price' : orderLines[i][3], 61 'quantity' : orderLines[i][4], 62 'currency' : '@(currency)' 63 }); 64 } 65 } 66 67 ga('ecommerce:send'); 68 }); 69 })(); 70 </script> 71 } 72 @functions { 73 string mediaOverlay(string filePath, string filePathThumb = "", string caption = "", string group = "", string alt = "", string title = "", string extraAttributes = "") { 74 var pv = Dynamicweb.Frontend.PageView.Current(); 75 var imageOverlayType = pv.Area.Item["ImageOverlayType"] as string; 76 77 filePathThumb = !string.IsNullOrWhiteSpace(filePathThumb) ? filePathThumb : filePath; 78 group = !string.IsNullOrWhiteSpace(group) ? group : !string.IsNullOrWhiteSpace(GetString("ParagraphID")) ? GetString("ParagraphID") : "imageGroup"; 79 80 if (imageOverlayType=="Fancybox") { 81 return "<a class='fancybox media-overlay' href='" + filePath + "' rel='" + group + "' title='" + title + "' data-title='" + caption + "'><img src='/Files/Templates/Designs/Standard/"+filePathThumb+"' alt='" + alt + "' title='" + title + "'></a>"; 82 } else { 83 return "<a href='" + filePath + "' class='media-overlay' data-lightbox='" + group + "' data-title='" + caption + "'><img src='/Files/Templates/Designs/Standard/"+filePathThumb+"' alt='" + alt + "' title='" + title + "'></a>"; 84 } 85 } 86 87 string GetImage(string image, int width, int height, int compression, int crop, string colorSpace, bool doNotUpscale) { 88 // Crop 89 // 0 = Center 90 // 1 = From upper left 91 // 2 = From lower left 92 // 3 = From lower right 93 // 4 = From upper right 94 // 5 = Keep aspect ratio 95 // 6 = Fit image 96 97 // ColorSpace 98 // rgb 99 // cmyk 100 // grayscale 101 102 var param = new List<string>(); 103 104 param.Add("Image=" + image); 105 param.Add("Format=" + Path.GetExtension(image).Substring(1)); 106 107 if (width > 0) { 108 param.Add("Width=" + width); 109 } 110 111 if (height > 0) { 112 param.Add("Height=" + height); 113 } 114 115 param.Add("Compression=" + compression); 116 param.Add("Crop=" + crop); 117 param.Add("ColorSpace=" + colorSpace); 118 param.Add("DoNotUpscale=" + (doNotUpscale ? "True" : "False")); 119 120 return "/Admin/Public/GetImage.ashx?" + string.Join("&amp;", param); 121 } 122 123 string GetImagePlaceholder(int width, int height) { 124 return GetImagePlaceholder(width, height, null, null, null); 125 } 126 127 string GetImagePlaceholder(int width, int height, string backgroundColor, string textColor, string text) { 128 var r = "https://placehold.it/" + width; 129 130 if (height > 0) { 131 r += "x" + height; 132 } 133 134 if (!string.IsNullOrWhiteSpace(backgroundColor) && !string.IsNullOrWhiteSpace(textColor)) { 135 r += "/" + backgroundColor; 136 r += "/" + textColor; 137 } 138 139 if (!string.IsNullOrWhiteSpace(text)) { 140 r += "?text=" + text.Replace(" ", "+"); 141 } 142 143 return r; 144 } 145 146 147 T LoadContextItem<T>(string key) { 148 var obj = HttpContext.Current.Items != null ? HttpContext.Current.Items[key] : null; 149 150 if (obj == null) { 151 return default(T); 152 } 153 154 return (T)obj; 155 } 156 157 void SaveContextItem(string key, object value) { 158 if (HttpContext.Current.Items != null && value != null) { 159 HttpContext.Current.Items[key] = value; 160 } 161 } 162 163 string PathCombine(params string[] paths) { 164 return Path.Combine(paths); 165 } 166 167 string NullIfEmpty(string value) { 168 return string.IsNullOrEmpty(value) ? null : value; 169 } 170 171 string NullIfWhiteSpace(string value) { 172 return string.IsNullOrWhiteSpace(value) ? null : value; 173 } 174 175 string ToJson(object value) { 176 return ToJson(value, false); 177 } 178 179 string ToJson(object value, bool indented) { 180 return Newtonsoft.Json.JsonConvert.SerializeObject( 181 value, 182 indented ? Newtonsoft.Json.Formatting.Indented : Newtonsoft.Json.Formatting.None, 183 new Newtonsoft.Json.Converters.IsoDateTimeConverter { DateTimeFormat = "yyyyMMdd'T'HHmmss" } 184 ); 185 } 186 187 void AddCssFile(params string[] files) { 188 var list = LoadContextItem<List<string>>("SB.CssFiles"); 189 190 if (list == null) { 191 list = new List<string>(); 192 } 193 194 foreach (var file in files) { 195 if (!list.Contains(file, StringComparer.OrdinalIgnoreCase)) { 196 list.Add(file); 197 } 198 } 199 200 SaveContextItem("SB.CssFiles", list); 201 } 202 203 void AddJsFile(params string[] files) { 204 var list = LoadContextItem<List<string>>("SB.JsFiles"); 205 206 if (list == null) { 207 list = new List<string>(); 208 } 209 210 foreach (var file in files) { 211 if (!list.Contains(file, StringComparer.OrdinalIgnoreCase)) { 212 list.Add(file); 213 } 214 } 215 216 SaveContextItem("SB.JsFiles", list); 217 } 218 } 219 @using System.Collections 220 @using System.Linq 221 @using System.Xml 222 @using System.Xml.Linq 223 @using System.Xml.XPath 224 @using System.Web 225 @{ 226 var Request = HttpContext.Current.Request; 227 var Response = HttpContext.Current.Response; 228 var Server = HttpContext.Current.Server; 229 230 var topPageview = Dynamicweb.Frontend.PageView.Current(); 231 var topPageviewMainPages = ((ArrayList)topPageview.Area.Values["areamainpages"]).Cast<int>().ToList(); 232 var topPageviewPagePaths = ((ArrayList)topPageview.Page.Values["pagepath"]).Cast<int>().ToList(); 233 234 /* 235 * /Admin/Public/GetNavigationXML.aspx?Expand=2&ParentID=0&StartLevel=1&StopLevel=999&AreaID=1 236 */ 237 238 Func<int, int, Dictionary<string, object>> __topPageviewGetPageById = null; 239 __topPageviewGetPageById = (pageId, pageLevel) => { 240 var page = (Dynamicweb.Frontend.Page)topPageview.PageCollection[pageId]; 241 var pages = page.Children != null ? page.Children.Select(o => __topPageviewGetPageById(o.ID, pageLevel + 1)).Where(o => o != null) : null; 242 243 return new Dictionary<string, object> { 244 { "Id" , page.ID }, 245 { "Active" , topPageview.ID == page.ID }, 246 { "InPath" , topPageviewPagePaths.Contains(page.ID) }, 247 { "Level" , pageLevel }, 248 { "Type" , "page" }, 249 250 { "Menutext" , page.Values["pagemenutext"] != null ? (string)page.Values["pagemenutext"] : string.Empty }, 251 { "NavigationTag" , page.Values["pagenavigationtag"] != null ? (string)page.Values["pagenavigationtag"] : string.Empty }, 252 { "ItemType" , page.Values["pageitemtype"] != null ? (string)page.Values["pageitemtype"] : string.Empty }, 253 { "IsFolder" , page.Values["pageisfolder"] != null ? (bool)page.Values["pageisfolder"] : false }, 254 { "Enabled" , page.Values["pageactive"] != null ? (bool)page.Values["pageactive"] : false }, 255 256 { "PropertyItem" , page.PropertyItem != null ? page.PropertyItem : null }, 257 { "Item" , page.Item != null ? page.Item : null }, 258 259 { "Pages", pages != null && pages.Any() ? pages.ToList() : null } 260 }; 261 }; 262 263 var __xmlNavigation = new Dynamicweb.Frontend.XmlNavigation(topPageview) { Sitemap = true }; 264 var __xmlDocument = __xmlNavigation.XML(0, 1, 999, Dynamicweb.Frontend.XmlNavigation.Expand.All, Pageview.Page.AreaID); 265 var __xNavigation = XDocument.Load(new XmlNodeReader(__xmlDocument)); 266 267 Func<XElement, int, Dictionary<string, object>> __topPageviewGetPageByXml = null; 268 __topPageviewGetPageByXml = (xElement, pageLevel) => { 269 var id = int.Parse((string)xElement.Attribute("ID")); 270 var active = (string)xElement.Attribute("Active") == "True"; 271 var inPath = (string)xElement.Attribute("InPath") == "True"; 272 var type = (string)xElement.Attribute("Type"); 273 var pages = xElement.XPathSelectElements("./Page").Select(o => __topPageviewGetPageByXml(o, pageLevel + 1)); 274 275 // ecom group 276 if (type == "group") { 277 var href = (string)xElement.Attribute("Href"); 278 var productCount = (string)xElement.Attribute("ProductCount"); 279 var menuText = (string)xElement.Attribute("MenuText"); 280 var hrefParsed = HttpUtility.ParseQueryString(href); 281 282 return new Dictionary<string, object> { 283 { "Id" , id }, 284 { "Active" , active }, 285 { "InPath" , inPath }, 286 { "Level" , pageLevel }, 287 { "Type" , type }, 288 289 { "Menutext" , menuText }, 290 { "NavigationTag" , string.Empty }, 291 { "ItemType" , string.Empty }, 292 { "IsFolder" , false }, 293 { "Enabled" , true }, 294 295 { "GroupId" , hrefParsed["GroupID"] }, 296 { "ProductCount" , string.IsNullOrEmpty(productCount) ? 0 : int.Parse(productCount) }, 297 298 { "Pages", pages != null && pages.Any() ? pages.ToList() : null } 299 }; 300 } 301 302 var page = (Dynamicweb.Frontend.Page)topPageview.PageCollection[id]; 303 304 return new Dictionary<string, object> { 305 { "Id" , id }, 306 { "Active" , active }, 307 { "InPath" , inPath }, 308 { "Level" , pageLevel }, 309 { "Type" , "page" }, 310 311 { "Menutext" , page.Values["pagemenutext"] != null ? (string)page.Values["pagemenutext"] : string.Empty }, 312 { "NavigationTag" , page.Values["pagenavigationtag"] != null ? (string)page.Values["pagenavigationtag"] : string.Empty }, 313 { "ItemType" , page.Values["pageitemtype"] != null ? (string)page.Values["pageitemtype"] : string.Empty }, 314 { "IsFolder" , page.Values["pageisfolder"] != null ? (bool)page.Values["pageisfolder"] : false }, 315 { "Enabled" , page.Values["pageactive"] != null ? (bool)page.Values["pageactive"] : false }, 316 317 { "PropertyItem" , page.PropertyItem != null ? page.PropertyItem : null }, 318 { "Item" , page.Item != null ? page.Item : null }, 319 320 { "Pages", pages != null && pages.Any() ? pages.ToList() : null } 321 }; 322 }; 323 324 var __topPageviewPages1 = __xNavigation.XPathSelectElements("/NavigationTree/Page").Select(o => __topPageviewGetPageByXml(o, 1)).ToList(); 325 var __topPageviewPages2 = topPageviewMainPages.Select(o => __topPageviewGetPageById(o, 1)).ToList(); 326 var topPageviewPages = new List<Dictionary<string, object>>(); 327 328 //Udkommenteret for at f� menuen i inspektion til at virke. 329 //foreach (var item in __topPageviewPages1) { 330 // if (!topPageviewPages.Any(o => (int)o["Id"] == (int)item["Id"])) { 331 // topPageviewPages.Add(item); 332 // } 333 //} 334 335 foreach (var item in __topPageviewPages2) { 336 if (!topPageviewPages.Any(o => (int)o["Id"] == (int)item["Id"])) { 337 topPageviewPages.Add(item); 338 } 339 } 340 } 341 @{ 342 var _master_LongLang = GetString("LongLang"); 343 var _master_DesignBaseUrl = GetString("Template:DesignBaseUrl"); 344 var _master_AssetsBaseUrl = _master_DesignBaseUrl + "assets/"; 345 346 var _master_ItemType = string.Empty; 347 var _master_ServiceType = string.Empty; 348 349 { 350 var page = Pageview.Page; 351 352 _master_ItemType = page.Values != null && page.Values.ContainsKey("pageitemtype") ? (string)page.Values["pageitemtype"] : _master_ItemType; 353 _master_ServiceType = page.Item != null && page.Item.ContainsKey("Type") ? (string)page.Item["Type"] : _master_ServiceType; 354 355 while (true) { 356 page = page.Parent; 357 358 if (page == null || page.Values == null || !page.Values.ContainsKey("pageisfolder") || (bool)page.Values["pageisfolder"]) { 359 break; 360 } 361 362 _master_ServiceType = page.Item != null && page.Item.ContainsKey("Type") ? (string)page.Item["Type"] : _master_ServiceType; 363 } 364 } 365 } 366 <!DOCTYPE html> 367 <html lang="@(_master_LongLang.Split('-')[0])"> 368 <head> 369 <meta charset="utf-8"> 370 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 371 <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> 372 <meta name="google-translate-customization" content="3ab294752fbc971b-990b0778fdaa5c49-gd959cd44578dce8b-1a"> 373 374 @RenderSnippet("OpenGraph") 375 376 <title>@GetValue("Title")</title> 377 378 @GetValue("MetaTags") 379 @GetValue("CopyRightNotice") 380 381 @RenderSnippet("Icons") 382 @RenderSnippet("Css") 383 384 @* Loading some needed scripts at top of page - rest before end of body tag *@ 385 @RenderSnippet("TopJs") 386 387 @* HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries *@ 388 @* WARNING: Respond.js doesn't work if you view the page via file:// *@ 389 <!--[if lt IE 9]> 390 <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script> 391 <script src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script> 392 <![endif]--> 393 394 @GetValue("Stylesheets") 395 @GetValue("Javascripts") 396 </head> 397 <body data-itemtype="@(_master_ItemType)" data-servicetype="@(_master_ServiceType)" data-areaid="@(Pageview.AreaID)"> 398 <div canvas="container"> 399 400 @{ 401 var contentSliderBlock = GetString("DwContent(sliderblock)"); 402 var contentContentBlock = GetString("DwContent(contentblock)"); 403 var contentSpotsBlock = GetString("DwContent(spotsblock)"); 404 var contentBtnSpotsBlock = GetString("DwContent(btnspotsblock)"); 405 406 407 var page_FolderCases = GetString("Item.Area.Folder_Cases"); 408 var page_FolderNews = GetString("Item.Area.Folder_News"); 409 410 // -- -- 411 int pageID = GetInteger("DwPageID"); 412 } 413 @if (false) { 414 <div id="slider-block">@GetValue("DwContent(sliderblock)")</div> 415 <div id="content-block">@GetValue("DwContent(contentblock)")</div> 416 417 <div id="btn-spots-block">@GetValue("DwContent(btnspotsblock)")</div> 418 <div id="spots-block">@GetValue("DwContent(spotsblock)")</div> 419 } 420 @if (!string.IsNullOrWhiteSpace(contentSliderBlock)) { 421 @(contentSliderBlock) 422 } 423 424 <div class="container"> 425 @if (!string.IsNullOrWhiteSpace(contentContentBlock)) { 426 <div class="row"> 427 @(contentContentBlock) 428 </div> 429 } 430 </div> 431 432 @if (!string.IsNullOrWhiteSpace(contentSpotsBlock) && pageID == 91) { 433 434 <div class="spots-btn-block"> 435 <div class="container"> 436 <div class="row"> 437 @(contentBtnSpotsBlock) 438 </div> 439 </div> 440 </div> 441 } 442 443 @if (!string.IsNullOrWhiteSpace(contentSpotsBlock)) { 444 <hr class="hr-monza"> 445 446 <div class="spots-block"> 447 <div class="container"> 448 <div class="row"> 449 @(contentSpotsBlock) 450 </div> 451 </div> 452 </div> 453 } 454 455 @RenderItemList(new { 456 ItemType = "Case", 457 ListSourceType = "Page", 458 ListSourcePage = page_FolderCases, 459 ItemFieldsList = "*", 460 ListTemplate = "ItemPublisher/List/Cases-extra.cshtml", 461 ListPageSize = 10000 462 }) 463 464 @RenderItemList(new { 465 ItemType = "News", 466 ListSourceType = "Page", 467 ListSourcePage = page_FolderNews, 468 ItemFieldsList = "*", 469 ListTemplate = "ItemPublisher/List/News-extra.cshtml", 470 ListPageSize = 10000 471 }) 472 473 @RenderSnippet("Footer") 474 </div> 475 476 @RenderSnippet("Top") 477 478 <div off-canvas="navbar-stage right shift"> 479 @RenderSnippet("NavBarStage") 480 </div> 481 482 <div off-canvas="contact-form bottom push"> 483 @RenderSnippet("ContactForm") 484 </div> 485 486 <div class="modal fade" id="contactformModal" tabindex="-1" role="dialog" aria-labelledby="contactformModalLabel"> 487 <div class="modal-dialog modal-sm" role="document"> 488 <div class="modal-content"> 489 <div class="modal-body"></div> 490 </div> 491 </div> 492 </div> 493 494 @* Scripts placed at the end of the page to make it load faster *@ 495 @RenderSnippet("BottomJs") 496 @RenderSnippet("ParagraphJs") 497 @RenderSnippet("GoogleAnalytics") 498 @RenderSnippet("CookieNotice") 499 500 @{ 501 var backendUser = Dynamicweb.Modules.UserManagement.User.get_Current(Dynamicweb.Modules.UserManagement.PagePermissionLevels.Backend); 502 } 503 @if (backendUser != null) { 504 <div class="page-edit" style="position: fixed; bottom: 10px; right: 10px; z-index: 100"> 505 <div class="btn-group dropup"> 506 <button type="button" class="btn btn-default">@Translate("Page actions")</button> 507 <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> 508 <span class="caret"></span> 509 </button> 510 <ul class="dropdown-menu pull-right"> 511 @if (Pageview.Page.Item == null) { 512 <li><a target="backend" href="/Admin/Content/PageEdit.aspx?ID=@Pageview.Page.ID">@Translate("Edit page properties")</a></li> 513 <li><a target="backend" href="/Admin/Content/ParagraphList.aspx?PageID=@Pageview.Page.ID">@Translate("Edit paragraphs")</a></li> 514 } else { 515 <li><a target="backend" href="/Admin/Content/Items/Editing/ItemEdit.aspx?PageID=@Pageview.Page.ID">@Translate("Edit page")</a></li> 516 <li><a target="backend" href="/Admin/Content/ParagraphList.aspx?PageID=@Pageview.Page.ID&amp;mode=viewParagraphs">@Translate("Edit paragraphs")</a></li> 517 <li><a target="backend" href="/Admin/Content/PageEdit.aspx?ID=@Pageview.Page.ID">@Translate("Edit page properties")</a></li> 518 } 519 </ul> 520 </div> 521 </div> 522 } 523 </body> 524 </html> 525 526 @SnippetStart("BottomJs") 527 @{ 528 var bottomJs_DesignBaseUrl = GetString("Template:DesignBaseUrl"); 529 var bottomJs_AssetsBaseUrl = bottomJs_DesignBaseUrl + "assets/"; 530 var bottomJs_LongLang = GetString("LongLang"); 531 532 if (GetBoolean("Item.Area.CookieEnabled")) { 533 AddJsFile("https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.4/cookieconsent.min.js"); 534 } 535 536 AddJsFile( 537 bottomJs_AssetsBaseUrl + "formvalidation/js/formValidation.min.js", 538 bottomJs_AssetsBaseUrl + "formvalidation/js/framework/bootstrap.min.js", 539 bottomJs_AssetsBaseUrl + "formvalidation/js/language/" + bottomJs_LongLang.Replace("-", "_").Replace("GB", "US") + ".js", 540 541 bottomJs_DesignBaseUrl + "js/script.js" 542 ); 543 544 var listBottomJs = LoadContextItem<List<string>>("SB.JsFiles"); 545 } 546 <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script> 547 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script> 548 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script> 549 <script src="https://cdnjs.cloudflare.com/ajax/libs/slidebars/2.0.2/slidebars.min.js"></script> 550 551 @if (!true) { 552 var listBottomJsObj = listBottomJs.Select(o => new { 553 Path = o, 554 IsCDN = o.StartsWith("http", StringComparison.OrdinalIgnoreCase) || o.StartsWith("//") 555 }).ToList(); 556 557 foreach (var js in listBottomJsObj.Where(o => o.IsCDN)) { 558 <script src="@(js.Path)"></script> 559 } 560 561 var bottomJses = string.Join(",", listBottomJsObj.Where(o => !o.IsCDN).Select(o => o.Path)); 562 <script src="/Admin/Public/ControlResourcesHandler.ashx?OutputType=js&amp;Files=@(bottomJses)"></script> 563 } else { 564 foreach (var js in listBottomJs) { 565 <script src="@(js)"></script> 566 } 567 } 568 @SnippetEnd("BottomJs") 569 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 570 @using Dynamicweb.Rendering 571 572 @SnippetStart("ContactForm") 573 @{ 574 int currentAreaId = Pageview.AreaID; 575 576 var contactForm_FormCH1_h = Dynamicweb.Base.MD5HashToString(HttpContext.Current.Session.SessionID + "dwdotnetsecret"); 577 578 var contactForm_FormCH1_s = Dynamicweb.Base.MD5HashToString(HttpContext.Current.Session.SessionID); 579 var contactForm_FormCH1_i = Dynamicweb.Base.MD5HashToString(HttpContext.Current.Request.ServerVariables["REMOTE_HOST"]); 580 581 582 } 583 @if(currentAreaId == 2) { 584 var contactForm_PageId = 403; 585 var contactForm_ParagraphId = 440; 586 var contactForm_Id = 6; 587 var contactForm_FormCH1_f = Dynamicweb.Base.MD5HashToString(contactForm_Id + "dwdotnetsecret"); 588 589 var contactForm_T_Firmanavn = Translate("Company name"); 590 var contactForm_T_Email = Translate("E-mail"); 591 var contactForm_T_Tlf = Translate("Tel"); 592 var contactForm_T_Kontaktperson = Translate("Contact name"); 593 594 var contactForm_T_Certificering = Translate("Certificering"); 595 var contactForm_T_InspektionOgVejledning = Translate("Inspektion og vejledning"); 596 var contactForm_T_Inspektion = Translate("Inspektion"); 597 var contactForm_T_Vejledning = Translate("Testing"); 598 var contactForm_T_TraeningOgKurser = Translate("Traening og kurser"); 599 var contactForm_T_Andet = Translate("Andet"); 600 601 <div class="contactform-block"> 602 <div class="container"> 603 <div class="row"> 604 <div class="col-md-offset-2 col-md-8"> 605 <form method="post" enctype="multipart/form-data" data-fv-live="enabled" data-fv-framework="bootstrap" data-fv-icon-required="fa fa-asterisk" data-fv-icon-valid="fa fa-check" data-fv-icon-invalid="fa fa-times" data-fv-icon-validating="fa fa-refresh"> 606 <div class="row"> 607 608 609 <div class="col-sm-6"> 610 <div class="form-group"> 611 <label class="control-label hidden-xs hidden-sm" for="cf_email">@(contactForm_T_Email)</label> 612 <input type="text" class="form-control input-sm" id="cf_email" name="cf_email" placeholder="@(contactForm_T_Email)" data-fv-notempty="true" data-fv-emailaddress="true"> 613 </div> 614 </div> 615 616 <div class="col-sm-6"> 617 <div class="form-group"> 618 <label class="control-label hidden-xs hidden-sm" for="cf_companyname">@(contactForm_T_Firmanavn)</label> 619 <input type="text" class="form-control input-sm" id="cf_companyname" name="cf_companyname" placeholder="@(contactForm_T_Firmanavn)" data-fv-notempty="true"> 620 </div> 621 </div> 622 623 <div class="col-sm-6"> 624 <div class="form-group"> 625 <label class="control-label hidden-xs hidden-sm" for="cf_phone">@(contactForm_T_Tlf)</label> 626 <input type="text" class="form-control input-sm" id="cf_phone" name="cf_phone" placeholder="@(contactForm_T_Tlf)" data-fv-notempty="true"> 627 </div> 628 </div> 629 630 <div class="col-sm-6"> 631 <div class="form-group"> 632 <label class="control-label hidden-xs hidden-sm" for="cf_contact">@(contactForm_T_Kontaktperson)</label> 633 <input type="text" class="form-control input-sm" id="cf_contact" name="cf_contact" placeholder="@(contactForm_T_Kontaktperson)" data-fv-notempty="true"> 634 </div> 635 </div> 636 637 <div class="col-sm-6"> 638 <div class="form-group"> 639 <label class="control-label">Please specify your inquiry</label> 640 <div> 641 642 @*<div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 643 <label class="checkbox-inline"> 644 <input type="checkbox" id="cf_interested_inspektionogvejledning" name="cf_interesteds" value="@(contactForm_T_InspektionOgVejledning)"> @(contactForm_T_InspektionOgVejledning) 645 </label> 646 </div>*@ 647 648 <div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 649 <label class="checkbox-inline"> 650 <input type="checkbox" id="cf_interested_inspektion" name="cf_interesteds" value="@(contactForm_T_Inspektion)"> @(contactForm_T_Inspektion) 651 </label> 652 </div> 653 <div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 654 <label class="checkbox-inline"> 655 <input type="checkbox" id="cf_interested_certificering" name="cf_interesteds" value="@(contactForm_T_Certificering)"> @(contactForm_T_Certificering) 656 </label> 657 </div> 658 659 660 <div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 661 <label class="checkbox-inline"> 662 <input type="checkbox" id="cf_interested_vejledning" name="cf_interesteds" value="@(contactForm_T_Vejledning)"> @(contactForm_T_Vejledning) 663 </label> 664 </div> 665 666 @*<div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 667 <label class="checkbox-inline"> 668 <input type="checkbox" id="cf_interested_traeningogkurser" name="cf_interesteds" value="@(contactForm_T_TraeningOgKurser)"> @(contactForm_T_TraeningOgKurser) 669 </label> 670 </div> 671 <div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 672 <label class="checkbox-inline"> 673 <input type="checkbox" id="cf_interested_andet" name="cf_interesteds" value="@(contactForm_T_Andet)" onclick="cf_interested_andet_toggle()"> @(contactForm_T_Andet) 674 </label> 675 </div>*@ 676 </div> 677 </div> 678 679 <div class="cf-interested-andet-text-wrapper hidden"> 680 <div class="form-group"> 681 <textarea class="form-control input-sm" id="cf_interested_andet_text" name="cf_interested_andet_text" rows="3" placeholder="@(contactForm_T_Andet)"></textarea> 682 </div> 683 </div> 684 </div> 685 686 <div class="col-sm-6"> 687 <div class="hidden-sm hidden-md hidden-lg"> 688 <hr> 689 </div> 690 <div class="form-group"> 691 <div> 692 <label class="checkbox-inline"> 693 <input type="checkbox" id="cf_callme" name="cf_callme" value="1"> @(Translate("Ring mig op")) 694 </label> 695 @*<label class="checkbox-inline"> 696 <input type="checkbox" id="cf_sendbrochures" name="cf_sendbrochures" value="1"> @(Translate("Send brochuremateriale")) 697 </label>*@ 698 </div> 699 </div> 700 <button type="submit" class="btn btn-monza btn-sm">@(Translate("Send"))</button> 701 </div> 702 </div> 703 </form> 704 </div> 705 </div> 706 </div> 707 </div> 708 709 <script type="text/javascript"> 710 function cf_interested_andet_toggle() { 711 var $andet = $('#cf_interested_andet'); 712 var controller = window['slidebars-controller']; 713 714 if ($andet.prop('checked')) { 715 $('.cf-interested-andet-text-wrapper').removeClass('hidden'); 716 } else { 717 $('.cf-interested-andet-text-wrapper').addClass('hidden'); 718 } 719 720 controller && controller.css(); 721 } 722 723 $(function() { 724 var $form = $('form', '.contactform-block'); 725 var controller = window['slidebars-controller']; 726 727 function onPreValidate(evt) { 728 var $target = $(evt.target); 729 } 730 731 function onError(evt) { 732 controller && controller.css(); 733 734 var $target = $(evt.target); 735 var fv = $target.data('formValidation'); 736 737 if (fv.getSubmitButton()) { 738 fv.disableSubmitButtons(false); 739 } 740 } 741 742 function onSuccess(evt) { 743 controller && controller.css(); 744 745 evt.preventDefault(); 746 747 var $target = $(evt.target); 748 var fv = $target.data('formValidation'); 749 750 var postdata = { 751 ID : '@(contactForm_PageId)', 752 FormPID : '@(contactForm_ParagraphId)', 753 FormID : '@(contactForm_Id)', 754 SubmitForm : 'true', 755 _sys_to_email : 'bot@dynamicweb.com', 756 757 FormCH1_h : '', 758 FormCH1_f : '@(contactForm_FormCH1_f)', 759 FormCH1_s : '@(contactForm_FormCH1_s)', 760 FormCH1_i : '@(contactForm_FormCH1_i)', 761 762 inspection_contact_date : '@(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"))', 763 inspection_contact_name : '', 764 inspection_contact_email : '', 765 inspection_contact_tel : '', 766 inspection_contact_contact : '', 767 inspection_contact_inquiry : '', 768 inspection_contact_call : '' 769 }; 770 771 postdata.FormCH1_h = '@(contactForm_FormCH1_h)'; 772 postdata._sys_to_email = ''; 773 774 postdata.inspection_contact_name = $.trim($('input[name="cf_companyname"]', $form).val()); 775 postdata.inspection_contact_email = $.trim($('input[name="cf_email"]', $form).val()); 776 postdata.inspection_contact_tel = $.trim($('input[name="cf_phone"]', $form).val()); 777 postdata.inspection_contact_contact = $.trim($('input[name="cf_contact"]', $form).val()); 778 postdata.inspection_contact_inquiry = $('input[name="cf_interesteds"]:checked', $form).map(function() { 779 var $this = $(this); 780 var value = $.trim($this.val()); 781 782 if (value == '@(contactForm_T_Andet)') { 783 var andettext = $.trim($('textarea[name="cf_interested_andet_text"]', $form).val()); 784 785 if (andettext != '') { 786 return value + ': ' + andettext; 787 } 788 } 789 790 return value; 791 }).get().join(', '); 792 console.log(postdata); 793 794 postdata.inspection_contact_call = $('input[name="cf_callme"]', $form).prop('checked') ? 'Ja' : 'Nej'; 795 //postdata.Form_Kontakt_Send_brochuremateriale = $('input[name="cf_sendbrochures"]', $form).prop('checked') ? 'Ja' : 'Nej'; 796 797 $('input[type="text"], input[type="checkbox"], textarea', $form).prop('disabled', true); 798 799 var $modal = $('#contactformModal'); 800 801 $modal.on('show.bs.modal', function (e) { 802 $('.modal-body', $modal).html('<h3>@(Translate("Vent venligst..."))</h3>'); 803 $('.modal-footer', $modal).remove(); 804 }); 805 806 $modal.modal({ keyboard: false, backdrop: 'static' }); 807 808 $.ajax({ 809 type : 'POST', 810 url : '/Default.aspx?ID=' + postdata.ID, 811 data : postdata, 812 success : function(data) { 813 $('.modal-body', $modal).html('<h3>@(Translate("Beskeden er sendt!"))</h3>@(Translate("Tak for din henvendelse."))'); 814 $('.modal-content', $modal).append( 815 '<div class="modal-footer">' + 816 '<button type="button" class="btn btn-monza" data-dismiss="modal">@(Translate("Luk"))</button>' + 817 '</div>' 818 ); 819 820 $('input[type="text"], input[type="checkbox"], textarea', $form).prop('disabled', false); 821 $('input[type="text"], textarea', $form).val(''); 822 $('input[type="checkbox"]', $form).prop('checked', false); 823 824 cf_interested_andet_toggle(); 825 826 $form.data('formValidation').resetForm(); 827 } 828 }); 829 } 830 831 $form 832 .formValidation({ 833 locale : 'en_US', 834 onPreValidate : onPreValidate, 835 onError : onError, 836 onSuccess : onSuccess 837 }) 838 .on('err.field.fv', function(e, data) { 839 data.element.data('fv.icon').hide(); 840 data.fv.disableSubmitButtons(false); 841 842 controller && controller.css(); 843 }) 844 .on('success.field.fv', function(e, data) { 845 var $parent = data.element.parents('.form-group'); 846 $parent.removeClass('has-success'); 847 data.element.data('fv.icon').hide(); 848 849 data.fv.disableSubmitButtons(false); 850 851 controller && controller.css(); 852 }); 853 }); 854 </script> 855 } else { 856 var contactForm_PageId = 41; 857 var contactForm_ParagraphId = 43; 858 if(currentAreaId == 3) 859 { 860 contactForm_PageId = 342; 861 contactForm_ParagraphId = 368; 862 } 863 var contactForm_Id = 1; 864 var contactForm_FormCH1_f = Dynamicweb.Base.MD5HashToString(contactForm_Id + "dwdotnetsecret"); 865 866 var contactForm_T_Firmanavn = Translate("Firmanavn"); 867 var contactForm_T_Email = Translate("E-mail"); 868 var contactForm_T_Tlf = Translate("Tlf."); 869 var contactForm_T_Kontaktperson = Translate("Kontaktperson"); 870 var contactForm_T_Certificering = Translate("Certificering"); 871 var contactForm_T_InspektionOgVejledning = Translate("Inspektion og vejledning"); 872 var contactForm_T_Inspektion = Translate("Inspektion"); 873 var contactForm_T_Vejledning = Translate("Vejledning"); 874 var contactForm_T_TraeningOgKurser = Translate("Traening og kurser"); 875 var contactForm_T_Andet = Translate("Andet"); 876 <div class="contactform-block"> 877 <div class="container"> 878 <div class="row"> 879 <div class="col-md-offset-2 col-md-8"> 880 <form method="post" enctype="multipart/form-data" data-fv-live="enabled" data-fv-framework="bootstrap" data-fv-icon-required="fa fa-asterisk" data-fv-icon-valid="fa fa-check" data-fv-icon-invalid="fa fa-times" data-fv-icon-validating="fa fa-refresh"> 881 <div class="row"> 882 <div class="col-sm-6"> 883 <div class="form-group"> 884 <label class="control-label hidden-xs hidden-sm" for="cf_companyname">@(contactForm_T_Firmanavn)</label> 885 <input type="text" class="form-control input-sm" id="cf_companyname" name="cf_companyname" placeholder="@(contactForm_T_Firmanavn)" data-fv-notempty="true"> 886 </div> 887 </div> 888 889 <div class="col-sm-6"> 890 <div class="form-group"> 891 <label class="control-label hidden-xs hidden-sm" for="cf_email">@(contactForm_T_Email)</label> 892 <input type="text" class="form-control input-sm" id="cf_email" name="cf_email" placeholder="@(contactForm_T_Email)" data-fv-notempty="true" data-fv-emailaddress="true"> 893 </div> 894 </div> 895 896 <div class="col-sm-6"> 897 <div class="form-group"> 898 <label class="control-label hidden-xs hidden-sm" for="cf_phone">@(contactForm_T_Tlf)</label> 899 <input type="text" class="form-control input-sm" id="cf_phone" name="cf_phone" placeholder="@(contactForm_T_Tlf)" data-fv-notempty="true"> 900 </div> 901 </div> 902 903 <div class="col-sm-6"> 904 <div class="form-group"> 905 <label class="control-label hidden-xs hidden-sm" for="cf_contact">@(contactForm_T_Kontaktperson)</label> 906 <input type="text" class="form-control input-sm" id="cf_contact" name="cf_contact" placeholder="@(contactForm_T_Kontaktperson)" data-fv-notempty="true"> 907 </div> 908 </div> 909 910 <div class="col-sm-6"> 911 <div class="form-group"> 912 <label class="control-label">@(Translate("Hvad er du interesseret i?"))</label> 913 <div> 914 915 @*<div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 916 <label class="checkbox-inline"> 917 <input type="checkbox" id="cf_interested_inspektionogvejledning" name="cf_interesteds" value="@(contactForm_T_InspektionOgVejledning)"> @(contactForm_T_InspektionOgVejledning) 918 </label> 919 </div>*@ 920 <div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 921 <label class="checkbox-inline"> 922 <input type="checkbox" id="cf_interested_certificering" name="cf_interesteds" value="@(contactForm_T_Certificering)"> @(contactForm_T_Certificering) 923 </label> 924 </div> 925 <div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 926 <label class="checkbox-inline"> 927 <input type="checkbox" id="cf_interested_inspektion" name="cf_interesteds" value="@(contactForm_T_Inspektion)"> @(contactForm_T_Inspektion) 928 </label> 929 </div> 930 931 932 933 <div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 934 <label class="checkbox-inline"> 935 <input type="checkbox" id="cf_interested_vejledning" name="cf_interesteds" value="@(contactForm_T_Vejledning)"> @(contactForm_T_Vejledning) 936 </label> 937 </div> 938 939 @*<div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 940 <label class="checkbox-inline"> 941 <input type="checkbox" id="cf_interested_traeningogkurser" name="cf_interesteds" value="@(contactForm_T_TraeningOgKurser)"> @(contactForm_T_TraeningOgKurser) 942 </label> 943 </div> 944 <div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 945 <label class="checkbox-inline"> 946 <input type="checkbox" id="cf_interested_andet" name="cf_interesteds" value="@(contactForm_T_Andet)" onclick="cf_interested_andet_toggle()"> @(contactForm_T_Andet) 947 </label> 948 </div>*@ 949 </div> 950 </div> 951 952 <div class="cf-interested-andet-text-wrapper hidden"> 953 <div class="form-group"> 954 <textarea class="form-control input-sm" id="cf_interested_andet_text" name="cf_interested_andet_text" rows="3" placeholder="@(contactForm_T_Andet)"></textarea> 955 </div> 956 </div> 957 </div> 958 959 <div class="col-sm-6"> 960 <div class="hidden-sm hidden-md hidden-lg"> 961 <hr> 962 </div> 963 <div class="form-group"> 964 <div> 965 <label class="checkbox-inline"> 966 <input type="checkbox" id="cf_callme" name="cf_callme" value="1"> @(Translate("Ring mig op")) 967 </label> 968 @* 969 <label class="checkbox-inline"> 970 <input type="checkbox" id="cf_sendbrochures" name="cf_sendbrochures" value="1"> @(Translate("Send brochuremateriale")) 971 </label> *@ 972 </div> 973 </div> 974 975 <button type="submit" class="btn btn-monza btn-sm">@(Translate("Send"))</button> 976 </div> 977 </div> 978 </form> 979 </div> 980 </div> 981 </div> 982 </div> 983 984 <script type="text/javascript"> 985 console.log('la: ' + navigator.language); 986 function cf_interested_andet_toggle() { 987 var $andet = $('#cf_interested_andet'); 988 var controller = window['slidebars-controller']; 989 990 if ($andet.prop('checked')) { 991 $('.cf-interested-andet-text-wrapper').removeClass('hidden'); 992 } else { 993 $('.cf-interested-andet-text-wrapper').addClass('hidden'); 994 } 995 996 controller && controller.css(); 997 } 998 999 $(function() { 1000 var $form = $('form', '.contactform-block'); 1001 var controller = window['slidebars-controller']; 1002 1003 function onPreValidate(evt) { 1004 console.log('prevalidate'); 1005 var $target = $(evt.target); 1006 } 1007 1008 function onError(evt) { 1009 console.log('prevalidate'); 1010 controller && controller.css(); 1011 1012 var $target = $(evt.target); 1013 var fv = $target.data('formValidation'); 1014 1015 if (fv.getSubmitButton()) { 1016 fv.disableSubmitButtons(false); 1017 } 1018 } 1019 1020 function onSuccess(evt) { 1021 console.log('succes!'); 1022 controller && controller.css(); 1023 1024 evt.preventDefault(); 1025 1026 var $target = $(evt.target); 1027 var fv = $target.data('formValidation'); 1028 1029 var postdata = { 1030 ID : '@(contactForm_PageId)', 1031 FormPID : '@(contactForm_ParagraphId)', 1032 FormID : '@(contactForm_Id)', 1033 SubmitForm : 'true', 1034 _sys_to_email : 'bot@dynamicweb.com', 1035 1036 FormCH1_h : '', 1037 FormCH1_f : '@(contactForm_FormCH1_f)', 1038 FormCH1_s : '@(contactForm_FormCH1_s)', 1039 FormCH1_i : '@(contactForm_FormCH1_i)', 1040 1041 Form_Kontakt__Dato : '@(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"))', 1042 Form_Kontakt_Firmanavn : '', 1043 Form_Kontakt_Email : '', 1044 Form_Kontakt_Tlf : '', 1045 Form_Kontakt_Kontaktperson : '', 1046 Form_Kontakt_Hvad_er_du_interesseret_i : '', 1047 Form_Kontakt_Ring_mig_op : '', 1048 Form_Kontakt_Send_brochuremateriale : '' 1049 }; 1050 1051 postdata.FormCH1_h = '@(contactForm_FormCH1_h)'; 1052 postdata._sys_to_email = ''; 1053 1054 postdata.Form_Kontakt_Firmanavn = $.trim($('input[name="cf_companyname"]', $form).val()); 1055 postdata.Form_Kontakt_Email = $.trim($('input[name="cf_email"]', $form).val()); 1056 postdata.Form_Kontakt_Tlf = $.trim($('input[name="cf_phone"]', $form).val()); 1057 postdata.Form_Kontakt_Kontaktperson = $.trim($('input[name="cf_contact"]', $form).val()); 1058 postdata.Form_Kontakt_Hvad_er_du_interesseret_i = $('input[name="cf_interesteds"]:checked', $form).map(function() { 1059 var $this = $(this); 1060 var value = $.trim($this.val()); 1061 1062 if (value == '@(contactForm_T_Andet)') { 1063 var andettext = $.trim($('textarea[name="cf_interested_andet_text"]', $form).val()); 1064 1065 if (andettext != '') { 1066 return value + ': ' + andettext; 1067 } 1068 } 1069 1070 return value; 1071 }).get().join(', '); 1072 1073 postdata.Form_Kontakt_Ring_mig_op = $('input[name="cf_callme"]', $form).prop('checked') ? 'Ja' : 'Nej'; 1074 postdata.Form_Kontakt_Send_brochuremateriale = $('input[name="cf_sendbrochures"]', $form).prop('checked') ? 'Ja' : 'Nej'; 1075 1076 $('input[type="text"], input[type="checkbox"], textarea', $form).prop('disabled', true); 1077 1078 var $modal = $('#contactformModal'); 1079 1080 $modal.on('show.bs.modal', function (e) { 1081 $('.modal-body', $modal).html('<h3>@(Translate("Vent venligst..."))</h3>'); 1082 $('.modal-footer', $modal).remove(); 1083 }); 1084 1085 $modal.modal({ keyboard: false, backdrop: 'static' }); 1086 1087 $.ajax({ 1088 type : 'POST', 1089 url : '/Default.aspx?ID=' + postdata.ID, 1090 data : postdata, 1091 success : function(data) { 1092 $('.modal-body', $modal).html('<h3>@(Translate("Beskeden er sendt!"))</h3>@(Translate("Tak for din henvendelse."))'); 1093 $('.modal-content', $modal).append( 1094 '<div class="modal-footer">' + 1095 '<button type="button" class="btn btn-monza" data-dismiss="modal">@(Translate("Luk"))</button>' + 1096 '</div>' 1097 ); 1098 1099 $('input[type="text"], input[type="checkbox"], textarea', $form).prop('disabled', false); 1100 $('input[type="text"], textarea', $form).val(''); 1101 $('input[type="checkbox"]', $form).prop('checked', false); 1102 1103 cf_interested_andet_toggle(); 1104 1105 $form.data('formValidation').resetForm(); 1106 } 1107 }); 1108 } 1109 1110 $form 1111 .formValidation({ 1112 locale : 'en_DK', 1113 onPreValidate : onPreValidate, 1114 onError : onError, 1115 onSuccess : onSuccess 1116 }) 1117 .on('err.field.fv', function(e, data) { 1118 data.element.data('fv.icon').hide(); 1119 data.fv.disableSubmitButtons(false); 1120 1121 controller && controller.css(); 1122 }) 1123 .on('success.field.fv', function(e, data) { 1124 var $parent = data.element.parents('.form-group'); 1125 $parent.removeClass('has-success'); 1126 data.element.data('fv.icon').hide(); 1127 1128 data.fv.disableSubmitButtons(false); 1129 1130 controller && controller.css(); 1131 }); 1132 }); 1133 </script> 1134 } 1135 1136 @SnippetEnd("ContactForm") 1137 @SnippetStart("CookieNotice") 1138 @if (GetBoolean("Item.Area.CookieEnabled")) { 1139 <script type="text/javascript"> 1140 (function(window) { 1141 window.cookieconsent.initialise({ 1142 palette: { 1143 popup: { 1144 background : '#000000', 1145 text : '#ffffff' 1146 }, 1147 button: { 1148 background : '#da022a', 1149 text : '#ffffff' 1150 } 1151 }, 1152 1153 elements: { 1154 header : '<span class="cc-header">{{header}}</span>&nbsp;', 1155 message : '<span id="cookieconsent:desc" class="cc-message">{{message}}</span>', 1156 messagelink : '<span id="cookieconsent:desc" class="cc-message">{{message}} <a aria-label="learn more about cookies" role="button" tabindex="0" class="cc-link" href="{{href}}">{{link}}</a></span>', 1157 dismiss : '<a aria-label="dismiss cookie message" role="button" tabindex="0" class="cc-btn cc-dismiss">{{dismiss}}</a>', 1158 allow : '<a aria-label="allow cookies" role="button" tabindex="0" class="cc-btn cc-allow">{{allow}}</a>', 1159 deny : '<a aria-label="deny cookies" role="button" tabindex="0" class="cc-btn cc-deny">{{deny}}</a>', 1160 link : '<a aria-label="learn more about cookies" role="button" tabindex="0" class="cc-link" href="{{href}}">{{link}}</a>', 1161 close : '<span aria-label="dismiss cookie message" role="button" tabindex="0" class="cc-close">{{close}}</span>' 1162 }, 1163 1164 content: { 1165 message : '@(GetString("Item.Area.CookieMassage").Replace("'", "\'"))', 1166 dismiss : '@(GetString("Item.Area.CookieDismissText").Replace("'", "\'"))', 1167 link : '@(GetString("Item.Area.CookieReadMoreText").Replace("'", "\'"))', 1168 href : '/@(GetString("Item.Area.CookieReadMoreLink").Replace("'", "\'"))' 1169 }, 1170 1171 position: 'top' 1172 }); 1173 })(window); 1174 </script> 1175 } 1176 @SnippetEnd("CookieNotice") 1177 @SnippetStart("Css") 1178 @{ 1179 var css_DesignBaseUrl = GetString("Template:DesignBaseUrl"); 1180 var css_AssetsBaseUrl = css_DesignBaseUrl + "assets/"; 1181 1182 if (GetBoolean("Item.Area.CookieEnabled")) { 1183 AddCssFile("https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.4/cookieconsent.min.css"); 1184 } 1185 1186 AddCssFile( 1187 css_AssetsBaseUrl + "formvalidation/css/formValidation.min.css", 1188 css_DesignBaseUrl + "css/style.min.css?v=2016-11-30T09:02" 1189 ); 1190 1191 var listCss = LoadContextItem<List<string>>("SB.CssFiles"); 1192 } 1193 <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"> 1194 <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> 1195 <link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css" rel="stylesheet"> 1196 <link href="https://cdnjs.cloudflare.com/ajax/libs/slidebars/2.0.2/slidebars.min.css" rel="stylesheet"> 1197 @if (!true) { 1198 var listCssObj = listCss.Select(o => new { 1199 Path = o, 1200 IsCDN = o.StartsWith("http", StringComparison.OrdinalIgnoreCase) || o.StartsWith("//") 1201 }).ToList(); 1202 1203 foreach (var css in listCssObj.Where(o => o.IsCDN)) { 1204 <link href="@(css.Path)" rel="stylesheet"> 1205 } 1206 1207 var csses = string.Join(",", listCssObj.Where(o => !o.IsCDN).Select(o => o.Path)); 1208 <link href="/Admin/Public/ControlResourcesHandler.ashx?OutputType=css&amp;Files=@(csses)" rel="stylesheet"> 1209 } else { 1210 foreach (var css in listCss) { 1211 <link href="@(css)" rel="stylesheet"> 1212 } 1213 } 1214 @SnippetEnd("Css") 1215 @SnippetStart("Footer") 1216 @using System.Text.RegularExpressions 1217 @{ 1218 var footer_LockArea = new int[] { 1, 2 }; 1219 var footer_AreaFirstPage = GetInteger("DwAreaFirstPageID"); 1220 var footer_DesignBaseUrl = GetString("Template:DesignBaseUrl"); 1221 var footer_AssetsBaseUrl = footer_DesignBaseUrl + "assets/"; 1222 1223 var footer_Logos = new List<dynamic>(); 1224 var footer_TermsId = GetString("Item.Area.Page_Terms"); 1225 var footer_PageLogin = GetString("Item.Area.Page_Login"); 1226 var footer_TermsText = string.Empty; 1227 string footerLogo = GetString("Item.Area.Company_logo"); 1228 var footerAreaId = GetInteger("DwAreaID"); 1229 var footer_BaseArea = Pageview.AreaCollection.ContainsKey(2) ? (Dynamicweb.Frontend.Area)Pageview.AreaCollection[2] : null; 1230 1231 if (!footer_LockArea.Contains(Pageview.AreaID)) { 1232 var footer_BaseFooterLogosId = footer_BaseArea != null && footer_BaseArea.Item.ContainsKey("FooterLogos") ? (int)footer_BaseArea.Item["FooterLogos"] : 0; 1233 var footer_BaseFooterLogosItems = Dynamicweb.Content.Items.ItemList.GetItemListById(footer_BaseFooterLogosId); 1234 var footer_BaseFooterLogos = footer_BaseFooterLogosItems != null && footer_BaseFooterLogosItems.Relations != null ? footer_BaseFooterLogosItems.Relations.Select(o => { 1235 var x = new Dynamicweb.Content.Items.Item(o); 1236 1237 return new { 1238 Logo = (string)x["Logo"], 1239 LogoHover = (string)x["LogoHover"], 1240 Link = (string)x["Link"], 1241 Target = (string)x["Target"] 1242 }; 1243 }).ToList() : null; 1244 1245 if (footer_BaseFooterLogos != null) { 1246 footer_Logos.AddRange(footer_BaseFooterLogos); 1247 } 1248 } 1249 1250 footer_Logos.AddRange( 1251 GetLoop("Item.Area.FooterLogos") 1252 .Select(o => new { 1253 Logo = o.GetString("Item.Area.FooterLogos.Logo"), 1254 LogoHover = o.GetString("Item.Area.FooterLogos.LogoHover"), 1255 Link = o.GetString("Item.Area.FooterLogos.Link"), 1256 Target = o.GetString("Item.Area.FooterLogos.Target") 1257 }) 1258 .Where(o => !footer_Logos.Any(x => x.Logo == o.Logo)) 1259 ); 1260 1261 if (string.IsNullOrWhiteSpace(footer_TermsId) && GetInteger("DwAreaID") != 1) { 1262 footer_TermsId = footer_BaseArea != null && footer_BaseArea.Item.ContainsKey("Page_Terms") ? (string)footer_BaseArea.Item["Page_Terms"] : string.Empty; 1263 } 1264 1265 if (!string.IsNullOrWhiteSpace(footer_TermsId)) { 1266 footer_TermsText = (string)((Dynamicweb.Frontend.Page)Pageview.PageCollection[int.Parse(footer_TermsId)]).Values["pagemenutext"]; 1267 } 1268 1269 var footer_Addresses = GetLoop("Item.Area.FooterAddresses"); 1270 string aaaCreditRatingImgPath = "/Admin/Public/GetImage.ashx?Image=/Files/Images/footer-logos/AAA_464x595px.jpg&Width=130&format=jpg"; 1271 } 1272 <div class="footer"> 1273 <div class="footer-block"> 1274 <div class="footer-logos"> 1275 <div class="fg-container"> 1276 <div class="fg-row"> 1277 @foreach (var item in footer_Logos) { 1278 if (string.IsNullOrWhiteSpace(item.LogoHover) && string.IsNullOrWhiteSpace(item.Logo)) { 1279 continue; 1280 } 1281 1282 var link = item.Link; 1283 1284 if (string.IsNullOrWhiteSpace(link)) { 1285 link = "javascript:void(0)"; 1286 } 1287 1288 <div class="fg-col-xs"> 1289 <div class="footer-logo-block"> 1290 <a href="@(link)" target="@(item.Target)"> 1291 @if (!string.IsNullOrWhiteSpace(item.LogoHover)) { 1292 <img src="@(item.LogoHover)" alt="" class="img-responsive"> 1293 } 1294 @if (!string.IsNullOrWhiteSpace(item.Logo)) { 1295 <img src="@(item.Logo)" alt="" class="img-responsive"> 1296 } 1297 </a> 1298 </div> 1299 </div> 1300 } 1301 </div> 1302 </div> 1303 </div> 1304 1305 <div class="footer-socials"> 1306 <div class="container"> 1307 @if (footerAreaId == 1) 1308 { 1309 <a href="https://www.linkedin.com/in/baltic-control-certification-bcc-57231618a/" target="_blank"> 1310 <img src="@(footer_DesignBaseUrl)img/logo-linkedin.png" alt="" class="img-responsive"> 1311 </a> 1312 <a href="https://www.facebook.com/balticcontrolcom" target="_blank"> 1313 <img src="@(footer_DesignBaseUrl)img/logo-facebook.png" alt="" class="img-responsive"> 1314 </a> 1315 } 1316 else 1317 { 1318 <a href="https://www.linkedin.com/company/baltic-control-ltd" target="_blank"> 1319 <img src="@(footer_DesignBaseUrl)img/logo-linkedin.png" alt="" class="img-responsive"> 1320 </a> 1321 <a href="https://www.facebook.com/balticcontrolcom" target="_blank"> 1322 <img src="@(footer_DesignBaseUrl)img/logo-facebook.png" alt="" class="img-responsive"> 1323 </a> 1324 } 1325 1326 1327 1328 </div> 1329 </div> 1330 </div> 1331 1332 <div class="footer-contact-block"> 1333 <div class="container"> 1334 <div class="footer-contact-logo"> 1335 @*<img src="@(footer_DesignBaseUrl)img/logo.png" alt="" class="img-responsive">*@ 1336 @if (!string.IsNullOrWhiteSpace(footerLogo)) { 1337 <img src="@footerLogo" alt="" class="img-responsive"> 1338 } else { 1339 <img src="@(footer_DesignBaseUrl)img/logo.png" alt="" class="img-responsive"> 1340 } 1341 </div> 1342 1343 <div class="footer-contact-content"> 1344 <div> 1345 @if (footerAreaId == 2) { 1346 <b>Baltic Control&reg;</b><br> 1347 } else { 1348 <b>Baltic Control&reg; Certification</b><br> 1349 } 1350 <ul class="list-unstyled"> 1351 @if (!string.IsNullOrWhiteSpace(footer_TermsId)) { 1352 <li><a href="/Default.aspx?Id=@(footer_TermsId)" target="_blank">@(footer_TermsText)</a></li> 1353 } 1354 @if (!string.IsNullOrWhiteSpace(footer_PageLogin)) { 1355 <li class="topbarnav-login"> 1356 <a href="/Default.aspx?Id=@(footer_PageLogin)" target="_blank"><i class="fa fa-lock" aria-hidden="true"></i> @(Translate("Login"))</a> 1357 </li> 1358 } 1359 </ul> 1360 <img width="130" height="79" src="@aaaCreditRatingImgPath" alt="AAA credit rating" class="img-responsive"> 1361 </div> 1362 1363 @foreach (var item in footer_Addresses) { 1364 <div> 1365 <address> 1366 <b>@(item.GetString("Item.Area.FooterAddresses.Name"))</b><br> 1367 @(item.GetString("Item.Area.FooterAddresses.Address")) 1368 </address> 1369 </div> 1370 } 1371 </div> 1372 </div> 1373 </div> 1374 </div> 1375 1376 <div class="footer-btncontact-block"> 1377 <a class="btn btn-monza" href="javascript:void(footerContactFormToggle())" onclick="this.blur()" role="button">@(Translate("Kontakt os"))</a> 1378 </div> 1379 1380 <script type="text/javascript"> 1381 function footerContactFormToggle() { 1382 var controller = window['slidebars-controller']; 1383 1384 controller && controller.toggle('contact-form'); 1385 } 1386 1387 $(function () { 1388 var $canvas = $('[canvas="container"]'); 1389 var $footer = $('.footer'); 1390 var $btn = $('.footer-btncontact-block'); 1391 1392 function getProps() { 1393 return { 1394 canvasHeight: $canvas.outerHeight(false), 1395 canvasScrollTop: $canvas.scrollTop(), 1396 canvasScrollHeight: $canvas[0].scrollHeight, 1397 1398 footerTop: $footer.position().top, 1399 footerHeight: $footer.outerHeight(true), 1400 1401 btnHeight: $btn.outerHeight(true) 1402 }; 1403 } 1404 1405 var lastScrollTop = 0; 1406 1407 function sticky() { 1408 var controller = window['slidebars-controller']; 1409 var props = getProps(); 1410 var scrollDir = props.canvasScrollTop > lastScrollTop ? 'down' : props.canvasScrollTop < lastScrollTop ? 'up' : ''; 1411 1412 var topA = (props.canvasScrollTop + props.footerTop + props.footerHeight) - props.btnHeight; 1413 var topB = (props.canvasScrollTop + props.canvasHeight) - props.btnHeight; 1414 1415 if (topA < topB || (controller && controller.isActiveSlidebar('contact-form'))) { 1416 $btn.removeClass('transition-enabled'); 1417 } else { 1418 if (scrollDir == 'down') { 1419 $btn.removeClass('transition-enabled'); 1420 } else if (scrollDir == 'up') { 1421 $btn.addClass('transition-enabled'); 1422 } 1423 } 1424 1425 $btn.css({ 1426 top: Math.min(topA, topB), 1427 bottom: 'auto' 1428 }); 1429 1430 lastScrollTop = props.canvasScrollTop; 1431 } 1432 1433 $canvas.on('scroll', sticky); 1434 $(window).on('load resize orientationchange', sticky); 1435 }); 1436 </script> 1437 @SnippetEnd("Footer") 1438 @SnippetStart("GoogleAnalytics") 1439 @{ 1440 var googleAnalytics_Code = GetString("Item.Area.Google_Analytics_Code"); 1441 } 1442 @if (!string.IsNullOrWhiteSpace(googleAnalytics_Code)) { 1443 <script type="text/javascript"> 1444 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 1445 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 1446 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 1447 })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); 1448 ga('create', '@(googleAnalytics_Code)', 'auto'); 1449 ga('send', 'pageview'); 1450 </script> 1451 1452 <script type="text/javascript"> 1453 if (window.skabertrang_ga_ecommerce_callbacks && window.skabertrang_ga_ecommerce_callbacks.length) { 1454 for (var i = 0; i < window.skabertrang_ga_ecommerce_callbacks.length; i++) { 1455 window.skabertrang_ga_ecommerce_callbacks[i](); 1456 } 1457 } 1458 </script> 1459 } 1460 @SnippetEnd("GoogleAnalytics") 1461 @SnippetStart("Icons") 1462 @{ 1463 /* 1464 * http://www.favicon-generator.org 1465 */ 1466 1467 var icons_DesktopIconsFolder = GetString("Item.Area.Icons_Desktopicons_Folder"); 1468 var icons_FacebookShareIcon = GetString("Item.Area.Icons_FacebookShareIcon"); 1469 1470 if (!string.IsNullOrWhiteSpace(icons_DesktopIconsFolder) && icons_DesktopIconsFolder.EndsWith("/")) { 1471 icons_DesktopIconsFolder = icons_DesktopIconsFolder.Remove(icons_DesktopIconsFolder.Length - 1); 1472 } 1473 1474 if (icons_DesktopIconsFolder.ToUpper() == "/FILES") { 1475 icons_DesktopIconsFolder = null; 1476 } 1477 } 1478 @if (!string.IsNullOrWhiteSpace(icons_DesktopIconsFolder)) { 1479 <link rel="shortcut icon" href="@(icons_DesktopIconsFolder)/favicon.ico"> 1480 1481 <link rel="apple-touch-icon" sizes="57x57" href="@(icons_DesktopIconsFolder)/apple-icon-57x57.png"> 1482 <link rel="apple-touch-icon" sizes="60x60" href="@(icons_DesktopIconsFolder)/apple-icon-60x60.png"> 1483 <link rel="apple-touch-icon" sizes="72x72" href="@(icons_DesktopIconsFolder)/apple-icon-72x72.png"> 1484 <link rel="apple-touch-icon" sizes="76x76" href="@(icons_DesktopIconsFolder)/apple-icon-76x76.png"> 1485 <link rel="apple-touch-icon" sizes="114x114" href="@(icons_DesktopIconsFolder)/apple-icon-114x114.png"> 1486 <link rel="apple-touch-icon" sizes="120x120" href="@(icons_DesktopIconsFolder)/apple-icon-120x120.png"> 1487 <link rel="apple-touch-icon" sizes="144x144" href="@(icons_DesktopIconsFolder)/apple-icon-144x144.png"> 1488 <link rel="apple-touch-icon" sizes="152x152" href="@(icons_DesktopIconsFolder)/apple-icon-152x152.png"> 1489 <link rel="apple-touch-icon" sizes="180x180" href="@(icons_DesktopIconsFolder)/apple-icon-180x180.png"> 1490 1491 <link rel="icon" type="image/png" sizes="192x192" href="@(icons_DesktopIconsFolder)/android-icon-192x192.png"> 1492 <link rel="icon" type="image/png" sizes="32x32" href="@(icons_DesktopIconsFolder)/favicon-32x32.png"> 1493 <link rel="icon" type="image/png" sizes="96x96" href="@(icons_DesktopIconsFolder)/favicon-96x96.png"> 1494 <link rel="icon" type="image/png" sizes="16x16" href="@(icons_DesktopIconsFolder)/favicon-16x16.png"> 1495 1496 <link rel="manifest" href="@(icons_DesktopIconsFolder)/manifest.json"> 1497 1498 <meta name="msapplication-TileColor" content="#da022a"> 1499 <meta name="msapplication-TileImage" content="@(icons_DesktopIconsFolder)/ms-icon-144x144.png"> 1500 <meta name="msapplication-config" content="@(icons_DesktopIconsFolder)/browserconfig.xml"> 1501 <meta name="theme-color" content="#da022a"> 1502 } 1503 @if (!string.IsNullOrWhiteSpace(icons_FacebookShareIcon)) { 1504 <link rel="image_src" href="@(icons_FacebookShareIcon)"> 1505 } 1506 @SnippetEnd("Icons") 1507 @SnippetStart("NavBarStage") 1508 @{ 1509 var navBarStage_FirstPageID = GetInteger("DwAreaFirstPageID"); 1510 var navBarStage_DesignBaseUrl = GetString("Template:DesignBaseUrl"); 1511 var navBarStage_AssetsBaseUrl = navBarStage_DesignBaseUrl + "assets/"; 1512 1513 var navBarStage_EcomMenuType = GetString("Item.Area.Ecommerce_Menu_Type"); 1514 var navBarStage_EcomProductPage = GetString("Item.Area.Ecommerce_Product_Page"); 1515 } 1516 @helper NavBarStage_RenderItemMenu(Dictionary<string, object> page, bool dropdown, string extraClassName) { 1517 var id = (int)page["Id"]; 1518 var active = (bool)page["Active"]; 1519 var inpath = (bool)page["InPath"]; 1520 var level = (int)page["Level"]; 1521 var type = (string)page["Type"]; 1522 var menutext = (string)page["Menutext"]; 1523 var itemtype = (string)page["ItemType"]; 1524 var isfolder = (bool)page["IsFolder"]; 1525 var enabled = (bool)page["Enabled"]; 1526 var pages = (List<Dictionary<string, object>>)page["Pages"]; 1527 1528 if (!(type == "page" || type == "group")) { 1529 return; 1530 } 1531 1532 if (!enabled) { 1533 return; 1534 } 1535 1536 if (isfolder) { 1537 return; 1538 } 1539 1540 var className = string.Empty; 1541 className += active ? " active" : string.Empty; 1542 className += inpath ? " inpath" : string.Empty; 1543 className += !string.IsNullOrWhiteSpace(extraClassName) ? " " + extraClassName : string.Empty; 1544 1545 var url = "/Default.aspx?Id=" + id; 1546 url += (type == "group") ? "&amp;GroupId=" + (string)page["GroupId"] : string.Empty; 1547 1548 var ariaExpanded = inpath ? "true" : "false"; 1549 var inClass = inpath ? "in" : string.Empty; 1550 1551 <li class="@(className.Trim())" data-active="@(active ? 1 : 0)" data-inpath="@(inpath ? 1 : 0)" data-level="@(level)" data-type="@(type)" data-pageid="@(id)" data-pages="@(pages != null ? pages.Count : 0)"> 1552 @if (pages != null && dropdown) { 1553 <a href="@(url)">@(menutext)</a> 1554 <a href="#ssm-@(id)" data-toggle="collapse" role="button" aria-expanded="@(ariaExpanded)" aria-controls="ssm-@(id)"><i class="fa fa-caret-right" aria-hidden="true"></i></a> 1555 1556 <ul class="nav nav-bordered nav-stacked collapse @(inClass)" id="ssm-@(id)"> 1557 @foreach (var subpage in pages) { 1558 @NavBarStage_RenderItemMenu(subpage, false, null) 1559 } 1560 </ul> 1561 } else { 1562 <a href="@(url)">@(menutext)</a> 1563 } 1564 </li> 1565 } 1566 <ul class="nav nav-bordered nav-stacked"> 1567 @if (navBarStage_EcomMenuType == "Ecommerce" && !string.IsNullOrWhiteSpace(navBarStage_EcomProductPage)) { 1568 foreach (var page in (List<Dictionary<string, object>>)topPageviewPages.First(o => (int)o["Id"] == int.Parse(navBarStage_EcomProductPage))["Pages"]) { 1569 @NavBarStage_RenderItemMenu(page, false, null) 1570 } 1571 } else { 1572 foreach (var page in topPageviewPages) { 1573 @NavBarStage_RenderItemMenu(page, true, null) 1574 } 1575 } 1576 </ul> 1577 @SnippetEnd("NavBarStage") 1578 @SnippetStart("OpenGraph") 1579 @{ 1580 var openGraph_Domain = "http://" + Request.Url.Host; 1581 var openGraph_Url = GetString("Item.Page.OgUrl"); 1582 var openGraph_Title = GetString("Item.Page.OgTitle"); 1583 var openGraph_Type = GetString("Item.Page.OgType"); 1584 var openGraph_Description = GetString("Item.Page.OgDescription"); 1585 var openGraph_Image = GetString("Item.Page.OgImage"); 1586 } 1587 @if (!string.IsNullOrWhiteSpace(openGraph_Url)) { 1588 <meta property="og:url" content="@(openGraph_Domain)/Default.aspx?ID=@(openGraph_Url)"> 1589 } 1590 @if (!string.IsNullOrWhiteSpace(openGraph_Title)) { 1591 <meta property="og:title" content="@(openGraph_Title)"> 1592 } 1593 @if (!string.IsNullOrWhiteSpace(openGraph_Type)) { 1594 <meta property="og:type" content="@(openGraph_Type)"> 1595 } 1596 @if (!string.IsNullOrWhiteSpace(openGraph_Description)) { 1597 <meta property="og:description" content="@(openGraph_Description)"> 1598 } 1599 @if (!string.IsNullOrWhiteSpace(openGraph_Image)) { 1600 <meta property="og:image" content="@(openGraph_Domain)@(openGraph_Image)"> 1601 } 1602 @SnippetEnd("OpenGraph") 1603 @SnippetStart("SNS") 1604 <div class="sns-block"> 1605 <span>@Translate("Del siden"):</span> 1606 <div class="addthis_toolbox addthis_default_style"> 1607 <a class="addthis_button_preferred_1"></a> 1608 <a class="addthis_button_preferred_2"></a> 1609 <a class="addthis_button_preferred_3"></a> 1610 <a class="addthis_button_preferred_4"></a> 1611 <a class="addthis_button_compact"></a> 1612 <a class="addthis_counter addthis_bubble_style"></a> 1613 </div> 1614 </div> 1615 <script type="text/javascript"> 1616 var addthis_config = { data_track_addressbar: false }; 1617 </script> 1618 <script src="https://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-51c009407d4aa776"></script> 1619 @SnippetEnd("SNS") 1620 @SnippetStart("Top") 1621 @{ 1622 var top_FirstPageID = GetInteger("DwAreaFirstPageID"); 1623 var top_DesignBaseUrl = GetString("Template:DesignBaseUrl"); 1624 var top_AssetsBaseUrl = top_DesignBaseUrl + "assets/"; 1625 string companyLogo = GetString("Item.Area.Company_logo"); 1626 1627 var top_EcomMenuType = GetString("Item.Area.Ecommerce_Menu_Type"); 1628 var top_EcomProductPage = GetString("Item.Area.Ecommerce_Product_Page"); 1629 var top_FolderTopBarNav = GetString("Item.Area.Folder_TopBarNav"); 1630 1631 var top_Websites = Pageview.AreaCollection 1632 .Cast<DictionaryEntry>() 1633 .Select(o => { 1634 var area = (Dynamicweb.Frontend.Area)o.Value; 1635 1636 return new { 1637 Id = area.ID, 1638 PageId = area.Values.ContainsKey("areafirstpage") ? (int)area.Values["areafirstpage"] : 0, 1639 Culture = area.Values.ContainsKey("areaculture") ? (string)area.Values["areaculture"] : string.Empty, 1640 Sort = area.Values.ContainsKey("areasort") ? (int)area.Values["areasort"] : 0 1641 }; 1642 }) 1643 .OrderBy(o => o.Sort) 1644 .ToList(); 1645 } 1646 @helper Top_TopBarNav_RenderItemMenu(Dictionary<string, object> page) { 1647 var id = (int)page["Id"]; 1648 var active = (bool)page["Active"]; 1649 var inpath = (bool)page["InPath"]; 1650 var level = (int)page["Level"]; 1651 var type = (string)page["Type"]; 1652 var menutext = (string)page["Menutext"]; 1653 var itemtype = (string)page["ItemType"]; 1654 var isfolder = (bool)page["IsFolder"]; 1655 var enabled = (bool)page["Enabled"]; 1656 1657 if (!enabled) { 1658 return; 1659 } 1660 1661 if (isfolder) { 1662 return; 1663 } 1664 1665 var className = string.Empty; 1666 className += active ? " active" : string.Empty; 1667 className += inpath ? " inpath" : string.Empty; 1668 1669 if (id == 385) { 1670 className += "red-btn"; 1671 } 1672 1673 <li class="@(className.Trim())" data-active="@(active ? 1 : 0)" data-inpath="@(inpath ? 1 : 0)"> 1674 <a href="/Default.aspx?ID=@(id)">@(menutext)</a> 1675 </li> 1676 } 1677 @helper Top_NavBar_RenderItemMenu(Dictionary<string, object> page, bool dropdown, string extraClassName) { 1678 var id = (int)page["Id"]; 1679 var active = (bool)page["Active"]; 1680 var inpath = (bool)page["InPath"]; 1681 var level = (int)page["Level"]; 1682 var type = (string)page["Type"]; 1683 var menutext = (string)page["Menutext"]; 1684 var itemtype = (string)page["ItemType"]; 1685 var isfolder = (bool)page["IsFolder"]; 1686 var enabled = (bool)page["Enabled"]; 1687 var pages = (List<Dictionary<string, object>>)page["Pages"]; 1688 1689 if (!(type == "page" || type == "group")) { 1690 return; 1691 } 1692 1693 if (!enabled) { 1694 return; 1695 } 1696 1697 if (isfolder) { 1698 return; 1699 } 1700 1701 var className = string.Empty; 1702 className += active ? " active" : string.Empty; 1703 className += inpath ? " inpath" : string.Empty; 1704 className += pages != null && dropdown ? " dropdown" : string.Empty; 1705 className += !string.IsNullOrWhiteSpace(extraClassName) ? " " + extraClassName : string.Empty; 1706 1707 var url = "/Default.aspx?Id=" + id; 1708 url += (type == "group") ? "&amp;GroupId=" + (string)page["GroupId"] : string.Empty; 1709 1710 <li class="@(className.Trim())" data-active="@(active ? 1 : 0)" data-inpath="@(inpath ? 1 : 0)" data-level="@(level)" data-type="@(type)" data-pageid="@(id)" data-pages="@(pages != null ? pages.Count : 0)"> 1711 @if (pages != null && dropdown) { 1712 <a href="@(url)" class="dropdown-toggle" data-toggle="" role="button" aria-haspopup="true" aria-expanded="false">@(menutext)</a> 1713 <ul class="dropdown-menu"> 1714 @foreach (var subpage in pages) { 1715 @Top_NavBar_RenderItemMenu(subpage, false, null) 1716 } 1717 </ul> 1718 } else { 1719 <a href="@(url)">@(menutext)</a> 1720 } 1721 </li> 1722 } 1723 <div class="top" canvas=""> 1724 <div class="container"> 1725 <div class="topbarnav-menu"> 1726 <ul> 1727 @if (!string.IsNullOrWhiteSpace(top_FolderTopBarNav)) { 1728 foreach (var page in topPageviewPages) { 1729 var pages = (List<Dictionary<string, object>>)page["Pages"]; 1730 1731 if (top_FolderTopBarNav != ((int)page["Id"]).ToString() || pages == null) { 1732 continue; 1733 } 1734 1735 foreach (var subpage in pages) { 1736 @Top_TopBarNav_RenderItemMenu(subpage) 1737 } 1738 } 1739 } 1740 @{ 1741 int searchpageid = 11; 1742 if (Pageview.Area.ID == 2) { 1743 searchpageid = 97; 1744 } 1745 else if (Pageview.Area.ID == 3) { 1746 searchpageid = 341; 1747 } 1748 } 1749 <li class="topbarnav-search"> 1750 <a href="javascript:void(toggleSearch())"><i class="fa fa-search" aria-hidden="true"></i></a> 1751 <div class="topbarnav-search-block"> 1752 <form method="get" action="/Default.aspx" role="search"> 1753 <input type="hidden" name="ID" value="@searchpageid"> 1754 <div class="input-group input-group-sm"> 1755 <input type="text" class="form-control" name="q" placeholder='@(Translate("Search"))'> 1756 <span class="input-group-btn"> 1757 <button type="submit" class="btn btn-monza"><i class="fa fa-search"></i></button> 1758 </span> 1759 </div> 1760 </form> 1761 </div> 1762 </li> 1763 1764 @if (Pageview.AreaID == 1 || Pageview.AreaID == 3) { 1765 <li class="topbarnav-language"> 1766 @foreach (var item in top_Websites) { 1767 if (item.Id == 2 || item.Id == 4 || item.Id == 5) { 1768 continue; 1769 } 1770 if (Pageview.Area.ID == item.Id) { 1771 var flag = item.Culture.Substring(3, 2); 1772 1773 <a href="javascript:void(toggleLanguage())" style="background-image: url(/Admin/Images/Flags/Small/flag_@(flag).png);"><i class="fa fa-angle-down" aria-hidden="true"></i></a> 1774 } 1775 } 1776 </li> 1777 } 1778 </ul> 1779 1780 </div> 1781 </div> 1782 1783 <div class="navbar-wrapper"> 1784 <div class="navbar navbar-transparent" role="navigation"> 1785 <div class="container"> 1786 <div class="navbar-header"> 1787 <button type="button" class="navbar-toggle collapsed" data-toggle="sliderbar" data-target="navbar-stage" aria-expanded="false"> 1788 <span class="sr-only">Toggle navigation</span> 1789 <i class="fa fa-bars" aria-hidden="true"></i> Menu 1790 </button> 1791 1792 <a href="/Default.aspx?Id=@(top_FirstPageID)" class="navbar-brand"> 1793 @if (!string.IsNullOrWhiteSpace(companyLogo)) { 1794 <img src="@companyLogo" alt="" class="img-responsive"> 1795 } else { 1796 <img src="@(top_DesignBaseUrl)img/logo.png" alt="" class="img-responsive"> 1797 } 1798 </a> 1799 </div> 1800 1801 <div class="navbar-collapse collapse"> 1802 <ul class="nav navbar-nav navbar-right"> 1803 @if (top_EcomMenuType == "Ecommerce" && !string.IsNullOrWhiteSpace(top_EcomProductPage)) { 1804 foreach (var page in (List<Dictionary<string, object>>)topPageviewPages.First(o => (int)o["Id"] == int.Parse(top_EcomProductPage))["Pages"]) { 1805 @Top_NavBar_RenderItemMenu(page, false, null) 1806 } 1807 } else { 1808 foreach (var page in topPageviewPages) { 1809 @Top_NavBar_RenderItemMenu(page, true, null) 1810 } 1811 } 1812 </ul> 1813 </div> 1814 </div> 1815 </div> 1816 </div> 1817 </div> 1818 1819 <div id="modalLanguages" class="modal fade" tabindex="-1" role="dialog"> 1820 <div class="modal-dialog modal-sm" role="document"> 1821 <div class="modal-content"> 1822 <div class="modal-header"> 1823 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> 1824 <h4 class="modal-title">Choose language</h4> 1825 </div> 1826 <div class="modal-body text-center"> 1827 @foreach (var item in top_Websites) 1828 { 1829 if (item.Id == 2 || item.Id == 4 || item.Id == 5) 1830 { 1831 continue; 1832 } 1833 var flag = item.Culture.Substring(3, 2); 1834 1835 if (!string.IsNullOrWhiteSpace(flag) && flag == "GB") 1836 { 1837 //Remove this and the if/else when SSL is installed and force ssl is set 1838 //and render the <a> tag from the else 1839 <a href="http://www.bccertification.com//Default.aspx?Id=@(item.PageId)" data-active="@(Pageview.Area.ID == item.Id ? 1 : 0)"><img src="/Admin/Images/Flags/flag_@(flag).png" alt=""></a> 1840 } 1841 else 1842 { 1843 <a href="/Default.aspx?Id=@(item.PageId)" data-active="@(Pageview.Area.ID == item.Id ? 1 : 0)"><img src="/Admin/Images/Flags/flag_@(flag).png" alt=""></a> 1844 } 1845 1846 } 1847 </a></div> 1848 </div> 1849 </div> 1850 </div> 1851 1852 <script type="text/javascript"> 1853 function toggleSearch() { 1854 var $target = $('.topbarnav-search'); 1855 1856 if ($target.data('toggle')) { 1857 $target.data('toggle', false); 1858 $target.removeClass('topbarnav-search-toggle'); 1859 } else { 1860 $target.data('toggle', true); 1861 $target.addClass('topbarnav-search-toggle'); 1862 1863 $('input[name="q"]', $target).focus(); 1864 } 1865 } 1866 1867 function toggleLanguage() { 1868 var $modal = $('#modalLanguages'); 1869 $modal.modal({ keyboard: false, backdrop: 'static' }); 1870 } 1871 1872 (function ($) { 1873 $(document).on('click', '[data-toggle="sliderbar"]', function () { 1874 var target = $(this).data('target'); 1875 var controller = window['slidebars-controller']; 1876 1877 controller && controller.toggle(target); 1878 }); 1879 })(jQuery); 1880 </script> 1881 @SnippetEnd("Top") 1882 @SnippetStart("TopJs") 1883 <!--[if lt IE 9]> 1884 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> 1885 <![endif]--> 1886 <!--[if gte IE 9]><!--> 1887 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script> 1888 <!--<![endif]--> 1889 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.17.0/jquery.validate.js"></script> 1890 @SnippetEnd("TopJs")</dynamic>