Ext.override(Ext.form.action.Action, {
    submitEmptyText: false // don't submit empty text by default
});

Ext.override(Ext.form.field.Date, {
    selectOnFocus: true,
    format: "d/m/Y",
    formatText: "Expected date format DD/MM/YYYY.",
    // just add "time" from default
    altFormats: 'm/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j|time'
});

Ext.override(Ext.grid.column.Date, {
    format: "d/m/Y"
});

Ext.override(Ext.Date, {
    defaultFormat: "d/m/Y"
});

Ext.override(Ext.data.field.Field, {
    allowNull: true
});

Ext.override(Ext.form.field.Number, {
    hideTrigger: true,
    mouseWheelEnabled: false,
    selectOnFocus: true,
});
Ext.override(Ext.form.field.Text, {
    selectOnFocus: true
});
Ext.override(Ext.form.field.TextArea, {
    selectOnFocus: true
});

Ext.override(Ext.grid.Panel, {
    style: {
        "border-radius": "9px",
        "box-shadow": "0 4px 8px 0 rgba(0,0,0,0.2)"
        // 'transition': '10s'
    }
});

Ext.override(Ext.form.Panel, {
    style: {
        "border-radius": "9px",
        "box-shadow": "0 4px 8px 0 rgba(0,0,0,0.2)"
    }
});

Ext.override(Ext.window.Window, {
    style: {
        "border-radius": "9px",
        "box-shadow": "0 4px 8px 0 rgba(0,0,0,0.2)"
    }
});

Ext.override(Ext.button.Button, {
    style: {
        "border-radius": "3px"
    }
});

Ext.override(Ext.form.field.ComboBox, {
    listeners: {
        focusenter: function (combo, event, eOpts) {
            combo.getStore().filter(function (record) {
                return record.get("deleted") ? false : true;
            });
        }
    }
});

Ext.override(Ext.form.Basic, {
    readOnly: false,
    setReadOnly: function (readOnly) {
        this.readOnly = readOnly;
        this.getFields().each(function (field) {
            field.setReadOnly(readOnly);
        });
    }
});