mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Show the iCal sharing link instead of directly open it (references #141)
This commit is contained in:
parent
4932b9c6d2
commit
fcdeda91d9
@ -335,7 +335,8 @@ return array(
|
|||||||
'This is for statistical purposes only' => 'This is for statistical purposes only',
|
'This is for statistical purposes only' => 'This is for statistical purposes only',
|
||||||
'You have to select a recipe' => 'You have to select a recipe',
|
'You have to select a recipe' => 'You have to select a recipe',
|
||||||
'Key type' => 'Key type',
|
'Key type' => 'Key type',
|
||||||
'Export as iCal' => 'Export as iCal',
|
'Share/Integrate calendar (iCal)' => 'Share/Integrate calendar (iCal)',
|
||||||
|
'Use the following (public) URL to share or integrate the calendar in iCal format' => 'Use the following (public) URL to share or integrate the calendar in iCal format',
|
||||||
'Allow partial units in stock' => 'Allow partial units in stock',
|
'Allow partial units in stock' => 'Allow partial units in stock',
|
||||||
'Enable tare weight handling' => 'Enable tare weight handling',
|
'Enable tare weight handling' => 'Enable tare weight handling',
|
||||||
'This is useful e.g. for flour in jars - on purchase/consume/inventory you always weigh the whole jar, the amount to be posted is then automatically calculated based on what is in stock and the tare weight defined below' => 'This is useful e.g. for flour in jars - on purchase/consume/inventory you always weigh the whole jar, the amount to be posted is then automatically calculated based on what is in stock and the tare weight defined below',
|
'This is useful e.g. for flour in jars - on purchase/consume/inventory you always weigh the whole jar, the amount to be posted is then automatically calculated based on what is in stock and the tare weight defined below' => 'This is useful e.g. for flour in jars - on purchase/consume/inventory you always weigh the whole jar, the amount to be posted is then automatically calculated based on what is in stock and the tare weight defined below',
|
||||||
|
@ -506,3 +506,8 @@ $(".locale-number-format[data-format='currency']").each(function ()
|
|||||||
{
|
{
|
||||||
$(this).text(parseFloat($(this).text()).toLocaleString(undefined, { style: "currency", currency: Grocy.Currency }));
|
$(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',
|
Grocy.Api.Get('calendar/ical/sharing-link',
|
||||||
function(result)
|
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)
|
function(xhr)
|
||||||
{
|
{
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<h1>
|
<h1>
|
||||||
@yield('title')
|
@yield('title')
|
||||||
<a id="ical-button" class="btn btn-outline-dark" href="#">
|
<a id="ical-button" class="btn btn-outline-dark" href="#">
|
||||||
<i class="fas fa-calendar-plus"></i> {{ $L('Export as iCal') }}
|
<i class="fas fa-calendar-plus"></i> {{ $L('Share/Integrate calendar (iCal)') }}
|
||||||
</a>
|
</a>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user