PageSourceSearch

https://dowlatow.pro/nassets/3e6171b4/js/frames/dialog.js?v=1765633899

js dowlatow.pro collected 2026-09-26 07:37:41 UTC 3,305 bytes, 109 lines download raw bytes

1window.gcSelectVideoFrame = function(options) {
2	var hash = options.hash;
3	window.gcVideoFrameSelectEl = {};
4
5	if (!(hash in window.gcVideoFrameSelectEl)) {
6		window.gcVideoFrameSelectEl[hash] = $('<div class="gc-file-dialog"></div>');
7		window.gcVideoFrameSelectEl[hash].appendTo(window.body);
8		window.gcVideoFrameSelectEl[hash].gcVideoFrameSelector(options);
9	}
10	window.gcVideoFrameSelectEl[hash].gcVideoFrameSelector('selectFile', options);
11};
12
13jQuery.widget('gc.gcVideoFrameSelector', $.gc.gcFileSelector, {
14	options: {
15		isMulti: null,
16		callback: null,
17		accept: '',
18		// hash файла (видео), с кадрами которого работаем
19		hash: null,
20		overrideDefaultFolder: '',
21		skipGetInfo: false,
22		previewList: [],
23	},
24	defaultFolder: "frames",
25	previousModal: null,
26	createModal: function() {
27		var self = this;
28
29		if(self.options.overrideDefaultFolder !== '') {
30			self.defaultFolder = self.options.overrideDefaultFolder;
31		}
32
33		this.detectPreviousActiveModal();
34		this.previousModal && this.previousModal.hide()
35        var previousModal = this.previousModal
36
37		// Тут уже срабатывает установка активной модалки, потому до этого имеет смысл получить текущую активную
38		return window.gcModalFactory.create({
39			onShow: function() {
40				if (self.folders && self.defaultFolder in self.folders) {
41					var folder = self.folders[self.defaultFolder];
42					if (folder.widgetEl) {
43						folder.widgetEl[folder.widget]('checkNeedToRefresh');
44					}
45				}
46			},
47			onHide: function () {
48                previousModal && previousModal.show();
49			}
50		});
51	},
52	createFolders: function() {
53		var self = this;
54		if (!self.folders) {
55			self.folders = {
56				frames: {
57					label: window.tt('common', 'Кадры'),
58					icon: "glyphicon glyphicon-film",
59					widget: 'gcVideoFramesFolder',
60					options: {
61						previewList: self.options.previewList,
62						mainHash: self.options.hash
63					}
64				},
65				subtitles: {
66					label: window.tt('common', 'Субтитры'),
67					icon: "glyphicon glyphicon-subtitles",
68					widget: 'gcVideoSubtitles',
69					options: {
70                        previewList: self.options.previewList,
71                        mainHash: self.options.hash,
72					}
73				},
74			};
75			if(window.defenceEnabled) {
76				self.folders.grids = {
77					label: window.tt('common', 'Защита'),
78					icon: "glyphicon glyphicon-copyright-mark",
79					widget: 'gcVideoGrid',
80					options: {
81						previewList: self.options.previewList,
82						mainHash: self.options.hash
83					}
84				};
85				self.folders.gridLog = {
86					label: window.tt('common', 'История вкл. защиты'),
87					icon: "glyphicon glyphicon-copyright-mark",
88					widget: 'gcVideoGridLog',
89					options: {
90						previewList: self.options.previewList,
91						mainHash: self.options.hash,
92					}
93				};
94				self.folders.statistics = {
95					label: window.tt('common', 'Статистика'),
96					icon: "glyphicon glyphicon-stats",
97					widget: 'gcVideoStatistics',
98					options: {
99						previewList: self.options.previewList,
100						mainHash: self.options.hash
101					}
102				};
103			}
104		}
105	},
106	getSrcByHash: function(hash) {
107		return this.folders[this.defaultFolder].widgetEl.gcVideoFramesFolder('getSrcByHash', hash);
108	}
109} );

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.