PageSourceSearch

https://aleshamebel.ru/local/templates/romza_bitronic2_2.17.0/js/c…/popups/initSearchPopup.js?1471403330836

js aleshamebel.ru collected 2026-10-04 23:51:31 UTC 836 bytes, 32 lines download raw bytes

1function initSearchPopup(popup, field, clearBtn){
2	function open(){
3		popup.velocity('fadeIn').data('opened', true);
4		$(document).on('click.searchPopup', function(e){
5			if ( !$(e.target).closest(popup, field).length ) close();
6		})
7	}
8	function close(){
9		popup.velocity('fadeOut').data('opened', false);
10		$(document).off('click.searchPopup');
11	}
12	field.on('focus keyup change', function(e){
13		if ( e.keyCode && 27 === e.keyCode ){
14			$(this).blur();
15			close();
16			e.stopPropagation();
17			return;
18		}
19		if ( $(this).val() ){
20			clearBtn.show();
21			if ( !popup.data('opened') ) open();
22		} else {
23			clearBtn.hide();
24			close();
25		}
26	}).on('click', function(e){
27		e.stopImmediatePropagation(); // for um popup not to close
28	});
29	clearBtn.on('click', function(){
30		field.val('').trigger('change');
31	})
32}

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.