This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ArchetypeLabelHelper = (function () { | |
//private helpers | |
if (!String.prototype.format) { | |
String.prototype.format = function () { | |
var args = arguments; | |
return this.replace(/{(\d+)}/g, function (match, number) { | |
return typeof args[number] != 'undefined' | |
? args[number] | |
: match | |
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
using Umbraco.Core; | |
using Umbraco.Core.Models; | |
using Umbraco.Core.Services; | |
namespace My.App.Events | |
{ | |
public class MyContentSmellerEventHandler : ApplicationEventHandler | |
{ | |
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Umbraco.Core; | |
using Umbraco.Core.Models; | |
using Umbraco.Core.Services; | |
namespace DemoApp | |
{ | |
public class ProtectedContentNotifyEventHandler : ApplicationEventHandler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Web; | |
using Umbraco.Web.WebApi; | |
namespace My.Website.Controllers.Api | |
{ | |
public class FormHtmlApiController : UmbracoApiController | |
{ | |
public IHtmlString Get(string id) | |
{ | |
return Umbraco.RenderMacro("FormsRenderForm", new { FormGuid = id }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using NUnit.Framework; | |
using Our.Umbraco.Ditto.Tests.Mocks; | |
namespace Our.Umbraco.Ditto.Tests | |
{ | |
[TestFixture] | |
[Category("Processors")] | |
public class DecimalTests | |
{ | |
public class MyModel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module("umbraco.directives").directive('simplerichtexteditor', function (assetsService) { | |
return { | |
restrict: 'E', | |
scope: { | |
field: '=' | |
}, | |
controller: function ($scope, $element) { | |
$scope.model = { | |
alias: 'simpleRichtextEditor', | |
view: 'rte', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@inherits UmbracoViewPage<dynamic> | |
@using Umbraco.Web.Templates; | |
@using Newtonsoft.Json.Linq; | |
@using Our.Umbraco.GridSettings.Web; | |
@using Our.Umbraco.GridSettings.Services; | |
@using Our.Umbraco.GridSettings.Resolvers; | |
@{ | |
var attributesResolver = new GroupByPrefixTokenGridSettingsAttributesResolver("_"); | |
var attributesService = new GridSettingsAttributesService(attributesResolver); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
javascript: [ | |
'~/App_Plugins/YourPackage/your.controller.js', | |
'~/App_Plugins/YourPackage/umbraco-editor-with-config.js', | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Globalization; | |
using Umbraco.Core; | |
using Umbraco.Core.Services; | |
using Umbraco.Web; | |
using Umbraco.Web.Editors; | |
using Umbraco.Web.Models.ContentEditing; | |
namespace MyWebsite | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
using Umbraco.Core.Logging; | |
using Umbraco.Core.Persistence.Migrations; | |
using Umbraco.Core.Persistence.SqlSyntax; | |
namespace My.Website.Migrations | |
{ | |
public abstract class CustomMigrationBase : MigrationBase | |
{ | |
public CustomMigrationBase(ISqlSyntaxProvider sqlSyntax, ILogger logger) : base(sqlSyntax, logger) |