1/*! 2 * DLE UniForm â ÑнвеÑÑалÑнÑе ÑоÑÐ¼Ñ Ð´Ð»Ñ DLE 3 * 4 * @author ÐаÑÐÑÑиР<[email protected]> 5 * @link http://pafnuty.name/ 6 * @link https://twitter.com/pafnuty_name 7 */ 8 9var doc = $(document); 10 11var laddaLoad; 12 13doc 14 // ajax-оÑпÑавка ÑоÑÐ¼Ñ + ÑÑÑекÑÑ 15 .on('submit', '[data-uf-form]', function () { 16 var $this = $(this); 17 var options = { 18 beforeSubmit: ufStart, 19 success: ufDone, 20 }; 21 22 $this.ajaxSubmit(options); 23 24 return false; 25 }) 26 // ÐÑкÑÑÑие ajax-окна Ñ ÑоÑмой 27 .on('click', '[data-uniform]', function () { 28 var $this = $(this); 29 var data = $this.data('uniform'); 30 data.mod = 'uniform'; 31 32 $.magnificPopup.open({ 33 items: { 34 src: '/index.php?controller=ajax', 35 }, 36 focus: '.uf-input-first', 37 type: 'ajax', 38 ajax: { 39 settings: { 40 data: data 41 } 42 } 43 }); 44 return false; 45 }) 46 // УбиÑаем клаÑÑ Ñ Ð¸Ð· инпÑÑа Ñ Ð¾ÑибоÑнÑм заполнением 47 .on('keyup input', '.uf-input-error', function (e) { 48 var $this = $(this); 49 if (e.type === 'input') { 50 doc.off('keyup', '.uf-input-error'); 51 } 52 if ($this.val().length) { 53 $this.removeClass('uf-input-error'); 54 } 55 }); 56 57// ФÑнкÑиÑ, вÑполнÑÐµÐ¼Ð°Ñ Ð¿ÐµÑед оÑпÑавкой ÑоÑÐ¼Ñ 58function ufStart(formData, jqForm) { 59 laddaLoad = jqForm.find('.ladda-button').ladda(); 60 laddaLoad.ladda('start'); 61 62 return true; 63} 64 65// ФÑнкÑиÑ, вÑполнÑÐµÐ¼Ð°Ñ Ð¿Ð¾Ñле ÑдаÑной оÑпÑавки ÑоÑÐ¼Ñ 66function ufDone(responseText, statusText, xhr, $form) { 67 68 var $responseText = $(responseText); 69 var responseResult = ($responseText.is('form')) ? $responseText.html() : responseText; 70 71 if (statusText === 'success') { 72 laddaLoad.ladda('stop'); 73 $form.html(responseResult); 74 } 75} 76 77jQuery(document).ready(function ($) { 78 var $inlineUniform = $('[data-uniform-inline]'); 79 80 if ($inlineUniform.length) { 81 $.each($inlineUniform, function () { 82 var $this = $(this); 83 var data = $this.data('uniformInline'); 84 data.mod = 'uniform'; 85 86 $.ajax({ 87 url: '/index.php?controller=ajax', 88 data: data, 89 }) 90 .done(function (data) { 91 $this.html(data); 92 }); 93 94 }); 95 } 96});
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.