diff options
author | Mario <mario@mariovavti.com> | 2021-09-08 19:48:42 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-09-08 21:50:25 +0200 |
commit | b95c61d2c21f2c9f64df9fe2d90d8b7612a7735a (patch) | |
tree | a1f99a059b8e457d0572d06d2a9c1af74f7befe4 /view | |
parent | 4c5f0a05c75cc66113f589a3ffe6df351abb1273 (diff) | |
download | volse-hubzilla-b95c61d2c21f2c9f64df9fe2d90d8b7612a7735a.tar.gz volse-hubzilla-b95c61d2c21f2c9f64df9fe2d90d8b7612a7735a.tar.bz2 volse-hubzilla-b95c61d2c21f2c9f64df9fe2d90d8b7612a7735a.zip |
fix language selector reloading the page if not clicking the icon exactly and bs5 modal issues
(cherry picked from commit 7b0f8f289637d06f610230a0fbe7cfe51cd53d6c)
Diffstat (limited to 'view')
-rw-r--r-- | view/js/main.js | 8 | ||||
-rw-r--r-- | view/tpl/jot-header.tpl | 4 | ||||
-rw-r--r-- | view/tpl/wiki.tpl | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/view/js/main.js b/view/js/main.js index f54dbf593..476e78056 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -87,8 +87,8 @@ $(document).ready(function() { if ( typeof(window.tao.zin) == 'undefined' ) { tao.zin = { syslc: '', syslcs: {}, htm: '', me: '', debug: '' }; tao.zin.axim = '<div class="zinpax fa fa-sync fa-spin"> </div>'; - $('.navbar-app[href*="/lang"]').attr({"data-toggle": "dropdown", "aria-expand": "true", "id": "zintog"}) - .removeAttr('href').addClass('zinlcx zinlcxp dropdown dropdown-toggle'); + $('.navbar-app[href*="/lang"]').attr({"aria-expand": "true", "id": "zintog"}) + .removeAttr('href').addClass('zinlcx zinlcxp dropdown dropdown-toggle').css('cursor','pointer'); $('.dropdown-item[href*="/lang"]').addClass('zinlcxmi zinlcx').removeAttr('href').css('cursor','pointer'); } $('.zinlcx').on('click', function(e) { @@ -108,11 +108,11 @@ $(document).ready(function() { tao.zin.htm += '</ul>'; $('.zinpax').remove(); $('.zinlcx').append(tao.zin.htm); - $('.zinlcxp > ul').addClass('dropdown dropdown-menu dropdown-menu-end').css('left','-16em'); + $('.zinlcxp > ul').addClass('dropdown dropdown-menu dropdown-menu-end mt-2 show').css('right', 0); }); return false; } else { - if (e.target.id == '') { + if (e.target.id == '' || e.target.id == 'zintog') { // noop click on lang again return false; } diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index 2ee78cd28..ca3cabd61 100644 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -185,7 +185,7 @@ var activeCommentText = ''; function jotGetExpiry() { //reply = prompt("{{$expirewhen}}", $('#jot-expire').val()); - $('#expiryModal').modal(); + $('#expiryModal').modal('show'); $('#expiry-modal-OKButton').on('click', function() { reply=$('#expiration-date').val(); if(reply && reply.length) { @@ -197,7 +197,7 @@ var activeCommentText = ''; function jotGetPubDate() { //reply = prompt("{{$expirewhen}}", $('#jot-expire').val()); - $('#createdModal').modal(); + $('#createdModal').modal('show'); $('#created-modal-OKButton').on('click', function() { reply=$('#created-date').val(); if(reply && reply.length) { diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl index 33d4dd097..bf3f64508 100644 --- a/view/tpl/wiki.tpl +++ b/view/tpl/wiki.tpl @@ -323,7 +323,7 @@ wiki_revert_page(compareCommit); $('#generic-modal-{{$wikiModalID}}').modal('hide'); }); - $('#generic-modal-{{$wikiModalID}}').modal(); + $('#generic-modal-{{$wikiModalID}}').modal('show'); } else { window.console.log('Error comparing page.'); } @@ -364,7 +364,7 @@ }); getPhotoAlbumList(); $('#embedPhotoModalBodyAlbumDialog').off('click'); - $('#embedPhotoModal').modal(); + $('#embedPhotoModal').modal('show'); }; var choosePhotoFromAlbum = function (album) { |