Skip to content

Instantly share code, notes, and snippets.

View RainerAtSpirit's full-sized avatar

Rainer Wittmann RainerAtSpirit

View GitHub Profile
@RainerAtSpirit
RainerAtSpirit / jqGrid-index.html
Created May 2, 2013 10:21
Durandal jqGrid integration
<div id='jqxWidget'>
<div style="margin-bottom: 10px;">
<input id="addButton" type="button" data-bind="click: addItem, jqxButton: { theme: getDemoTheme() }" value="Add Item" />
<input id="removeButton" type="button" data-bind="click: removeItem, jqxButton: { theme: getDemoTheme() }" value="Remove Last Item" />
<input id="updateButton" type="button" data-bind="click: updateItem, jqxButton: { theme: getDemoTheme() }" value="Update First Item" />
<div data-bind="jqxCheckBox: { checked: disabled, theme: getDemoTheme() }" style='margin-top: 5px;' id="checkBox">Disabled</div>
</div>
<div data-bind="jqxGrid: {
source: items, disabled: disabled, autoheight: true,
theme: getDemoTheme(),
@RainerAtSpirit
RainerAtSpirit / gist:5490113
Last active December 16, 2015 20:09
SharePoint 2013 Online $metadata are back! _/api/$metadata
<?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" m:MaxDataServiceVersion="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 / index.html
Created April 8, 2013 11:43
PromiseDemo: Using SPServiceAlpha as data provider for a Durandal app
<section>
<h2 class="page-title" data-bind="text: title"></h2>
<div class="row-fluid">
<div class="span6">
<label>Select a list</label>
<select data-bind="options: lists, optionsText: 'name', value: activeList"></select>
</div>
<div class="span6 well">
@RainerAtSpirit
RainerAtSpirit / metadata.xml
Created October 31, 2012 14:13
project list metadata
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
<edmx:DataServices xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" m:DataServiceVersion="1.0">
<Schema Namespace="MyApp.DataService" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://schemas.microsoft.com/ado/2007/05/edm">
<EntityType Name="AttachmentsItem" m:HasStream="true">
<Key>
<PropertyRef Name="EntitySet" />
<PropertyRef Name="ItemId" />
<PropertyRef Name="Name" />
</Key>
@RainerAtSpirit
RainerAtSpirit / ListDataMetaData.d.ts
Created October 29, 2012 10:42
listdata.svc/$metadata
///<reference path="./jaydata.d.ts" />
/*//////////////////////////////////////////////////////////////////////////////////////
////// Autogenerated by JaySvcUtil.exe http://JayData.org for more info /////////
////// oData V1.1 TypeScript /////////
//////////////////////////////////////////////////////////////////////////////////////*/
module Microsoft.SharePoint.DataService {
class AttachmentsItem extends $data.Entity {
constructor ();
@RainerAtSpirit
RainerAtSpirit / ListDataSvcmetadata.xml
Created October 23, 2012 13:33
SharePoint 2013 listdata.svc/$metadata
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
<edmx:DataServices xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" m:DataServiceVersion="1.0">
<Schema Namespace="Microsoft.SharePoint.DataService" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://schemas.microsoft.com/ado/2007/05/edm">
<EntityType Name="AttachmentsItem" m:HasStream="true">
<Key>
<PropertyRef Name="EntitySet"/>
<PropertyRef Name="ItemId"/>
<PropertyRef Name="Name"/>
</Key>
@RainerAtSpirit
RainerAtSpirit / example1.js
Created October 11, 2012 10:44
Feedback test
northwind.Products
.toArray()
.then( function( products ) {
console.dir( products );
} );
@RainerAtSpirit
RainerAtSpirit / api.js
Created October 8, 2012 10:41
Odata v3: SharePoint 2013 _api $metadata conversion
////////////////////////////////////////////////////////////////////////////////////////
////// Autogenerated by JaySvcUtil.exe http://JayData.org for more info /////////
////// oData v3 /////////
////////////////////////////////////////////////////////////////////////////////////////
(function(global, $data, undefined) {
@RainerAtSpirit
RainerAtSpirit / Fiddler Raw
Created September 19, 2012 12:46
JayData 1.2 using SharePoint Odata provider throws error on MERGE
MERGE https://spirit2013preview-b0204c96e901b7.sharepoint.com/sites/dev/ToDoSPhosted/_vti_bin/listdata.svc/Tasks(1) HTTP/1.1
Host: spirit2013preview-b0204c96e901b7.sharepoint.com
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1
Accept: application/atomsvc+xml;q=0.8, application/json;odata=verbose;q=0.5, */*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
If-Match: W/"1"
DataServiceVersion: 1.0
Content-Type: application/json; charset=UTF-8;odata=verbose
@RainerAtSpirit
RainerAtSpirit / app.js
Created August 28, 2012 14:01
Nappa apps and Chrome Control
(function () {
var params = getParams(),
scriptbase = params.SPHostUrl + "/_layouts/15/";
// Load the js file and continue to the
// success handler.
$.getScript(scriptbase + "SP.UI.Controls.js", renderChrome)
// Load the js file and continue to the
// success event handler.