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