This file contains hidden or 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
function Break-SPWebInheritance($siteXmlFilePath) { | |
$xml = Select-Xml -Path $siteXmlFilePath -XPath"//SiteStructure" | |
$xml.Node.Web | ForEach-Object { | |
Write-Host "Openning web for breaking inheritance ($($_.Url))" | |
$web = $clientContext.Site.OpenWeb($_.Url) | |
$web.BreakRoleInheritance($true, $true) | |
$clientContext.ExecuteQuery() | |
} | |
} |
This file contains hidden or 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
Break-SPWebInheritance "c:\MyAwesomeSiteStructure.xml" |
This file contains hidden or 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 MyCompany = MyCompany || {}; | |
MyCompany.MyProject = MyCompany.MyProject || { }; |
This file contains hidden or 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
( function ( my, $ ) { | |
//Implements the modal logic on the create article button | |
my.CreateArticleButton = function ( ) { | |
var _src = 'MyCompany.MyProject.CreateArticleButton'; | |
//if the button is pressed we load the article creation modal | |
var _dialog = function ( ) { | |
console.log ( _src + '.dialog initiating modal window' ) | |
var _options = { | |
tite : 'Create News Item', |
This file contains hidden or 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
_news.count = "10"; | |
_target.count = 10; | |
if (_news.count == _target.count) { | |
… | |
} |
This file contains hidden or 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
_news.count = "10"; | |
_target.count = 10; | |
if (_news.count === _target.count) { | |
… | |
} |
This file contains hidden or 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
if (parseInt(_news.count) === _target.count) { | |
… | |
} |
This file contains hidden or 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 _counter; | |
var _newsCount = int.Parse(_news.count); | |
if (_newsCount > _target.count) { | |
_counter = (_newsCount - _news.removed) * average; | |
} else { | |
_counter = (_target.count - _news.removed) * average; | |
} |
This file contains hidden or 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
//config array of variables for our script | |
var _config = { | |
height: 310, | |
width: 310, | |
colour: '#00ff00' | |
}; | |
//now you can get at your variables from the _config object like… | |
_config.height = 500; |
This file contains hidden or 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
SP.SOD.executeFunc ( 'sp.js', 'SP.ClientContext', function() { | |
//awesome code that does stuff | |
}); |