Commit 0c1ba9975310abc359d011d3e0fb6e89c9710282
1 parent
7cfbdfc4
300616
Showing
2 changed files
with
102 additions
and
1 deletions
Show diff stats
backend/web/js/option.js
| ... | ... | @@ -159,6 +159,8 @@ $(document).ready(function(){ |
| 159 | 159 | removeSpecializationTags() |
| 160 | 160 | newAddSpecializationTags() |
| 161 | 161 | checkSpecialization() |
| 162 | + selectAllInBox() | |
| 163 | + loadList() | |
| 162 | 164 | |
| 163 | 165 | function addSpecializationTagsLoad(){ |
| 164 | 166 | var specTags = $('.admin-page .third-ul-menu input:checked') |
| ... | ... | @@ -169,6 +171,29 @@ $(document).ready(function(){ |
| 169 | 171 | } |
| 170 | 172 | } |
| 171 | 173 | |
| 174 | + function loadList(){ | |
| 175 | + $( '.new-spec-block .content-menu-first :checkbox:checked' ).each(function(){ | |
| 176 | + var ThisTxt = $(this).parents('a').text(); | |
| 177 | + Thisid = $(this).attr('id'); | |
| 178 | + | |
| 179 | + $(".admin-specialization-selected ul").append('<li data-spec-id="'+Thisid+'">'+ThisTxt+'</li>'); | |
| 180 | + }); | |
| 181 | + $(".admin-specialization-selected ul li").click(function(){ | |
| 182 | + var specIdThis = ($(this).data('spec-id')); | |
| 183 | + $('.new-spec-block .content-menu-first').find("#"+specIdThis).prop('checked', false); | |
| 184 | + $(this).remove(); | |
| 185 | + }); | |
| 186 | + } | |
| 187 | + | |
| 188 | + function selectAllInBox(){ | |
| 189 | + | |
| 190 | + $(".new-spec-block .content-menu-first li a").click(function(){ | |
| 191 | + $(this).parent().find("ul input[type=checkbox]").prop('checked', true); | |
| 192 | + $(".admin-specialization-selected").find("li").remove(); | |
| 193 | + loadList(); | |
| 194 | + }); | |
| 195 | + } | |
| 196 | + | |
| 172 | 197 | function removeSpecializationTags(){ |
| 173 | 198 | $('body').on('click', '.admin-page .admin-specialization-selected ul li', function(){ |
| 174 | 199 | var removeSpecTagsId = $(this).attr('data-spec-id') |
| ... | ... | @@ -194,7 +219,7 @@ $(document).ready(function(){ |
| 194 | 219 | |
| 195 | 220 | } |
| 196 | 221 | |
| 197 | - if( ($('.admin-page .admin-specialization-selected ul li').length)>0 ){ | |
| 222 | + if( ($('.admin-page .admin-specialization-selected ul li, .new-spec-block .admin-specialization-selected ul li').length)>0 ){ | |
| 198 | 223 | $('.input-blocks-wrapper.admin-menu-list .admn-menu-err').addClass('has-error').removeClass('has-error') |
| 199 | 224 | } else { |
| 200 | 225 | $('.input-blocks-wrapper.admin-menu-list .admn-menu-err').addClass('has-error') |
| ... | ... | @@ -220,4 +245,5 @@ $(document).ready(function(){ |
| 220 | 245 | $('.admin-page .admin-menu-list .content-menu-first a').addClass('no-click') |
| 221 | 246 | $('.admin-page .admin-menu-list .content-menu-first a.remove-link, .third-ul-menu a').removeClass('no-click') |
| 222 | 247 | $('.admin-page .admin-menu-list .content-menu-first a.no-click').click(function(e){e.preventDefault()}) |
| 248 | + | |
| 223 | 249 | }) | ... | ... |
frontend/web/css/style.css
| ... | ... | @@ -12447,4 +12447,79 @@ li.active-menu-admin:hover a .ico_num { |
| 12447 | 12447 | right: -13px; |
| 12448 | 12448 | top: 50%; |
| 12449 | 12449 | margin-top: -9px; |
| 12450 | +} | |
| 12451 | + | |
| 12452 | +/* specialisations */ | |
| 12453 | + | |
| 12454 | +.new-spec-block{ | |
| 12455 | + width: 100%; | |
| 12456 | + position: relative; | |
| 12457 | + font-size: 13px; | |
| 12458 | + margin-bottom: 15px; | |
| 12459 | +} | |
| 12460 | +.new-spec-block .content-menu-first{width: 100%;} | |
| 12461 | +.new-spec-block ul.content-menu-first li { | |
| 12462 | + width: 100%; | |
| 12463 | + list-style: none; | |
| 12464 | + box-sizing: border-box; | |
| 12465 | + border-top: 1px solid #dfdfdf; | |
| 12466 | + border-right: 1px solid #dfdfdf; | |
| 12467 | + height: 30px; | |
| 12468 | + line-height: 30px; | |
| 12469 | + cursor: pointer; | |
| 12470 | + transition: 0.3s; | |
| 12471 | + background: #fff; | |
| 12472 | +} | |
| 12473 | +.new-spec-block ul.content-menu-first li > ul { | |
| 12474 | + position: absolute; | |
| 12475 | + top: 0; | |
| 12476 | + left: 100%; | |
| 12477 | + width: 235px; | |
| 12478 | + height: 100%; | |
| 12479 | +} | |
| 12480 | +.new-spec-block ul.content-menu-first li > ul li { | |
| 12481 | + height: auto; | |
| 12482 | + line-height: 14px; | |
| 12483 | + min-height: 30px; | |
| 12484 | + padding: 8px 8px 7px 19px; | |
| 12485 | + width: 235px; | |
| 12486 | +} | |
| 12487 | +.new-spec-block ul.content-menu-first li > ul { | |
| 12488 | + position: absolute; | |
| 12489 | + top: 0; | |
| 12490 | + left: 100%; | |
| 12491 | + width: 235px; | |
| 12492 | + height: 100%; | |
| 12493 | +} | |
| 12494 | +.new-spec-block ul.third-ul-menu li { | |
| 12495 | + background: #fff !important; | |
| 12496 | + border-left: 1px solid #dfdfdf; | |
| 12497 | + line-height: 18px!important; | |
| 12498 | + width: 235px!important; | |
| 12499 | +} | |
| 12500 | +.new-spec-block .search-work-form input[type="checkbox"] + label span { | |
| 12501 | + width: 12px; | |
| 12502 | + height: 12px; | |
| 12503 | + background: url('/images/check.png') no-repeat; | |
| 12504 | + float: left; | |
| 12505 | + transition: 0.2s; | |
| 12506 | + margin-top: 3px; | |
| 12507 | +} | |
| 12508 | +.new-spec-block ul.content-menu-first li > ul li { | |
| 12509 | + height: auto; | |
| 12510 | + min-height: 30px; | |
| 12511 | + padding: 8px 8px 7px 19px; | |
| 12512 | +} | |
| 12513 | +.new-spec-block .form-group {margin-bottom: 0px!important;} | |
| 12514 | +.new-spec-block .control-label {font-weight: 100!important;} | |
| 12515 | +.left-search-work .admin-specialization-selected ul { | |
| 12516 | + width: 105%; | |
| 12517 | + max-height: 250px; | |
| 12518 | + overflow-x: hidden; | |
| 12519 | + overflow-y: auto; | |
| 12520 | + margin: 0px 0px 15px -10px; | |
| 12521 | +} | |
| 12522 | +.left-search-work .admin-specialization-selected ul li {border-bottom:none;float: initial;padding-right: 20px;} | |
| 12523 | +.left-search-work .admin-specialization-selected ul li:before { | |
| 12524 | + right: 8px; | |
| 12450 | 12525 | } |
| 12451 | 12526 | \ No newline at end of file | ... | ... |