PageSourceSearch

http://parki.org.pl/Js/utils.js

js parki.org.pl collected 2026-10-02 12:59:47 UTC 5,235 bytes, 172 lines download raw bytes

1function HP_loadTab(number)
2{
3    //$('.categories').fadeOut();
4    $('.age li a').removeClass();
5    $('#categories_option' + parseInt(number)+' a').attr('class', 'selected');
6    $(".categories").empty();
7    $('#categories' + parseInt(number)).children().clone().appendTo(".categories");
8    
9	$('#content .categories > div').bind( 'mouseover', function(){ $('#content .categories > div.active').removeClass('active');$(this).addClass('active') } )
10    //$('.categories').fadeIn();   
11}
12
13function flashMsg(message, status) {
14    /*
15    $(".flashMessenger").text(message);
16    if (status == 0)
17        $(".flashMessenger").addClass("info");
18    else
19        $(".flashMessenger").addClass("error");
20
21    $(".flashMessenger").fadeIn('fast');
22    */
23    alert(message);
24}
25
26function addToFavorites(nodes_id) {
27    $.ajax({
28        type: "POST",
29        url: "/Documents/Services/Favorites.asmx/Add",
30        data: "{Nodes_Id: " + parseInt(nodes_id) + "} ",
31        contentType: "application/json; charset=utf-8",
32        dataType: "json",
33        success: function(data) {
34
35            flashMsg(data.d.Message, data.d.Status);
36        }
37    });
38
39}
40
41function removeFromFavorites(nodes_id) {
42    $.ajax({
43        type: "POST",
44        url: "/Documents/Services/Favorites.asmx/Remove",
45        data: "{Nodes_Id: " + parseInt(nodes_id) + "} ",
46        contentType: "application/json; charset=utf-8",
47        dataType: "json",
48        success: function(data) {
49
50            flashMsg(data.d.Message, data.d.Status);
51            $('#node-' + parseInt(nodes_id)).hide();
52        }
53    });
54
55}
56
57function addToAbuse(nodes_id) {
58    $.ajax({
59        type: "POST",
60        url: "/Documents/Services/AbuseList.asmx/Add",
61        data: "{Nodes_Id: " + parseInt(nodes_id) + "} ",
62        contentType: "application/json; charset=utf-8",
63        dataType: "json",
64        success: function(data) {
65
66            flashMsg(data.d.Message, data.d.Status);
67        }
68    });
69
70}
71   
72 function lock(nodes_id, enabled) {
73    $.ajax({
74        type: "POST",
75        url: "/Documents/Services/Nodes.asmx/Lock",
76        data: "{Nodes_Id: " + parseInt(nodes_id) + ", enabled: "+ ((parseInt(enabled) == 1)? 'false':'true') + "} ",
77        contentType: "application/json; charset=utf-8",
78        dataType: "json",
79        success: function(data) {
80
81            flashMsg(data.d.Message, data.d.Status);
82        }
83    });
84
85}
86
87function browserAddToFavorites() { if (window.external) { window.external.AddFavorite("http://kursusability.pl/","Kurs Usability") 
88} else { alert("Twoja przegl¹darka nie obs³uguje tej funkcji!"); 
89} } // --></script>
90
91function tg(div)
92{
93}
94
95function urlencode(str) {
96    str = (str + '').toString();
97    return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').
98                                                                    replace(/\)/g, '%29').replace(/\*/g, '%2A').replace(/%20/g, '+');
99}
100
101
102var ImageDescriptionsEditor = {
103    inuse: false,
104    curr: null,
105    returned: false,
106    cancel: function () {
107
108        with (this) {
109            //    if (returned) return;
110            curr = null;
111            returned = false;
112            inuse = false;
113        }
114    },
115    save: function () {
116        $('#EditedDescription').val($('#EditedDescriptionText').val());
117        //this.returned = true;
118        // $('#EditedDescriptionPrompt').dialog('close');
119        //$(this.curr).click(function(){return true;});
120        //$(this.curr).click();
121        //eval($(this.curr).attr.('href'));
122    },
123    edit: function (el) {
124        if (this.inuse && !this.returned) return false;
125        if (!this.inuse) {
126            this.curr = el;
127            this.inuse = true;
128            var content = $(el).next('span.description').html();
129            $('#EditedDescriptionText').val(content);
130            $('#EditedDescriptionPrompt').dialog('open');
131            $('#EditedDescriptionPrompt_Saver').attr('href', $(el).attr('href'));
132            return false;
133        }
134        return true;
135        //var re = prompt("Opis:", content);
136        //if (re === null) return false;
137        //$('#EditedDescription').val(re);
138        //return true;
139    },
140    init: function () {
141        $('#EditedDescriptionPrompt').dialog({
142            autoOpen: false,
143            modal: true,
144            height: 125,
145            minHeight: 125,
146            title: 'Zmiana opisu obrazka',
147            close: function (event, ui) {
148                ImageDescriptionsEditor.cancel();
149            }
150        });
151
152
153        $('#EditedDescriptionPrompt_Saver').hover(
154					function () { $(this).addClass('ui-state-hover'); },
155					function () { $(this).removeClass('ui-state-hover'); }
156				);
157
158        $('#EditedDescriptionPrompt_Saver').click(function () {
159            ImageDescriptionsEditor.save();
160            return true;
161        });
162
163        $('#EditedDescriptionPrompt_Canceler').click(function () {
164            $('#EditedDescriptionPrompt').dialog('close');
165            return false;
166        });
167
168
169        //$('#EditedDescriptionPrompt_Saver').button();
170
171    }
172}

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.