File size: 1,610 Bytes
07c3cdd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
function saveUserGroup(sUser) {

    var oRPC = new leimnud.module.rpc.xmlhttp({
      url   : '../groups/groups_Ajax',
      async : false,
      method: 'POST',
      args  : 'action=assignUser&GRP_UID=' + currentGroup + '&USR_UID=' + sUser
    });
    oRPC.make();
    currentPopupWindow.remove();
    selectGroup(currentGroup);
  }


function saveUsers(){
  if( checks_selected_ids.length == 0 ){
    new leimnud.module.app.alert().make({label: G_STRINGS.ID_MSG_GROUPS_ADDCONFIRM});
    return 0;
  }
    var oRPC = new leimnud.module.rpc.xmlhttp({
      url   : '../groups/groups_Ajax',
      async : false,
      method: 'POST',
      args  : 'action=assignAllUsers&GRP_UID=' + currentGroup + '&aUsers=' + checks_selected_ids
    });
    resetChecks();
    oRPC.make();
    currentPopupWindow.remove();
    selectGroup(currentGroup);
}

function resetChecks(){
  checks_selected_ids.length = 0;
}


function WindowSize() {
    var wSize = [0, 0];
    if (typeof window.innerWidth != 'undefined')
    {
      wSize = [
          window.innerWidth,
          window.innerHeight
      ];
    }
    else if (typeof document.documentElement != 'undefined'
        && typeof document.documentElement.clientWidth !=
        'undefined' && document.documentElement.clientWidth != 0)
    {
      wSize = [
          document.documentElement.clientWidth,
          document.documentElement.clientHeight
      ];
    }
    else   {
      wSize = [
          document.getElementsByTagName('body')[0].clientWidth,
          document.getElementsByTagName('body')[0].clientHeight
      ];
    }
    return wSize;
  }