Project

General

Profile

Bug #79

Administration - User: export to PDF opens in same windows

Added by Stefaan Vanbillemont about 10 years ago. Updated almost 9 years ago.

Status:
Feature implemented
Priority:
Normal
Target version:
Start date:
22/10/2009
Due date:
% Done:

100%

Estimated time:
Complexity:
Normal

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.

History

#1

Updated by Isaac Flores about 10 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

#2

Updated by Stefaan Vanbillemont about 10 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

#3

Updated by Hans De Bisschop about 10 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.

#4

Updated by Sven Vanpoucke about 10 years ago

  • Assignee set to Sven Vanpoucke
#5

Updated by Sven Vanpoucke about 10 years ago

  • Status changed from Assigned to Needs testing
  • % Done changed from 30 to 100
#6

Updated by Stefaan Vanbillemont about 10 years ago

  • Status changed from Needs testing to Feature implemented
#7

Updated by Hans De Bisschop almost 9 years ago

  • Project changed from Chamilo LCMS Connect to Admin
  • Category deleted (5)
  • Target version deleted (2)
#8

Updated by Hans De Bisschop almost 9 years ago

  • Target version set to 1.0.0

Also available in: Atom PDF