Skip to content

Instantly share code, notes, and snippets.

View scottdurow's full-sized avatar
😊

Scott Durow scottdurow

😊
View GitHub Profile
@scottdurow
scottdurow / gist:6fa7e83c452c78ceca69
Created July 26, 2014 19:18
SparkleXrm Contact Card - View
public class ContactCardView
{
static FreeWallPlugin wall;
public static void init()
{
ContactCardViewModel vm = new ContactCardViewModel();
wall = new FreeWallPlugin("#freewall");
FreeWallOptions options = new FreeWallOptions();
options.selector = ".brick";
@scottdurow
scottdurow / gist:78db02cb17c7e9d9e88e
Created July 26, 2014 18:56
SparkleXrm Contact Card - FreeWall Plugin
[Imported]
[IgnoreNamespace]
[ScriptName("freewall")]
public class FreeWallPlugin
{
public jQueryObject container;
public FreeWallPlugin(string selector)
{
}
@scottdurow
scottdurow / gist:69b628c2e07f7e4159a3
Created July 26, 2014 18:55
SparkleXrm Contact Card - ViewHtml
public class ContactCardViewModel : ViewModelBase
{
public List<Entity> Contacts;
public ContactCardViewModel()
{
string fetchXml = @"<fetch version='1.0' output-format='xml-platform'
mapping='logical' distinct='false'>
<entity name='contact'>
<attribute name='fullname' />
<attribute name='telephone1' />
@scottdurow
scottdurow / gist:99d43d9e9fe0052b4393
Last active August 29, 2015 14:04
SparkleXrm Contact Card - ViewHtml
<div id="freewall" class="free-wall">
<div data-bind="template: {
name: 'contact-template', foreach: contacts, as: 'contact',
afterRender: Client.InlineSubGrids.Views.ContactCardView.onAfterRender
}"></div>
</div>
<script type="text/html" id="contact-template">
<div class="brick">
<img data-bind="attr: { src: $root.getImageUrl(contact)}" width="32" />
<div class="info">