1 // (c) BenoƮt PIN 2006-2007
5 function openMemberPopup(member_id
) {
6 var slot
= document
.getElementById("MemberFormSlot");
7 var url
= portal_url() + "/use_macro?template=gruf_macros¯o=member_properties_form&fragmentId=MemberFormSlot&member_id=" + member_id
;
8 new FragmentImporter(url
, function() {initForms(slot
);}).load();
11 function openMemberTreeView(evt
) {
13 disablePropagation(evt
);
14 var link
= getTargetedObject(evt
);
15 var slot
= document
.getElementById("MemberFormSlot");
16 var member_id
= link
.href
.split("member_id=")[1];
17 /* member_id parameter is not necesary at the last position.*/
18 var member_id
= member_id
.split("&");
19 var url
= portal_url() + "/use_macro?template=gruf_macros¯o=member_tree_view&fragmentId=MemberFormSlot&member_id=" + member_id
;
20 new FragmentImporter(url
, _initMemberTreeListener
).load(url
);
23 function _initMemberTreeListener() {
24 var slot
= document
.getElementById("MemberFormSlot");
25 addListener(slot
, "click", handleMemberTreeViewClick
);
26 if (browser
.isIE55
|| browser
.isIE6up
) {
27 _disableMemberSlotClickHandler
= false;
31 function handleMemberTreeViewClick(evt
) {
33 disablePropagation(evt
);
35 // prevent click glitches from IE :((
36 if ((browser
.isIE55
|| browser
.isIE6up
) && _disableMemberSlotClickHandler
)
39 _disableMemberSlotClickHandler
= true;
40 setTimeout("_disableMemberSlotClickHandler=false", 100);
44 var target
= getTargetedObject(evt
);
46 var slot
= document
.getElementById("MemberFormSlot");
47 var afterLoadFunction
;
49 switch (target
.tagName
) {
51 target
= target
.parentNode
;
52 afterLoadFunction
= _initMemberTreeListener
;
55 query
= target
.href
.split('?')[1];
56 query
= query
.replace(/macroName/, "macro");
57 query
= query
.split('#')[0];
58 url
= portal_url() + "/use_macro?template=gruf_macros&fragmentId=MemberFormSlot&" + query
;
59 afterLoadFunction
= (afterLoadFunction
) ? afterLoadFunction : function() {initForms(slot
);};
60 new FragmentImporter(url
, afterLoadFunction
).load();