mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Show the iCal sharing link instead of directly open it (references #141)
This commit is contained in:
@@ -506,3 +506,8 @@ $(".locale-number-format[data-format='currency']").each(function ()
|
||||
{
|
||||
$(this).text(parseFloat($(this).text()).toLocaleString(undefined, { style: "currency", currency: Grocy.Currency }));
|
||||
});
|
||||
|
||||
$(document).on("click", ".easy-link-copy-textbox", function()
|
||||
{
|
||||
$(this).select();
|
||||
});
|
||||
|
@@ -17,7 +17,10 @@ $("#ical-button").on("click", function(e)
|
||||
Grocy.Api.Get('calendar/ical/sharing-link',
|
||||
function(result)
|
||||
{
|
||||
location.href = result.url;
|
||||
bootbox.alert({
|
||||
title: L('Share/Integrate calendar (iCal)'),
|
||||
message: L('Use the following (public) URL to share or integrate the calendar in iCal format') + '<input type="text" class="form-control form-control-sm mt-2 easy-link-copy-textbox" value="' + result.url + '">'
|
||||
});
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
|
Reference in New Issue
Block a user