Commit 54962f0748ca907fb909d6d572713b041052baf3
1 parent
bdbc858e
tokar commit
Showing
3 changed files
with
69 additions
and
1 deletions
Show diff stats
frontend/views/accounts/_vacancy_form.php
... | ... | @@ -90,7 +90,7 @@ |
90 | 90 | <div class="input-blocks admin-currency-second"> |
91 | 91 | <?= |
92 | 92 | $form->field($vacancy, 'salary_currency', [ |
93 | - 'template' => "{input}<span class='admn-input-txt' style='padding-top: 7px; display: block'>за час</span>\n{hint}\n{error}", | |
93 | + 'template' => "{input}\n{hint}\n{error}", | |
94 | 94 | ]) |
95 | 95 | ->label(false) |
96 | 96 | ->dropDownList($currencies) |
... | ... | @@ -100,6 +100,9 @@ |
100 | 100 | |
101 | 101 | |
102 | 102 | <div class="input-blocks-wrapper admin-menu-list"> |
103 | + <div class="input-blocks" style="width: 100%; margin-bottom: 5px"> | |
104 | + <label>Специализации</label> | |
105 | + </div> | |
103 | 106 | <ul class="content-menu-first"> |
104 | 107 | <?php foreach($specializations as $specialization): ?> |
105 | 108 | <li data-img="<?= $specialization->image ?>"> |
... | ... | @@ -140,6 +143,12 @@ |
140 | 143 | </ul> |
141 | 144 | </div> |
142 | 145 | |
146 | +<div class="admin-specialization-selected style"> | |
147 | + <ul> | |
148 | + | |
149 | + </ul> | |
150 | +</div> | |
151 | + | |
143 | 152 | <div class="input-blocks-wrapper admin-vacancy-check" style="margin-top: 29px"> |
144 | 153 | <div class="input-blocks"> |
145 | 154 | <?= $form->field($vacancy, 'employmentInput') |
... | ... | @@ -209,5 +218,41 @@ |
209 | 218 | $('.input-blocks.admin-currency-second select').change(function(){ |
210 | 219 | $(this).blur() |
211 | 220 | }) |
221 | + | |
222 | + specializationTags() | |
223 | + function specializationTags(){ | |
224 | + addSpecializationTags() | |
225 | + removeSpecializationTags() | |
226 | + newAddSpecializationTags() | |
227 | + | |
228 | + function addSpecializationTags(){ | |
229 | + var specTags = $('.admin-page .third-ul-menu input:checked') | |
230 | + for (var spI=0;spI<specTags.length;spI++) { | |
231 | + var newSpecTagsId = $(specTags[spI]).attr('id') | |
232 | + var newSpecTagsTxt = $(specTags[spI]).parents('a').text() | |
233 | + $('.admin-page .admin-specialization-selected ul').append('<li data-spec-id="'+newSpecTagsId+'">'+newSpecTagsTxt+'</li>') | |
234 | + } | |
235 | + } | |
236 | + | |
237 | + function removeSpecializationTags(){ | |
238 | + $('body').on('click', '.admin-page .admin-specialization-selected ul li', function(){ | |
239 | + var removeSpecTagsId = $(this).attr('data-spec-id') | |
240 | + $('.admin-page .third-ul-menu #'+removeSpecTagsId).attr('checked', false) | |
241 | + $(this).remove() | |
242 | + }) | |
243 | + } | |
244 | + | |
245 | + function newAddSpecializationTags(){ | |
246 | + $('.admin-page .third-ul-menu input').change(function(){ | |
247 | + var thisSpecTagsId = $(this).attr('id') | |
248 | + var thisSpecTagsTxt = $(this).parents('a').text() | |
249 | + if($(this).prop("checked")){ | |
250 | + $('.admin-page .admin-specialization-selected ul').append('<li data-spec-id="'+thisSpecTagsId+'">'+thisSpecTagsTxt+'</li>') | |
251 | + } else { | |
252 | + $('.admin-page .admin-specialization-selected ul li[data-spec-id="'+thisSpecTagsId+'"]').remove() | |
253 | + } | |
254 | + }) | |
255 | + } | |
256 | + } | |
212 | 257 | }) |
213 | 258 | </script> |
214 | 259 | \ No newline at end of file | ... | ... |
frontend/web/css/style.css
... | ... | @@ -6342,4 +6342,27 @@ input[disabled], select[disabled] { |
6342 | 6342 | } |
6343 | 6343 | .active-menu-admin.admin-menu-ico-4 a:before { |
6344 | 6344 | background: url("/images/menu-ico/ico-4-active.png") 100% 50% no-repeat ; |
6345 | +} | |
6346 | +.admin-specialization-selected {overflow: hidden;} | |
6347 | +.admin-specialization-selected ul {float: left; width: 740px; margin-left: -20px; margin-top: -8px;} | |
6348 | +.admin-specialization-selected ul li { | |
6349 | + text-decoration: none; | |
6350 | + font-size: 13px; | |
6351 | + color: #b7b7b7; | |
6352 | + list-style: none; | |
6353 | + float: left; | |
6354 | + margin-left: 20px; | |
6355 | + border-bottom: 1px dashed #b7b7b7; | |
6356 | + position: relative; | |
6357 | + cursor: pointer; | |
6358 | + margin-top: 8px; | |
6359 | +} | |
6360 | +.admin-specialization-selected ul li:before { | |
6361 | + position: absolute; | |
6362 | + content: ''; | |
6363 | + width: 7px; | |
6364 | + height: 7px; | |
6365 | + top: 1px; | |
6366 | + right: -9px; | |
6367 | + background: url("/images/delete-ico-min.png")no-repeat; | |
6345 | 6368 | } |
6346 | 6369 | \ No newline at end of file | ... | ... |
212 Bytes