PageSourceSearch

https://khcn.vnua.edu.vn/themes/default/js/news.js

js vnua.edu.vn collected 2026-10-02 03:42:17 UTC 3,220 bytes, 89 lines download raw bytes

1/**
2 * @Project NUKEVIET 4.x
3 * @Author VINADES.,JSC ([email protected])
4 * @Copyright (C) 2014 VINADES.,JSC. All rights reserved
5 * @License GNU/GPL version 2 or any later version
6 * @Createdate 1 - 31 - 2010 5 : 12
7 */
8
9function sendrating(id, point, newscheckss) {
10    if (point == 1 || point == 2 || point == 3 || point == 4 || point == 5) {
11        $.post(nv_base_siteurl + 'index.php?' + nv_lang_variable + '=' + nv_lang_data + '&' + nv_name_variable + '=' + nv_module_name + '&' + nv_fc_variable + '=rating&nocache=' + new Date().getTime(), 'id=' + id + '&checkss=' + newscheckss + '&point=' + point, function(res) {
12            res = res.split('|');
13            $('#stringrating').html(res[0]);
14            if (typeof res[1] != 'undefined' && res[1] != '0') {
15                $('#numberrating').html(res[1]);
16            }
17            if (typeof res[2] != 'undefined' && res[2] != '0') {
18                $('#click_rating').html(res[2]);
19            }
20        });
21    }
22}
23
24function nv_del_content(id, checkss, base_adminurl, detail) {
25    if (confirm(nv_is_del_confirm[0])) {
26        $.post(base_adminurl + 'index.php?' + nv_lang_variable + '=' + nv_lang_data + '&' + nv_name_variable + '=' + nv_module_name + '&' + nv_fc_variable + '=del_content&nocache=' + new Date().getTime(), 'id=' + id + '&checkss=' + checkss, function(res) {
27            var r_split = res.split('_');
28            if (r_split[0] == 'OK') {
29                if( detail ){
30                    window.location.href = r_split[2];
31                }
32                else
33                {
34                    window.location.href = strHref;
35                }
36            } else if (r_split[0] == 'ERR') {
37                alert(r_split[1]);
38            } else {
39                alert(nv_is_del_confirm[2]);
40            }
41        });
42    }
43    return false;
44}
45
46function get_alias(op) {
47    var title = strip_tags(document.getElementById('idtitle').value);
48    if (title != '') {
49        $.post(script_name + '?' + nv_name_variable + '=' + nv_module_name + '&' + nv_fc_variable + '=' + op + '&nocache=' + new Date().getTime(), 'get_alias=' + encodeURIComponent(title), function(res) {
50            if (res != "") {
51                document.getElementById('idalias').value = res;
52            } else {
53                document.getElementById('idalias').value = '';
54            }
55        });
56    }
57    return false;
58}
59
60function fix_news_image(){
61    var news = $('#news-bodyhtml'), newsW, w, h;
62    if( news.length ){
63        var newsW = news.innerWidth();
64        $.each($('img', news), function(){
65            if( typeof $(this).data('width') == "undefined" ){
66                w = $(this).innerWidth();
67                h = $(this).innerHeight();
68                $(this).data('width', w);
69                $(this).data('height', h);
70            }else{
71                w = $(this).data('width');
72                h = $(this).data('height');
73            }
74            
75            if( w > newsW ){
76                $(this).prop('width', newsW);
77                $(this).prop('height', h * newsW / w);
78            }
79        });
80    }
81}
82
83$(window).on('load', function() {
84    fix_news_image();
85});
86
87$(window).on("resize", function() {
88    fix_news_image();
89});

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.