mirror of
https://github.com/grocy/grocy.git
synced 2026-04-07 05:16:15 +02:00
Fixed (broken by myself) link-return handling
This commit is contained in:
parent
ddfe608ec6
commit
849d3dd0ca
|
|
@ -670,7 +670,7 @@ $(Grocy.UserPermissions).each(function (index, item)
|
||||||
$('.permission-'+item.permission_name).addClass('disabled').addClass('not-allowed');
|
$('.permission-'+item.permission_name).addClass('disabled').addClass('not-allowed');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('a.link-return').each(function () {
|
$('a.link-return').not(".btn").each(function () {
|
||||||
var base = $(this).data('href');
|
var base = $(this).data('href');
|
||||||
if(base.contains('?'))
|
if(base.contains('?'))
|
||||||
{
|
{
|
||||||
|
|
@ -681,3 +681,18 @@ $('a.link-return').each(function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
$(document).on("click", "a.btn.link-return", function(e)
|
||||||
|
{
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
var link = GetUriParam("returnto");
|
||||||
|
if (!link || !link.length > 0)
|
||||||
|
{
|
||||||
|
location.href = $(e.currentTarget).attr("href");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
location.href = U(link);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a href="{{ $U('/') }}" class="btn btn-success">{{ $__t('OK') }}</a>
|
<a href="{{ $U('/') }}" class="btn btn-success link-return">{{ $__t('OK') }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@stop
|
@stop
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user