PageSourceSearch

https://teoriya.ru/sites/default/files/js/js_OfVbNqEbVGdWM34Q4oaSxjDUSxgsGA0zjs7CPsCdaWA.js

js teoriya.ru collected 2026-09-26 02:22:55 UTC 7,741 bytes, 171 lines download raw bytes

1/*
2* Placeholder plugin for jQuery
3* ---
4* Copyright 2010, Daniel Stocks (http://webcloud.se)
5* Released under the MIT, BSD, and GPL Licenses.
6*/
7(function($) {
8    function Placeholder(input) {
9        this.input = input;
10        if (input.attr('type') == 'password') {
11            this.handlePassword();
12        }
13        // Prevent placeholder values from submitting
14        $(input[0].form).submit(function() {
15            if (input.hasClass('placeholder') && input[0].value == input.attr('placeholder')) {
16                input[0].value = '';
17            }
18        });
19    }
20    Placeholder.prototype = {
21        show : function(loading) {
22            // FF and IE saves values when you refresh the page. If the user refreshes the page with
23            // the placeholders showing they will be the default values and the input fields won't be empty.
24            if (this.input[0].value === '' || (loading && this.valueIsPlaceholder())) {
25                if (this.isPassword) {
26                    try {
27                        this.input[0].setAttribute('type', 'text');
28                    } catch (e) {
29                        this.input.before(this.fakePassword.show()).hide();
30                    }
31                }
32                this.input.addClass('placeholder');
33                this.input[0].value = this.input.attr('placeholder');
34            }
35        },
36        hide : function() {
37            if (this.valueIsPlaceholder() && this.input.hasClass('placeholder')) {
38                this.input.removeClass('placeholder');
39                this.input[0].value = '';
40                if (this.isPassword) {
41                    try {
42                        this.input[0].setAttribute('type', 'password');
43                    } catch (e) { }
44                    // Restore focus for Opera and IE
45                    this.input.show();
46                    this.input[0].focus();
47                }
48            }
49        },
50        valueIsPlaceholder : function() {
51            return this.input[0].value == this.input.attr('placeholder');
52        },
53        handlePassword: function() {
54            var input = this.input;
55            input.attr('realType', 'password');
56            this.isPassword = true;
57            // IE < 9 doesn't allow changing the type of password inputs
58            if ($.browser.msie && input[0].outerHTML) {
59                var fakeHTML = $(input[0].outerHTML.replace(/type=(['"])?password\1/gi, 'type=$1text$1'));
60                this.fakePassword = fakeHTML.val(input.attr('placeholder')).addClass('placeholder').focus(function() {
61                    input.trigger('focus');
62                    $(this).hide();
63                });
64                $(input[0].form).submit(function() {
65                    fakeHTML.remove();
66                    input.show()
67                });
68            }
69        }
70    };
71    var NATIVE_SUPPORT = !!("placeholder" in document.createElement( "input" ));
72    $.fn.placeholder = function() {
73        return NATIVE_SUPPORT ? this : this.each(function() {
74            var input = $(this);
75            var placeholder = new Placeholder(input);
76            placeholder.show(true);
77            input.focus(function() {
78                placeholder.hide();
79            });
80            input.blur(function() {
81                placeholder.show(false);
82            });
83
84            // On page refresh, IE doesn't re-populate user input
85            // until the window.onload event is fired.
86            if ($.browser.msie) {
87                $(window).load(function() {
88                    if(input.val()) {
89                        input.removeClass("placeholder");
90                    }
91                    placeholder.show(true);
92                });
93                // What's even worse, the text cursor disappears
94                // when tabbing between text inputs, here's a fix
95                input.focus(function() {
96                    if(this.value == "") {
97                        var range = this.createTextRange();
98                        range.collapse(true);
99                        range.moveStart('character', 0);
100                        range.select();
101                    }
102                });
103            }
104        });
105    }
106})(jQuery);;
107(function($){
108
109  $(document).ready(function(){
110    $('input[placeholder], textarea[placeholder]').placeholder();
111    $("#edit-name").attr('placeholder', 'Имя пользователя');  
112    $("#edit-pass").attr('placeholder', 'Пароль');
113    $("#search-block-form .form-text").attr('placeholder', 'Введите текст запроса');
114    $(".i18n-en #edit-name").attr('placeholder', 'User name');  
115    $(".i18n-en #edit-pass").attr('placeholder', 'Password');
116    $(".i18n-en #search-block-form .form-text").attr('placeholder', 'Enter query text');
117    /*=== добавление классов ===*/
118    $('#block-quicktabs-forum-ru').before('<div class="clearfix">&nbsp;</div>')
119    $('#block-quicktabs-forum-ru').addClass('clearfix');
120    $('#block-quicktabs-forum-en').before('<div class="clearfix">&nbsp;</div>')
121    $('#block-quicktabs-forum-en').addClass('clearfix');
122    $('.view-forum .views-row').each(function(){
123      $(this).addClass('clearfix');
124    });
125    $('.view-display-id-on_homepage .views-row').each(function(){
126      $(this).addClass('clearfix');
127      $(this).children('.node-article').children('.group_bottom_main_group').addClass('clearfix');
128    });
129    $('#logo').after($('.region-header .region-inner').html());
130    $('.region-header .region-inner').html('');
131    /*=== Анимация ховера картинок в блоке с новыми фотоисториями ===*/
132    $('.view-id-image_story.view-display-id-homepage td').hover(function(){
133      $(this).children('.views-field-title').stop(true, true).slideToggle();
134    });
135    $('.node-picture-story.node-teaser').hover(function(){
136      $(this).children('.field-name-title').stop(true, true).slideToggle();
137    });
138    /*=== Добавляем cheackbox ===*/
139    $('#commerce-checkout-form-checkout .cart_contents').after('<div class="info-check"><input type="checkbox" class="checked" checked />&nbsp;<span>' + Drupal.t('Shipping information and billing information identical') + '</span></div>');
140    $('.info-check input').each(function(){
141      if($(this).hasClass('checked')){
142        $('#edit-customer-profile-shipping').css('display','none');
143      }
144    });
145    $('.info-check input').change(function(){
146      if(!$(this).hasClass('checked')){
147        $(this).addClass('checked');
148      }else{
149        $(this).removeClass('checked');
150      }
151      $('#edit-customer-profile-shipping').slideToggle();
152    });
153    /*=== Запускаем валидацию ===*/
154    
155  }); 
156    
157  Drupal.behaviors.at_teoriya = {
158    attach: function(context, settings) {
159      $('.field-name-field-journal-term-recensents a').html(Drupal.t('Reviewers'));
160      $('.field-name-field-journal-term-editors a').html(Drupal.t('The editorial board'));
161      $('.field-name-field-journal-term-authors a').html(Drupal.t('Authors'));
162      $('.commerce-price-formatted-components .component-type-commerce-price-formatted-amount.odd .component-title').html(Drupal.t('Order total'));
163      $('.customer_profile_shipping legend .fieldset-legend').html(Drupal.t('Shipping information'));
164      $('.customer_profile_billing legend .fieldset-legend').html(Drupal.t('Billing information'));
165      $('.commerce_shipping legend .fieldset-legend').html(Drupal.t('Shipping service'));
166      
167      $("#edit-checkout-review td:contains('Shipping information')").html(Drupal.t('Shipping information'));
168      $("#edit-checkout-review td:contains('Billing information')").html(Drupal.t('Billing information'));
169    }
170  };
171})(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.