2 * Copyright 1998 - 2009 The Citadel Team
3 * Licensed under the GPL V3
12 var roomsForFloors = new Array();
18 var RN_LIST_ORDER = 3;
19 var RN_ACCESS_CONTROL = 4;
22 var RN_LAST_CHANGE = 7;
25 var QR_MAILBOX = 16384;
28 var UA_GOTOALLOWED = 4;
29 var UA_HASNEWMSGS = 8;
34 var VIEW_ADDRESSBOOK = 2;
35 var VIEW_CALENDAR = 3;
39 var VIEW_CALBRIEF = 7;
42 function FillRooms(callback) {
43 var roomFlr = new Ajax.Request("/json_roomflr", {method: 'get', onSuccess: function(transport) { ProcessRoomFlr(transport); callback.call(); }});
45 function ProcessRoomFlr(transport) {
46 var data = eval('('+transport.responseText+')');
47 floors = data["floors"];
48 rooms = data["rooms"];
50 function GetRoomsByFloorNum(flnum) {
51 var roomsForFloor = new Array();
53 for(var i=0; i<rooms.length; i++) {
55 var floornum = room[RN_FLOOR_NUM];
56 var flag = room[RN_ROOM_FLAG];
57 if (flnum == floornum && ((flag & QR_MAILBOX) != QR_MAILBOX)) {
58 roomsForFloor[x] = room;
64 function GetMailboxRooms() {
65 var roomsForFloor = new Array();
67 for(var i=0; i<rooms.length; i++) {
69 var floornum = room[RN_FLOOR_NUM];
70 var flag = room[RN_ROOM_FLAG];
71 if ((flag & QR_MAILBOX) == QR_MAILBOX) {
72 roomsForFloor[x] = room;