Index: lams_learning/web/includes/javascript/learnerPage.js =================================================================== diff -u -r722eca5a525f8ec6f93a1f8c740473a68876f1c1 -ra98851d446506c2f9e7e7bac54569cc912a84e44 --- lams_learning/web/includes/javascript/learnerPage.js (.../learnerPage.js) (revision 722eca5a525f8ec6f93a1f8c740473a68876f1c1) +++ lams_learning/web/includes/javascript/learnerPage.js (.../learnerPage.js) (revision a98851d446506c2f9e7e7bac54569cc912a84e44) @@ -87,4 +87,31 @@ $('#progress-bar-widget-value').text(progressBarWidgetValue + '%'); } }); +} + +function showMyProfileDialog() { + let dialog = showDialog("dialogMyProfile", { + 'title' : "My profile", + 'modal' : true, + 'width' : Math.max(380, Math.min(1000, $(window).width() - 60)), + 'height' : 430, + 'open' : function() { + var dialog = $(this); + // load contents after opening the dialog + $('iframe', dialog).attr({'src': LAMS_URL + 'index.do?redirect=profile', + 'id' : 'myProfileModal'}); + + // in case of mobile devices allow iframe scrolling + if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { + setTimeout(function() { + dialog.css({ + 'overflow-y' : 'scroll', + '-webkit-overflow-scrolling' : 'touch' + }); + },500); + } + } + }); + + dialog.children('.modal-dialog').addClass('modal-lg'); } \ No newline at end of file