Changeset 605


Ignore:
Timestamp:
02/17/09 16:46:36 (15 years ago)
Author:
ramonb
Message:

job_monarch/js/monarch.js:

  • changed/fixed metrics combobox datastore
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web2/addons/job_monarch/js/monarch.js

    r604 r605  
    827827{
    828828        id:             'MetricsDataStore',
    829         proxy:          JobProxy,
    830         autoLoad:       false,
    831         // RB: anto cache store timestamp, dan autoload
     829        proxy:          new Ext.data.HttpProxy(
     830        {
     831                url:            'jobstore.php',
     832                method:         'POST'
     833        }),
     834        autoLoad:       true,
    832835        baseParams:     { task: "GETMETRICS" },
    833836        reader:
    834837                new Ext.data.JsonReader(
    835838                {
    836                         root: 'names',
    837                         totalProperty: 'total',
    838                         id: 'id'
     839                        root:           'names',
     840                        totalProperty:  'total',
     841                        id:             'id'
    839842                },
    840843                [{
    841                         name: 'ID'
     844                        name:           'ID'
    842845                },{
    843                         name: 'name'
     846                        name:           'name'
    844847                }]
    845                 )
     848                ),
     849        listeners:
     850        {
     851                'beforeload':
     852                {
     853                        scope: this,
     854                        fn:
     855
     856                        function( myStore, myOptions )
     857                        {
     858                                // Add a (bogus) timestamp, to create a unique url and prevent browser caching
     859                                //
     860                                myStore.proxy.url       = 'jobstore.php?timestamp=' + new Date().getTime();
     861                        }
     862                }
     863        }
    846864});
    847865
Note: See TracChangeset for help on using the changeset viewer.