Add share button on own planning
This commit is contained in:
@@ -115,6 +115,8 @@ var siteScript = async function() {
|
||||
$('#switch-status-bezahlt').parent().parent().click(planningSwitchChanged);
|
||||
}
|
||||
|
||||
$('#a-share-planning').attr('href', LINK_PRE + 'planning_view?user=' + USER_ID);
|
||||
|
||||
today = getToday();
|
||||
|
||||
var selectedYear = $('#select-year').val();
|
||||
|
||||
@@ -46,6 +46,15 @@ var siteScript = async function() {
|
||||
|
||||
$('#p-username').text(user.username);
|
||||
|
||||
if (isLoggedIn() && (userid == USER_ID)) {
|
||||
$('#button-share').show();
|
||||
$('#button-share').click(function(){
|
||||
$('#menu-share').showMenu();
|
||||
});
|
||||
} else {
|
||||
$('#button-share').hide();
|
||||
}
|
||||
|
||||
if (firstCall) {
|
||||
firstCall = false;
|
||||
initYear();
|
||||
|
||||
Reference in New Issue
Block a user