mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 12:31:33 +01:00
category changes
This commit is contained in:
@@ -7,5 +7,6 @@
|
||||
"browsing": "browsing",
|
||||
"no_replies": "No one has replied",
|
||||
"replied": "replied",
|
||||
"last_edited_by": "last edited by"
|
||||
"last_edited_by": "last edited by",
|
||||
"share_this_category": "Share this category"
|
||||
}
|
||||
|
||||
@@ -10,21 +10,34 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
||||
|
||||
app.enterRoom('category_' + cid);
|
||||
|
||||
$('#twitter-share').on('click', function () {
|
||||
$('.twitter-share').on('click', function () {
|
||||
window.open('https://twitter.com/intent/tweet?url=' + encodeURIComponent(window.location.href) + '&text=' + encodeURIComponent(ajaxify.variables.get('category_name')), '_blank', 'width=550,height=420,scrollbars=no,status=no');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#facebook-share').on('click', function () {
|
||||
$('.facebook-share').on('click', function () {
|
||||
window.open('https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(window.location.href), '_blank', 'width=626,height=436,scrollbars=no,status=no');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#google-share').on('click', function () {
|
||||
$('.google-share').on('click', function () {
|
||||
window.open('https://plus.google.com/share?url=' + encodeURIComponent(window.location.href), '_blank', 'width=500,height=570,scrollbars=no,status=no');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.share-dropdown').on('shown.bs.dropdown', function() {
|
||||
$('#category-link').val(window.location.protocol + '//' + window.location.host + window.location.pathname);
|
||||
// without the setTimeout can't select the text in the input
|
||||
setTimeout(function() {
|
||||
$('#category-link').putCursorAtEnd().select();
|
||||
}, 50);
|
||||
});
|
||||
|
||||
$('.post-link').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#new_post').on('click', function () {
|
||||
composer.newTopic(cid);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user