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
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"; |
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
[Imported] | |
[IgnoreNamespace] | |
[ScriptName("freewall")] | |
public class FreeWallPlugin | |
{ | |
public jQueryObject container; | |
public FreeWallPlugin(string selector) | |
{ | |
} |
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
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' /> |
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
<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"> |