4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>The source code</title>
6 <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
7 <script type="text/javascript" src="../prettify/prettify.js"></script>
8 <style type="text/css">
9 .highlight { display: block; background-color: #ddd; }
11 <script type="text/javascript">
12 function highlight() {
13 document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
17 <body onload="prettyPrint(); highlight();">
18 <pre class="prettyprint lang-js"><span id='Ext-grid-CellEditor'>/**
19 </span> * @class Ext.grid.CellEditor
21 * Internal utility class that provides default configuration for cell editing.
24 Ext.define('Ext.grid.CellEditor', {
26 constructor: function(config) {
28 config.field.monitorTab = false;
33 this.callParent(arguments);
36 <span id='Ext-grid-CellEditor-method-onShow'> /**
38 * Hide the grid cell when editor is shown.
41 var first = this.boundEl.first();
45 this.callParent(arguments);
48 <span id='Ext-grid-CellEditor-method-onHide'> /**
50 * Show grid cell when editor is hidden.
53 var first = this.boundEl.first();
57 this.callParent(arguments);
60 <span id='Ext-grid-CellEditor-method-afterRender'> /**
62 * Fix checkbox blur when it is clicked.
64 afterRender: function() {
65 this.callParent(arguments);
66 var field = this.field;
67 if (field.isXType('checkboxfield')) {
68 field.mon(field.inputEl, 'mousedown', this.onCheckBoxMouseDown, this);
69 field.mon(field.inputEl, 'click', this.onCheckBoxClick, this);
73 <span id='Ext-grid-CellEditor-method-onCheckBoxMouseDown'> /**
75 * Because when checkbox is clicked it loses focus completeEdit is bypassed.
77 onCheckBoxMouseDown: function() {
78 this.completeEdit = Ext.emptyFn;
81 <span id='Ext-grid-CellEditor-method-onCheckBoxClick'> /**
83 * Restore checkbox focus and completeEdit method.
85 onCheckBoxClick: function() {
86 delete this.completeEdit;
87 this.field.focus(false, 10);
90 alignment: "tl-tl",
92 cls: Ext.baseCSSPrefix + "small-editor " + Ext.baseCSSPrefix + "grid-editor",