Blame view

js/app/views/PlotComponents/EraseTrigger.js 721 Bytes
7ef7ea02   Benjamin Renard   Add erase button ...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/**
 * Project   : AMDA-NG
 * Name      : EraseTrigger.js
 * @class   amdaPlotComp.EraseTrigger
 * @extends Ext.form.field.Trigger
 * @brief   Erase button used to define a dropped parameter (cf. function addStandardParamDropTarget of PlotStandardForm)
 * @author  Benjamin Renard
 * @version $Id: EraseTrigger.js benjamin $
 */

Ext.define('amdaPlotComp.EraseTrigger', {
    extend: 'Ext.form.field.Trigger',
    alias: 'widget.erasetrigger',
    initComponent: function () {
        var me = this;

        me.triggerCls = 'x-form-clear-trigger'; // native ExtJS class & icon

        me.callParent(arguments);
    },
    // override onTriggerClick
    onTriggerClick: function() {
        this.setValue('');
    }
});