Skip to content

Commit

Permalink
Updated jquery-ajax-loader.js and default templates
Browse files Browse the repository at this point in the history
  • Loading branch information
mac committed Apr 18, 2019
1 parent a50ea5f commit 6158256
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 12 deletions.
Binary file modified WebApplication/App_Data/DB/FlexDotnetCMS.mdf
Binary file not shown.
Binary file modified WebApplication/App_Data/DB/FlexDotnetCMS_log.ldf
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!-- Header -->
{IncludeFile:'/Frontend/layouts/includes/header-home.cshtml'}


{Field:MainContent}

<Site:LoggedInHeader runat="server" />
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
{IncludeFile:'/Frontend/layouts/includes/header-interior.cshtml'}

{Field:MainContent}

<Site:LoggedInHeader runat="server" />
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
<body>
{Settings:GlobalCodeInBody}

<Site:LoggedInHeader runat="server" />

<div id="DynamicContent">
<!-- PageContent -->
{PageContent}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

<body>
{Settings:GlobalCodeInBody}
<Site:LoggedInHeader runat="server" />

<div id="DynamicContent">
<!-- PageContent -->
Expand Down
17 changes: 9 additions & 8 deletions WebApplication/Frontend/scripts/jquery-ajax-loader.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
var ajaxOptions = {
homePagePath: "/home/",
targetElement: "#DynamicContent",
preloadLinks: false,
animateIn: function (selector, html) {
animateIn: function (selector, html) {
$(selector).each(function (index, el) {
//$(el).html(html);

$(el).toggle("fade", 250, function () {
$(el).toggle("fade", 250, function () {
$(el).html(html);
//$(el).css("height", "100%");
// $("#mainNav").effect("fade");
Expand Down Expand Up @@ -44,6 +43,8 @@ function preloadLinks() {

$(document).ready(function () {

trackPageView();

if (ajaxOptions.preloadLinks) {
preloadLinks();
}
Expand Down Expand Up @@ -126,11 +127,11 @@ function pushHistory(href, bodyHtml) {

function _loadData(href, el, bodyHtml, callBackFunction) {

if ($("#DynamicContent").length > 0 && bodyHtml.indexOf("DynamicContent") != -1) {
var doc = $('<output>').append($.parseHTML(bodyHtml, document, true));
var dynamicContent = doc.find("#DynamicContent").html();
var dynamicContent = bodyHtml;

bodyHtml = dynamicContent;
if ($("#DynamicContent").length > 0 && bodyHtml.indexOf("DynamicContent") != -1) {
var doc = $('<output>').append($.parseHTML(bodyHtml, document, true));
dynamicContent = doc.find("#DynamicContent").html();
}


Expand All @@ -141,7 +142,7 @@ function _loadData(href, el, bodyHtml, callBackFunction) {
updateTitle(href, bodyHtml);
pushHistory(href, bodyHtml);

loadeData($(el), bodyHtml);
loadeData($(el), dynamicContent);
}

if (el != "") {
Expand Down

0 comments on commit 6158256

Please sign in to comment.