-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfavourite.html
392 lines (321 loc) · 11.8 KB
/
favourite.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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="css/styles.css" type="text/css" media="screen" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=no"/>
<meta name="description" content="Mobile optimised Dublin Traffic Cams" />
<meta name="keywords" content="Dublin, traffic, camera, livedrive, AA roadwatch, traffic cams" />
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
<script src="jquery-1.6.1.min.js"></script>
<script src="jquery.scrollTo-1.4.2-min.js"></script>
<!--Analytics-->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-23963982-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<style type="text/css">
li {
list-style: none;
float: center;
}
li a {
text-decoration: none;
color: #000;
margin: 10px;
width: 150px;
border: 3px dashed #fff;
background: #00C5CD;
padding: 10px;
display: block;
}
*[draggable=true] {
-moz-user-select:none;
-khtml-user-drag: element;
cursor: move;
}
*:-khtml-drag {
background-color: rgba(238,238,238, 0.5);
}
li a:hover:after {
content: '(drag me)';
}
ul {
margin-left: 200px;
min-height: 300px;
}
li.over {
border-color: #333;
background: #ccc;
}
#instruction
{
background-color: #CDCD00;
color: #FFFFFF;
float: left;
position: fixed;
border: 3px dashed #fff;
}
#dropzone {
background-color: #FF6A6A;
height: 250px;
width: 166px;
float: left;
border: 3px dashed #fff;
position: fixed;
margin-top: 0;
top: 55px;
}
#clearall
{
background-color: #458B00;
float: left;
border: 3px dashed #fff;
position: fixed;
top: 325px;
}
.item {
background-color: #FF5555;
border: 1px dashed #000;
-moz-user-select:none;
-khtml-user-drag: element;
cursor: move;
}
</style>
<script src="http://html5demos.com/h5utils.js"></script>
<script src="database.js"></script>
</head>
<body onload="">
<div id="instruction">Drag your favourites into the box.</div>
<div id="dropzone"></div>
<div id="clearall"><input type="button" value="Reset" OnClick="ClearOut();"></div>
<ul>
<li><a href="#" id="Site0Camera10">The Quays from Liberty Hall</a></li>
<li><a href="#" id="Site0Camera100">N11-Fosters</a></li>
<li><a href="#" id="Site0Camera101">N11-Mount Merrion</a></li>
<li><a href="#" id="Site0Camera102">N11-Kilmacud Rd</a></li>
<li><a href="#" id="Site0Camera103">N11-Trees Road</a></li>
<li><a href="#" id="Site0Camera104">N11-Newtownpark Avenue</a></li>
<li><a href="#" id="Site0Camera105">N11-Kill Lane</a></li>
<li><a href="#" id="Site0Camera106">N11-Clonkeen</a></li>
<li><a href="#" id="Site0Camera107">N11-Johnstown</a></li>
<li><a href="#" id="Site0Camera108">N11-Wyattville</a></li>
<li><a href="#" id="Site0Camera109">M1-Balbriggan</a></li>
<li><a href="#" id="Site0Camera110">M1-Airport</a></li>
<li><a href="#" id="Site0Camera111">M1-Drynam</a></li>
<li><a href="#" id="Site0Camera112">M1-Malahide Estuary</a></li>
<li><a href="#" id="Site0Camera113">M1-Lissenhall</a></li>
<li><a href="#" id="Site0Camera122">North Wall Quay</a></li>
<li><a href="#" id="Site0Camera127">Guild Street-Mayor Street</a></li>
<li><a href="#" id="Site0Camera131">Constitution Hill</a></li>
<li><a href="#" id="Site0Camera135">Dublin Port Tunnel Toll Plaza</a></li>
<li><a href="#" id="Site0Camera136">Samuel Beckett Bridge</a></li>
<li><a href="#" id="Site0Camera137">Sir John Rogersons Quay</a></li>
<li><a href="#" id="Site0Camera139">Guild Street-Seville Place</a></li>
<li><a href="#" id="Site0Camera15">John's Road-SCR</a></li>
<li><a href="#" id="Site0Camera163">John's Road West</a></li>
<li><a href="#" id="Site0Camera21">Dame Street from Civic Offices</a></li>
<li><a href="#" id="Site0Camera22">North Quays from Civic Offices</a></li>
<li><a href="#" id="Site0Camera23">Pearse Street</a></li>
<li><a href="#" id="Site0Camera24">North Strand Road</a></li>
<li><a href="#" id="Site0Camera27">Drumcondra Road</a></li>
<li><a href="#" id="Site0Camera31">Harolds Cross Bridge</a></li>
<li><a href="#" id="Site0Camera32">Cabra Road</a></li>
<li><a href="#" id="Site0Camera6">O'Connell Bridge</a></li>
<li><a href="#" id="Site0Camera66">Longmile Road</a></li>
<li><a href="#" id="Site0Camera71">M50-Blanchardstown Roundabout</a></li>
<li><a href="#" id="Site0Camera73">M50-Ballinteer</a></li>
<li><a href="#" id="Site0Camera74">M50-Edmondstown</a></li>
<li><a href="#" id="Site0Camera75">M50-Firhouse</a></li>
<li><a href="#" id="Site0Camera77">M50-Tallaght</a></li>
<li><a href="#" id="Site0Camera78">M50-Ballymount</a></li>
<li><a href="#" id="Site0Camera79">M50-Red Cow</a></li>
<li><a href="#" id="Site0Camera80">M50-Red Cow Slip</a></li>
<li><a href="#" id="Site0Camera81">M50-Greenhills Park</a></li>
<li><a href="#" id="Site0Camera82">M50-Lucan</a></li>
<li><a href="#" id="Site0Camera85">Naas road-Newlands cross</a></li>
<li><a href="#" id="Site0Camera87">M50-South of Finglas Roundabout</a></li>
<li><a href="#" id="Site0Camera91">N32-Malahide Road</a></li>
<li><a href="#" id="Site0Camera94">M1-M50</a></li>
<li><a href="#" id="Site0Camera95">M1-Port Tunnel Works</a></li>
<li><a href="#" id="Site0Camera96">M50-Ballymun</a></li>
<li><a href="#" id="BelgardAirton">Belgard Airton</a></li>
<li><a href="#" id="belgardcook">Belgard Cookstown</a></li>
<li><a href="#" id="belgardmayberry">Belgard Mayberry</a></li>
<li><a href="#" id="BelgardSqE">Belgard Square East</a></li>
<li><a href="#" id="Castleroad">Castle Road/ORR</a></li>
<li><a href="#" id="FonthillRon">Fonthill/Ronanstown</a></li>
<li><a href="#" id="Greenhillsairton">Greenhills Airton</a></li>
<li><a href="#" id="Greenhillsmayberry">Greenhills Mayberry</a></li>
<li><a href="#" id="Greenhillstallaght">Greenhills Tallaght</a></li>
<li><a href="#" id="Greenhillstymon">Greenhills Tymon</a></li>
<li><a href="#" id="Jobstown">Jobstown</a></li>
<li><a href="#" id="Lucanwood">Lucan Road at Woodvale</a></li>
<li><a href="#" id="N7citywest">N7/City West Junction</a></li>
<li><a href="#" id="N7Longmile">N7 Longmile</a></li>
<li><a href="#" id="N4newcastle">N4 Newcastle</a></li>
<li><a href="#" id="Rathcoole">N7/Rathcoole</a></li>
<li><a href="#" id="N81belgard">N81/Belgard Road</a></li>
<li><a href="#" id="N81Citywest">N81/Citwest</a></li>
<li><a href="#" id="N81oldbawn">N81 Oldbawn</a></li>
<li><a href="#" id="N81white">N81 Whitestown</a></li>
<li><a href="#" id="Bawneouge">Nangor Road/Bawneouge Jtn</a></li>
<li><a href="#" id="Deansrath">Nangor Road/Deansrath Jtn</a></li>
<li><a href="#" id="killen">Nangor Road/Killeen</a></li>
<li><a href="#" id="Parkwest">Nangor/Park West Junction</a></li>
<li><a href="#" id="m50redcow">M50 Red Cow</a></li>
<li><a href="#" id="ORRFetter">ORR Fettercairn</a></li>
<li><a href="#" id="ORRFox">ORR at Foxhunter</a></li>
<li><a href="#" id="ORRGrange">ORR Grange Castle</a></li>
<li><a href="#" id="ORRnangor">ORR Nangor</a></li>
</ul>
<script>
function cancel(e)
{
if (e.preventDefault)
{
e.preventDefault();
}
return false;
}
var links = document.querySelectorAll('li > a'), el = null;
for (var i = 0; i < links.length; i++)
{
el = links[i];
el.setAttribute('draggable', 'true');
addEvent(el, 'dragstart', function (e) {
e.dataTransfer.effectAllowed = 'copy'; // only dropEffect='copy' will be dropable
e.dataTransfer.setData('filename', this.id); // required otherwise doesn't work
e.dataTransfer.setData('text', this.text);
//e.hide();
});
//addEvent(el, 'd', cancel);
addEvent(el, 'dragend', function (e)
{
var event;
if (!event) event = e;
event.target.parentNode.removeChild(event.target);
});
}
var i =0;
var items = new Array();
var dropzone = document.querySelector('#dropzone');
// Tells the browser that we *can* drop on this target
addEvent(dropzone, 'dragover', cancel);
addEvent(dropzone, 'dragenter', cancel);
addEvent(dropzone, 'drop', function (e) {
if (e.preventDefault) e.preventDefault(); // stops the browser from redirecting off to the text.
this.innerHTML += '<div class="item" id="item' + i + '" draggable><a href="' + e.dataTransfer.getData('filename') +'"></a>' + e.dataTransfer.getData('text') + '</div>';
var filename = e.dataTransfer.getData('filename');
addArgs(filename,i);
items[i] = document.getElementById('item'+i);
var elit = items[i];
elit.setAttribute('draggable', 'true');
addEvent(elit, 'dragstart', function (e)
{
var event;
if (!event) event = e;
event.target.parentNode.removeChild(event.target);
e.dataTransfer.setData('text', this.innerHTML);
//e.dataTransfer.effectAllowed = 'copy';
});
addEvent(elit, 'dragend', function (e)
{
});
i++;
return false;
});
/*addEvent(dropzone, 'dragleave', function (e)
{
removeArgs(e.dataTransfer.href);
});*/
function ClearOut()
{
dropzone.innerHTML = "";
ClearAll();
};
/*var items = document.getElementById('item'), elit = null;
for (var i = 0; i < items.length; i++)
{
elit = items[i];
elit.setAttribute('draggable', 'true');
addEvent(elit, 'dragstart', function (e) {
e.dataTransfer.effectAllowed = 'copy'; // only dropEffect='copy' will be dropable
e.dataTransfer.setData('filename', this.id); // required otherwise doesn't work
e.dataTransfer.setData('text', this.text);
});
addEvent(elit, 'dragend', function (e)
{
var event;
if (!event) event = e;
event.target.parentNode.removeChild(event.target);
});
}
(function()
{
var id_ = 'columns-almostFinal';
var cols_ = document.querySelectorAll('#' + id_ + ' .column');
var dragSrcEl_ = null;
this.handleDragStart = function(e) {
e.dataTransfer.effectAllowed = 'move';
e.dataTransfer.setData('text/html', this.innerHTML);
dragSrcEl_ = this;
this.style.opacity = '0.4';
// this/e.target is the source node.
this.addClassName('moving');
};
this.handleDragOver = function(e) {
if (e.preventDefault) {
e.preventDefault(); // Allows us to drop.
}
e.dataTransfer.dropEffect = 'move';
return false;
};
this.handleDragEnter = function(e) {
this.addClassName('over');
};
this.handleDragLeave = function(e) {
// this/e.target is previous target element.
this.removeClassName('over');
};
this.handleDrop = function(e) {
// this/e.target is current target element.
if (e.stopPropagation) {
e.stopPropagation(); // stops the browser from redirecting.
}
// Don't do anything if we're dropping on the same column we're dragging.
if (dragSrcEl_ != this) {
dragSrcEl_.innerHTML = this.innerHTML;
this.innerHTML = e.dataTransfer.getData('text/html');
}
return false;
};
this.handleDragEnd = function(e)
{
// this/e.target is the source node.
this.style.opacity = '1';
[].forEach.call(cols_, function (col)
{
col.removeClassName('over');
col.removeClassName('moving');
});
};
[].forEach.call(cols_, function (col) {
col.setAttribute('draggable', 'true'); // Enable columns to be draggable.
col.addEventListener('dragstart', this.handleDragStart, false);
col.addEventListener('dragenter', this.handleDragEnter, false);
col.addEventListener('dragover', this.handleDragOver, false);
col.addEventListener('dragleave', this.handleDragLeave, false);
col.addEventListener('drop', this.handleDrop, false);
col.addEventListener('dragend', this.handleDragEnd, false);
});
})();*/
</script>
</body>
</html>