Skip to content

Instantly share code, notes, and snippets.

<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="polymer-cool">
<template>
<style>
</style>
<content></content>
</template>
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="polymer-cool">
<template>
<style>
</style>
<content></content>
</template>
@teeaich
teeaich / sharepoint_after_ribbon_load_event.js
Created October 21, 2013 12:07
sharepoint_after_ribbon_load_event
SP.SOD.executeOrDelayUntilScriptLoaded(function () {
var pm = SP.Ribbon.PageManager.get_instance();
pm.add_ribbonInited(function () {
var temp;
});
},"sp.ribbon.js");
@teeaich
teeaich / sp_getUser_csom.js
Created October 18, 2013 07:00
sharepoint csom get user
var context;
var web;
var user;
// This code runs when the DOM is ready and creates a context object which is needed to use the SharePoint object model
$(document).ready(function () {
context = SP.ClientContext.get_current();
web = context.get_web();
getUserName();
@teeaich
teeaich / index.html
Created October 4, 2013 14:08
basic html browser conditional
// saves way to prevent quirks mode and only using one html element
look at http://nicolasgallagher.com/better-conditional-classnames-for-hack-free-css/
<!--[if IE]><![endif]-->
<!DOCTYPE html>
<!--[if lt IE 7]><html class="no-js ie6"><![endif]-->
<!--[if IE 7]><html class="no-js ie7"><![endif]-->
<!--[if IE 8]><html class="no-js ie8"><![endif]-->
<!--[if gt IE 8]><!--><html class="no-js"><!--<![endif]-->
@teeaich
teeaich / proxy_fresenius
Created September 2, 2013 09:13
proxy settings fresenius
http://Thorsten%20Habig@10.171.21.201:3129
@teeaich
teeaich / sp_logout
Created September 2, 2013 08:01
sharepoint logout url
http://yoursite/_layouts/closeConnection.aspx?loginasanotheruser=true
@teeaich
teeaich / directive.js
Created August 24, 2013 07:32
Highlight navigation menu object with additional class or/and with arrow positioning of active menu object
'use strict';
// TODO we need a event handler for window.resize to ensure that the
// TODO position will be recalclated
angular.module('flatdesignAngularApp')
.directive('navMenu', ['$compile', function ($compile) {
return {
link: function (scope, element, attrs) {
/*
template used for the arrow
@teeaich
teeaich / breadcrumb_angular.html
Created August 19, 2013 17:42
angular breadcrumb
<div class="navbar" ng-controller="HeaderCtrl">
<div class="navbar-inner">
<a class="brand" ng-click="home()">AScrum</a>
<ul class="nav">
<li ng-class="{active:isNavbarActive('projectsinfo')}"><a href="/projectsinfo">Current Projects</a></li>
</ul>
<ul class="nav" ng-show="isAuthenticated()">
<li ng-class="{active:isNavbarActive('projects')}"><a href="/projects">My Projects</a></li>
<li class="dropdown" ng-class="{active:isNavbarActive('admin'), open:isAdminOpen}" ng-show="isAdmin()">
@teeaich
teeaich / filter_angular
Created August 13, 2013 15:27
filter on objects in angular
{{ games|filter:'street' }} // all games containing "street" in any property
{{ games|filter:'!street' }} // all games NOT containing "street" in any property
{{ games|filter:{name:'street'} }} // all games containing "street" in their name
{{ games|filter:{name:'street'}:true }} // all games named exactly "street"
{{ games|filter:{name:'street', device:'PS3'} }} // all games containing "street" in their name and PS3 in their device