[Vtigercrm-developers] user export function not working in Firefox

Hamono, Chris (DPC) Chris.Hamono at sa.gov.au
Wed May 6 01:37:11 GMT 2015


Vtiger 6.2

When clicking on export users nothing happens

The problem appears to be in the export script in
layouts\vlayout\modules\Users\resources\List.js

The function

        triggerExportAction: function() {
            var url = window.location.href;
            var siteUrl = url.split('?');
            var newForm = jQuery('<form>', {
                'method': 'post',
                'action': siteUrl[0] + '?module=Users&source_module=Users&action=ExportData',
            }).append(jQuery('<input>', {
                'name': csrfMagicName,
                'value': csrfMagicToken,
                'type': 'hidden'
            }));
            newForm.submit();
    }

Needs to be changed to (or something similar)

        triggerExportAction: function() {
            var url = window.location.href;
            var siteUrl = url.split('?');
            var newForm = jQuery('<form>', {
                'method': 'post',
                'action': siteUrl[0] + '?module=Users&source_module=Users&action=ExportData',
            }).append(jQuery('<input>', {
                'name': csrfMagicName,
                'value': csrfMagicToken,
                'type': 'hidden'
            }));
            jQuery(newForm).appendTo('body')[0].submit();
    }


A cleanup may be required to remove the new dom form element in case the export button is repeatedly used

Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20150506/ea917770/attachment-0001.html>


More information about the vtigercrm-developers mailing list