diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/images/icons.svg | 4 | ||||
-rw-r--r-- | app/assets/stylesheets/application.css | 57 | ||||
-rw-r--r-- | app/assets/stylesheets/responsive.css | 25 | ||||
-rw-r--r-- | app/helpers/application_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/icons_helper.rb | 7 | ||||
-rw-r--r-- | app/helpers/projects_helper.rb | 4 | ||||
-rw-r--r-- | app/helpers/reactions_helper.rb | 2 |
7 files changed, 78 insertions, 23 deletions
diff --git a/app/assets/images/icons.svg b/app/assets/images/icons.svg index df635523a..e30ef5446 100644 --- a/app/assets/images/icons.svg +++ b/app/assets/images/icons.svg @@ -351,6 +351,10 @@ <path d="M7 5.03v5.455"/> <path d="M12 8l5 -3"/> </symbol> + <symbol viewBox="0 0 24 24" id="icon--quote-filled"> + <path d="M9 5a2 2 0 0 1 2 2v6c0 3.13 -1.65 5.193 -4.757 5.97a1 1 0 1 1 -.486 -1.94c2.227 -.557 3.243 -1.827 3.243 -4.03v-1h-3a2 2 0 0 1 -1.995 -1.85l-.005 -.15v-3a2 2 0 0 1 2 -2z"/> + <path d="M18 5a2 2 0 0 1 2 2v6c0 3.13 -1.65 5.193 -4.757 5.97a1 1 0 1 1 -.486 -1.94c2.227 -.557 3.243 -1.827 3.243 -4.03v-1h-3a2 2 0 0 1 -1.995 -1.85l-.005 -.15v-3a2 2 0 0 1 2 -2z"/> + </symbol> <symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--reload"> <path d="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"/> <path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/> diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 26e719cbb..4e894c1f5 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -364,6 +364,9 @@ table.list caption { text-align: left; padding: 0.5em 0.5em 0.5em 0; } table.list tr.overdue td.due_date { color: #c22; } table.list thead.related-issues th { background-color: inherit; font-size: 11px; border: none; } #role-permissions-trackers table.list th {white-space:normal;} +table.list div.wiki p { + margin: 0; +} .table-list-cell {display: table-cell; vertical-align: top; padding:2px; } .table-list div.buttons {width: 15%;} @@ -922,7 +925,11 @@ ul.projects div.description ul li {list-style-type:initial;} background-image: none; padding-left: 0; } -#projects-index ul.projects div.root svg { +#projects-index ul.projects .icon-bookmarked-project svg, +#projects-index ul.projects .my-project svg { + margin-left: 4px; +} +#projects-index ul.projects div.root .icon-bookmarked-project svg, #projects-index ul.projects div.root .my-project svg { stroke-width: 2; margin-bottom: 10px; } @@ -933,7 +940,12 @@ ul.projects div.description ul li {list-style-type:initial;} background-image: none; padding-left: 0; } -#projects-index a.project ~ svg, table.projects tr.project td.name svg { +#projects-index div.wiki p { + margin-top: 0px; +} + +table.projects td.name .icon-bookmarked-project svg, +table.projects td.name .my-project svg { margin-left: 4px; } @@ -1148,10 +1160,26 @@ span.required {color: #bb0000;} .attachments_fields .icon-attachment, #existing-attachments .icon-attachment {background-image: none; padding-left: 0} .attachments_fields input.filename, #existing-attachments .filename {border:0; width:250px; color:#555; background-color:inherit; } .tabular input.filename {max-width:75% !important;} -.attachments_fields input.filename {height:1.8em;padding-right: 0;} -.attachments_fields .ajax-waiting input.filename {background:url(/hourglass.png) no-repeat 0px 50%;} -.attachments_fields .ajax-loading input.filename {background:url(/loading.gif) no-repeat 0px 50%;} .attachments_fields div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; } +.attachments_fields input.filename { + height:1.8em; + padding-left: 3px; + padding-right: 0; +} +.attachments_fields .ajax-waiting { + padding-left: 16px; + background:url(/hourglass.png) no-repeat 0px 50%; +} +.attachments_fields .ajax-waiting .svg-attachment { + display: none; +} +.attachments_fields .ajax-loading { + padding-left: 16px; + background: url(/loading.gif) no-repeat 0px 50%; +} +.attachments_fields .ajax-loading .svg-attachment { + display: none; +} a.remove-upload:hover {text-decoration:none !important;} .existing-attachment.deleted .filename {text-decoration:line-through; color:#999 !important;} @@ -1888,10 +1916,15 @@ td.gantt_selected_column .gantt_hdr,.gantt_selected_column_container { flex-shrink: 0; } -a.icon:hover svg, a.icon-only:hover svg { +a.icon:hover .icon-svg, a.icon-only:hover .icon-svg { stroke: #c61a1a; } +a.icon:hover .icon-svg-filled, a.icon-only:hover .icon-svg-filled { + stroke: none; + fill: #c61a1a; +} + svg.icon-ok { stroke: #5db651; } @@ -1915,6 +1948,11 @@ svg.icon-svg { vertical-align: middle; } +svg.icon-svg-filled { + fill: #169; + stroke: none; +} + svg.s20 { width: 1.25rem; height: 1.25rem; @@ -2122,13 +2160,6 @@ color: #555; text-shadow: 1px 1px 0 #fff; img.filecontent.image {background-image: url(/transparent.png);} /* Reaction styles */ -.reaction-button.reacted .icon-svg { - fill: #126fa7; - stroke: none; -} -.reaction-button.reacted:hover .icon-svg { - fill: #c61a1a; -} .reaction-button:hover, .reaction-button:active { text-decoration: none; } diff --git a/app/assets/stylesheets/responsive.css b/app/assets/stylesheets/responsive.css index 3a2eb46bb..b3e8bddd8 100644 --- a/app/assets/stylesheets/responsive.css +++ b/app/assets/stylesheets/responsive.css @@ -385,7 +385,7 @@ list-style: none; } - .flyout-menu #watchers { + .flyout-menu #watchers, .flyout-menu .queries { display: -webkit-flex; display: -webkit-box; display: flex; @@ -402,11 +402,11 @@ order: 3; } - .flyout-menu #watchers h3 { + #sidebar-wrapper { margin-left: -8px; } - .flyout-menu #watchers ul li { + .flyout-menu #watchers ul li, .flyout-menu ul.queries li { display: -webkit-flex; display: -webkit-box; display: flex; @@ -418,6 +418,16 @@ -webkit-align-items: center; -webkit-box-align: center; align-items: center; + border-top: 1px solid rgba(255,255,255,.1); + } + + .flyout-menu #watchers ul li a, .flyout-menu ul.queries li a { + border-top: none; + } + + .flyout-menu ul.queries li a.icon-clear-query { + flex-shrink: 0; + padding-right: 8px; } .flyout-menu ul li a { @@ -440,7 +450,7 @@ color: white; } - .flyout-menu .icon svg { + .flyout-menu .icon svg, .flyout-menu .icon-only svg { stroke: white; } @@ -854,6 +864,13 @@ div#sticky-issue-header { top: 64px; } + + /* Prevent content from being hidden behind #sticky-issue-header and project-jump when scrolling via anchor links. */ + .controller-issues.action-show div.wiki a[name], + .controller-issues.action-show #history div[id^="note-"], + .controller-issues.action-show #history div[id^="change-"] { + scroll-margin-top: 114px; + } } @media all and (max-width: 599px) { diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 99a760c1d..285528422 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -518,6 +518,8 @@ module ApplicationHelper def render_flash_messages s = +'' flash.each do |k, v| + next unless v.is_a?(String) + s << content_tag('div', notice_icon(k) + v.html_safe, :class => "flash #{k}", :id => "flash_#{k}") end s.html_safe diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb index f96315c75..6afb84537 100644 --- a/app/helpers/icons_helper.rb +++ b/app/helpers/icons_helper.rb @@ -21,10 +21,10 @@ module IconsHelper DEFAULT_ICON_SIZE = "18" DEFAULT_SPRITE = "icons" - def sprite_icon(icon_name, label = nil, icon_only: false, size: DEFAULT_ICON_SIZE, css_class: nil, sprite: DEFAULT_SPRITE, plugin: nil, rtl: false) + def sprite_icon(icon_name, label = nil, icon_only: false, size: DEFAULT_ICON_SIZE, style: :outline, css_class: nil, sprite: DEFAULT_SPRITE, plugin: nil, rtl: false) sprite = plugin ? "plugin_assets/#{plugin}/#{sprite}.svg" : "#{sprite}.svg" - svg_icon = svg_sprite_icon(icon_name, size: size, css_class: css_class, sprite: sprite, rtl: rtl) + svg_icon = svg_sprite_icon(icon_name, size: size, style: style, css_class: css_class, sprite: sprite, rtl: rtl) if label label_classes = ["icon-label"] @@ -92,8 +92,9 @@ module IconsHelper private - def svg_sprite_icon(icon_name, size: DEFAULT_ICON_SIZE, sprite: DEFAULT_SPRITE, css_class: nil, rtl: false) + def svg_sprite_icon(icon_name, size: DEFAULT_ICON_SIZE, style: :outline, sprite: DEFAULT_SPRITE, css_class: nil, rtl: false) css_classes = "s#{size} icon-svg" + css_classes += " icon-svg-filled" if style == :filled css_classes += " #{css_class}" unless css_class.nil? css_classes += " icon-rtl" if rtl diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 01a5452f7..bae1c4e3a 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -80,8 +80,8 @@ module ProjectsHelper classes += %w(icon icon-bookmarked-project) if bookmarked_project_ids.include?(project.id) s = link_to_project(project, {}, :class => classes.uniq.join(' ')) - s << sprite_icon('user', l(:label_my_projects), icon_only: true) if User.current.member_of?(project) - s << sprite_icon('bookmarked', l(:label_my_bookmarks), icon_only: true) if bookmarked_project_ids.include?(project.id) + s << tag.span(sprite_icon('user', l(:label_my_projects), icon_only: true), class: 'icon-only icon-user my-project') if User.current.member_of?(project) + s << tag.span(sprite_icon('bookmarked', l(:label_my_bookmarks), icon_only: true), class: 'icon-only icon-bookmarked-project') if bookmarked_project_ids.include?(project.id) if project.description.present? s << content_tag('div', textilizable(project.short_description, :project => project), :class => 'wiki description') end diff --git a/app/helpers/reactions_helper.rb b/app/helpers/reactions_helper.rb index 97943e71c..e02e1c9f9 100644 --- a/app/helpers/reactions_helper.rb +++ b/app/helpers/reactions_helper.rb @@ -52,7 +52,7 @@ module ReactionsHelper def reaction_button_reacted(object, reaction, count, tooltip) reaction_button_wrapper object do link_to( - sprite_icon('thumb-up-filled', count.nonzero?), + sprite_icon('thumb-up-filled', count.nonzero?, style: :filled), reaction_path(reaction, object_type: object.class.name, object_id: object), remote: true, method: :delete, class: ['icon', 'reaction-button', 'reacted'], |