Add share button on own planning

This commit is contained in:
ostertun
2020-10-05 13:09:24 +02:00
parent 138071769c
commit 5e926f3e75
4 changed files with 18 additions and 6 deletions

View File

@@ -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();

View File

@@ -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();