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
# Print all project items | |
Recurse-Project -Action {param($item) "`"$($item.ProjectItem.Name)`" is a $($item.Type)" } | |
# Function to format all documents based on https://gist.github.com/984353 | |
function Format-Document { | |
param( | |
[parameter(ValueFromPipelineByPropertyName = $true)] | |
[string[]]$ProjectName | |
) | |
Process { |
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 System; | |
using System.Collections.Generic; | |
using System.Windows.Input; | |
namespace Application3.Common | |
{ | |
class DelegateCommand : ICommand | |
{ | |
private static readonly Action EmptyExecute = () => { }; | |
private static readonly Func<bool> EmptyCanExecute = () => true; |
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
// Handlebars Localisation Helper | |
// Source: https://gist.github.com/tracend/3261055 | |
Handlebars.registerHelper('l10n', function(keyword) { | |
var lang = (navigator.language) ? navigator.language : navigator.userLanguage; | |
// pick the right dictionary (if only one available assume it's the right one...) | |
var locale = window.locale[lang] || window.locale['en-US'] || window.locale || false; | |
// exit now if there's no data | |
if( !locale ) return target; |
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
// Controls events for panel menu. | |
// We use context here on click events to compensate for a stupid bug in views ajax. | |
Drupal.behaviors.menuPanelBehavior = { | |
attach: function(context, settings) { | |
$(document).ready(function() { | |
$('body', context).click(function(e) { | |
// Ignore click on search box. | |
if (e.target.id == "edit-search-block-form--2") { | |
return; | |
} |