PageSourceSearch

https://probki-yandex.ru/templates/default/js/modal.js?1539655675

js probki-yandex.ru collected 2026-10-08 07:52:30 UTC 2,935 bytes, 93 lines download raw bytes

1var icms = icms || {};
2
3icms.modal = (function ($) {
4
5    this.onDocumentReady = function() {
6        icms.modal.bind('a.ajax-modal');
7        icms.modal.bind('.ajax-modal > a');
8    };
9
10    //====================================================================//
11
12	this.bind = function(selector) {
13        $(selector).nyroModal({anim: {def: 'show'}});
14	};
15
16    //====================================================================//
17
18	this.open = function(selector) {
19		$.nmManual(selector, {autoSizable: true, anim: {def: 'show'}});
20	};
21
22    //====================================================================//
23
24	this.openHtml = function(html, title) {
25        title = title || '';
26		$.nmData(html, {autoSizable: true, anim: {def: 'show'}, callbacks: {initFilters : function (nm) {
27                if(title){ nm.opener.attr('title', title); nm.filters.push('title'); }
28            }}});
29	};
30
31    //====================================================================//
32
33    this.openAjax = function(url, data, open_callback, title){
34
35        open_callback = open_callback || function(){};
36        title = title || '';
37
38        if (typeof(data)=='undefined'){
39            $.nmManual(url, {autoSizable: true, anim: {def: 'show'}, callbacks: {afterShowCont: open_callback, initFilters : function (nm) {
40                if(title){ nm.opener.attr('title', title); nm.filters.push('title'); }
41            }}});
42            return false;
43        }
44
45        $.nmManual(url, {autoSizable: true, anim: {def: 'show'}, callbacks: {afterShowCont: open_callback, initFilters : function (nm) {
46                if(title){ nm.opener.attr('title', title); nm.filters.push('title'); }
47        }}, ajax:{data: data, type: "POST"}});
48        return false;
49
50    };
51
52    //====================================================================//
53
54    this.bindGallery = function(selector){
55        $(selector).attr('rel', 'gal');
56        $(selector).nyroModal({anim: {def: 'show'}});
57    };
58
59    //====================================================================//
60
61    this.close = function(){
62        $.nmTop().close();
63    };
64
65    //====================================================================//
66
67    this.setCallback = function(event, callback){
68        switch(event){
69            case 'open':
70                $.nmTop().callbacks.afterShowCont = callback; break;
71            case 'close':
72                $.nmTop().callbacks.beforeClose = callback; break;
73        }
74    };
75
76    //====================================================================//
77
78    this.resize = function(){
79        $.nmTop().resize(true);
80    };
81
82    this.setHeight = function(height){
83        $('.nyroModalCont').css('height', height+'px');
84    };
85
86	this.alert = function(text, type) {
87        type = type || '';
88		this.openHtml('<div id="alert_wrap"><div class="ui_message '+type+'">'+text+'</div></div>');
89	};
90
91	return this;
92
93}).call(icms.modal || {},jQuery);

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.