[903] | 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 | |
---|
| 31 | function 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 | |
---|
| 71 | function getFolder(id_folder) |
---|
| 72 | { |
---|
| 73 | return document.getElementById("content_id_"+id_folder); |
---|
| 74 | } |
---|
| 75 | |
---|
| 76 | function 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 | |
---|
| 97 | Event.observe(window, 'load', function() { |
---|
| 98 | init_user_interface(); |
---|
| 99 | }); |
---|