-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgrid.html
143 lines (124 loc) · 5.53 KB
/
grid.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html>
<html>
<head>
<link rel="shortcut icon" href="favicon.ico" type="image/vnd.microsoft.icon" />
<title>Map | ZeldaMaps.com</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="robots" content="noindex">
<!-- Third-Party LIBs -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
<script type="text/javascript" src="res.php?type=javascript"></script>
<link rel="stylesheet" type="text/css" href="res.php?type=css" />
<script type="text/javascript" src="//cdn.tinymce.com/4/tinymce.min.js"></script>
<script>tinymce.baseURL="//cdn.tinymce.com/4";tinymce.init({ selector:'textarea' });</script>
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid.min.css" />
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid-theme.min.css" />
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid.min.js"></script>
<script>
var urlParams;
$(function(){
(window.onpopstate = function () {
var match,
pl = /\+/g, // Regex for replacing addition symbol with a space
search = /([^&=]+)=?([^&]*)/g,
decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); },
query = window.location.search.substring(1);
urlParams = {};
while (match = search.exec(query))
urlParams[decode(match[1])] = decode(match[2]);
})();
var game = urlParams["game"];
if(game===undefined) {
window.location.href = "?game=BotW";
}
$.getJSON("ajax.php?command=get_container_name&game="+game,function(data){
if(!data.success) {
document.title="Zelda Map | ZeldaMaps.com";
return;
}
document.title=data.name+" Map | ZeldaMaps.com";
});
});
</script>
<!-- Internal LIBS -->
<!--
<script src="scripts/zmap.js"></script>
<script src="scripts/zmain.js"></script>
<script src="scripts/Control.ZLayers2.js"></script>
<link rel="stylesheet" href="scripts/zmain.css" />
-->
</head>
<body>
<div id="map" style="width: 50vw; float: left"></div>
<div id="jsGrid" style="width: 49vw; float: right"></div>
<script>
$(function() {
$("#jsGrid").jsGrid({
height: window.innerHeight,
width: "49vw",
sorting: true,
paging: false,
autoload: true,
rowClick: function(args) { console.log(args.item.id); zMap._openMarker(args.item.id); },
controller: {
loadData: function() {
var d = $.Deferred();
$.ajax({
url: "ajax.php?command=get_markers&game=19&all=true",
dataType: "json"
}).done(function(response) {
d.resolve(response);
});
return d.promise();
}
},
fields: [
{ name: "id", title: 'ID', type: "number", width: 30 },
{ name: "name", title: 'Name', type: "text", width: 50 },
{ name: "description", title: 'Desc', type: "textarea", width: 50 },
{ name: "userName", title: 'User', type: "text", width: 50 },
{ name: "tabText", title: 'Text', type: "textarea" },
{ name: "visible", title: "Visible?", type: "checkbox", width: 30,
itemTemplate: function(value, item) {
return ((value)==1?"true":"false");
},
}
]
});
});
</script>
<div id="mobileAds">
</div>
<div id="desktopAds" align="center">
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-317947-14', 'auto');
ga('send', 'pageview');
</script>
<script>
setTimeout(function () {
var x = document.getElementsByClassName("leaflet-bottommenu");
for (var i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
}, 1000);
document.getElementById("mobileAds").style.display = 'none';
document.getElementById("desktopAds").style.display = 'none';
</script>
<style>
::-webkit-scrollbar {
display: block !important;
}
.jsgrid-cell img {
width: 100%;
height: auto;
}
</style>
</body>
</html>