This file contains hidden or 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
<div ng-controller="Umbraco.PropertyEditors.ColorPickerController"> | |
<ul class="thumbnails color-picker"> | |
<li ng-repeat="preval in model.prevalues" ng-class="{active: model.value === preval.value}"> | |
<a ng-click="toggleItem(preval)" class="thumbnail" hex-bg-color="{{preval.color}}"> | |
</a> | |
<span class="color-label" ng-bind="preval.key"></span> | |
</li> | |
</ul> | |
<input type="hidden" name="modelValue" ng-model="model.value" val-property-validator="validateMandatory"/> |
This file contains hidden or 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
/* Sometimes it's pretty easy to run ito troubles with React ES6 components. | |
Consider the following code: */ | |
class EventStub extends Component { | |
componentDidMount() { | |
window.addEventListener('resize', this.onResize.bind(this)); //notice .bind | |
} | |
componentWillUnmount() { | |
window.removeEventListener('resize', this.onResize.bind(this)); |
This file contains hidden or 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 Tridion.ContentManager.Templating.Expression | |
@using Tridion.ContentManager.ContentManagement | |
@using Tridion.Extensions.Mediators.Razor.Models | |
@* --------------- IDENTIFYING FIELDS ---------------------- *@ | |
@helper FieldStartMarker(string fieldExpression) | |
{ | |
var fn = new BuiltInFunctions(TridionHelper.Engine, TridionHelper.Package); | |
@fn.FieldStartMarker(fieldExpression) |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |