From ab3bd62b162004a0e2436a1d25e813ed25ad7c33 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 13 Jul 2018 16:31:38 +0200 Subject: [PATCH] Some fine tuning for notifications popup sidebar --- notifications/js/notificationajaxpopup.js | 14 +++++++-- pixelegg/css/mobile.css | 14 +++++---- pixelegg/css/pixelegg.css | 14 +++++---- pixelegg/js/slider.js | 38 +++++++++-------------- pixelegg/less/layout_messages.less | 14 +++++---- pixelegg/mobile/fw_mobile.css | 14 +++++---- 6 files changed, 59 insertions(+), 49 deletions(-) diff --git a/notifications/js/notificationajaxpopup.js b/notifications/js/notificationajaxpopup.js index 35d32c2bc3..8deb6f0967 100644 --- a/notifications/js/notificationajaxpopup.js +++ b/notifications/js/notificationajaxpopup.js @@ -372,6 +372,7 @@ _node[0].removeClass('egwpopup_expanded'); _node[0].css('z-index', 0); this.checkNavButtonStatus(); + egw.loading_prompt('popup_notifications', false); }; /** @@ -395,6 +396,7 @@ var zindex = jQuery('.egwpopup_expanded').length; _node[0].addClass('egwpopup_expanded').css('z-index', zindex++); this.checkNavButtonStatus(); + if (jQuery('#egwpopup').is(':visible')) egw.loading_prompt('popup_notifications', true); }; notifications.prototype.nav_button = function (_params, _event){ @@ -507,6 +509,7 @@ notifymessages = {}; jQuery("#egwpopup_list").empty(); this.counterUpdate(); + egw.loading_prompt('popup_notifications', false); }; /** @@ -524,16 +527,20 @@ var request = egw.json("notifications.notifications_ajax.delete_message", [ids]); request.sendRequest(true); var nextNode = egwpopup_message.next(); + var keepLoadingPrompt = false; delete (notifymessages[id]); if (nextNode.length > 0 && nextNode[0].id.match(/egwpopup_message_/ig) && egwpopup_message.hasClass('egwpopup_expanded')) { nextNode.trigger('click'); + keepLoadingPrompt = true; } // try to close the dialog if expanded before hidding it this.collapseMessage(_node, _event); + if (keepLoadingPrompt) egw.loading_prompt('popup_notifications', true); egwpopup_message.remove(); this.bell("inactive"); this.counterUpdate(); + }; /** @@ -720,19 +727,22 @@ !$egwpopup.is(e.target) && $egwpopup.has(e.target).length == 0) { jQuery(this).off(e); - $egwpopup.slideToggle('fast'); + $egwpopup.toggle('slide'); + egw.loading_prompt('popup_notifications', false); } }); + egw.loading_prompt('popup_notifications', jQuery("#egwpopup_list").find('.egwpopup_expanded').length>0); } else { + egw.loading_prompt('popup_notifications', false); if (_stat) return; $body.off('click'); } // Remove popup_note as soon as message list is toggled jQuery('.popup_note', '#egwpopup_fw_notifications').remove(); - if ($egwpopup.length>0) $egwpopup.slideToggle('fast'); + if ($egwpopup.length>0) $egwpopup.toggle('slide'); }; /** diff --git a/pixelegg/css/mobile.css b/pixelegg/css/mobile.css index dc5ecad90f..85a437a5f0 100644 --- a/pixelegg/css/mobile.css +++ b/pixelegg/css/mobile.css @@ -3550,14 +3550,16 @@ td.lettersearch { * @version $Id$ */ #egwpopup { - top: 43px !important; + top: 85px; right: 0px !important; left: auto !important; - height: calc(100% - 65px); - width: 300px !important; + height: calc(100% - 130px); + width: 277px !important; position: absolute; background: white; - box-shadow: -2px 1px 18px 1px silver; + border: 1px solid silver; + border-top: none; + border-bottom: none; padding: 1em; /*Button*/ } @@ -3702,8 +3704,8 @@ td.lettersearch { } #egwpopup #egwpopup_list .egwpopup_message.egwpopup_expanded { position: fixed; - top: 4vh; - height: 90vh; + top: 85px; + height: calc(100% - 130px); left: 20vw; width: 60vw; box-shadow: 0 0 40px #666; diff --git a/pixelegg/css/pixelegg.css b/pixelegg/css/pixelegg.css index 75a3cb099c..fdb83d7213 100644 --- a/pixelegg/css/pixelegg.css +++ b/pixelegg/css/pixelegg.css @@ -3539,14 +3539,16 @@ td.lettersearch { * @version $Id$ */ #egwpopup { - top: 43px !important; + top: 85px; right: 0px !important; left: auto !important; - height: calc(100% - 65px); - width: 300px !important; + height: calc(100% - 130px); + width: 277px !important; position: absolute; background: white; - box-shadow: -2px 1px 18px 1px silver; + border: 1px solid silver; + border-top: none; + border-bottom: none; padding: 1em; /*Button*/ } @@ -3691,8 +3693,8 @@ td.lettersearch { } #egwpopup #egwpopup_list .egwpopup_message.egwpopup_expanded { position: fixed; - top: 4vh; - height: 90vh; + top: 85px; + height: calc(100% - 130px); left: 20vw; width: 60vw; box-shadow: 0 0 40px #666; diff --git a/pixelegg/js/slider.js b/pixelegg/js/slider.js index 89da3d0c34..d5e713b057 100644 --- a/pixelegg/js/slider.js +++ b/pixelegg/js/slider.js @@ -24,6 +24,7 @@ function show_pixelegg_header(_toggle, _delay) jQuery(".egw_fw_ui_sidemenu_entry_header_active").css("background-position","95% -3000px"); jQuery(_toggle).parent().removeClass("slidedown"); jQuery(_toggle).parent().addClass("slideup"); + jQuery('#egwpopup, .egwpopup_message.egwpopup_expanded').css({top:'90px', height:'calc(100% - 130px)'}); } //closed = Topmenu is gone @@ -31,7 +32,7 @@ function hide_pixelegg_header(_toggle, _delay) { jQuery("#egw_fw_header").slideToggle(); jQuery("#egw_fw_sidebar").animate({'top':'3px'},_delay); -// jQuery("#egw_fw_topmenu_info_items").show(); + // jQuery("#egw_fw_topmenu_info_items").show(); jQuery("#egw_fw_logout").show(); jQuery("#egw_fw_print").show(); jQuery("#egw_fw_tabs").animate({'margin-top':'8px', "top": "0px"},_delay); @@ -44,30 +45,21 @@ function hide_pixelegg_header(_toggle, _delay) // "white-space": "nowrap", // },_delay); jQuery(".egw_fw_ui_sidemenu_entry_header_active").css("background-position","95% 50%"); - -// jQuery("#egw_fw_topmenu_info_items").css("position", "fixed"); -// jQuery("#egw_fw_topmenu_info_items").css("z-index", "1000"); - // Form - Country Switch -// jQuery("#egw_fw_topmenu_info_items form").css("display", "none"); - - jQuery(".egw_fw_ui_tabs_header").css("height", "34px") - // Padding to adjust for icons left & right of the tabs - .css("padding", "1px 150px 0px 20px"); - - - //Tab - jQuery(".egw_fw_ui_tab_header").css("height", "24px"); - // ICON - //jQuery(".egw_fw_ui_tab_icon").css("height", "17px"); - jQuery(".egw_fw_ui_tab_icon").css("display", "inline-block"); - jQuery(".egw_fw_ui_tab_icon").css("margin-right", "5px"); - // H1 - jQuery(".egw_fw_ui_tabs_header h1").css("float", "none"); - jQuery(".egw_fw_ui_tabs_header h1").css("display", "inline"); - - + jQuery(".egw_fw_ui_tabs_header").css("height", "34px") + // Padding to adjust for icons left & right of the tabs + .css("padding", "1px 150px 0px 20px"); + //Tab + jQuery(".egw_fw_ui_tab_header").css("height", "24px"); + // ICON + //jQuery(".egw_fw_ui_tab_icon").css("height", "17px"); + jQuery(".egw_fw_ui_tab_icon").css("display", "inline-block"); + jQuery(".egw_fw_ui_tab_icon").css("margin-right", "5px"); + // H1 + jQuery(".egw_fw_ui_tabs_header h1").css("float", "none"); + jQuery(".egw_fw_ui_tabs_header h1").css("display", "inline"); jQuery(_toggle).parent().removeClass("slideup"); jQuery(_toggle).parent().addClass("slidedown"); + jQuery('#egwpopup, .egwpopup_message.egwpopup_expanded').css({top:'45px', height:'calc(100% - 85px)'}); } /* diff --git a/pixelegg/less/layout_messages.less b/pixelegg/less/layout_messages.less index e086b15484..11a91e8370 100755 --- a/pixelegg/less/layout_messages.less +++ b/pixelegg/less/layout_messages.less @@ -17,14 +17,16 @@ #egwpopup { - top: 43px !important; + top: 85px; right:0px !important; left: auto !important; - height: ~"calc(100% - 65px)"; - width: 300px !important; + height: ~"calc(100% - 130px)"; + width: 277px !important; position: absolute; background: white; - box-shadow: -2px 1px 18px 1px silver; + border:1px solid silver; + border-top: none; + border-bottom: none; padding: 1em; /*Button*/ @@ -142,8 +144,8 @@ } .egwpopup_message.egwpopup_expanded { position: fixed; - top: 4vh; - height: 90vh; + top: 85px; + height: ~"calc(100% - 130px)"; left: 20vw; width: 60vw; box-shadow: 0 0 40px #666; diff --git a/pixelegg/mobile/fw_mobile.css b/pixelegg/mobile/fw_mobile.css index d61cd839ac..bf4c406e91 100644 --- a/pixelegg/mobile/fw_mobile.css +++ b/pixelegg/mobile/fw_mobile.css @@ -3561,14 +3561,16 @@ td.lettersearch { * @version $Id$ */ #egwpopup { - top: 43px !important; + top: 85px; right: 0px !important; left: auto !important; - height: calc(100% - 65px); - width: 300px !important; + height: calc(100% - 130px); + width: 277px !important; position: absolute; background: white; - box-shadow: -2px 1px 18px 1px silver; + border: 1px solid silver; + border-top: none; + border-bottom: none; padding: 1em; /*Button*/ } @@ -3713,8 +3715,8 @@ td.lettersearch { } #egwpopup #egwpopup_list .egwpopup_message.egwpopup_expanded { position: fixed; - top: 4vh; - height: 90vh; + top: 85px; + height: calc(100% - 130px); left: 20vw; width: 60vw; box-shadow: 0 0 40px #666;