PageSourceSearch

https://e-news.pro/templates/ENews-night/editrating/js/editrating.js

js e-news.pro collected 2026-09-26 06:46:31 UTC 1,786 bytes, 71 lines download raw bytes

1/*!
2=============================================================================
3DLE EditRating — редактирование рейтинга для DLE
4=============================================================================
5Автор:   ПафНутиЙ
6URL:     http://pafnuty.name/
7twitter: https://twitter.com/pafnuty_name
8google+: http://gplus.to/pafnuty
9email:   [email protected]
10=============================================================================
11*/
12
13// Экономим памть браузера.
14var doc = $(document);
15
16doc
17	// ajax-отправка формы + эффекты
18	.on('submit', '[data-er-form]', function () {
19		var $this = $(this),
20			laddaLoad,
21			options = {
22				beforeSubmit: erStart,
23				success: erDone,
24			};
25
26		$this.ajaxSubmit(options);
27
28		return false;
29	})
30	// Открытие ajax-окна с формой
31	.on('click', '[data-er-edit]', function (e) {
32		var $this = $(this),
33			id = $this.data('erEdit');
34
35		$.magnificPopup.open({
36			items: {
37				src: '/engine/ajax/editrating.php',
38			},
39			focus: '.er-input-first',
40			type: 'ajax',
41			ajax: {
42				settings: {
43					data: {
44						id: id
45					}
46				}
47			}
48		});
49		return false;
50	});
51
52
53// Функция, выполняемая перед отправкой формы
54function erStart(formData, jqForm) {
55	laddaLoad = jqForm.find('.ladda-button').ladda();
56	laddaLoad.ladda('start');
57
58	return true;
59}
60
61// Функция, выполняемая после удачной отправки формы
62function erDone(responseText, statusText, xhr, $form) {
63
64	var $responseText = $(responseText),
65		responseResult = ($responseText.is('form')) ? $responseText.html() : responseText;
66
67	if (statusText == 'success') {
68		laddaLoad.ladda('stop');
69		$form.html(responseResult);
70	}
71}

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.