grouped post buttons in dropdowns

This commit is contained in:
Baris Soner Usakli
2014-01-18 19:15:07 -05:00
parent e83e7870ce
commit 72447c9b9c
3 changed files with 36 additions and 18 deletions

View File

@@ -418,12 +418,18 @@ define(['composer'], function(composer) {
}
});
$('#post-container').on('click', '.link', function() {
$('#post-container').on('shown.bs.dropdown', '.share-dropdown', function() {
var pid = $(this).parents('.post-row').attr('data-pid');
$('#post_' + pid + '_link').val(window.location.href + "#" + pid).stop(true, false).fadeIn().select();
$('#post_' + pid + '_link').off('blur').on('blur', function() {
$(this).fadeOut();
});
$('#post_' + pid + '_link').val(window.location.href + "#" + pid);
// without the setTimeout can't select the text in the input
setTimeout(function(){
$('#post_' + pid + '_link').select();
}, 50);
});
$('#post-container').on('click', '.post-link', function(e) {
e.preventDefault();
return false;
});
$('#post-container').on('click', '.twitter-share', function () {