Skip to content
This repository has been archived by the owner on Dec 6, 2019. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feature/gulp
Browse files Browse the repository at this point in the history
Conflicts:
	src/Foundation/Theming/code/styles/dayfrost.css
	src/Foundation/Theming/code/styles/dayfrost.min.css
	src/Foundation/Theming/code/styles/niteflight.css
	src/Foundation/Theming/code/styles/niteflight.min.css
	src/Foundation/Theming/code/styles/white-wonder.min.css
  • Loading branch information
stasmaxymov committed Mar 15, 2016
2 parents 418ca3b + a26baf1 commit 5ff0104
Show file tree
Hide file tree
Showing 125 changed files with 2,688 additions and 1,336 deletions.
1 change: 1 addition & 0 deletions Habitat.sln.DotSettings
Expand Up @@ -365,6 +365,7 @@
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=265E44EAE15B1D48A22D22CE017C8499/Shortcut/@EntryValue">theory</s:String>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=265E44EAE15B1D48A22D22CE017C8499/ShortenQualifiedReferences/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=265E44EAE15B1D48A22D22CE017C8499/Text/@EntryValue">[Theory]&#xD;
[AutoDbData]&#xD;
public void $UnitOfWork$_$StateUnderTest$_$ExpectedBehavior$($Arguments$)&#xD;
{&#xD;
//Arrange&#xD;
Expand Down
4 changes: 2 additions & 2 deletions gulpfile.js
Expand Up @@ -195,9 +195,9 @@ gulp.task("Publish-All-Configs", function () {
*****************************/
gulp.task("Auto-Publish-Css", function () {
var root = "./src";
var roots = [root + "/**/stylesheets", "!" + root + "/**/obj/**/stylesheets"];
var roots = [root + "/**/styles", "!" + root + "/**/obj/**/styles"];
var files = "/**/*.css";
var destination = config.websiteRoot + "\\stylesheets";
var destination = config.websiteRoot + "\\styles";
gulp.src(roots, { base: root }).pipe(
foreach(function (stream, rootFolder) {
gulp.watch(rootFolder.path + files, function (event) {
Expand Down
14 changes: 12 additions & 2 deletions src/Feature/Accounts/code/Services/AccountTrackerService.cs
@@ -1,11 +1,13 @@
namespace Sitecore.Feature.Accounts.Services
{
using System;
using Sitecore.Analytics;
using Sitecore.Analytics.Data.Items;
using Sitecore.Analytics.Outcome.Extensions;
using Sitecore.Analytics.Outcome.Model;
using Sitecore.Data;
using Sitecore.Diagnostics;
using Sitecore.Exceptions;

public class AccountTrackerService : IAccountTrackerService
{
Expand All @@ -30,9 +32,17 @@ public virtual void TrackRegistration()

public void IdentifyContact(string identifier)
{
if (Tracker.Current != null && Tracker.Current.IsActive)
try
{
if (Tracker.Current != null && Tracker.Current.IsActive)
{
Tracker.Current.Session.Identify(identifier);
}
}
catch (ItemNotFoundException ex)
{
Tracker.Current.Session.Identify(identifier);
//Error can happen if previous user profile has been deleted
Log.Error($"Could not identify the user '{identifier}'", ex, this);
}
}

Expand Down
12 changes: 3 additions & 9 deletions src/Feature/Demo/code/Controllers/DemoController.cs
Expand Up @@ -27,18 +27,12 @@ public DemoController(IContactProfileProvider contactProfileProvider, IProfilePr
this.profileProvider = profileProvider;
}

public ActionResult VisitDetails()

public ActionResult ExperienceData()
{
if (Tracker.Current == null || Tracker.Current.Interaction == null)
return null;
return View("VisitDetails", new VisitInformation(profileProvider));
}

public ActionResult ContactDetails()
{
if (Tracker.Current == null || Tracker.Current.Contact == null)
return null;
return View("ContactDetails", new ContactInformation(contactProfileProvider));
return View(new ExperienceData(contactProfileProvider, profileProvider));
}

public ActionResult DemoContent()
Expand Down
26 changes: 0 additions & 26 deletions src/Feature/Demo/code/Models/BehaviorProfile.cs

This file was deleted.

12 changes: 12 additions & 0 deletions src/Feature/Demo/code/Models/Campaign.cs
@@ -0,0 +1,12 @@
namespace Sitecore.Feature.Demo.Models
{
using System;

public class Campaign
{
public DateTime? Date { get; set; }
public bool IsActive { get; set; }
public string Title { get; set; }
public string Channel { get; set; }
}
}
41 changes: 0 additions & 41 deletions src/Feature/Demo/code/Models/ContactInformation.cs

This file was deleted.

3 changes: 2 additions & 1 deletion src/Feature/Demo/code/Models/DemoContent.cs
Expand Up @@ -5,6 +5,7 @@ namespace Sitecore.Feature.Demo.Models
using Sitecore.Data.Items;
using Sitecore.Foundation.SitecoreExtensions.Extensions;
using Sitecore.Text;
using static Sitecore.Configuration.Factory;

public class DemoContent
{
Expand All @@ -26,7 +27,7 @@ public string HtmlContent

private string ReplaceTokens(string content)
{
var replacer = Factory.GetMasterVariablesReplacer();
var replacer = GetMasterVariablesReplacer();
using (new ReplacerContextSwitcher(GetReplacementTokens()))
return replacer.Replace(content, Item);
}
Expand Down
8 changes: 8 additions & 0 deletions src/Feature/Demo/code/Models/Device.cs
@@ -0,0 +1,8 @@
namespace Sitecore.Feature.Demo.Models
{
public class Device
{
public string Title { get; set; }
public string Browser { get; set; }
}
}
11 changes: 11 additions & 0 deletions src/Feature/Demo/code/Models/EngagementPlanState.cs
@@ -0,0 +1,11 @@
namespace Sitecore.Feature.Demo.Models
{
using System;

public class EngagementPlanState
{
public string EngagementPlanTitle { get; set; }
public DateTime Date { get; set; }
public string Title { get; set; }
}
}
9 changes: 0 additions & 9 deletions src/Feature/Demo/code/Models/EngagementState.cs

This file was deleted.

29 changes: 29 additions & 0 deletions src/Feature/Demo/code/Models/ExperienceData.cs
@@ -0,0 +1,29 @@
namespace Sitecore.Feature.Demo.Models
{
using System.Web.Mvc;
using Services;
using Foundation.SitecoreExtensions.Services;
using Sitecore.Feature.Demo.Models.Repository;

public class ExperienceData
{
private IContactProfileProvider contactProfileProvider;
private IProfileProvider profileProvider;

public ExperienceData(IContactProfileProvider contactProfileProvider, IProfileProvider profileProvider)
{
this.contactProfileProvider = contactProfileProvider;
this.profileProvider = profileProvider;

Visits = new VisitsRepository(contactProfileProvider).Get();
PersonalInfo = new PersonalInfoRepository(contactProfileProvider).Get();
OnsiteBehavior = new OnsiteBehaviorRepository(profileProvider).Get();
Referral = new ReferralRepository().Get();
}

public Visits Visits { get; set; }
public PersonalInfo PersonalInfo { get; set; }
public OnsiteBehavior OnsiteBehavior { get; set; }
public Referral Referral { get; set; }
}
}
24 changes: 0 additions & 24 deletions src/Feature/Demo/code/Models/ExperienceProfile.cs

This file was deleted.

12 changes: 12 additions & 0 deletions src/Feature/Demo/code/Models/Goal.cs
@@ -0,0 +1,12 @@
namespace Sitecore.Feature.Demo.Models
{
using System;

public class Goal
{
public string Title { get; set; }
public int EngagementValue { get; set; }
public DateTime Date { get; set; }
public bool IsCurrentVisit { get; set; }
}
}
20 changes: 0 additions & 20 deletions src/Feature/Demo/code/Models/KeyBehaviorCacheEntryModel.cs

This file was deleted.

8 changes: 8 additions & 0 deletions src/Feature/Demo/code/Models/Location.cs
@@ -0,0 +1,8 @@
namespace Sitecore.Feature.Demo.Models
{
public class Location
{
public string Country { get; set; }
public string City { get; set; }
}
}
13 changes: 13 additions & 0 deletions src/Feature/Demo/code/Models/OnsiteBehaviour.cs
@@ -0,0 +1,13 @@
namespace Sitecore.Feature.Demo.Models
{
using System.Collections;
using System.Collections.Generic;

public class OnsiteBehavior
{
public IEnumerable<Profile> ActiveProfiles { get; set; }
public IEnumerable<Profile> HistoricProfiles { get; set; }
public IEnumerable<Goal> Goals { get; set; }
public IEnumerable<Outcome> Outcomes { get; set; }
}
}
12 changes: 12 additions & 0 deletions src/Feature/Demo/code/Models/Outcome.cs
@@ -0,0 +1,12 @@
namespace Sitecore.Feature.Demo.Models
{
using System;

public class Outcome
{
public string OutcomeGroup { get; set; }
public string Title { get; set; }
public DateTime Date { get; set; }
public bool IsCurrentVisit { get; set; }
}
}
18 changes: 0 additions & 18 deletions src/Feature/Demo/code/Models/PageLink.cs

This file was deleted.

13 changes: 13 additions & 0 deletions src/Feature/Demo/code/Models/PageView.cs
@@ -0,0 +1,13 @@
namespace Sitecore.Feature.Demo.Models
{
using System;

public class PageView
{
public string Path { get; set; }
public TimeSpan Duration { get; set; }
public bool HasEngagementValue { get; set; }
public bool HasMvTest { get; set; }
public bool HasPersonalisation { get; set; }
}
}
15 changes: 15 additions & 0 deletions src/Feature/Demo/code/Models/PersonalInfo.cs
@@ -0,0 +1,15 @@
namespace Sitecore.Feature.Demo.Models
{
using System.Collections;
using System.Collections.Generic;

public class PersonalInfo
{
public string FullName { get; set; }
public bool IsIdentified { get; set; }
public IEnumerable<KeyValuePair<string, string>> Properties { get; set; }
public string PhotoUrl { get; set; }
public Location Location { get; set; }
public Device Device { get; set; }
}
}

0 comments on commit 5ff0104

Please sign in to comment.