Skip to content

Instantly share code, notes, and snippets.

View sionjlewis's full-sized avatar

Siôn J. Lewis sionjlewis

View GitHub Profile

Every 2nd item ('-' * 14) The Javascript modulus operator ( % ) is used to calculate the remainder of two values if they were divided

A Pen by Siôn J. Lewis on CodePen.

License.

Every 3rd item ('-' * 14) The Javascript modulus operator ( % ) is used to calculate the remainder of two values if they were divided

A Pen by Siôn J. Lewis on CodePen.

License.

@sionjlewis
sionjlewis / SharePoint Disable For All Mobile Devices
Last active August 29, 2015 14:23
SharePoint On-Premises: The quickest way for all mobile devices and browsers add the following to the web applications web.config file.
<browserCaps>
<result type="System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<filter>isMobileDevice=false</filter>
</browserCaps>
@sionjlewis
sionjlewis / SharePoint disabling or enabling devices and browsers
Created June 17, 2015 16:26
SharePoint On-Premises: For a more granular approach to disabling/enabling devices and browsers, edit the App_Browsers\compat.browser changing the following to "false" for the relevant userAgent:
<capability name="isMobileDevice" value="true" />
@sionjlewis
sionjlewis / MyWebpart.webpart.xml
Last active October 20, 2020 02:23
Client-side Development Techniques with CQWP(s) and JavaScript - Part 1/5
<webParts>​​
<webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
<metaData>
<type name="Microsoft.SharePoint.Publish​​ing.WebControls.ContentByQueryWebPart, Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<importErrorMessage>Cannot import this Web Part.</importErrorMessage>
</metaData>
<data>
<properties>
<property name="GroupBy" type="string" />
<property name="FilterValue2" type="string" />
@sionjlewis
sionjlewis / ContentQueryMain.xsl
Created June 24, 2015 14:20
Client-side Development Techniques with CQWP(s) and JavaScript - Part 2/5
<xsl:stylesheet
version="1.0"
exclude-result-prefixes="x xsl cmswrt cbq"
xmlns:x="http://www.w3.org/2001/XMLSchema"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:cmswrt="http://schemas.microsoft.com/WebPart/v3/Publishing/runtime"
xmlns:cbq="urn:schemas-microsoft-com:ContentByQueryWebPart">
<xsl:output method="html" indent="no" media-type="text/html" omit-xml-declaration="yes"/>
<xsl:param name="cbq_isgrouping" />
<xsl:param name="cbq_columnwidth" />
@sionjlewis
sionjlewis / _temp.js
Created June 24, 2015 14:26
Client-side Development Techniques with CQWP(s) and JavaScript - Part 3/5
var namespace = function (ns_string, obj) {
var parts = ns_string.split('.'),
parent = window,
pl, i;
for (i = 0, pl = parts.length; i < pl; i++) {
parent = parent[parts[i]] = parent[parts[i]] || (i == pl - 1 && obj ? (typeof obj == 'function' ? (obj() || {}) : obj) : {});
}
return parent;