~mortenoh/+junk/dhis2-detailed-import-export

« back to all changes in this revision

Viewing changes to gis/dhis-gis-geostat/mfbase/ext/source/widgets/menu/DateMenu.js

  • Committer: larshelge at gmail
  • Date: 2009-03-03 16:46:36 UTC
  • Revision ID: larshelge@gmail.com-20090303164636-2sjlrquo7ib1gf7r
Initial check-in

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Ext JS Library 2.2
 
3
 * Copyright(c) 2006-2008, Ext JS, LLC.
 
4
 * licensing@extjs.com
 
5
 * 
 
6
 * http://extjs.com/license
 
7
 */
 
8
 
 
9
/**
 
10
 * @class Ext.menu.DateMenu
 
11
 * @extends Ext.menu.Menu
 
12
 * A menu containing a {@link Ext.menu.DateItem} component (which provides a date picker).
 
13
 * @constructor
 
14
 * Creates a new DateMenu
 
15
 * @param {Object} config Configuration options
 
16
 */
 
17
Ext.menu.DateMenu = function(config){
 
18
    Ext.menu.DateMenu.superclass.constructor.call(this, config);
 
19
    this.plain = true;
 
20
    var di = new Ext.menu.DateItem(config);
 
21
    this.add(di);
 
22
    /**
 
23
     * The {@link Ext.DatePicker} instance for this DateMenu
 
24
     * @type DatePicker
 
25
     */
 
26
    this.picker = di.picker;
 
27
    /**
 
28
     * @event select
 
29
     * @param {DatePicker} picker
 
30
     * @param {Date} date
 
31
     */
 
32
    this.relayEvents(di, ["select"]);
 
33
 
 
34
    this.on('beforeshow', function(){
 
35
        if(this.picker){
 
36
            this.picker.hideMonthPicker(true);
 
37
        }
 
38
    }, this);
 
39
};
 
40
Ext.extend(Ext.menu.DateMenu, Ext.menu.Menu, {
 
41
    cls:'x-date-menu',
 
42
 
 
43
    // private
 
44
    beforeDestroy : function() {
 
45
        this.picker.destroy();
 
46
    }
 
47
});
 
 
b'\\ No newline at end of file'