X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/3789b528d8dd8aad4558e38e22d775bcab1cbd36..6746dc89c47ed01b165cc1152533605f97eb8e8d:/docs/app/view/cls/Header.js diff --git a/docs/app/view/cls/Header.js b/docs/app/view/cls/Header.js new file mode 100644 index 00000000..ecdb3084 --- /dev/null +++ b/docs/app/view/cls/Header.js @@ -0,0 +1,44 @@ +/** + * Renders class name and icon in page header. + */ +Ext.define('Docs.view.cls.Header', { + extend: 'Ext.container.Container', + padding: '5 0 17 0', + // Initially the component will be empty and so the initial height + // will not be correct if not set explicitly + height: 47, + alias: 'widget.classheader', + + tpl: Ext.create('Ext.XTemplate', + '

', + '', + 'Private', + '', + '{name}', + '', + 'xtype: {[values.xtypes.join(", ")]}', + '', + '

', + { + getClass: function(cls) { + if (cls.component) { + return "component"; + } + else if (cls.singleton) { + return "singleton"; + } + else { + return "class"; + } + } + } + ), + + /** + * Loads class name and icon to header. + * @param {Object} cls class config. + */ + load: function(cls) { + this.update(this.tpl.apply(cls)); + } +});