Skip to content

Instantly share code, notes, and snippets.

@pc-pdx
pc-pdx / SubcontentField.cs
Last active July 5, 2018 23:42 — forked from kamsar/SubcontentField.cs
Subcontent Computed Field
using System.Collections.Generic;
using System.Linq;
using Blade.Utility;
using Sitecore;
using Sitecore.ContentSearch;
using Sitecore.ContentSearch.ComputedFields;
using Sitecore.Data.Fields;
using Sitecore.Data.Items;
using Sitecore.Layouts;
function doFormValidation(validationGroup, errorclass) {
if (typeof Page_IsValid != "boolean") {
return true; // ASP.NET client side validation not properly loaded
}
if (Page_IsValid == false) {
if (Page_Validators) {
var invalidArrayIndex = 0;
var invalidArray = Array();
for (var index = 0; index < Page_Validators.length; index++) {
@pc-pdx
pc-pdx / gist:1a5e408ee691bf956763
Created November 5, 2014 23:33
CsWebApp.core.dataservice
(function () {
'use strict';
angular
.module('CsWebApp.core')
.factory('dataservice', dataservice);
function dataservice($http) {
@pc-pdx
pc-pdx / debug-directive
Created November 4, 2014 23:00
debug-directive
/**
* Show pretty datas for debugging purposes.
* ~USAGE:: <debug obj="nowPlayingApiResponse"></debug>
*/
.directive('debug', function () {
return {
restrict: 'E',
scope: {
expression: '=obj',
callersName: '@obj'