Project

General

Profile

Patch #29216 » 0001-Compact-search-input.patch

Marius BĂLTEANU, 2019-10-01 18:00

View differences:

app/views/layouts/base.html.erb
28 28
        <div class="flyout-menu__search">
29 29
            <%= form_tag({:controller => 'search', :action => 'index', :id => @project}, :method => :get ) do %>
30 30
            <%= hidden_field_tag(controller.default_search_scope, 1, :id => nil) if controller.default_search_scope %>
31
            <%= label_tag 'flyout-search', '&#9906;'.html_safe, :class => 'search-magnifier search-magnifier--flyout' %>
32
            <%= text_field_tag 'q', @question, :id => 'flyout-search', :class => 'small js-search-input', :placeholder => l(:label_search) %>
31
            <%= label_tag 'flyout-search', '&#9906;'.html_safe, :class => 'icon-search-magnifier search-magnifier--flyout' %>
32
            <%= search_field_tag 'q', @question, :id => 'flyout-search', :class => 'small js-search-input', :placeholder => l(:label_search) %>
33 33
            <% end %>
34 34
        </div>
35 35
    <% end %>
......
77 77
        <%= form_tag({:controller => 'search', :action => 'index', :id => @project}, :method => :get ) do %>
78 78
        <%= hidden_field_tag 'scope', default_search_project_scope, :id => nil %>
79 79
        <%= hidden_field_tag(controller.default_search_scope, 1, :id => nil) if controller.default_search_scope %>
80
        <label for='q'>
81
          <%= link_to l(:label_search), {:controller => 'search', :action => 'index', :id => @project, :scope => default_search_project_scope}, :accesskey => accesskey(:search) %>:
82
        </label>
83
        <%= text_field_tag 'q', @question, :size => 20, :class => 'small', :accesskey => accesskey(:quick_search),
80
        <%= link_to '&#9906;'.html_safe, {:controller => 'search', :action => 'index', :id => @project, :scope => default_search_project_scope}, :accesskey => accesskey(:search), :class => 'icon-search-magnifier search-magnifier', :title => l(:label_search) %>
81
        <%= search_field_tag 'q', @question, :size => 20, :class => 'small', :accesskey => accesskey(:quick_search),
82
                            :placeholder => l(:label_search),
84 83
                            :data => {
85 84
                                :auto_complete => true,
86 85
                                :issues_url => auto_complete_issues_path(:q => '')
public/stylesheets/application.css
35 35
#header h1 .breadcrumbs { display:block; font-size: .5em; font-weight: normal; }
36 36

  
37 37
#quick-search {float:right;}
38
#quick-search #q {width:130px; height:24px; box-sizing:border-box; vertical-align:middle; border:1px solid #ccc; border-radius:3px;}
39

  
38
#quick-search #q {width: 130px; height: 24px; box-sizing: border-box; vertical-align: middle; border: 1px solid #ccc; border-radius:3px; padding-left: 27px; font-size: 12px;}
39
#quick-search > form {position: relative;}
40
#quick-search .search-magnifier {
41
  z-index: 1;
42
  position: absolute;
43
  left: 5px;
44
  top: -10px;
45
  font-size: 25px;
46
}
40 47
#main-menu {position: absolute;  bottom: 0px;  left:6px; margin-right: -500px; width: 100%;}
41 48
#main-menu ul {margin: 0;  padding: 0; width: 100%; white-space: nowrap;}
42 49
#main-menu li {
......
1562 1569

  
1563 1570
.contextual>*:not(:first-child), .buttons>.icon:not(:first-child), .contextual .journal-actions>*:not(:first-child) { margin-left: 5px; }
1564 1571

  
1572
/* search magnifier icon */
1573
.icon-search-magnifier {
1574
  font-family: Verdana !important;
1575
  color: #bbb !important;
1576

  
1577
  text-decoration: none !important;
1578
  cursor: pointer;
1579
  -webkit-transform: rotate(-45deg);
1580
  -moz-transform: rotate(45deg);
1581
  -o-transform: rotate(45deg);
1582
}
1583

  
1565 1584
img.gravatar {
1566 1585
  vertical-align: middle;
1567 1586
  border-radius: 20%;
public/stylesheets/responsive.css
259 259
    content: '\2261';
260 260
  }
261 261

  
262
  /* search magnifier icon */
263
  .search-magnifier {
264
    font-family: Verdana;
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 262
  .search-magnifier--flyout {
274 263
    font-size: 25px;
275 264
    line-height: 54px;
......
472 461
    padding-right: 8px;
473 462
  }
474 463

  
475
  .flyout-menu__search input[type='text'] {
464
  .flyout-menu__search input[type='text'], .flyout-menu__search input[type='search'] {
476 465
    line-height: 2;
477 466

  
478 467
    width: 100%;
(6-6/9)