Skip to content

Instantly share code, notes, and snippets.

Created November 6, 2012 00:35
Show Gist options
  • Save anonymous/4021591 to your computer and use it in GitHub Desktop.
Save anonymous/4021591 to your computer and use it in GitHub Desktop.
Dashboard.Mixins={}
Batman.mixins.someMixin =
initialize: ->
$(@).hide().fadeIn()
show: (addToParent) -> $(@).fadeIn()
hide: (removeFromParent) -> $(@).fadeOut()
-# services section
%div{ data: { mixin: 'someMixin', showif: 'family.activeSection | equals "Stats" ' } }
.tab-content.stats{ data: { renderif: 'family.activeSection | equals "Stats" ', partial: 'app/families/show/details/services/_stats' } }
%div{ data: { mixin: 'someMixin', showif: 'family.activeSection | equals "Backups" ' } }
.tab-content.backups{ data: { renderif: 'family.activeSection | equals "Backups" | and family.backupable ', partial: 'app/families/show/details/services/_backups' } }
%div{ data: { mixin: 'someMixin', showif: 'family.activeSection | equals "Credentials" ' } }
.tab-content.creds{ data: { renderif: 'family.activeSection | equals "Credentials" | and family.authable ', partial: 'app/families/show/details/services/_creds' } }
%div{ data: { mixin: 'someMixin', showif: 'family.activeSection | equals "Reboot" ' } }
.tab-content.reboot{ data: { renderif: 'family.activeSection | equals "Reboot" | and family.rebootable', partial: 'app/families/show/details/services/_reboot' } }
%div{ data: { mixin: 'someMixin', showif: 'family.activeSection | equals "Misc" ' } }
.tab-content.misc{ data: { renderif: 'family.activeSection | equals "Misc" ', partial: 'app/families/show/details/services/_misc' } }
%div{ data: { mixin: 'someMixin', showif: 'family.activeSection | equals "Delete" ' } }
.tab-content.delete{ data: { renderif: 'family.activeSection | equals "Delete" ', partial: 'app/families/show/details/services/_delete' } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment