Skip to content

Instantly share code, notes, and snippets.

View RainerAtSpirit's full-sized avatar

Rainer Wittmann RainerAtSpirit

View GitHub Profile
Requesting: metadata.xml... done.
Info: generating type Microsoft.SharePoint.DataService.AnnouncementsItem
Warning: AnnouncementsItem.Title:m:FC_TargetPath is an unknown/unprocessed attribued
Warning: AnnouncementsItem.Title:m:FC_ContentKind is an unknown/unprocessed attribued
Warning: AnnouncementsItem.Title:m:FC_KeepInContent is an unknown/unprocessed attribued
Warning: AnnouncementsItem.Modified:m:FC_TargetPath is an unknown/unprocessed attribued
Warning: AnnouncementsItem.Modified:m:FC_ContentKind is an unknown/unprocessed attribued
Warning: AnnouncementsItem.Modified:m:FC_KeepInContent is an unknown/unprocessed attribued
Warning: inverseProperty other side missing: Microsoft.SharePoint.DataService.AnnouncementsItem_CreatedBy
Warning: inverseProperty other side missing: Microsoft.SharePoint.DataService.AnnouncementsItem_ModifiedBy
@RainerAtSpirit
RainerAtSpirit / JayData.xslt
Created June 6, 2012 16:58
SharePoint OData to JayData conversion
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:edm="http://schemas.microsoft.com/ado/2007/05/edm"
xmlns:annot="http://schemas.microsoft.com/ado/2009/02/edm/annotation"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
<xsl:key name="entityType" match="edm:EntityType" use="concat(string(../@Namespace),'.', string(@Name))"/>
<xsl:key name="associations" match="edm:Association" use="concat(string(../@Namespace),'.', string(@Name))"/>
<!-- Unsupported in DataFormWebPart -->
<!--<xsl:strip-space elements="property item unprocessed"/>-->
@RainerAtSpirit
RainerAtSpirit / JekyllApps.js
Created July 9, 2012 12:18
Adding AngularJS search in Jekyll blog
/**
* Setup Module with `highlight` filter
*/
var JekyllApp = angular.module('JekyllApp', [], function ($routeProvider, $locationProvider) {
$locationProvider.html5Mode(false);
});
JekyllApp.filter('highlight', function () {
return function (text, filter) {
@RainerAtSpirit
RainerAtSpirit / WebPartPage.aspx
Created July 15, 2012 12:53
SharePoint DVWP From workhorse to html5 ferrari (html source)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:o="urn:schemas-microsoft-com:office:office" lang="en-us" dir="ltr">
<head><meta http-equiv="X-UA-Compatible" content="IE=8" /><meta name="GENERATOR" content="Microsoft SharePoint" /><meta name="progid" content="SharePoint.WebPartPage.Document" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="Expires" content="0" /><title>
WebPartPage
</title><link rel="stylesheet" type="text/css" href="/_layouts/1033/styles/Themable/corev4.css?rev=iIikGkMuXBs8CWzKDAyjsQ%3D%3D"/>
<script type="text/javascript">
@RainerAtSpirit
RainerAtSpirit / SP2013_apimetadata.xml
Created July 21, 2012 15:15
SP2013 _api $metadata
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
<edmx:DataServices m:DataServiceVersion="3.0" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<Schema Namespace="SP" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
<ComplexType Name="KeyValue">
<Property Name="Key" Type="Edm.String"/>
<Property Name="Value" Type="Edm.String"/>
<Property Name="ValueType" Type="Edm.String"/>
</ComplexType>
<ComplexType Name="SimpleDataRow">
@RainerAtSpirit
RainerAtSpirit / app.js
Created July 26, 2012 17:00
draft version of Odata chooseMap
/**
* User: RainerAtSpirit
* Date: 24.07.12
* Time: 15:35
*/
define(['knockout', 'helper', 'postbox', 'underscore', 'jaydata', 'appData', 'jd2ko'], function (ko, fn, postbox, _) {
var app = window.app || {},
TileViewModel, LogonViewModel, ListingModel, init;
@RainerAtSpirit
RainerAtSpirit / ListingViewModel.js
Created July 29, 2012 13:20
JayData + Knockout
define(['knockout', 'postbox', 'underscore'], function (ko, postbox) {
"use strict";
return function () {
var selectedList, allItems, take, takeValues, includeArray, orderBy, orderAsc, handleAfterRender, showTable,
chooseMap;
selectedList = ko.observable('No list selected').syncWith('selectedList');
allItems = ko.observableArray([]);
@RainerAtSpirit
RainerAtSpirit / ListingView.html
Created August 1, 2012 14:08
Ferrari meets JayData
<div class="row" id="listingVM">
<div class="nine columns" style="display:none"
data-bind="visible: showTable()">
<div class="twelve columns">
<div class="two columns">
<a href="#" title="Go back"><img src="images/48/arrow_left.png" style="border: none"/></a>
</div>
<div class="ten columns">
<h3 data-bind="text: $root.selectedList"></h3>
@RainerAtSpirit
RainerAtSpirit / CustomBindingHandler.js
Created August 2, 2012 15:14
KnockoutJS, RequireJS and the revealing module pattern
define (['knockout', 'jquery', 'prettyDate', 'metrojs'], function ( ko, $ ) {
"use strict";
// See https://github.com/SteveSanderson/knockout/wiki/Bindings---class
ko.bindingHandlers['class'] = {
'update' : function ( element, valueAccessor ) {
if ( element['__ko__previousClassValue__'] ) {
ko.utils.toggleDomNodeCssClass (element, element['__ko__previousClassValue__'], false);
}
var value = ko.utils.unwrapObservable (valueAccessor ());
@RainerAtSpirit
RainerAtSpirit / _api$metadata.xml
Created August 6, 2012 10:44
SharePoint 2013 Developer Preview REST API
<?xml version="1.0" encoding="utf-8"?><edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx"><edmx:DataServices m:DataServiceVersion="3.0" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><Schema Namespace="SP" xmlns="http://schemas.microsoft.com/ado/2009/11/edm"><ComplexType Name="KeyValue"><Property Name="Key" Type="Edm.String" /><Property Name="Value" Type="Edm.String" /><Property Name="ValueType" Type="Edm.String" /></ComplexType><ComplexType Name="SimpleDataRow"><Property Name="Cells" Type="Collection(SP.KeyValue)" /></ComplexType><ComplexType Name="SimpleDataTable"><Property Name="Rows" Type="Collection(SP.SimpleDataRow)" /></ComplexType><ComplexType Name="MethodInformation"><Property Name="Name" Type="Edm.String" /><Property Name="Parameters" Type="Collection(SP.ParameterInformation)" /><Property Name="ReturnTypeFullName" Type="Edm.String" /></ComplexType><ComplexType Name="ParameterInformation"><Property Name="Name" Type="Edm.String" /><Property Nam