]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | Ext.define('Ext.rtl.view.Table', {\r |
2 | override: 'Ext.view.Table',\r | |
3 | \r | |
4 | rtlCellTpl: [\r | |
5 | '<td class="' + Ext.baseCSSPrefix + 'rtl {tdCls}" {tdAttr} {[Ext.aria ? "id=\\"" + Ext.id() + "\\"" : ""]} style="width:{column.cellWidth}px;<tpl if="tdStyle">{tdStyle}</tpl>" tabindex="-1" {ariaCellAttr} data-columnid="{[values.column.getItemId()]}">',\r | |
6 | '<div {unselectableAttr} class="' + Ext.baseCSSPrefix + 'rtl ' + Ext.baseCSSPrefix + 'grid-cell-inner {innerCls}" ',\r | |
7 | 'style="text-align:{[this.getAlign(values.align)]};<tpl if="style">{style}</tpl>" {ariaCellInnerAttr}>{value}</div>',\r | |
8 | '</td>', {\r | |
9 | priority: 0,\r | |
10 | rtlAlign: {\r | |
11 | right: 'left',\r | |
12 | left: 'right',\r | |
13 | center: 'center'\r | |
14 | },\r | |
15 | getAlign: function(align) {\r | |
16 | return this.rtlAlign[align];\r | |
17 | }\r | |
18 | }\r | |
19 | ],\r | |
20 | \r | |
21 | beforeRender: function() {\r | |
22 | var me = this;\r | |
23 | \r | |
24 | me.callParent();\r | |
25 | if (me.getInherited().rtl) {\r | |
26 | me.addCellTpl(me.getTpl('rtlCellTpl'));\r | |
27 | }\r | |
28 | },\r | |
29 | \r | |
30 | getCellPaddingAfter: function(cell) {\r | |
31 | return Ext.fly(cell).getPadding(this.getInherited().rtl ? 'l' : 'r');\r | |
32 | }\r | |
33 | });\r |