<!DOCTYPE html>
|
<html>
|
<head>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<title>The source code</title>
|
<link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
|
<script type="text/javascript" src="../resources/prettify/prettify.js"></script>
|
<style type="text/css">
|
.highlight { display: block; background-color: #ddd; }
|
</style>
|
<script type="text/javascript">
|
function highlight() {
|
document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
|
}
|
</script>
|
</head>
|
<body onload="prettyPrint(); highlight();">
|
<pre class="prettyprint lang-js">Ext.define('Ext.rtl.view.Table', {
|
override: 'Ext.view.Table',
|
|
rtlCellTpl: [
|
'<td class="' + Ext.baseCSSPrefix + 'rtl {tdCls}" {tdAttr}>',
|
'<div {unselectableAttr} class="' + Ext.baseCSSPrefix + 'rtl ' + Ext.baseCSSPrefix + 'grid-cell-inner {innerCls}"',
|
' style="text-align:{[this.getAlign(values.align)]};<tpl if="style">{style}</tpl>">{value}</div>',
|
'</td>',
|
{
|
priority: 0,
|
rtlAlign: {
|
right: 'left',
|
left: 'right',
|
center: 'center'
|
},
|
getAlign: function(align) {
|
return this.rtlAlign[align];
|
}
|
}
|
],
|
|
beforeRender: function() {
|
var me = this;
|
|
me.callParent();
|
if (me.getHierarchyState().rtl) {
|
me.addCellTpl(me.getTpl('rtlCellTpl'));
|
}
|
},
|
|
getCellPaddingAfter: function(cell) {
|
return Ext.fly(cell).getPadding(this.getHierarchyState().rtl ? 'l' : 'r');
|
}
|
});</pre>
|
</body>
|
</html>
|