Revision 64,
1.3 KB
checked in by niltonneto, 17 years ago
(diff) |
* empty log message *
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
|
Rev | Line | |
---|
[64] | 1 | function copy_manager(manager) |
---|
| 2 | { |
---|
| 3 | var new_manager = prompt("Digite o login do novo gerente:",""); |
---|
| 4 | |
---|
| 5 | var handler_copy_manager = function(data) |
---|
| 6 | { |
---|
| 7 | if (data) |
---|
| 8 | location.reload(); |
---|
| 9 | else |
---|
| 10 | alert('Erro ao copiar gerente.'); |
---|
| 11 | } |
---|
| 12 | cExecute ('$this.db_functions.copy_manager&manager='+manager+'&new_manager='+new_manager, handler_copy_manager); |
---|
| 13 | } |
---|
| 14 | |
---|
| 15 | function add_input_context() |
---|
| 16 | { |
---|
| 17 | var input = document.createElement("INPUT"); |
---|
| 18 | input.size = 60; |
---|
| 19 | document.getElementById("td_input_context").appendChild(input); |
---|
| 20 | } |
---|
| 21 | |
---|
| 22 | function validade_managers_data() |
---|
| 23 | { |
---|
| 24 | var context = ''; |
---|
| 25 | var input_context_fields = document.getElementById('td_input_context').childNodes; |
---|
| 26 | for (var i=0; i<input_context_fields.length; i++) |
---|
| 27 | { |
---|
| 28 | if ((input_context_fields[i].nodeName === 'INPUT') && (input_context_fields[i].value != '')) |
---|
| 29 | { |
---|
| 30 | context += input_context_fields[i].value + '%'; |
---|
| 31 | } |
---|
| 32 | } |
---|
| 33 | context = context.substring(0,context.length-1); |
---|
| 34 | document.managers_form.context.value = context; |
---|
| 35 | |
---|
| 36 | if(document.managers_form.manager_lid.value == '') { |
---|
| 37 | alert('Campo "Manager LID" está vazio.'); |
---|
| 38 | document.managers_form.manager_lid.focus(); |
---|
| 39 | return; |
---|
| 40 | } |
---|
| 41 | else if(document.managers_form.context.value == '') { |
---|
| 42 | alert('Contexto está vazio.'); |
---|
| 43 | document.managers_form.context.focus(); |
---|
| 44 | return; |
---|
| 45 | } |
---|
| 46 | |
---|
| 47 | document.managers_form.submit(); |
---|
| 48 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.