From 59db0ed5a72647f1f26c089b9d2e450002673e47 Mon Sep 17 00:00:00 2001 From: abarrau Date: Fri, 22 Dec 2023 10:16:19 +0100 Subject: [PATCH 1/7] fix forgotten semicolon on php --- application/views/awards/details.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/views/awards/details.php b/application/views/awards/details.php index 59261177..f656d527 100644 --- a/application/views/awards/details.php +++ b/application/views/awards/details.php @@ -1,3 +1,3 @@ -
+
-load->view('view_log/partial/log_ajax') ?> \ No newline at end of file +load->view('view_log/partial/log_ajax'); ?> \ No newline at end of file From 372ef7604bb69724d68c225d7defcd306882c7c8 Mon Sep 17 00:00:00 2001 From: abarrau Date: Fri, 22 Dec 2023 11:12:08 +0100 Subject: [PATCH 2/7] remove class can make issue --- assets/css/general.css | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/assets/css/general.css b/assets/css/general.css index c9386e75..b66e9c71 100644 --- a/assets/css/general.css +++ b/assets/css/general.css @@ -701,11 +701,9 @@ table.dataTable tfoot td { .dropend .dropdown-toggle { margin-left: 1em; } - -.dropdown .dropdown-menu { +/*.dropdown .dropdown-menu { display: none; -} - +}*/ .dropdown:hover>.dropdown-menu, .dropend:hover>.dropdown-menu { display: block; /* margin-top: .125em; */ @@ -718,15 +716,13 @@ table.dataTable tfoot td { top: 0; left: 100%; } - .dropend .dropdown-toggle { margin-left: .5em; } } - -.navbar-nav li:hover > ul.dropdown-menu { +/*.navbar-nav li:hover > ul.dropdown-menu { display: block; -} +}*/ .dropdown-submenu { position:relative; @@ -736,11 +732,15 @@ table.dataTable tfoot td { left:100%; margin-top:-9px; } - .dropdown-menu > li > a:hover:after { transform: rotate(-90deg); } +.table-responsive .dropdown-menu.notdisplay { + padding:0px!important; + border:0px!important; +} + #partial_view .table-responsive { overflow-x: unset; } From 19a8f60803eb7c6acd20ba6fc40eaeb4d4fbd709 Mon Sep 17 00:00:00 2001 From: abarrau Date: Fri, 22 Dec 2023 11:12:58 +0100 Subject: [PATCH 3/7] add generic function for display action menu --- assets/js/sections/common.js | 42 ++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/assets/js/sections/common.js b/assets/js/sections/common.js index e4e8a2dc..9bf7490a 100644 --- a/assets/js/sections/common.js +++ b/assets/js/sections/common.js @@ -123,6 +123,9 @@ function qso_edit(id) { data: {'id': id }, success: function(html) { + // remove actions QSO menu // + $('.menuOnResultTab').hide(); + $('.menuOnBody').remove(); BootstrapDialog.show({ title: lang_general_word_qso_data, cssClass: 'edit-dialog', @@ -148,7 +151,7 @@ function qso_edit(id) { //$('#stationCntyInput')[0].selectize.destroy(); $("#stationCntyInputEdit").val(""); } - }); + }); $('#locator').change(function(){ if ($(this).val().length >= 4) { @@ -584,4 +587,39 @@ function btn_pwd_showhide() { $(this).closest('div').find('.fa-eye').removeClass('fa-eye').addClass('fa-eye-slash'); } } -$('.user_edit .btn-pwd-showhide').off('click').on('click', btn_pwd_showhide ); \ No newline at end of file +$('.user_edit .btn-pwd-showhide').off('click').on('click', btn_pwd_showhide ); + +// [QSO] show/hide actions menu on qso list (_this = div.dropdown actived) // +function showQsoActionsMenu(_this) { + $('.menuOnResultTab').hide(); + $('.menuOnBody').remove(); + var _id = _this.find('.menuOnResultTab').attr('data-qsoid'); + var _dropdownMenuClone = _this.find('.menuOnResultTab[data-qsoid="'+ _id +'"]').clone(); + _dropdownMenuClone.removeClass('menuOnResultTab').addClass('menuOnBody'); + $('body').append(_dropdownMenuClone); + var _dropdownMenu = _this.find('.menuOnResultTab[data-qsoid="'+ _id +'"]'); + var eOffset = _this.offset(); + if ((eOffset.top - $(window).scrollTop() + _dropdownMenu.outerHeight()) >= ($(window).height()-50)) { + _topMenu = eOffset.top - _dropdownMenu.outerHeight(); + } else { + _topMenu = eOffset.top + _this.outerHeight(); + } + _dropdownMenuClone.css({ + 'top': _topMenu, + 'left': eOffset.left - _dropdownMenu.width() + _this.find('.dropdown-toggle').outerWidth(), + 'display': 'block', + }); + _dropdownMenuClone.off('mouseleave').on('mouseleave', function () { + $(this).remove(); + }); + _dropdownMenuClone.find('a').off('click').on('click', function () { + if ($(this).is(':first-child') || $(this).is(':last-child')) { // Only for edit & delete action // + $(this).closest('.menuOnResultTab').remove(); + } + }); +} +if ($('.table-responsive .dropdown-toggle').length>0) { + $('.table-responsive .dropdown-toggle').off('mouseenter').on('mouseenter', function () { + showQsoActionsMenu($(this).closest('.dropdown')); + }); +} From 3199660f9d57eb2354ef69ecf8136d55ab8d396d Mon Sep 17 00:00:00 2001 From: abarrau Date: Fri, 22 Dec 2023 11:14:25 +0100 Subject: [PATCH 4/7] add special name of this action menu (difference with top menu) --- application/views/search/search_result_ajax.php | 2 +- application/views/view_log/partial/log_ajax.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/views/search/search_result_ajax.php b/application/views/search/search_result_ajax.php index f26870bb..16c94bfb 100644 --- a/application/views/search/search_result_ajax.php +++ b/application/views/search/search_result_ajax.php @@ -419,7 +419,7 @@ $ci =& get_instance(); -