Index: /branches/2.2/workflow/js/userinterface/orgchartPrint.js
===================================================================
--- /branches/2.2/workflow/js/userinterface/orgchartPrint.js (revision 6477)
+++ /branches/2.2/workflow/js/userinterface/orgchartPrint.js (revision 6481)
@@ -9,5 +9,4 @@
$('tr.employees').hide();
}
-
/**
@@ -56,23 +55,9 @@
}
-
-/**
-* Show / Hide all photo employees
-*/
-function togglePhotoVisibility()
-{
- $('#employee_table').remove();
-
- if ($('#groupByArea').attr('checked'))
- showGroupedByArea();
- else
- showUngrouped();
-}
-
/**
* Centralize the creation of table rows for employees.
* 'showAreaColumn' specifies whether the second column will be shown
*/
-function createEmployeeRow(area_id, user_id, showAreaColumn, showUserPhoto)
+function createEmployeeRow(area_id, user_id, showAreaColumn)
{
/* set a special 'class' if the employee is a supervisor one */
@@ -82,23 +67,15 @@
/* creating the row. */
- element = $('
');
-
-
- /* photo: zero (optional) column */
- if (showUserPhoto){
- var content = '';
- element.append($('' + content + ' | ').css('width', '8%'));
- }
-
- /* name: first column */
- element.append(
- $(' | ')
- .append(
- $('')
- .addClass(class_name)
- .append(areas[area_id].employees[user_id].cn)
- )
- .css('width', '30%')
- );
+ element = $('
')
+ /* name: first column */
+ .append(
+ $(' | ')
+ .append(
+ $('')
+ .addClass(class_name)
+ .append(areas[area_id].employees[user_id].cn)
+ )
+ .css('width', '70%')
+ );
/* area: second (optional) column */
@@ -106,32 +83,12 @@
element.append(
$('' + areas[area_id].sigla + ' | ')
- .css('width', '10%')
+ .css('width', '15%')
);
- /* login: show uid attribute */
- element.append(
- $('' + areas[area_id].employees[user_id].uid + ' | ')
- .css('width', '15%')
- )
-
-
/* telephone: last column */
element.append(
$('' + areas[area_id].employees[user_id].telephoneNumber + ' | ')
- .css('width', '15%')
+ .css('width', '20%')
)
-
- /* VÃnculo: show cargo vÃnculo */
- element.append(
- $('' + areas[area_id].employees[user_id].vinculo + ' | ')
- .css('width', '15%')
- )
-
- /* Cargo: show cargo attribute */
- element.append(
- $('' + areas[area_id].employees[user_id].cargo + ' | ')
- .css('width', '15%')
- )
-
.addClass('employees');
@@ -145,10 +102,5 @@
{
var table = $('').css('width', '90%').attr('id', 'employee_table');
- var i, j, photo;
-
- if ($('#photoVisibility').attr('checked'))
- photo = true;
- else
- photo = false;
+ var i, j;
/* iterating over areas */
@@ -159,6 +111,5 @@
$('
')
.append(
- $(' | ')
- .css('font-weight', 'bold')
+ $(' | ')
.css('text-align', 'left')
.css('height', '30')
@@ -174,5 +125,5 @@
/* creating employee rows */
for (j=0; j < areas[i].employees.length; j++)
- table.append(createEmployeeRow(i, j, false, photo));
+ table.append(createEmployeeRow(i, j));
}
$('#areas_content').append(table);
@@ -188,10 +139,5 @@
{
var table = $('').css('width', '90%').attr('id', 'employee_table');
- var i, less, end, photo;
-
- if ($('#photoVisibility').attr('checked'))
- photo = true;
- else
- photo = false;
+ var i, less, end;
/* creating and reseting indexes */
@@ -226,5 +172,5 @@
/* inserting the row */
- table.append(createEmployeeRow(less, areas[less].index, true, photo));
+ table.append(createEmployeeRow(less, areas[less].index, true));
areas[less].index++;
}
@@ -246,5 +192,4 @@
{
$('#employeesVisibility').click(toggleEmployeesVisibility);
- $('#photoVisibility').click(togglePhotoVisibility);
$('#groupByArea').click(toggleGroupByArea);
$('#highlightSupervisor').click(toggleHighlightSupervisor);
@@ -256,5 +201,4 @@
{
toggleGroupByArea();
- togglePhotoVisibility();
toggleEmployeesVisibility();
toggleHighlightSupervisor();