Skip to content

Instantly share code, notes, and snippets.

Avatar

Lee Kelleher leekelleher

View GitHub Profile
@leekelleher
leekelleher / umb-hack-appHeaderActions.js
Last active Aug 18, 2022
Umbraco (v8-10) AngularJS hacking the top navigation
View umb-hack-appHeaderActions.js
angular.module("umbraco").run([
"$compile",
"appState",
"eventsService",
function ($compile, appState, eventsService) {
eventsService.on("app.ready", function (e, args) {
// console.log("app.ready", e, args);
var scope = e.targetScope.$new();
@leekelleher
leekelleher / ExamineDataListSource.cs
Last active Apr 27, 2021
Contentment: Examine (Lucene) data-source
View ExamineDataListSource.cs
/* Copyright © 2021 Lee Kelleher.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
using System.Collections.Generic;
using System.Linq;
using Examine;
using Examine.Search;
using Umbraco.Core;
@leekelleher
leekelleher / UmbracoMembersDataListSource.cs
Last active Apr 28, 2021
Contentment: Umbraco Members data-source
View UmbracoMembersDataListSource.cs
/* Copyright © 2021 Lee Kelleher.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
using System;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json.Linq;
using Umbraco.Core;
@leekelleher
leekelleher / TemplatedLabelConfigurationEditor.cs
Created Apr 20, 2021
Contentment: Templated Label prototype
View TemplatedLabelConfigurationEditor.cs
/* Copyright © 2021 Lee Kelleher.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
using System.Collections.Generic;
using Umbraco.Core.IO;
using Umbraco.Core.PropertyEditors;
namespace Umbraco.Community.Contentment.DataEditors
@leekelleher
leekelleher / ContentmentDataSourcePreValueSource.cs
Last active Apr 19, 2021
Umbraco Forms - to populate the prevalues with a data-source from a Contentment data-editor
View ContentmentDataSourcePreValueSource.cs
/* Copyright © 2021 Lee Kelleher.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
using System;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json.Linq;
using Umbraco.Community.Contentment.DataEditors;
@leekelleher
leekelleher / UmbracoImageCropDataListSource.cs
Created Feb 11, 2021
Umbraco Image Crop Picker using Contentment Data List
View UmbracoImageCropDataListSource.cs
/* Copyright © 2021 Lee Kelleher.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json.Linq;
using Umbraco.Community.Contentment.DataEditors;
using Umbraco.Core;
View PropertyDataDataSource.cs
using System.Collections.Generic;
using System.Linq;
using Umbraco.Community.Contentment.DataEditors;
using Umbraco.Core.PropertyEditors;
using Umbraco.Web;
namespace MyWebsite.DataSources
{
public class PropertyDataDataSource : IDataListSource
{
@leekelleher
leekelleher / night-mode.css
Last active May 31, 2018
Prototype for an Umbraco "Night Mode" back-office UI theme
View night-mode.css
/*
Umbraco Night Mode - A BackOffice UI Theme
*/
body {
filter: invert(100%) hue-rotate(90deg) sepia(25%);
}
#umbracoMainPageBody {
background-color: #000;
@leekelleher
leekelleher / MyMacroContainerValueConverter.cs
Created Apr 5, 2018
Umbraco - Overrides the default MacroContainerValueConverter, to return the correct type, HtmlString
View MyMacroContainerValueConverter.cs
using System;
using Umbraco.Core;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Core.PropertyEditors;
using Umbraco.Core.PropertyEditors.ValueConverters;
using Umbraco.Web.PropertyEditors.ValueConverters;
namespace Our.Umbraco.Web.HotFixes
{
public class MyApplicationEventHandler : ApplicationEventHandler
@leekelleher
leekelleher / UmbracoFormsPickerValueConverter.cs
Created Mar 28, 2018
Umbraco Forms - Value Converter for the "Form Picker" property-editor, used to define the value type as a `Guid`
View UmbracoFormsPickerValueConverter.cs
using System;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Core.PropertyEditors;
namespace Our.Umbraco.Web.PropertyEditors
{
public class UmbracoFormsPickerValueConverter : PropertyValueConverterBase, IPropertyValueConverterMeta
{
public override bool IsConverter(PublishedPropertyType propertyType)
{