Created
March 16, 2015 15:52
-
-
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
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
<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