Skip to content

Instantly share code, notes, and snippets.

View RodrigoAlbert's full-sized avatar

RodrigoAlbert

  • São Paulo
View GitHub Profile
NB: The SiteCollection is Created automatically. If you try to make the collection first
an Exception will be thrown; "The Site Collection Already Exists".
NB: You don't need the -HostHeaderWebApplication parameter if the site being restored, share
the same name as the web application.
### Backup
Backup-SPSite http://s-hqs-spdev/sites/branding/ -Path C:\COLLECTIONS\Branding.bak –UseSqlSnapshot
@IAMIronmanSam
IAMIronmanSam / bootstrap-custom.js
Created March 5, 2015 04:04
Custom for sharepoint specific
jQuery(document).ready(function($) {
BindBrowserStyles($);
BindTopNav($);
BindBodySpans($);
});
/*
specific browsers may require specific fixes
*/
function BindBrowserStyles($) {
@IAMIronmanSam
IAMIronmanSam / bootstrap-custom.css
Created March 5, 2015 03:56
Custom bootstrap for sharepoint specific
/*bootstrap 3 resets for SharePoint*/
/*border-box causes many issues with SP*/
*, *:before, *:after {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
/*reset elements that B3 is expecting to be border-box*/
* [class^="col-"], * [class^="col-"]:before, * [class^="col-"]:after,
.container, .container:before, .container:after,
@marineko
marineko / infiniteScroll.js
Last active April 10, 2016 15:33
Infinite scroll SharePoint items
$(function(){
var setArea = $('#loadarea'),
loadNum = 1, // 読み込む個数
loadTxt = 'Now Loading...', // Loading中の表示テキスト
fadeSpeed = 500; // フェードスピード
var onclickStr;
var txt;
$.ajax({
url: "/[your site]/_api/web/lists/getbytitle('test')/items?$select=*",
@rwcasarin
rwcasarin / modal-sharepoint.html
Created January 21, 2013 12:11
Modal Sharepoint - vídeos
<script type="text/javascript" src="/_layouts/mediaplayer.js"></script>
<script type="text/javascript">
_spBodyOnLoadFunctionNames.push('mediaPlayer.createOverlayPlayer');
mediaPlayer.attachToMediaLinks( document.getElementById('campanha-video'), ['wmv', 'avi', 'mp3']);
</script>
<div id="campanha-video">
<a href="{@Midia}">Open Video</a>
</div>
@eirikb
eirikb / sp-accordion.js
Created September 19, 2012 06:22
Accordion for SharePoint
$('head').append($('<link rel="stylesheet">').attr('href', 'http://twitter.github.com/bootstrap/assets/css/bootstrap.css'));
$.getScript('http://twitter.github.com/bootstrap/assets/js/bootstrap-transition.js', function() {
$.getScript('http://twitter.github.com/bootstrap/assets/js/bootstrap-collapse.js', function() {
var $collapse = $('<div class="accordion">');
var $tplHead = $('<div class="accordion-heading"><a class="accordion-toggle" data-toggle="collapse">');
var $tplBody = $('<div class="accordion-body collapse"><div class="accordion-inner">');
$('.s4-ba .s4-wpTopTable:has([webpartid])').each(function(i) {
var $wp = $(this);
var $content = $wp.find('[webpartid]');
var $head = $tplHead.clone();