1"use strict"; 2$(document).ready(function() { 3 4}); 5 6function chooseOption(el, valueField, nameField, funcName) { 7 if (valueField) 8 $(valueField).val( $(el).attr('data-option') ); 9 10 if (nameField) 11 $(nameField).html( $(el).html() ); 12 13 if (typeof funcName !== "undefined" && funcName !== false) 14 window[funcName](el); // todo check function exist 15} 16 17function closePopupListener(redirectUrl) { 18 var $body = $('body'); 19 $body.addClass('open'); 20 21 $(".close_popup, .popup_fon").click(function () { 22 $body.removeClass('open'); 23 // $(".popup").fadeOut(200); 24 25 $(".popup").addClass('leave_right'); 26 if (redirectUrl) load(redirectUrl); 27 }); 28} 29 30function removeErrors() { 31 $('.error_text').text(''); 32} 33 34function closePopup(redirectUrl) { 35 $('#site').removeClass('popup-open'); 36 // $(".popup").addClass('leave_right'); 37 38 if (redirectUrl) load(redirectUrl); 39} 40 41// Open/close menu 42function openMenu() { 43 $("#site").addClass('open-menu'); 44} 45 46function closeMenu() { 47 $("#site").removeClass('open-menu'); 48} 49 50 51// PopupMe 52// <div class="mememe" onclick="popupMe(this);"> 53// Popup Me 54// <div class="popup-me"> 55// <div onclick="closeMe();">(X) Close</div> 56// <div>Popup Body</div> 57// </div> 58// </div> 59var popupMeEl; 60function popupMe(el) { 61 popupMeEl = $(el); 62 $(popupMeEl).children().appendTo("#notice"); 63} 64 65function closeMe() { 66 $("#notice").children().appendTo( '.' + $(popupMeEl).prop('class') ); 67} 68 69 70function toggleClass(el, toggleClass) { 71 $(el).toggleClass(toggleClass); 72} 73 74 75/** 76 * Put it to "onclick" when upload file 77 * @param el 78 */ 79function initFile(el) { 80 files = el.files; 81} 82 83 84/** 85 * initSlug function 86 * $("#firstname, #lastname").keyup(function () {
87 * initSlug('#slug', '#firstname,#lastname', '+', 'http://am.loc/'); 88 * }); 89 * @param writeField 90 * @param readFields 91 * @param separator 92 * @param start 93 */ 94function initSlug(writeField, readFields, separator, start) { 95 var readFieldsArr = readFields.split(','); 96 separator = separator || '-'; 97 start = start || ''; 98 99 var row = start; 100 for (var i = 0; i < readFieldsArr.length; i++) { 101 if (i > 0) row += separator; 102 row += $(readFieldsArr[i]).val().replace(/[^a-zA-Z0-9]+/g, separator).toLowerCase(); 103 104 } 105 106 $(writeField).val(trim(row, "-")); 107} 108 109// Start search 110function startSearch(el) { 111 let value = $(el).val(); 112 if (value) 113 load('jobs', 'keywords' + el); 114} 115 116 117// Buttons events 118 119function share_linkedin(e) { 120 window.open('http://www.linkedin.com/shareArticle?mini=true&url=' + $(e).data('url'), '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=400,width=600'); 121 return false; 122} 123 124function share_twitter(e) { 125 window.open('https://twitter.com/intent/tweet?url=' + $(e).data('url'), '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=400,width=600'); 126 return false; 127} 128 129function share_facebook(e) { 130 window.open('https://www.facebook.com/sharer/sharer.php?u=' + $(e).data('url'), '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=400,width=600'); 131 return false; 132} 133 134function copy_link_modal(el) { 135 $('#copy_link_profile_url').val($(el).data('url')); 136 $('#copy_link_profile_url').tooltipster('content', 'Copy Link'); 137 138 $("#copy-link-dialog").dialog({ 139 resizable: false, 140 height: "auto", 141 width: 600, 142 modal: true, 143 buttons: { 144 "Copy": function () { 145 var copyText = document.getElementById("copy_link_profile_url"); 146 copyText.select(); 147 document.execCommand("copy"); 148 149 $('#copy_link_profile_url').tooltipster('content', 'Copied'); 150 $('#copy_link_profile_url').tooltipster('open'); 151 }, 152 Cancel: function () { 153 $('#copy_link_profile_url').tooltipster('close'); 154 $(this).dialog("close"); 155 } 156 } 157 }); 158} 159 160function latestRolesSlider(el) { 161 $(el).slick({ 162 slidesToShow: 3, 163 slidesToScroll: 1, 164 arrows: true, 165 dots: false, 166 responsive: [ 167 { 168 breakpoint: 1024, 169 settings: { 170 slidesToShow: 2, 171 } 172 }, 173 { 174 breakpoint: 650, 175 settings: { 176 slidesToShow: 1, 177 } 178 } 179 ] 180 }); 181}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.