Project

General

Profile

Defect #41714 » 0001-Replaces-legacy-magnifier-icon-with-SVG-icon-in-proj.patch

Marius BĂLTEANU, 2024-11-18 23:20

View differences:

app/assets/images/icons.svg
331 331
      <path d="M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"/>
332 332
      <path d="M14 4l0 4l-6 0l0 -4"/>
333 333
    </symbol>
334
    <symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--search">
335
      <path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"/>
336
      <path d="M21 21l-6 -6"/>
337
    </symbol>
334 338
    <symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--server-authentication">
335 339
      <path d="M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z"/>
336 340
      <path d="M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z"/>
app/assets/stylesheets/application.css
268 268
}
269 269
.drdn.expanded .drdn-content {display:block;}
270 270

  
271
.drdn-content .quick-search {margin:8px;}
271
.drdn-content .quick-search {margin:8px; display: flex; align-items: center;}
272
.drdn-content .quick-search svg {margin-left: 5px; position: absolute;}
273
.drdn-content .quick-search input.autocomplete {background: none; padding-left: 24px !important;}
272 274
.drdn-content .autocomplete {box-sizing: border-box; width:100% !important; height:28px;}
273 275
.drdn-content .autocomplete:focus {border-color:#5ad;}
274 276
.drdn-items {max-height:400px; overflow:auto;}
app/assets/stylesheets/responsive.css
184 184
    font-size:0.9375rem;
185 185
    font-weight:normal;
186 186
  }
187
  #project-jump .drdn-content svg {
188
    width: 1.25rem;
189
    height: 1.25rem;
190
  }
187 191
  #project-jump .drdn-content .autocomplete {
188 192
    height:40px;
189 193
    font-size:1.25rem;
194
    padding-left: 28px !important;
190 195
  }
191 196
  #project-jump .drdn-content a {
192 197
    padding:8px;
......
259 264
    content: '\2261';
260 265
  }
261 266

  
262
  /* search magnifier icon */
263
  .search-magnifier {
264
    font-family: var(--fonts-main);
265
    color: #bbb;
266

  
267
    cursor: pointer;
268
    -webkit-transform: rotate(-45deg);
269
    -moz-transform: rotate(45deg);
270
    -o-transform: rotate(45deg);
271
  }
272

  
273 267
  .search-magnifier--flyout {
274
    font-size: 1.5625rem;
275
    line-height: 54px;
276

  
277 268
    position: absolute;
278 269
    z-index: 1;
279 270
    left: 12px;
app/helpers/application_helper.rb
610 610
                  :class => (@project.nil? && controller.class.main_menu ? 'selected' : nil))
611 611
    content =
612 612
      content_tag('div',
613
                  content_tag('div', q, :class => 'quick-search') +
613
                  content_tag('div', sprite_icon('search', icon_only: true, size: 18) + q, :class => 'quick-search') +
614 614
                    content_tag('div', render_projects_for_jump_box(projects, selected: @project),
615 615
                                :class => 'drdn-items projects selection') +
616 616
                    content_tag('div', all, :class => 'drdn-items all-projects selection'),
app/views/layouts/base.html.erb
27 27
        <div class="flyout-menu__search">
28 28
            <%= form_tag(search_path(id: @project), :method => :get ) do %>
29 29
            <%= hidden_field_tag(controller.default_search_scope, 1, :id => nil) if controller.default_search_scope %>
30
            <%= label_tag 'flyout-search', '&#9906;'.html_safe, :class => 'search-magnifier search-magnifier--flyout' %>
30
            <%= label_tag 'flyout-search', sprite_icon('search', l(:label_search), icon_only: true), :class => 'search-magnifier search-magnifier--flyout' %>
31 31
            <%= text_field_tag 'q', @question, :id => 'flyout-search', :class => 'small js-search-input', :placeholder => l(:label_search) %>
32 32
            <% end %>
33 33
        </div>
config/icon_source.yml
197 197
  svg: chevrons-left
198 198
- name: key
199 199
  svg: key
200
- name: search
201
  svg: search
(2-2/5)