diff --git a/app/assets/fonts/openproject_icon/openproject-icon-font.eot b/app/assets/fonts/openproject_icon/openproject-icon-font.eot index 60b17dcc89..43fdab7e6e 100644 Binary files a/app/assets/fonts/openproject_icon/openproject-icon-font.eot and b/app/assets/fonts/openproject_icon/openproject-icon-font.eot differ diff --git a/app/assets/fonts/openproject_icon/openproject-icon-font.svg b/app/assets/fonts/openproject_icon/openproject-icon-font.svg index 1b589df74a..f4ab129239 100644 --- a/app/assets/fonts/openproject_icon/openproject-icon-font.svg +++ b/app/assets/fonts/openproject_icon/openproject-icon-font.svg @@ -1,219 +1,224 @@ -This SVG font generated by Fontastic.me +Generated by Fontastic.me - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/assets/fonts/openproject_icon/openproject-icon-font.ttf b/app/assets/fonts/openproject_icon/openproject-icon-font.ttf index 10a48dfcb3..847fea5c5d 100644 Binary files a/app/assets/fonts/openproject_icon/openproject-icon-font.ttf and b/app/assets/fonts/openproject_icon/openproject-icon-font.ttf differ diff --git a/app/assets/fonts/openproject_icon/openproject-icon-font.woff b/app/assets/fonts/openproject_icon/openproject-icon-font.woff index f7941305e9..ddc2aafd01 100644 Binary files a/app/assets/fonts/openproject_icon/openproject-icon-font.woff and b/app/assets/fonts/openproject_icon/openproject-icon-font.woff differ diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index d9c3825f8a..e034275a69 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -45,6 +45,7 @@ //= require jquery.atwho //= require jquery_ujs //= require jquery_noconflict +//= require jquery.colorcontrast //= require prototype //= require effects //= require dragdrop diff --git a/app/assets/javascripts/jquery.colorcontrast.js b/app/assets/javascripts/jquery.colorcontrast.js new file mode 100644 index 0000000000..58d0349a92 --- /dev/null +++ b/app/assets/javascripts/jquery.colorcontrast.js @@ -0,0 +1,102 @@ +/** + * jQuery color contrast + * @Author: Jochen Vandendriessche + * @Author URI: http://builtbyrobot.com + **/ + +function debug(o){ + var _r = ''; + for (var k in o){ + _r += 'o[' + k + '] => ' + o[k] + '\n'; + } + window.alert(_r); +} + +(function($){ + + var methods = { + /* + Function: init + + Initialises the color contrast + + Parameters: + jQuery object - {object} + + Example + > // initialise new color contrast calculator + > $('body').colorcontrast(); + + */ + init : function() { + // check if we have a background image, if not, use the backgroundcolor + if ($(this).css('background-image') == 'none') { + $(this).colorcontrast('bgColor'); + }else{ + $(this).colorcontrast('bgImage'); + } + return this; + }, + bgColor : function() { + var t = $(this); + t.removeClass('dark light'); + t.addClass($(this).colorcontrast('calculateYIQ', t.css('background-color'))); + }, + bgImage : function() { + var t = $(this); + t.removeClass('dark light'); + t.addClass($(this).colorcontrast('calculateYIQ', t.colorcontrast('fetchImageColor'))); + }, + fetchImageColor : function(){ + var img = new Image(); + var src = $(this).css('background-image').replace('url(', '').replace(/'/, '').replace(')', ''); + img.src = src; + var can = document.createElement('canvas'); + var context = can.getContext('2d'); + context.drawImage(img, 0, 0); + data = context.getImageData(0, 0, 1, 1).data; + return 'rgb(' + data[0] + ',' + data[1] + ',' + data[2] + ')'; + }, + calculateYIQ : function(color){ + var r = 0, g = 0, b = 0, a = 1, yiq = 0; + if (/rgba/.test(color)){ + color = color.replace('rgba(', '').replace(')', '').split(/,/); + r = color[0]; + g = color[1]; + b = color[2]; + a = color[3]; + }else if (/rgb/.test(color)){ + color = color.replace('rgb(', '').replace(')', '').split(/,/); + r = color[0]; + g = color[1]; + b = color[2]; + }else if(/#/.test(color)){ + color = color.replace('#', ''); + if (color.length == 3){ + var _t = ''; + _t += color[0] + color[0]; + _t += color[1] + color[1]; + _t += color[2] + color[2]; + color = _t; + } + r = parseInt(color.substr(0,2),16); + g = parseInt(color.substr(2,2),16); + b = parseInt(color.substr(4,2),16); + } + yiq = ((r*299)+(g*587)+(b*114))/1000; + return (yiq >= 128) ? 'light' : 'dark'; + } + }; + $.fn.colorcontrast = function(method){ + + if ( methods[method] ) { + return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 )); + } else if ( typeof method === 'object' || ! method ) { + return methods.init.apply( this, arguments ); + } else { + $.error( 'Method ' + method + ' does not exist on jQuery color contrast' ); + } + + } + +})(this.jQuery); \ No newline at end of file diff --git a/app/assets/stylesheets/content/_forms.css.sass b/app/assets/stylesheets/content/_forms.css.sass index 58df40137f..3531f4fbdf 100644 --- a/app/assets/stylesheets/content/_forms.css.sass +++ b/app/assets/stylesheets/content/_forms.css.sass @@ -27,21 +27,41 @@ @import global/all +$login_form_button_font_color: #FFFFFF !default +$login_form_bg_color: #F8F8F8 !default +$login_form_border: 1px solid #EAEAEA !default +$login_form_input_border: 1px solid #CACACA !default +$login_form_button_bg_color: #06799F !default +$login_form_button_hover_bg_color: #053242 !default + #login-form form - border: none padding: 30px 20px - background-color: $content_form_bg_color + background-color: $login_form_bg_color display: block - border: 1px solid #6DABC2 - -moz-border-radius: 5px - -webkit-border-radius: 5px - border-radius: 5px - padding: 10px - input#username, input#password + border: $login_form_border + input#username, input#password, input#openid_url width: $content_from_input_width - label - font-weight: bold + height: 35px + line-height: 35px + border: $login_form_input_border + padding: 0 10px + @include border-radius(2px) + font-family: $font_family_bold + font-size: $global_font_size + input[type=submit] + border: none + background-color: $login_form_button_bg_color + color: $login_form_button_font_color + padding: 5px 13px + font-size: $global_font_size + @include border-radius(2px) + @include default-transition + cursor: pointer + &:hover + background-color: $login_form_button_hover_bg_color + #lost_password + margin-top: 20px table border: 0 none @@ -49,4 +69,6 @@ margin: 0 td padding: 6px + &.label + width: 160px diff --git a/app/assets/stylesheets/content/_links.css.sass b/app/assets/stylesheets/content/_links.css.sass index a9eefef26a..5478f80d7d 100644 --- a/app/assets/stylesheets/content/_links.css.sass +++ b/app/assets/stylesheets/content/_links.css.sass @@ -30,7 +30,7 @@ a, a:link color: $content_link_color text-decoration: none - font-weight: bold + font-weight: $content_link_font_weight a:hover, a:active, #content table th a:hover color: $content_link_hover_active_color diff --git a/app/assets/stylesheets/default/main.css.erb b/app/assets/stylesheets/default/main.css.erb index 54a29d1ba9..6a8dd169e5 100644 --- a/app/assets/stylesheets/default/main.css.erb +++ b/app/assets/stylesheets/default/main.css.erb @@ -323,7 +323,7 @@ ul.projects ul {border: none; } ul.projects ul.projects { border-left: 3px solid #e0e0e0; } ul.projects li.root { list-style-type: none; margin-bottom: 1em; } ul.projects li.child { list-style-type: none; margin-top: 1em;} -ul.projects div.root a.project { font-family: "Arial", Arial, sans-serif; font-weight: bold; font-size: 16px; margin: 0 0 10px 0; } +ul.projects div.root a.project { font-weight: bold; font-size: 16px; margin: 0 0 10px 0; } #type_project_ids ul { margin: 0; padding-left: 1em; } #type_project_ids li { list-style-type: none; } @@ -742,10 +742,6 @@ ins.diffmod, ins.diffins { background: #cfc; } margin-bottom: 15px; } -.mypage-box h3, .mypage-box a { - font-weight: bold; -} - #content .mypage-box table.issues td, #content .mypage-box table th, #content .mypage-box table.list { border: none; padding: 0; diff --git a/app/assets/stylesheets/fonts/openproject_icon_font.css.sass b/app/assets/stylesheets/fonts/openproject_icon_font.css.sass index a491a64f58..cd8eaaf6ab 100644 --- a/app/assets/stylesheets/fonts/openproject_icon_font.css.sass +++ b/app/assets/stylesheets/fonts/openproject_icon_font.css.sass @@ -790,3 +790,18 @@ dt.wiki-page:before, .icon-server-key:before content: "\e0d0" +.icon-backlogs-icon:before + content: "\e0d1" + +.icon-pulldown-arrow1:before + content: "\e0d2" + +.icon-pulldown-arrow2:before + content: "\e0d3" + +.icon-pulldown-arrow3:before + content: "\e0d4" + +.icon-pulldown-arrow4:before + content: "\e0d5" + diff --git a/app/assets/stylesheets/global/_mixins.sass b/app/assets/stylesheets/global/_mixins.sass index e27f66aa71..0280b04a10 100644 --- a/app/assets/stylesheets/global/_mixins.sass +++ b/app/assets/stylesheets/global/_mixins.sass @@ -40,24 +40,29 @@ @mixin default-font-normal($color, $font-size: 13px) color: $color font-size: $font-size - font-family: 'LatoRegular', 'Lucida Grande', Helvetica, Arial, sans-serif + font-family: $font_family_normal font-weight: normal @mixin default-font-bold($color, $font-size: 13px) color: $color font-size: $font-size - font-family: 'LatoBold', 'Lucida Grande', Helvetica, Arial, sans-serif + font-family: $font_family_bold font-weight: normal @mixin main-menu-font font-style: normal - font-family: 'LatoRegular','Lucida Grande',Helvetica,Arial,sans-serif + font-family: $font_family_normal -@mixin header-fonts($color, $font-size: 14px) +@mixin header-fonts($color, $font-size: $header_item_font_size) @include default-font-normal($color, $font-size) @mixin breadcrumb-font($color) - @include default-font-normal($color, 12px) + @include default-font-normal($color, $breadcrumb_font_size) @mixin breadcrumb-font-bold($color) - @include default-font-bold($color, 12px) + @include default-font-bold($color, $breadcrumb_font_size) + +@mixin border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + border-radius: $radius diff --git a/app/assets/stylesheets/global/_variables.sass b/app/assets/stylesheets/global/_variables.sass index 8f8c4d99d0..5b863b4eb6 100644 --- a/app/assets/stylesheets/global/_variables.sass +++ b/app/assets/stylesheets/global/_variables.sass @@ -25,13 +25,38 @@ * * See doc/COPYRIGHT.rdoc for more details. ++*/ +$font_family_normal: 'LatoRegular', 'Lucida Grande', Helvetica, Arial, sans-serif !default +$font_family_bold: 'LatoBold', 'Lucida Grande', Helvetica, Arial, sans-serif !default +$global_font_color: #555555 !default +$global_font_size: 13px !default +$global_line_height: 1.5 !default + $header_height: 55px !default $header_bg_color: #3493B3 !default -$header_logo_bg_color: #06799F !default +$header_border_bottom_color: #3493B3 !default +$header_border_bottom_width: 0 !default +$header_item_font_size: 14px !default $header_item_font_color: #FFFFFF !default +$header_item_font_hover_color: #FFFFFF !default $header_item_bg_hover_color: #06799F !default $header_drop_down_bg_color: #FFFFFF !default $header_drop_down_border_color: #E0E0E0 !default +$header_drop_down_item_font_color: #555555 !default +$header_drop_down_item_font_hover_color: #FFFFFF !default + +$header_drop_down_button_bg_color: #06799F !default +$header_drop_down_button_hover_bg_color: #053242 !default + +$header_logo_bg_color: #06799F !default +$header_home_link_bg: url(image-path('logo_openproject_white_big.png')) no-repeat 20px 0 !default + +$header_drop_down_projects_search_font_color: #555555 !default +$header_drop_down_projects_search_bg_color: #E0E0E0 !default +$header_drop_down_projects_search_input_bg_color: #FFFFFF !default + +$header_search_field_bg_color: #FFFFFF !default +$header_search_field_font_color: #000000 !default +$header_search_field_border: 0 !default $footer_bg_color: #3493B3 !default $footer_font_color: #FFFFFF !default @@ -49,11 +74,12 @@ $main_menu_item_border_color: #EAEAEA !default $main_menu_item_border_width: 1px !default $main_menu_bg_color: #F8F8F8 !default -$main_menu_bg_hover_selected_color: #06799F !default +$main_menu_bg_hover_selected_background: url() no-repeat #06799F !default $main_menu_font_color: #333333 !default $main_menu_selected_font_color: #FFFFFF !default $main_menu_font_size: 15px !default $main_menu_selected_hover_indicator_color: #06799F !default +$main_menu_selected_hover_indicator_width: 4px !default $main_menu_navigation_toggler_font_hover_color: #FFFFFF !default @@ -71,6 +97,18 @@ $main_menu_sidebar_link_color: #333333 !default $main_menu_sidebar_h3_border_top_color: #1F4654 !default $main_menu_sidebar_h3_font_size: 15px !default +$main_menu_sidebar_button_font_color: #FFFFFF !default +$main_menu_sidebar_button_hover_font_color: #FFFFFF !default +$main_menu_sidebar_button_bg_color: #06799F !default +$main_menu_sidebar_button_hover_bg_color: #053242 !default + +$breadcrumb_height: 40px !default +$breadcrumb_bg_color: #F8F8F8 !default +$breadcrumb_border_color: #E7E7E7 !default +$breadcrumb_font_size: 12px !default +$breadcrumb_highlighted_font_size: 14px !default +$breadcrumb_font_color: #555555 !default + $content_default_border_color: #EAEAEA !default $content_default_border_width: 1px !default @@ -78,6 +116,7 @@ $content_link_color: #06799F !default $content_link_hover_active_color: #06799F !default $content_icon_link_color: #4b4b4b !default $content_icon_link_hover_color: #06799F !default +$content_link_font_weight: bold !default $content_icon_color: #06799F !default diff --git a/app/assets/stylesheets/layout/_base.css.sass b/app/assets/stylesheets/layout/_base.css.sass index 1eec0d8cee..44e069f30b 100644 --- a/app/assets/stylesheets/layout/_base.css.sass +++ b/app/assets/stylesheets/layout/_base.css.sass @@ -36,8 +36,9 @@ html body @include html_body_spacing - color: #4b4b4b - font: normal normal normal 12px/1.5 arial,'lucida grandriale','lucida sans unicode',tahom,sans-serif + color: $global_font_color + font: normal normal normal $global_font_size $font_family_normal + line-height: $global_line_height background: white #wrapper diff --git a/app/assets/stylesheets/layout/_breadcrumb.css.sass b/app/assets/stylesheets/layout/_breadcrumb.css.sass index c0d8dc7266..8c9c54ab4e 100644 --- a/app/assets/stylesheets/layout/_breadcrumb.css.sass +++ b/app/assets/stylesheets/layout/_breadcrumb.css.sass @@ -29,11 +29,11 @@ #breadcrumb @include default-transition - height: 40px + height: $breadcrumb_height overflow: hidden - background: none repeat scroll 0 0 #F8F8F8 + background: none repeat scroll 0 0 $breadcrumb_bg_color border: none - border-bottom: 1px solid #E7E7E7 + border-bottom: 1px solid $breadcrumb_border_color margin: 0 0 0 $main_menu_width width: auto overflow: hidden @@ -48,10 +48,10 @@ h1 margin-bottom: 0px margin-left: 13px - @include breadcrumb-font(#555555) + @include breadcrumb-font($breadcrumb_font_color) a - @include breadcrumb-font-bold(#555555) + @include breadcrumb-font-bold($breadcrumb_font_color) text-decoration: none &:hover text-decoration: underline @@ -59,19 +59,19 @@ list-style-type: none white-space: nowrap &.cutme - max-width: 40px + max-width: $breadcrumb_height ul.breadcrumb list-style: none list-style-position: outside width: 10000px - height: 40px - line-height: 40px + height: $breadcrumb_height + line-height: $breadcrumb_height #breadcrumb ul.breadcrumb li.first-breadcrumb-element margin-left: 0 - height: 40px - line-height: 40px + height: $breadcrumb_height + line-height: $breadcrumb_height a text-decoration: none display: block @@ -84,5 +84,5 @@ ul.breadcrumb background: url(image-path('breadcrumb-list.png')) no-repeat right center #breadcrumb a.breadcrumb-project-title - font-size: 13px + font-size: $breadcrumb_highlighted_font_size diff --git a/app/assets/stylesheets/layout/_main_menu.css.sass b/app/assets/stylesheets/layout/_main_menu.css.sass index 15596f0f80..905c92f122 100644 --- a/app/assets/stylesheets/layout/_main_menu.css.sass +++ b/app/assets/stylesheets/layout/_main_menu.css.sass @@ -52,13 +52,13 @@ a background: none padding: 0 0 0 7px - border-left: 4px solid $main_menu_bg_color + border-left: $main_menu_selected_hover_indicator_width solid $main_menu_bg_color @include default-transition &:hover, &.selected text-decoration: none - background-color: $main_menu_bg_hover_selected_color - border-left: 4px solid $main_menu_selected_hover_indicator_color + background: $main_menu_bg_hover_selected_background + border-left: $main_menu_selected_hover_indicator_width solid $main_menu_selected_hover_indicator_color color: $main_menu_selected_font_color &.selected color: $main_menu_selected_font_color @@ -99,7 +99,7 @@ border: none !important background-color: $main_menu_child_bg_hover_selected_color color: $main_menu_child_selected_font_color - font-family: 'LatoBold','Lucida Grande',Helvetica,Arial,sans-serif + font-family: $font_family_bold a text-decoration: none @@ -133,7 +133,7 @@ background-color: $main_menu_bg_color @include default-transition &:hover - background-color: $main_menu_bg_hover_selected_color + background: $main_menu_bg_hover_selected_background &.show width: $main_menu_folded_width - $main_menu_item_border_width a.navigation-toggler @@ -203,14 +203,18 @@ input.button-small margin-top: 14px - background: #FFFFFF + background: $main_menu_sidebar_button_bg_color border-radius: 25px -webkit-border-radius: 25px padding: 3px 7px - color: #222 + color: $main_menu_sidebar_button_font_color border: none cursor: pointer @include main-menu-font + @include default-transition + &:hover + background: $main_menu_sidebar_button_hover_bg_color + color: $main_menu_sidebar_button_hover_font_color ul border: none diff --git a/app/assets/stylesheets/layout/_top_menu.css.sass b/app/assets/stylesheets/layout/_top_menu.css.sass index 51f5c4a759..78ac3f6693 100644 --- a/app/assets/stylesheets/layout/_top_menu.css.sass +++ b/app/assets/stylesheets/layout/_top_menu.css.sass @@ -26,6 +26,7 @@ * See doc/COPYRIGHT.rdoc for more details. ++*/ @import global/all +@import fonts/openproject_icon_font #logo float: left @@ -35,7 +36,7 @@ .home-link margin-top: 13px display: block - background: url(image-path('logo_openproject_white_big.png')) no-repeat 20px 0 + background: $header_home_link_bg background-size: 150px height: 42px text-indent: -9999em @@ -46,26 +47,27 @@ padding: 0px z-index: 21 position: relative - a,span,div,li,ul + border-bottom: $header_border_bottom_width solid $header_border_bottom_color + #search margin: 7px 25px 0 0 float: left .search_field position: relative - border: 0 + border: $header_search_field_border border-radius: 25px -webkit-border-radius: 25px - background: #FFFFFF url(image-path('magnifier.png')) no-repeat 94% center + background: $header_search_field_bg_color url(image-path('magnifier.png')) no-repeat 94% center top: 6px width: 140px outline: 0px padding: 7px 30px 7px 10px - font-family: 'LatoRegular', 'Lucida Grande', Helvetica, Arial, sans-serif - color: #000000 + font-family: $font_family_normal + color: $header_search_field_font_color ::-webkit-input-placeholder - color: #000000 + color: $header_search_field_font_color :-moz-placeholder - color: #000000 + color: $header_search_field_font_color ul margin: 0 padding: 0 @@ -86,11 +88,12 @@ zoom: 1 @include header-fonts($header_item_font_color) text-decoration: none - padding: 0 18px 0 10px + padding: 0 10px 0 10px > a:hover background: $header_item_bg_hover_color + color: $header_item_font_hover_color > ul - top: $header_height + top: $header_height + $header_border_bottom_width display: none position: absolute height: auto @@ -113,21 +116,34 @@ li.last-child > ul left: auto right: 0 - li.drop-down select - width: 100% - li.drop-down > a - padding-right: 35px - background: url(image-path('top_menu_arrow_grey_white_sprite.png')) 95% -35px no-repeat - li.drop-down > a:hover - background: $header_item_bg_hover_color url(image-path('top_menu_arrow_grey_white_sprite.png')) 95% -35px no-repeat - li.drop-down.open > a - background: $header_item_bg_hover_color url(image-path('top_menu_arrow_grey_white_sprite.png')) 95% -35px no-repeat - li.drop-down li > a - color: #555555 - padding: 0 15px - li.drop-down li > a:hover - background: $header_item_bg_hover_color - color: #FFFFFF + + li.drop-down + select + width: 100% + + > a + &:after + @include icon-common + padding: 0 2px 0 9px + content: "\e0d2" + &:hover + background-color: $header_item_bg_hover_color + &.open > a + background-color: $header_item_bg_hover_color + color: $header_item_font_hover_color + &:after + @include icon-common + padding: 0 2px 0 9px + content: "\e0d4" + + li + > a + color: $header_drop_down_item_font_color + padding: 0 15px + &:hover + background: $header_item_bg_hover_color + color: $header_drop_down_item_font_hover_color + #loggedas float: right margin-right: 0.5em @@ -142,40 +158,40 @@ line-height: 19px padding: 10px @include header-fonts(#555555, 13px) - #nav-login-content input[type=text] - height: 16px - width: 150px - border: 1px solid #CCCCCC - padding: 5px - @include default-transition - &:hover - border: 1px solid #888888 - #nav-login-content input[type=password] - height: 16px - width: 150px - border: 1px solid #CCCCCC - padding: 5px - @include default-transition - &:hover - border: 1px solid #888888 - #nav-login-content input[type=submit] - background: $header_item_bg_hover_color - border-radius: 20px - color: #FFFFFF - padding: 6px 13px - border: none - cursor: pointer - @include default-transition - &:hover - background: #053242 - #nav-login-content div a - display: inline - color: $header_item_bg_hover_color - padding: 0 - font-family: 'LatoRegular', 'Lucida Grande', Helvetica, Arial, sans-serif - font-weight: normal - #nav-login-content table td - padding: 3px + + input[type=text] + height: 16px + width: 150px + border: 1px solid #CCCCCC + padding: 5px + @include default-transition + &:hover + border: 1px solid #888888 + input[type=password] + height: 16px + width: 150px + border: 1px solid #CCCCCC + padding: 5px + @include default-transition + &:hover + border: 1px solid #888888 + input[type=submit] + background: $header_drop_down_button_bg_color + border-radius: 20px + color: #FFFFFF + padding: 6px 13px + border: none + cursor: pointer + @include default-transition + &:hover + background: $header_drop_down_button_hover_bg_color + div a + display: inline + padding: 0 + font-family: $font_family_normal + font-weight: normal + table td + padding: 3px #optional_login_fields white-space: nowrap margin: 5px 0 0 3px @@ -190,36 +206,37 @@ #top-menu.open z-index: 5 -#select2-drop +#select2-drop.project-search-results margin: 0 0 0 -2px border: 2px solid $header_drop_down_border_color border-top: 0 - @include header-fonts(#555555, 13px) + @include header-fonts($header_drop_down_projects_search_font_color, 13px) li padding: 0 10px -.select2-search - background: #E0E0E0 - margin: 0px 0 10px 0 - -.select2-search input - background: #FFFFFF url(image-path('magnifier.png')) no-repeat 94% center - margin: 10px 10px - padding: 9px 7px 9px 10px - border: none - border-radius: 25px - -webkit-border-radius: 25px - width: 92% - -.select2-results - margin: 0 - padding: 0 - -.select2-highlighted - background: $header_item_bg_hover_color !important - border-radius: 0 !important - font-family: 'LatoBold', 'Lucida Grande', Helvetica, Arial, sans-serif !important - font-weight: normal !important + .select2-search + background: $header_drop_down_projects_search_bg_color + margin: 0px 0 10px 0 + + .select2-search input + background: $header_drop_down_projects_search_input_bg_color url(image-path('magnifier.png')) no-repeat 94% center + margin: 10px 10px + padding: 9px 7px 9px 10px + border: none + border-radius: 25px + -webkit-border-radius: 25px + width: 92% + + .select2-results + margin: 0 + padding: 0 + + .select2-highlighted + background: $header_item_bg_hover_color !important + border-radius: 0 !important + font-family: $font_family_bold + font-weight: normal !important + color: $header_drop_down_item_font_hover_color #header height: $header_height diff --git a/app/helpers/accessibility_helper.rb b/app/helpers/accessibility_helper.rb index e2fbcf5538..53f9d3a5c9 100644 --- a/app/helpers/accessibility_helper.rb +++ b/app/helpers/accessibility_helper.rb @@ -36,4 +36,38 @@ module AccessibilityHelper def empty_element_tag @empty_element_tag ||= ApplicationController.new.render_to_string(partial: "accessibility/empty_element_tag").html_safe end + + # Return true if the difference between two colors + # matches the W3C recommendations for readability + # See http://www.wat-c.org/tools/CCA/1.1/ + def colors_diff_ok?(color_1, color_2) + cont, bright = find_color_diff color_1, color_2 + (cont > 500) && (bright > 125) # Acceptable diff according to w3c + end + + def color_contrast(color) + _, bright = find_color_diff 0x000000, color + (bright > 128) + end + +private + + # Return the contranst and brightness difference between two RGB values + def find_color_diff(c1, c2) + r1, g1, b1 = break_color c1 + r2, g2, b2 = break_color c2 + cont_diff = (r1-r2).abs+(g1-g2).abs+(b1-b2).abs # Color contrast + bright1 = (r1 * 299 + g1 * 587 + b1 * 114) / 1000 + bright2 = (r2 * 299 + g2 * 587 + b2 * 114) / 1000 + brt_diff = (bright1 - bright2).abs # Color brightness diff + [cont_diff, brt_diff] + end + + # Break a color into the R, G and B components + def break_color(rgb) + r = (rgb & 0xff0000) >> 16 + g = (rgb & 0x00ff00) >> 8 + b = rgb & 0x0000ff + [r,g,b] + end end diff --git a/app/helpers/work_packages_helper.rb b/app/helpers/work_packages_helper.rb index 175bb11075..dfff25ac8a 100644 --- a/app/helpers/work_packages_helper.rb +++ b/app/helpers/work_packages_helper.rb @@ -523,7 +523,7 @@ module WorkPackagesHelper (locals[:project].categories.collect {|c| [c.name, c.id]}), :include_blank => true) - field += prompt_to_remote(icon_wrapper('icon-context icon-add',t(:label_work_package_category_new)), + field += prompt_to_remote(icon_wrapper('icon icon-add',t(:label_work_package_category_new)), t(:label_work_package_category_new), 'category[name]', project_categories_path(locals[:project]), @@ -539,7 +539,7 @@ module WorkPackagesHelper field = form.select(:fixed_version_id, version_options_for_select(work_package.assignable_versions, work_package.fixed_version), :include_blank => true) - field += prompt_to_remote(icon_wrapper('icon-context icon-add',t(:label_version_new)), + field += prompt_to_remote(icon_wrapper('icon icon-add',t(:label_version_new)), l(:label_version_new), 'version[name]', new_project_version_path(locals[:project]), diff --git a/app/views/account/login.html.erb b/app/views/account/login.html.erb index 07a931536c..09e1573400 100644 --- a/app/views/account/login.html.erb +++ b/app/views/account/login.html.erb @@ -32,43 +32,46 @@ See doc/COPYRIGHT.rdoc for more details. <% breadcrumb_paths(l(:label_login)) %> <%= call_hook :view_account_login_top %>
-<%= form_tag({:action=> "login"}, :autocomplete => 'off') do %> -<%= back_url_hidden_field_tag %> - - - - - - - - - -<% if Setting.openid? %> - - - - -<% end %> - - - - - - - - -
<%= text_field_tag 'username', nil %>
<%= password_field_tag 'password', nil %>
<%= text_field_tag "openid_url", nil %>
- <% if Setting.autologin? %> - - <% end %> -
- <% if Setting.lost_password? %> - <%= link_to l(:label_password_lost), :controller => '/account', :action => 'lost_password' %> - <% end %> - - -
-<%= javascript_tag "Form.Element.focus('username');" %> -<% end %> + <%= form_tag({:action=> "login"}, :autocomplete => 'off') do %> + <%= back_url_hidden_field_tag %> + + + + + + + + + + <% if Setting.openid? %> + + + + + <% end %> + + + + + + + + +
<%= text_field_tag 'username', nil %>
<%= password_field_tag 'password', nil %>
<%= text_field_tag "openid_url", nil %>
+ <% if Setting.autologin? %> + + <% end %> +
+ + +
+ <%= javascript_tag "Form.Element.focus('username');" %> + <% end %> + + <% if Setting.lost_password? %> +
+ <%= link_to l(:label_password_lost), :controller => '/account', :action => 'lost_password' %> +
+ <% end %>
<%= call_hook :view_account_login_bottom %> diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index 1e297f8286..d0577f62f9 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -29,9 +29,15 @@ See doc/COPYRIGHT.rdoc for more details. # Changelog +* `#2228` [Accessibility] low contrast in backlogs task view * `#2734` [API] Access-Key not supported for all controllers * `#3120` Implement a test suite the spikes can be developed against * `#3251` [Timelines] Filtering for Responsible filters everything +* `#3409` New Layout for fallback Login page +* `#3453` Highlight project in bread crumb +* `#3546` Better icon for Timelines Module +* `#3547` Change color of Apply button in Activity +* `#3667` Better icon for Roadmap ## 3.0.0pre42 diff --git a/features/support/login_steps.rb b/features/support/login_steps.rb index 99e0d656f2..79666f04af 100644 --- a/features/support/login_steps.rb +++ b/features/support/login_steps.rb @@ -32,9 +32,11 @@ module LoginSteps def login(login, password) # visit '/logout' # uncomment me if needed visit '/login' - fill_in User.human_attribute_name(:login)+":", :with => login - fill_in 'Password:', :with => password - click_button 'Login ยป' + within('#login-form') do + fill_in User.human_attribute_name(:login)+":", :with => login + fill_in 'Password:', :with => password + click_button 'Login' + end end end diff --git a/lib/redmine.rb b/lib/redmine.rb index 9a56743bd0..e7309a2dc8 100644 --- a/lib/redmine.rb +++ b/lib/redmine.rb @@ -291,7 +291,7 @@ Redmine::MenuManager.map :project_menu do |menu| menu.push :roadmap, { :controller => '/versions', :action => 'index' }, :param => :project_id, :if => Proc.new { |p| p.shared_versions.any? }, - :html => {:class => "icon2 icon-new-planning-element"} + :html => {:class => "icon2 icon-process-arrow1"} menu.push :work_packages, { controller: '/work_packages', action: 'index', set_filter: 1 }, param: :project_id, @@ -313,7 +313,7 @@ Redmine::MenuManager.map :project_menu do |menu| menu.push :timelines, {:controller => '/timelines', :action => 'index'}, :param => :project_id, :caption => :'timelines.project_menu.timelines', - :html => {:class => "icon2 icon-time-1"} + :html => {:class => "icon2 icon-new-planning-element"} menu.push :calendar, { :controller => '/work_packages/calendars', :action => 'index' }, :param => :project_id,