check if attribute 'remote' is set

This commit is contained in:
Uwe Steinmann 2025-04-02 09:29:37 +02:00
parent de4fae18d0
commit cd4743d917

View File

@ -395,7 +395,8 @@ $(document).ready( function() {
*/
$('body').on('click', '[data-toggle="modal"]', function(ev){ /* {{{ */
ev.preventDefault();
$($(this).data("target")+' .modal-body').load($(this).data("remote"), function() {setTimeout(function(){initMost();}, 500);});
if($(this).data("remote"))
$($(this).data("target")+' .modal-body').load($(this).data("remote"), function() {setTimeout(function(){initMost();}, 500);});
/* Also set the title */
if($(this).data("modal-title"))
$($(this).data("target")+' .modal-header h3').html($(this).data("modal-title"));