PageSourceSearch

https://www.iiitb.ac.in/includes/javascripts/common.js?v=146.26

js iiitb.ac.in collected 2026-09-24 09:12:45 UTC 7,384 bytes, 176 lines download raw bytes

1function isNumberKey(evt) {
2    var charCode = (evt.which) ? evt.which : event.keyCode
3    if (charCode > 31 && (charCode < 48 || charCode > 57))
4        return false;
5    return true;
6}
7function isFloat(evt)
8{
9    var iKeyCode = (evt.which) ? evt.which : evt.keyCode;
10    if (iKeyCode != 46 && iKeyCode > 31 && (iKeyCode < 48 || iKeyCode > 57))
11        return false;
12
13    return true;
14}
15/* trigger when page is ready */
16$(document).ready(function () {
17
18    $(".accessibility").hover(function () {
19        $(".accessibility-menu").css('visibility', 'visible');
20    }, function () {
21        $(".accessibility-menu").css('visibility', 'hidden');
22    }
23    );
24
25    $('#action_approve').validate({
26        debug: false,
27        submitHandler: function () {
28            $.post("ajax/approve_preview_page", $("#action_approve").serialize(), function (data) {
29                $(".preview-bar").remove();
30                if (data.status == 1) {
31                    swal("Page Approved Successfully", "page will redirect to approval list page", "success")
32                            .then(function (result) {
33                                if (result) {
34                                    setTimeout(function () {
35                                        window.location.href = data.redirct_url;
36                                    }, 500);
37                                }
38                            });
39                } else if (data.status == 2) {
40                    swal("Page Approval Rejected!", "page will redirect to approval list page", "error")
41                            .then(function (result) {
42                                if (result) {
43                                    setTimeout(function () {
44                                        window.location.href = data.redirct_url;
45                                    }, 500);
46                                }
47                            });
48                } else {
49                    swal("Oops! Something went wrong please try again", "page will redirect to approval list page", "error")
50                            .then(function (result) {
51                                if (result) {
52                                    setTimeout(function () {
53                                        window.location.href = data.redirct_url;
54                                    }, 500);
55                                }
56                            });
57                }
58            });
59        }
60    });
61
62    $('#email_subscriber').validate({
63        debug: false,
64        rules: {
65            newsletter_email: {
66                required: true,
67                email: true,
68            },
69        },
70        submitHandler: function () {
71            $.post("ajax/newsletter_subscriber", $("#email_subscriber").serialize(), function (data) {
72                if (data == 1) {
73                    $("#email_subscriber .spam-message").css('color', '#0bfda6');
74                    $("#email_subscriber .spam-message").show();
75                    $("#email_subscriber .spam-message").html('Subscribe Successfully!').fadeOut(10000);
76                    $("#newsletter_email").val('');
77                } else if (data == 2) {
78                    $("#email_subscriber .spam-message").css('color', '#f57272');
79                    $("#email_subscriber .spam-message").show();
80                    $("#email_subscriber .spam-message").html('Oopps! Please try again').fadeOut(10000);
81                } else if (data == 3) {
82                    $("#email_subscriber .spam-message").css('color', '#0bfda6');
83                    $("#email_subscriber .spam-message").show();
84                    $("#email_subscriber .spam-message").html('Email id already exist').fadeOut(10000);
85                } else {
86                    $("#email_subscriber .spam-message").css('color', '#f57272');
87                    $("#email_subscriber .spam-message").show();
88                    $("#email_subscriber .spam-message").html('Enter valid Email!').fadeOut(10000);
89                }
90            });
91        }
92
93    });
94
95
96    $('#alumni_signup').validate({
97        debug: false,
98        rules: {
99            alumni_name: {
100                required: true,
101            },
102            alumni_email: {
103                required: true,
104                email: true,
105            },
106        },
107        submitHandler: function () {
108            $("#alumni_signup .spam-message").show();
109            $.post("ajax/alumni_signup", $("#alumni_signup").serialize(), function (data) {
110                if (data == 1) {
111                    $("#alumni_name").val('');
112                    $("#alumni_email").val('');
113                    $("#alumni_signup .spam-message").css('color', '#0bfda6');
114                    $("#alumni_signup .spam-message").show();
115                    $("#alumni_signup .spam-message").html('Subscribe Successfully!').fadeOut(10000);
116                    $("#newsletter_email").val('');
117                } else if (data == 2) {
118                    $("#alumni_signup .spam-message").css('color', '#f57272');
119                    $("#alumni_signup .spam-message").show();
120                    $("#alumni_signup .spam-message").html('Oopps! Please try again').fadeOut(10000);
121                } else {
122                    $("#alumni_signup .spam-message").css('color', '#f57272');
123                    $("#alumni_signup .spam-message").show();
124                    $("#alumni_signup .spam-message").html('Enter valid Email!').fadeOut(10000);
125                }
126            });
127        }
128
129    });
130
131
132    //Tabs functionality //Firstly hide all content divs begins here$('.labs-tab-list div').hide();
133    $('#generic-tabs div').hide();
134    //Then show the first content div
135	$('.labs-tab-list div:first').show();
136    $('#generic-tabs div:first').show();
137    //Add active class to the first tab link
138    $('.labs-tab-list ul#tabs li:first').addClass('active');
139    $('#generic-tabs ul#tabs li:first').addClass('active');
140    //Functionality when a tab is clicked
141    $('#generic-tabs ul#tabs li a').click(function () {
142        //Firstly remove the current active class
143        $('#generic-tabs ul#tabs li').removeClass('active');
144        //Apply active class to the parent(li) of the link tag
145        $(this).parent().addClass('active');
146        //Set currentTab to this link
147        var currentTab = $(this).attr('href');
148        //Hide away all tabs
149        $('#generic-tabs div').hide();
150        //show the current tab
151        $(currentTab).show();
152        //Stop default link action from happening
153        return false;
154    });
155    //Tabs functionality //Firstly hide all content divs end here
156
157});
158/*
159function set_font_size(fontType) {
160    var fontSize = 100;
161    if (fontType == "increase") {
162        if (fontSize < 130) {
163            fontSize = parseInt(fontSize) + 15;
164        }
165    } else if (fontType == "decrease") {
166        if (fontSize > 70) {
167            fontSize = parseInt(fontSize) - 15;
168        }
169    } else {
170        fontSize = 100;
171    }
172    //_setCookie("fontSize", fontSize);
173    $(".lg-mnu-sec2 nav > div > ul > li").css("font-size", fontSize + "%");
174    $("body").css("font-size", fontSize + "%");
175    //jQuery("#template_three_column").css("font-size",fontSize + "%");
176}*/

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.