Bug #79
closedAdministration - User: export to PDF opens in same windows
100%
Description
When you export the user list to PDF it opens in the same window. Can we change this so it opens in a new windows. That way you keep you original Chamilo screen.
Updated by Isaac Flores almost 14 years ago
- Status changed from New to Assigned
- % Done changed from 0 to 30
Hi Stefaan:
I think that there are two forms of do it(customer side and server side) = >
1. Server side :
Go to the file /user/lib/forms/user_export_form.class.php line 27
and set the "target" to "_blank" option , thus :
parent :: __construct('user_export', 'post', $action, '_blank');
2. Customer side :
- Add the select ID) respective...
Go the file /user/lib/forms/user_export_form.class.php line 39 and modify the code just like that :
$this->addElement('select', 'file_type', Translation :: get('OutputFileType'), Export::get_supported_filetypes(array('ical')),array('id' => 'file_type'));
- Import jquery library :
<script type ="text/javascript" src="'.Path :: get(WEB_PLUGIN_PATH).'jquery/jquery.min.js"></script>';
- Add this jquery code
$(function() { $("#file_type").change( function() { var option_value = $("#file_type option:selected").attr("value"); if (option_value == "pdf") { $("#user_export").attr("target","_blank") } else { $("#user_export").attr("target","_self") } }); });
I not know how add javascript code into dokeos 2.0 ...
if you can help me it would be very good for me
Updated by Stefaan Vanbillemont almost 14 years ago
Isaac,
I think best way to do this is server side handling. If you want you can implement this of course.
Don't know if there are other exports that need to be changed. I'll try to navigate to the system tomorrow to have a look.
Regards,
Stefaan
Updated by Hans De Bisschop almost 14 years ago
Definately do it with the target-attribute. It may not be the cleanest way to do it, but it's a lot better then doing it the Javascript way.
Updated by Sven Vanpoucke almost 14 years ago
- Status changed from Assigned to Needs testing
- % Done changed from 30 to 100
Updated by Stefaan Vanbillemont almost 14 years ago
- Status changed from Needs testing to Feature implemented
Updated by Hans De Bisschop over 12 years ago
- Project changed from Chamilo LCMS Connect to Admin
- Category deleted (
5) - Target version deleted (
2)