This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var iconUrl = 'https://www.example.com/myappicon.png'; | |
var appChromeSettings = new ShareCoffee.ChromeSettings(iconUrl, 'SharePoint ChromeControl Sample', | |
// Settings links are displayed within the AppChrome. | |
// 1. Parameter = 'TargetURL' | |
// 2. Parameter = 'Title' | |
// 3. Parameter = AppendCurrentQueryString (true|false) | |
new ShareCoffee.SettingsLink('foo.html', 'Foo', true), | |
new ShareCoffee.SettingsLink('bar.html', 'Bar', true)); | |
var onSuccess = function(){ | |
console.log('SharePoint App Chrome and CSS loaded'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the next line of code brings somple IntelliSense within VS | |
/// <reference path="ShareCoffee/ShareCoffee.js"/> | |
$(document).ready(function () { | |
var onLoaded = function (data) { | |
var ctx = document.getElementById("myChart").getContext("2d"); | |
var chartData = { | |
labels: [], | |
datasets: [{ | |
fillColor: "#3399cc", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- for the minified version --> | |
<script type='text/javascript' src="~/Scripts/ShareCoffee/ShareCoffee.min.js"></script> | |
<script type='text/javascript' src="~/Scripts/ShareCoffee.Search/ShareCoffee.Search.min.js"></script> | |
<!-- or for the debug version --> | |
<script type='text/javascript' src="~/Scripts/ShareCoffee/ShareCoffee.js"></script> | |
<script type='text/javascript' src="~/Scripts/ShareCoffee.Search/ShareCoffee.Search.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$http(ShareCoffee.REST.build.create.for.angularJS {url: 'contextinfo'}) | |
.success((data)-> | |
# great for single time use | |
formDigestValue = data.d.GetContextWebInformation.FormDigestValue | |
# use this for page instace wide usages | |
ShareCoffee.Commons.formDigestValue = data.d.GetContextWebInformation.FormDigestValue | |
).error((error)-> | |
console.log "error while loading contextinfo" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ensure that nodejs is installed on your system | |
# Install yeoman globally | |
npm install yo -g | |
# on unix systems or macs you should use sudo when installing global packages | |
sudo npm install yo -g #MAC/LINUX | |
# Install generator globally | |
npm install generator-sharecoffee-addon -g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myObject = | |
foo: 'bar' | |
isThisAwesome: true | |
requiresLessKeystrokes: true | |
complex: | |
ifYouAreInterestedIn: true | |
stillReadable: true | |
caption: 'CoffeeScript' | |
compilesTo: 'JavaScript' | |
cost: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install sass on windows | |
gem install sass | |
# ensure root permissions on -ix systems using sudo | |
sudo gem install sass | |
# check the installation by querying for the current SASS version | |
sass -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.MyAngularApp.service 'userProfilesService', ['$http', ($http) -> | |
loadMyProfile: (onSuccess, onError) -> | |
$http ShareCoffee.REST.build.read.for.angularJS | |
url: ShareCoffee.Url.GetMyProperties | |
.success onSuccess | |
.error onError | |
loadProfilePropertiesForUser: (accountName, onSuccess, onError) -> | |
properties = new ShareCoffee.UserProfileProperties(ShareCoffee.Url.GetUserProfileProperty, accountName, 'WorkEmail') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load the AppWebUrl (default implementation) | |
var appWebUrl = ShareCoffee.Commons.getAppWebUrl(); | |
// provide a custom load function for loading the AppWebUrl | |
ShareCoffee.Commons.loadAppWebUrlFrom = function(){ | |
$.ajax({url: 'Context/AppWebUrl', type: 'GET', async: false}).responseJSON; | |
}; | |
var appWebUrl = ShareCoffee.Commons.getAppWebUrl(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Office365.Exchange; | |
using Microsoft.Office365.OAuth; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace WebApplication2 | |
{ |