From c4f28c364959cd3dcf03a7594650e9a7c7f29e89 Mon Sep 17 00:00:00 2001 From: zmagod Date: Wed, 5 Oct 2016 10:16:51 +0200 Subject: [PATCH 1/4] made notification images bigger [fixes SCI-533] --- app/assets/stylesheets/themes/scinote.scss | 25 ++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/themes/scinote.scss b/app/assets/stylesheets/themes/scinote.scss index 23290885b..3c9d0d462 100644 --- a/app/assets/stylesheets/themes/scinote.scss +++ b/app/assets/stylesheets/themes/scinote.scss @@ -128,20 +128,37 @@ table { padding-top: 10px; } + .avatar { + height: 45px; + margin: 0 auto; + margin-left: 5px; + width: 45px; + } + .assignment { background-color: $color-theme-primary; border-radius: 50%; color: $color-wild-sand; - font-size: 15px; - padding: 7px; + display: block; + font-size: 23px; + height: 45px; + margin: 0 auto; + margin-left: 5px; + padding-top: 5px; + width: 45px; } .system_message { background-color: $color-theme-secondary; border-radius: 50%; color: $color-wild-sand; - font-size: 13px; - padding: 7px 10px; + display: block; + font-size: 23px; + height: 45px; + margin: 0 auto; + margin-left: 5px; + padding-top: 8px; + width: 45px; } .notifications-dropdown-header { From f9d956bbca98bd1d97419ac7424dd0af5e709e55 Mon Sep 17 00:00:00 2001 From: zmagod Date: Wed, 5 Oct 2016 11:50:57 +0200 Subject: [PATCH 2/4] fix notifications number on [fixes SCI-531] --- app/assets/javascripts/navigation.js | 19 ++++++++++++ app/assets/stylesheets/themes/scinote.scss | 34 +++++++--------------- 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/app/assets/javascripts/navigation.js b/app/assets/javascripts/navigation.js index 64d81fcc8..6b8a77129 100644 --- a/app/assets/javascripts/navigation.js +++ b/app/assets/javascripts/navigation.js @@ -32,6 +32,7 @@ } }); $('#count-notifications').hide(); + toggleNotificationBellPosition(); }); } @@ -46,6 +47,7 @@ if ( data.notificationNmber > 0 ) { notificationCount.html(data.notificationNmber); notificationCount.show(); + toggleNotificationBellPosition(); } else { notificationCount.hide(); } @@ -54,7 +56,24 @@ }); } + function toggleNotificationBellPosition() { + var notificationCount = $('#count-notifications'); + var button = $('#notifications-dropdown'); + + if ( notificationCount.is(":hidden") ) { + button + .find('.fa-bell') + .css('position', 'relative'); + } else { + button + .find('.fa-bell') + .css('position', 'absolute'); + } + + } + // init loadDropdownNotifications(); loadUnseenNotificationsNumber(); + toggleNotificationBellPosition(); })(); diff --git a/app/assets/stylesheets/themes/scinote.scss b/app/assets/stylesheets/themes/scinote.scss index 3c9d0d462..e9fbd8f9a 100644 --- a/app/assets/stylesheets/themes/scinote.scss +++ b/app/assets/stylesheets/themes/scinote.scss @@ -75,29 +75,20 @@ table { #notifications-dropdown { .fa-bell { font-size: 15px; + position: absolute; } #count-notifications { background-color: $color-theme-primary; border-radius: 5px; color: $color-wild-sand; - font-size: 12px; - font-weight: bold; - margin-left: 10px; - margin-top: -10px; - padding-left: 4px; - padding-right: 4px; - position: fixed; - z-index: 999999; display: none; - } -} - -@media(max-width:768px) { - #count-notifications { - position: absolute !important; - margin-left: -4px !important; - margin-top: 10px !important; + font-size: 11px; + font-weight: bold; + margin-left: 12px; + padding: 1px 6px; + position: relative; + z-index: 999999; } } @@ -124,14 +115,13 @@ table { } .text-center { - margin-left: 10px; - padding-top: 10px; + margin-left: 12px; } .avatar { + top: 0px; + margin-top: 5px; height: 45px; - margin: 0 auto; - margin-left: 5px; width: 45px; } @@ -142,8 +132,6 @@ table { display: block; font-size: 23px; height: 45px; - margin: 0 auto; - margin-left: 5px; padding-top: 5px; width: 45px; } @@ -155,8 +143,6 @@ table { display: block; font-size: 23px; height: 45px; - margin: 0 auto; - margin-left: 5px; padding-top: 8px; width: 45px; } From 5bf278298b5e2ec1c1c65147004dd1c5eafee743 Mon Sep 17 00:00:00 2001 From: zmagod Date: Wed, 5 Oct 2016 12:22:27 +0200 Subject: [PATCH 3/4] fixed navbar on sceens smaller than 1000px --- app/assets/stylesheets/extend/bootstrap.scss | 43 +++++++ app/views/shared/_navigation.html.erb | 126 +++++++++---------- 2 files changed, 105 insertions(+), 64 deletions(-) diff --git a/app/assets/stylesheets/extend/bootstrap.scss b/app/assets/stylesheets/extend/bootstrap.scss index 4159a13b1..f65cd2ee8 100644 --- a/app/assets/stylesheets/extend/bootstrap.scss +++ b/app/assets/stylesheets/extend/bootstrap.scss @@ -57,3 +57,46 @@ .result-comment .col-xs-12 { float: none; } + +@media (max-width: 1000px) { + .navbar-header { + float: none; + } + .navbar-left,.navbar-right { + float: none !important; + } + .navbar-toggle { + display: block; + background-color: transparent; + background-image: none; + border: 1px solid transparent; + } + .navbar-collapse { + border-top: 1px solid transparent; + box-shadow: inset 0 1px 0 rgba(255,255,255,0.1); + } + .navbar-fixed-top { + top: 0; + border-width: 0 0 1px; + } + .navbar-collapse.collapse { + display: none!important; + } + .navbar-nav { + float: none!important; + margin-top: 7.5px; + } + .navbar-nav>li { + float: none; + } + .navbar-nav>li>a { + padding-bottom: 10px; + padding-top: 10px; + } + .collapse.in{ + display:block !important; + } + .container { + width: 100%; + } +} diff --git a/app/views/shared/_navigation.html.erb b/app/views/shared/_navigation.html.erb index e00830dc6..325b9294f 100644 --- a/app/views/shared/_navigation.html.erb +++ b/app/views/shared/_navigation.html.erb @@ -28,95 +28,93 @@
  • - <%= t('nav.label.projects') %> + <%= t('nav.label.projects') %>
  • - <%= t('nav.label.protocols') %> + <%= t('nav.label.protocols') %>
  • <% if false %>
  • - <%= t('nav.label.calendar') %> + <%= t('nav.label.calendar') %>
  • <% end %>
  • - <%= t('nav.label.activities') %> + <%= t('nav.label.activities') %>
  • -
    - - - - <%= form_tag search_path, method: :get, id: 'search-bar', class: 'navbar-form navbar-right', role: 'search' do %> -
    -
    - - - - -
    + + <%= form_tag search_path, method: :get, id: 'search-bar', class: 'navbar-form navbar-right', role: 'search' do %> +
    +
    + + + +
    - <% end %> -
    +
    + <% end %>
    <% end %> From dfcbebbf4f45819acbc614df169fb4b4c1f75c98 Mon Sep 17 00:00:00 2001 From: zmagod Date: Wed, 5 Oct 2016 14:49:23 +0200 Subject: [PATCH 4/4] cleaned up bootstrap extension --- app/assets/stylesheets/extend/bootstrap.scss | 26 ++++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/app/assets/stylesheets/extend/bootstrap.scss b/app/assets/stylesheets/extend/bootstrap.scss index f65cd2ee8..71f3a612d 100644 --- a/app/assets/stylesheets/extend/bootstrap.scss +++ b/app/assets/stylesheets/extend/bootstrap.scss @@ -62,40 +62,50 @@ .navbar-header { float: none; } - .navbar-left,.navbar-right { + + .navbar-left, + .navbar-right { float: none !important; } + .navbar-toggle { - display: block; background-color: transparent; background-image: none; border: 1px solid transparent; + display: block; } + .navbar-collapse { border-top: 1px solid transparent; - box-shadow: inset 0 1px 0 rgba(255,255,255,0.1); } + .navbar-fixed-top { - top: 0; border-width: 0 0 1px; + top: 0; } + .navbar-collapse.collapse { - display: none!important; + display: none !important; } + .navbar-nav { - float: none!important; + float: none !important; margin-top: 7.5px; } + .navbar-nav>li { float: none; } + .navbar-nav>li>a { padding-bottom: 10px; padding-top: 10px; } - .collapse.in{ - display:block !important; + + .collapse.in { + display: block !important; } + .container { width: 100%; }