Skip to content

Instantly share code, notes, and snippets.

@Danno040
Created March 16, 2015 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Danno040/85b739f125756423c677 to your computer and use it in GitHub Desktop.
Save Danno040/85b739f125756423c677 to your computer and use it in GitHub Desktop.
Place this in your "categories" template in SocialEngine Cloud and the category you're viewing will be auto-populated in the composer modal
<script>
$('body').on('composer.rendered', '.composer-link', function() {
// Set default category to current category
var currentCategoryId = $('ul.dropdown-menu li.active').data('id');
$('.modal-body').find('select[name$="category"]').val(currentCategoryId).trigger('change');
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment