Skip to content

Instantly share code, notes, and snippets.

View spdustin's full-sized avatar
💭
I may be slow to respond.

Dustin Miller spdustin

💭
I may be slow to respond.
View GitHub Profile
@spdustin
spdustin / baseline_dvwp.xsl
Created July 8, 2015 20:00
Baseline DVWP XSL
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- This XSL Stylesheet created by SharePoint Experts, Inc. -->
<!-- http://sharepointexperience.com -->
<xsl:output method="html" indent="yes"/>
<!-- This template is the "wrapper" or "container" for the custom view. -->
<xsl:template match="/">
<!-- This is the actual wrapper element that will be emitted -->
@spdustin
spdustin / announcements.xsl
Created July 8, 2015 21:12
Accordion Announcements
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="WPQ"/>
<xsl:param name="ListTitle"/>
<!-- This XSL Stylesheet created by SharePoint Experts, Inc. -->
<!-- http://sharepointexperience.com -->
<xsl:output method="html" indent="yes"/>
<!-- This template is the "wrapper" or "container" for the custom view. -->
<xsl:template match="/">
@spdustin
spdustin / faq.xsl
Created July 9, 2015 16:49
FAQs (expanding and collapsing)
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- This XSL Stylesheet created by SharePoint Experts, Inc. -->
<!-- http://sharepointexperience.com -->
<xsl:output method="html" indent="yes"/>
<!-- This template is the "wrapper" or "container" for the custom view. -->
<xsl:template match="/">
<!-- This is the actual wrapper element that will be emitted -->
@spdustin
spdustin / faq_redux.xsl
Created July 9, 2015 19:18
Updated Expanding/Collapsing FAQ (with wpclick killer)
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="WPQ"/>
<!-- This XSL Stylesheet created by SharePoint Experts, Inc. -->
<!-- http://sharepointexperience.com -->
<xsl:output method="html" indent="yes"/>
<!-- This template is the "wrapper" or "container" for the custom view. -->
<xsl:template match="/">
<!-- This is the actual wrapper element that will be emitted -->
<dl class="faq">
<!-- This will tell the data view to look for the actual content
@spdustin
spdustin / highcharts_a.xsl
Created July 9, 2015 19:46
Highcharts (pre-updatepanel)
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>
<xsl:strip-space elements="script"/>
<xsl:template match="/">
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js" type="text/javascript"/>
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
<script type="text/javascript">
@spdustin
spdustin / highcharts_part3.xsl
Created July 10, 2015 16:36
Highcharts (bar chart and pie chart)
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
<div id="container2" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
<script type="text/javascript">
<![CDATA[
$('#container').highcharts({
chart: {
@spdustin
spdustin / highcharts_4.xsl
Created July 10, 2015 21:37
Highcharts, part 4 (multiple series)
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
<div id="container2" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
<script type="text/javascript">
<![CDATA[
$('#container').highcharts({
chart: {
@spdustin
spdustin / highcharts_5.xsl
Created July 10, 2015 22:02
Highcharts (with params and improved csv)
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="xAxis">Date</xsl:param>
<xsl:param name="Series1">Total</xsl:param>
<xsl:param name="Series2">Subtotal</xsl:param>
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
<div id="container2" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
<script type="text/javascript">
@spdustin
spdustin / spo_contacts.css
Last active November 19, 2015 22:26
SharePoint Online Contacts List CSS
.ms-formtable td.ms-formbody, /* cell containing all form fields */
.ms-formtable td.ms-formlabel /* cell containing all form labels */
{
display: block;
width: auto;
padding: .5em 1em;
}
.ms-formtable td * /* resize everything inside the cells */
{
@spdustin
spdustin / cars.xml
Created March 1, 2016 17:25
cars.xml
<cars>
<car year="1972" make="Ford" model="Pinto" explodes="yes"/>
<car year="2016" make="Toyota" model="Prius"/>
<car year="1996" make="Nissan" model="Sentra"/>
</cars>