forked from InfotelGLPI/positions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgeoloc.js
49 lines (43 loc) · 1.11 KB
/
geoloc.js
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
Ext.ns('Position');
Position = {
init:function()
{
/* just for demo */
},
openWindow:function(url)
{
var win = new Ext.Window({
width:1400,
height:650,
//title:'Site:' + url,
autoScroll:true,
modal:true
});
var iframeid = win.getId() + '_iframe';
var iframe = {
id:iframeid,
tag:'iframe',
src:url,
width:'100%',
height:'100%',
frameborder:0
}
// show first
win.show();
// then iframe
Ext.DomHelper.insertFirst(win.body, iframe)
}
}
//Ext.onReady(function() {
// Position.init();
// Ext.select('a[href*=user.form.php]').each(function(el){
// var href = el.getAttribute('href');
// var users_id = href.substring(href.lastIndexOf('id=')+3, href.length);
// var target = "../plugins/positions/front/geoloc.php?users_id="+users_id;
//
// el.insertHtml(
// 'afterEnd',
// '<a href=\"#\" onclick=\"Position.openWindow(\''+target+'\')\"><img src="../plugins/positions/pics/sm_globe.png" /></a>'
// );
// });
//});