PageSourceSearch

https://ea-nlp.ru/nassets/e8dff584/js/comment_template_dialog.js?v=1765633899

js ea-nlp.ru collected 2026-09-28 09:05:57 UTC 1,869 bytes, 66 lines download raw bytes

1function CommentTemplateDialog() {
2	var modal = this.modal = window.gcModalFactory.create({show: false, width: 900 });
3	var self = this;
4
5	var saveTemplate = 'Сохранить шаблон';
6	if (typeof Yii != 'undefined') {
7		saveTemplate = Yii.t('common', saveTemplate);
8	}
9	var $saveBtn = $('<button class="pull-left btn btn-use btn-success">' + saveTemplate + '</button>')
10	$saveBtn.appendTo( modal.getFooterEl() );
11
12	/*
13	var $editBtn = $('<button class="pull-right btn btn-use btn-link">Редактировать</button>')
14	$editBtn.appendTo( modal.getFooterEl() );
15	*/
16
17	$saveBtn.click( function() {
18
19		$('.owner-type-id-value').val( $('.owner-type-selector:checked').data('owner-type-id'));
20		$('.owner-id-value').val( $('.owner-type-selector:checked').data('owner-id'));
21
22		ajaxCall( '/pl/notifications/skill-question/save-ajax', $('.skill-question-form').serialize(), { btn: $saveBtn }, function( response ) {
23
24			/*
25			self.modal.setContent( response.data.html );
26			self.data = response.data;
27			self.id = id;
28			*/
29			self.modal.hide();
30			location.href = location.href;
31		} );
32
33
34	} );
35
36	/*
37	$editBtn.click( function() {
38		window.open( "/pl/notifications/skill-question/update?id=" + self.id)
39	});
40	*/
41
42	/*$deleteBtn = $('<button class="pull-right btn btn-danger">Удалить</button>')
43	 $deleteBtn.appendTo( modal.getFooterEl() );
44	 $deleteBtn.click( function() {
45	 self.setValue({selected_id: null})
46	 self.doSelect()
47	 })*/
48
49	this.open = function( id, userId ) {
50		this.modal.reset();
51		$('.skill-question-form').detach();
52
53
54		ajaxCall( '/pl/notifications/skill-question/create-from-comment?id=' + id, { }, {}, function( response ) {
55			self.modal.setContent( response.data.html );
56			self.data = response.data;
57			self.id = id;
58		} );
59
60		this.modal.show();
61		setTimeout( function() {
62			$('.owner-type-selector').eq(0).click();
63		}, 100 )
64
65	}
66}

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.