From d36b0fa64d5b09877f04c4900abb50d0a40a0534 Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Wed, 25 Mar 2015 17:12:01 +0100 Subject: [PATCH 1/3] remove old css --- app/assets/stylesheets/zammad.css.scss | 8 -------- 1 file changed, 8 deletions(-) diff --git a/app/assets/stylesheets/zammad.css.scss b/app/assets/stylesheets/zammad.css.scss index 1b0f599bd..5b8d99bf2 100644 --- a/app/assets/stylesheets/zammad.css.scss +++ b/app/assets/stylesheets/zammad.css.scss @@ -5,14 +5,6 @@ body { background: hsl(210,17%,98%); } -/* TODO: @mrflix, do we need this at this level? -p, -ol, -ul { - color: #bcbcbb; -} -*/ - p { margin: 14px 0; } From d39d960a13c601c2af013bfc28bd7aac10096c66 Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Wed, 25 Mar 2015 18:00:00 +0100 Subject: [PATCH 2/3] fix popover out of visible area --- .../app/lib/bootstrap/popover-enhance.js | 36 ++++++++++++++++++- app/assets/stylesheets/zammad.css.scss | 11 ++++-- 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/app/lib/bootstrap/popover-enhance.js b/app/assets/javascripts/app/lib/bootstrap/popover-enhance.js index 961ddd428..3662cfb87 100644 --- a/app/assets/javascripts/app/lib/bootstrap/popover-enhance.js +++ b/app/assets/javascripts/app/lib/bootstrap/popover-enhance.js @@ -27,4 +27,38 @@ $.fn.popover.Constructor.prototype.leave = function(obj){ }); }) } -}; \ No newline at end of file +}; + +/* + + Add global 10px padding + +*/ + +$.fn.popover.Constructor.DEFAULTS.viewport.padding = 10; + +/* + + Extend zammad popover template + + adds a popover-body around popover-title and popover-content + to make the popover scrollable without hiding the arrow + +*/ + +$.fn.popover.Constructor.DEFAULTS.template = ''; + +/* + + Add maxHeight to popovers + +*/ + +var originalShow = $.fn.popover.Constructor.prototype.show; + +$.fn.popover.Constructor.prototype.show = function(){ + originalShow.call(this); + + var maxHeight = $(this.options.viewport.selector).height() - 2 * this.options.viewport.padding; + this.$tip.find('.popover-body').css('maxHeight', maxHeight); +} \ No newline at end of file diff --git a/app/assets/stylesheets/zammad.css.scss b/app/assets/stylesheets/zammad.css.scss index 5b8d99bf2..b8130f738 100644 --- a/app/assets/stylesheets/zammad.css.scss +++ b/app/assets/stylesheets/zammad.css.scss @@ -1,8 +1,13 @@ +html { + height: 100%; +} + body { font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; line-height: 1.45; font-weight: normal; background: hsl(210,17%,98%); + height: 100%; } p { @@ -2810,9 +2815,12 @@ footer { z-index: 1110; box-shadow: 0 1px 14px rgba(0,8,14,.25); word-wrap: break-word; - // max-height: calc(100vh - 20px); } + .popover-body { + overflow: auto; + } + .popover-title { border: none; background: none; @@ -2821,7 +2829,6 @@ footer { .popover-content { padding: 0 17px 10px; - overflow-y: auto; } .popover.right { margin-left: 4px; } From eddc9e00612b8474b5d78fa0b1f09ab846d0a9c8 Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Thu, 26 Mar 2015 11:35:04 +0100 Subject: [PATCH 3/3] hide unused chat --- app/assets/stylesheets/custom/chat.css | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/stylesheets/custom/chat.css b/app/assets/stylesheets/custom/chat.css index 643574cbb..065b941c5 100644 --- a/app/assets/stylesheets/custom/chat.css +++ b/app/assets/stylesheets/custom/chat.css @@ -2,6 +2,7 @@ position: fixed; bottom: 0; right: 0; + display: none; } #chat .well-chat {