PageSourceSearch

https://www.akut.org.tr/scripts/map/init.js?v=1.3

js akut.org.tr collected 2026-10-01 11:46:28 UTC 5,948 bytes, 176 lines download raw bytes

1/*
2Raphaël 2.1.0 - JavaScript Vector Library                         
3Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com)   
4Copyright © 2008-2012 Sencha Labs (http://sencha.com)             
5Licensed under the MIT (http://raphaeljs.com/license.html) license. 
6*/
7
8var iscountyselected = false;
9var previouscountyselected = "blank";
10var start = true;
11var past = null;
12var content_dir = "details";
13
14var defaultColor = new Array( '#e6e7e8', '#e3252b');
15var hoverColor = new Array('#e6e7e8', '#e3252b');
16
17$(function () {
18
19    var r = Raphael('map'),
20	attributes = {
21	    fill: '#e3252b',
22	    stroke: '#ffffff',
23	    'stroke-width': 0,
24	    'stroke-linejoin': 'round',
25	    width: 10
26	},
27    states = r.set(),
28	arr = new Array();
29
30    for (var county in paths) {
31
32        var obj = r.path(paths[county].path);
33
34        obj.attr(attributes);
35        states.push(obj.attr(attributes));
36
37        arr[obj.id] = county;
38
39        //		if(arr[county] == 'blank')
40        //			obj.attr(attributes).attr( { fill: "#000" } ); /* set blank colour */
41        //county.transform("s2");
42
43
44        if (arr[obj.id] != 'blank') /* prevent change of blank colour and mouse click */
45        {
46            obj.data('selected', 'notSelected');
47
48            /* add ID to paths */
49            obj.node.id = arr[obj.id];
50            var sehir = parseInt(paths[arr[obj.id]].county, 10);
51            
52            if ($.inArray(sehir, ekipOlanSehirler) != -1) {
53                obj.SehirVar = 1;
54            } else {
55                obj.SehirVar = 0;
56            }
57            obj.attr(attributes).attr({ title: paths[arr[obj.id]].city, fill: defaultColor[obj.SehirVar] });
58
59            /* add crests to bottom and set county selections */
60            obj.click(function () {
61                try {
62                    var sehirId = parseInt(paths[arr[this.id]].county, 10);
63                    if ($.inArray(sehirId, ekipOlanSehirler) != -1) { //Şehir varsa
64                        OpenCityPopup(sehirId);
65                    }
66                } catch (e) {
67                    alert(e);
68                }
69
70                if (paths[arr[this.id]].value == 'notSelected') {
71                    //                    this.animate({
72                    //                        fill: '#eb1c23'
73                    //                    }, 200);
74
75                    paths[previouscountyselected].value = "notSelected";
76                    paths[arr[this.id]].value = "isSelected";
77
78                    previouscountyselected = paths[arr[this.id]].name;
79
80                    $('<div/>', {
81                        title: arr[this.id],
82                        'class': arr[this.id] + 'small sprite-smallcrests'
83                    });
84
85                    /* change select drop menu */
86                    $("#countymenu").val(paths[arr[this.id]].county);
87
88                    //                    if (!start && past != this) {
89                    //                        past.animate({ fill: '#e0e0e0' }, 200);
90                    //                    }
91                    past = this;
92                    start = false;
93                }
94
95                else if (paths[arr[this.id]].value == 'isSelected') {
96                    //                    this.animate({
97                    //                        fill: '#eb1c23'
98                    //                    }, 200);
99
100                    paths[arr[this.id]].value = "notSelected"; /* set path value */
101
102                    /* remove small crest */
103                    $("." + previouscountyselected + 'small').remove();
104                }
105
106            }); /* end mark selections */
107
108            /* county hover bump */
109            function hoverin(e) {
110                //if (paths[arr[this.id]].value == 'notSelected')
111                this.animate({
112                    fill: hoverColor[this.SehirVar]
113                }, 300);
114            }
115
116            function hoverout(e) {
117                //if (paths[arr[this.id]].value == 'notSelected')
118                this.animate({
119                    fill: defaultColor[this.SehirVar]
120                }, 300);
121            }
122
123            obj.mouseout(hoverout);
124
125            obj.mouseover(hoverin);
126            /* end county hover bump */
127
128            /* hide name div - !important do not delete - ajax uses contents for event search */
129            $('#countyInfo').hide();
130
131            $('#spinner').hide();
132
133        } /* end check on blank */
134
135    } /* end raphael loop */
136    //states.transform("s0.45,0.45 0,0");
137    states.transform("s0.63,0.63 0,0");
138});
139
140function OpenCityPopup(sehirId) {
141    $("#SehirImg").attr("src", "");
142    $("#MapDetail").hide();
143    $("#MapImg").hide();
144    $("#MPClose").show();
145    $('#MapSehir').fadeIn(function () {
146        $("#SehirImg").attr("src", "/images/sehirler/" + sehirId + ".png");
147        $.ajax({
148            type: 'POST',
149            url: '/PageMethods.aspx/EkipBilgiGetir',
150            data: '{ Sehir:' + sehirId + ' }',
151            contentType: 'application/json; charset=utf-8',
152            dataType: 'json',
153            success: function (result) {
154                if (result.d != null) {
155                    var response = eval('(' + result.d + ')');
156                    if (response.s == "1") {
157                        $("#SehirAdi").html(response.SehirAdi);
158                        $("#SehirAciklama").html(response.SehirAciklama);
159                    } else {
160                        $("#SehirAdi").html("");
161                        $("#SehirAciklama").html("");
162                    }
163                }
164                $("#MapDetail").show();
165                $("#MapImg").show();
166            },
167            error: function () {
168
169            }
170        });
171    });
172}
173
174function CloseCityPopup() {
175    $('#MapSehir').fadeOut();
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.