source: branches/1.2/workflow/js/adminaccess/main.js @ 1349

Revision 1349, 2.9 KB checked in by niltonneto, 15 years ago (diff)

Ticket #561 - Inclusão do módulo Workflow faltante nessa versão.

  • Property svn:executable set to *
Line 
1var ID_CONTROL_FOLDER   = 0;
2var window_list = new Array;
3
4/* permissions index */
5var permissionList = new Array();
6for (var i = 0; i < 11; i++)
7        permissionList[i] = new Array();
8permissionList[0]['name'] = "Alterar prioridade da instância";
9permissionList[0]['value'] = 0;
10permissionList[1]['name'] = "Alterar usuário da instância";
11permissionList[1]['value'] = 1;
12permissionList[2]['name'] = "Alterar status da instância";
13permissionList[2]['value'] = 2;
14permissionList[3]['name'] = "Alterar identificador da instância";
15permissionList[3]['value'] = 3;
16permissionList[4]['name'] = "Alterar a atividade da instância";
17permissionList[4]['value'] = 4;
18permissionList[5]['name'] = "Visualizar as propriedades da instância";
19permissionList[5]['value'] = 5;
20permissionList[6]['name'] = "Editar as propriedades da instância";
21permissionList[6]['value'] = 6;
22permissionList[7]['name'] = "Visualizar estatísticas";
23permissionList[7]['value'] = 7;
24permissionList[8]['name'] = "Remover instâncias finalizadas";
25permissionList[8]['value'] = 8;
26permissionList[9]['name'] = "Substituir usuário";
27permissionList[9]['value'] = 9;
28permissionList[10]['name'] = "Disparar e-mails";
29permissionList[10]['value'] = 10;
30
31function show_window(titulo,div,width,height)
32{
33  if (!window_list[div.id])
34  {
35    if(is_ie){
36        div.style.height = (height + 10) + 'px';
37        div.style.width = (width + 50) + 'px';
38    } else {
39        div.style.height = height + 'px';
40        div.style.width = width + 'px';
41    }
42
43    div.style.visibility = "hidden";
44    div.style.position = "absolute";
45    div.style.zIndex = "10002";
46    var wHeight = div.offsetHeight + "px";
47    var wWidth =  div.offsetWidth   + "px";
48
49    win = new dJSWin({
50         id: 'window_'+div.id,
51         content_id: div.id,
52         width: wWidth,
53         height: wHeight,
54         title_color: '#3978d6',
55         bg_color: '#eee',
56         title: titulo,
57         title_text_color: 'white',
58         button_x_img: _icon_dir + '/winclose.gif',
59         border: true
60        });
61
62    win.draw();
63        window_list[div.id] = win;
64  } else {
65        win = window_list[div.id];
66  }
67
68  win.open();
69}
70
71function getFolder(id_folder)
72{
73        return document.getElementById("content_id_"+id_folder);
74}
75
76function init_user_interface() {
77
78        if ((!is_gecko) && (!is_ie6up)) {
79                alert('Seu navegador não suporta o módulo de Workflow.\nInstale o Mozilla FireFox 1.0+ ou Internet Explorer 6.0+.');
80        } else {
81                BordersArray[0] = new setBorderAttributes(0);
82                BordersArray[1] = new setBorderAttributes(1);
83                BordersArray[2] = new setBorderAttributes(2);
84                BordersArray[3] = new setBorderAttributes(3);
85                BordersArray[4] = new setBorderAttributes(4);
86                BordersArray[5] = new setBorderAttributes(5);
87
88                var main_body = document.getElementById("main_body");
89                main_body.style.display = '';
90
91                if (alternate_border(ID_CONTROL_FOLDER) == 0) {
92                        draw_control_folder();
93                }
94        }
95}
96
97Event.observe(window, 'load', function() {
98        init_user_interface();
99});
Note: See TracBrowser for help on using the repository browser.