1function FormHelper(form) { 2 this.form = form; 3} 4 5FormHelper.prototype.init = function () { 6 var self = this; 7 // добавлÑем кÑаÑнÑÑ Ð·Ð²ÐµÐ·Ð´Ð¾ÑÐºÑ 8 $(self.form).find('.input-block.required').each(function(){ 9 $(this).find('.req').remove(); 10 11 var input = $(this).find('input').eq(0); 12 var letterWidth = parseFloat($(input).css('font-size').replace(/[pxt\%]+/gi,""))/2; 13 var str = $(input).attr('placeholder'); 14 var width = (str.length + 2) * letterWidth - str.replace(/[^liI]/g,"").length * letterWidth * 0.7; 15 if ($(input)) { 16 $(this).append('<span class="req">*</span>'); 17 $(this).find('.req').css({ 18 'position': 'absolute', 19 'left': width+'px', 20 'top': '3px' 21 }); 22 23 24 $(input).blur(function(){ 25 if ($(input).val()=='' || $(input).val()=='+7(___) ___-____') $(this).parent().find('.req').show(); 26 }); 27 $(input).focus(function(){ 28 $(this).parent().find('.req').hide(); 29 }); 30 $(window).load(function(){ 31 if ($(input).val()!='' && $(input).val()!='+7(___) ___-____') $(this).parent().find('.req').hide(); 32 }); 33 } 34 }); 35}; 36
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.