Skip to content

Instantly share code, notes, and snippets.

// Decompiled with JetBrains decompiler
// Type: Sitecore.ExperienceEditor.Speak.Ribbon.Requests.PreviewDate.GetPreviewDateUrlRequest
// Assembly: Sitecore.ExperienceEditor.Speak.Ribbon, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
using Sitecore;
using Sitecore.ExperienceEditor.Speak.Server.Contexts;
using Sitecore.ExperienceEditor.Speak.Server.Requests;
using Sitecore.ExperienceEditor.Speak.Server.Responses;
using Sitecore.Text;
using Sitecore.Web;
// Decompiled with JetBrains decompiler
// Type: Sitecore.Web.WebEditUtil
// Assembly: Sitecore.Kernel, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null
//
// NOTE: This is not the complete implementation, only fractions of the important parts related to the date and time.
//
namespace Sitecore.Web
{
public static class WebEditUtil
// Decompiled with JetBrains decompiler
// Type: Sitecore.ExperienceEditor.Speak.Ribbon.Panels.PreviewDatePanel.DateAndTime
// Assembly: Sitecore.ExperienceEditor.Speak.Ribbon, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
//
// NOTE: This is not the complete implementation, only fractions of the important parts related to the date and time.
//
namespace Sitecore.ExperienceEditor.Speak.Ribbon.Panels.PreviewDatePanel
{
public class DateAndTime : RibbonComponentControlBase
// Decompiled with JetBrains decompiler
// Type: Sitecore.ExperienceEditor.Speak.Ribbon.Requests.PreviewDate.SetDateValueRequest
// Assembly: Sitecore.ExperienceEditor.Speak.Ribbon, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
namespace Sitecore.ExperienceEditor.Speak.Ribbon.Requests.PreviewDate
{
public class SetDateValueRequest : PipelineProcessorRequest<ValueItemContext>
{
public override PipelineProcessorResponseValue ProcessRequest()
{
define(["sitecore"], function (Sitecore) {
Sitecore.Commands.SetDateAndTime =
{
// code omitted...
execute: function (context) {
// When the dialog is being opened a request to the 'ExperienceEditor.PreviewDate.GetPreviewDateUrl' processor
// is made. In essence, this gets the currently set preview date which is used from within the dialog.
Sitecore.ExperienceEditor.PipelinesUtil.generateRequestProcessor("ExperienceEditor.PreviewDate.GetPreviewDateUrl", function (response) {
Sitecore.ExperienceEditor.Dialogs.showModalDialog(response.responseValue.value, '', '', null, function (result) {
// Decompiled with JetBrains decompiler
// Type: Sitecore.Web.WebEditUtil
// Assembly: Sitecore.Kernel, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null
//
// NOTE: This is not the complete implementation, only fractions of the important parts related to the date and time.
//
namespace Sitecore.Web
{
public static class WebEditUtil
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<settings>
<setting name="ContentSearch.Solr.ServiceBaseAddress" value="http://urlToSolr:8983/solr" patch:instead="/configuration/sitecore/settings/setting[@name='ContentSearch.Solr.ServiceBaseAddress']"/>
<setting name="ContentSearch.Solr.EnableHttpCache" value="false" patch:instead="/configuration/sitecore/settings/setting[@name='ContentSearch.Solr.EnableHttpCache']"/>
</settings>
</sitecore>
</configuration>
<%@Application Language='C#' Inherits="Sitecore.ContentSearch.SolrProvider.CastleWindsorIntegration.WindsorApplication" %>
{
"docs": [{
"_indexname": "sitecore_master_index",
"__smallcreateddate": "2015-10-21T07:28:00Z",
"_content": "Roads? Where we're going, we don't need roads."
}]
}
namespace Sitecore.ContentSearch.SearchTypes
{
public class SearchResultItem : ISearchResult, IObjectIndexers
{
[IndexField("_content")]
public virtual string Content { get; set; }
[IndexField("__smallcreateddate")]
public virtual DateTime CreatedDate { get; set; }