Ignore:
Timestamp:
28 Jul 2012, 04:47:58 (12 years ago)
Author:
Henrik Bettermann
Message:

Fix export finished file name.

Sort files by upload date.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py

    r9038 r9074  
    920920            'Content-Type', 'text/csv; charset=UTF-8')
    921921        self.response.setHeader(
    922             'Content-Disposition:', 'attachment; filename="%s.csv' %
    923             self.filename.replace('.csv',''))
     922            'Content-Disposition:', 'attachment; filename="%s' %
     923            self.filename.replace('finished/',''))
    924924        fullpath = os.path.join(self.context.storage, self.filename)
    925925        return open(fullpath, 'rb').read()
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/static/datatable.js

    r7811 r9074  
    11$(document).ready(function(){
    2     $('.dataTable').dataTable();
     2  $('.dataTable').dataTable();
     3
     4        $('.dataTableFiles').dataTable( {
     5                "aaSorting": [[ 2, "desc" ]],
     6        } );
     7
    38        $('.dataTableManage').dataTable( {
    49                "aaSorting": [[ 1, "asc" ]],
    510                "aoColumnDefs":[{ "bSortable": false, "aTargets": [ 0 ] }]
    611        } );
     12
     13        $('.dataTableManageFiles').dataTable( {
     14                "aaSorting": [[ 3, "desc" ]],
     15                "aoColumnDefs":[{ "bSortable": false, "aTargets": [ 0 ] }]
     16        } );
     17
     18
    719});
    820
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterfinishedpage.pt

    r9023 r9074  
    1 <table i18n:domain="waeup.kofa" class="display dataTable">
     1<table i18n:domain="waeup.kofa" class="display dataTableFiles">
    22  <thead>
    33    <tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterpage.pt

    r9023 r9074  
    1111<form action="." tal:attributes="action request/URL" method="post"
    1212      i18n:domain="waeup.kofa" enctype="multipart/form-data">
    13     <table i18n:domain="waeup.kofa" class="display dataTableManage">
     13    <table i18n:domain="waeup.kofa" class="display dataTableManageFiles">
    1414      <thead>
    1515        <tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/datacenter.py

    r9023 r9074  
    8787        return result
    8888
    89     def getFinishedFiles(self, sort='name'):
     89    def getFinishedFiles(self):
    9090        """Get a list of files stored in `finished` subfolder of `storage`.
    9191
    92         Files are sorted by basename.
     92        Files are unsorted.
    9393        """
    9494        result = []
     
    103103                continue
    104104            result.append(DataCenterFile(fullpath, 'finished'))
    105         if sort == 'date':
    106             # sort results in newest-first order...
    107             result = sorted(result, key=lambda x: x.getTimeStamp(),
    108                             reverse=True)
    109105        return result
    110106
  • main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py

    r9023 r9074  
    645645        """
    646646
    647     def getFinishedFiles(sort='name'):
    648         """Get a list of files stored in `finished` subfolder of `storage`
    649         sorted by basename.
     647    def getFinishedFiles():
     648        """Get a list of files stored in `finished` subfolder of `storage`.
    650649        """
    651650
Note: See TracChangeset for help on using the changeset viewer.