Commit 83f7b1ab414b8de717e9912f4464c1b8b70ffb1d
Merge remote-tracking branch 'origin/master'
Showing
3 changed files
with
48 additions
and
2 deletions
Show diff stats
frontend/views/layouts/main.php
@@ -125,7 +125,7 @@ AppAsset::register($this); | @@ -125,7 +125,7 @@ AppAsset::register($this); | ||
125 | <button type="submit" value=""></button> | 125 | <button type="submit" value=""></button> |
126 | <div class="search-list"> | 126 | <div class="search-list"> |
127 | <span>Проекты</span> | 127 | <span>Проекты</span> |
128 | - <ul> | 128 | + <ul class="search-ul"> |
129 | <li>Проекты</li> | 129 | <li>Проекты</li> |
130 | <li>Исполнители</li> | 130 | <li>Исполнители</li> |
131 | <li>Заказчики</li> | 131 | <li>Заказчики</li> |
frontend/web/css/style.css
@@ -153,8 +153,27 @@ ul.header-contacts-menu li:last-child a { | @@ -153,8 +153,27 @@ ul.header-contacts-menu li:last-child a { | ||
153 | font-size: 13px; | 153 | font-size: 13px; |
154 | transition: 0.3s; | 154 | transition: 0.3s; |
155 | margin-left: 14px; | 155 | margin-left: 14px; |
156 | + width: 102px; | ||
157 | + overflow: hidden; | ||
158 | + position: relative; | ||
159 | + height: 15px; | ||
160 | + white-space: nowrap; | ||
156 | } | 161 | } |
157 | .header-cabinet-wr a:hover{opacity: 0.9} | 162 | .header-cabinet-wr a:hover{opacity: 0.9} |
163 | +.header-cabinet-wr a:before{ | ||
164 | + content: ''; | ||
165 | + height: 15px; | ||
166 | + width: 15px; | ||
167 | + background: #fff; | ||
168 | + opacity: 0.5; | ||
169 | + position: absolute; | ||
170 | + top: 0; | ||
171 | + right: 0; | ||
172 | + background: -moz-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%); | ||
173 | + background: -webkit-linear-gradient(left, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%); | ||
174 | + background: linear-gradient(to right, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%); | ||
175 | + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#ffffff',GradientType=1 ); | ||
176 | +} | ||
158 | ul.main-menu { | 177 | ul.main-menu { |
159 | width: 620px; | 178 | width: 620px; |
160 | float: left; | 179 | float: left; |
@@ -4979,9 +4998,10 @@ input.custom-check:checked + label span, input.custom-check:checked + label:hove | @@ -4979,9 +4998,10 @@ input.custom-check:checked + label span, input.custom-check:checked + label:hove | ||
4979 | border-bottom: 1px solid #b7b7b7; | 4998 | border-bottom: 1px solid #b7b7b7; |
4980 | display: none; | 4999 | display: none; |
4981 | } | 5000 | } |
5001 | +.search-list ul.active {display: block} | ||
4982 | .search-list li { | 5002 | .search-list li { |
4983 | list-style: none; | 5003 | list-style: none; |
4984 | - padding: 0 20px 0 10px; | 5004 | + padding: 0 0 0 10px; |
4985 | border-top: 1px solid #b7b7b7; | 5005 | border-top: 1px solid #b7b7b7; |
4986 | height: 20px; | 5006 | height: 20px; |
4987 | line-height: 20px; | 5007 | line-height: 20px; |
@@ -4989,6 +5009,8 @@ input.custom-check:checked + label span, input.custom-check:checked + label:hove | @@ -4989,6 +5009,8 @@ input.custom-check:checked + label span, input.custom-check:checked + label:hove | ||
4989 | font-size: 13px; | 5009 | font-size: 13px; |
4990 | color: #b7b7b7; | 5010 | color: #b7b7b7; |
4991 | cursor: pointer; | 5011 | cursor: pointer; |
5012 | + width: 118px; | ||
5013 | + box-sizing: border-box; | ||
4992 | } | 5014 | } |
4993 | .search-list li:hover { | 5015 | .search-list li:hover { |
4994 | transition: 0.2s; | 5016 | transition: 0.2s; |
frontend/web/js/script.js
@@ -826,4 +826,28 @@ $(document).ready(function(){ | @@ -826,4 +826,28 @@ $(document).ready(function(){ | ||
826 | } | 826 | } |
827 | 827 | ||
828 | 828 | ||
829 | + | ||
830 | + $('.search-list span').click(function(){ | ||
831 | + if($('.search-ul').hasClass('active')) { | ||
832 | + $('.search-list ul').removeClass('active'); | ||
833 | + $('.search-main-menu form input').focus() | ||
834 | + } else { | ||
835 | + $('.search-list ul').addClass('active'); | ||
836 | + | ||
837 | + } | ||
838 | + $('.search-list ul.active li').click(function(){ | ||
839 | + $('.search-list ul').removeClass('active'); | ||
840 | + $('.search-list span').html($(this).text()) | ||
841 | + var searchListIndex = $(this).index() | ||
842 | + searchListIndex = searchListIndex+1 | ||
843 | + $('.search-main-menu form input[type="hidden"]').val(searchListIndex) | ||
844 | + $('.search-main-menu form input').focus() | ||
845 | + }) | ||
846 | + | ||
847 | + | ||
848 | + | ||
849 | + }) | ||
850 | + | ||
851 | + | ||
852 | + | ||
829 | }); | 853 | }); |
830 | \ No newline at end of file | 854 | \ No newline at end of file |