Index: /trunk/workflow/js/userinterface/orgchartPrint.js
===================================================================
--- /trunk/workflow/js/userinterface/orgchartPrint.js (revision 5242)
+++ /trunk/workflow/js/userinterface/orgchartPrint.js (revision 5739)
@@ -9,4 +9,5 @@
$('tr.employees').hide();
}
+
/**
@@ -55,9 +56,23 @@
}
+
+/**
+* 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)
+function createEmployeeRow(area_id, user_id, showAreaColumn, showUserPhoto)
{
/* set a special 'class' if the employee is a supervisor one */
@@ -67,15 +82,23 @@
/* creating the row. */
- element = $('
')
- /* name: first column */
- .append(
- $(' | ')
- .append(
- $('')
- .addClass(class_name)
- .append(areas[area_id].employees[user_id].cn)
- )
- .css('width', '60%')
- );
+ 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', '55%')
+ );
/* area: second (optional) column */
@@ -108,5 +131,10 @@
{
var table = $('').css('width', '90%').attr('id', 'employee_table');
- var i, j;
+ var i, j, photo;
+
+ if ($('#photoVisibility').attr('checked'))
+ photo = true;
+ else
+ photo = false;
/* iterating over areas */
@@ -117,5 +145,6 @@
$('
')
.append(
- $(' | ')
+ $(' | ')
+ .css('font-weight', 'bold')
.css('text-align', 'left')
.css('height', '30')
@@ -131,5 +160,5 @@
/* creating employee rows */
for (j=0; j < areas[i].employees.length; j++)
- table.append(createEmployeeRow(i, j));
+ table.append(createEmployeeRow(i, j, false, photo));
}
$('#areas_content').append(table);
@@ -145,5 +174,10 @@
{
var table = $('').css('width', '90%').attr('id', 'employee_table');
- var i, less, end;
+ var i, less, end, photo;
+
+ if ($('#photoVisibility').attr('checked'))
+ photo = true;
+ else
+ photo = false;
/* creating and reseting indexes */
@@ -178,5 +212,5 @@
/* inserting the row */
- table.append(createEmployeeRow(less, areas[less].index, true));
+ table.append(createEmployeeRow(less, areas[less].index, true, photo));
areas[less].index++;
}
@@ -198,4 +232,5 @@
{
$('#employeesVisibility').click(toggleEmployeesVisibility);
+ $('#photoVisibility').click(togglePhotoVisibility);
$('#groupByArea').click(toggleGroupByArea);
$('#highlightSupervisor').click(toggleHighlightSupervisor);
@@ -207,4 +242,5 @@
{
toggleGroupByArea();
+ togglePhotoVisibility();
toggleEmployeesVisibility();
toggleHighlightSupervisor();
Index: /trunk/workflow/templates/default/orgchartPrint.tpl
===================================================================
--- /trunk/workflow/templates/default/orgchartPrint.tpl (revision 3167)
+++ /trunk/workflow/templates/default/orgchartPrint.tpl (revision 5739)
@@ -6,7 +6,10 @@
{$css}
{$javaScripts}
+
Configurar Impressão
+
+