123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913 |
- /*
- * This file defines the core framework "shortcuts". These are the modes and states of the
- * various components keyed by their xtype.
- *
- * To add more shortcuts for an xtype to a derived theme, call Ext.theme.addShortcuts in
- * a theme-specific file and script tag that file in to that theme's 'theme.html' file.
- */
- Ext.theme.addShortcuts({
- 'tooltip': [{
- setup: function(component, ct) {
- component.render(ct);
- component.showBy(ct);
- ct.setHeight(component.getHeight());
- ct.el.dom.appendChild(component.el.dom);
- component.el.setLeft(0);
- component.el.setTop(0);
- },
- config: {
- width: 100,
- height: 40,
- hide: function(){}
- }
- }],
- 'widget.buttongroup': [
- {
- folder: 'btn-group',
- filename: 'btn-group-{ui}-framed-notitle',
- config: {
- columns: 2,
- defaults: {
- scale: 'small'
- },
- items: [{
- xtype:'splitbutton',
- text: 'Menu Button',
- iconCls: 'add16',
- menu: [{text: 'Menu Item 1'}]
- },{
- xtype:'splitbutton',
- text: 'Cut',
- iconCls: 'add16',
- menu: [{text: 'Cut Menu Item'}]
- },{
- text: 'Copy',
- iconCls: 'add16'
- },{
- text: 'Paste',
- iconCls: 'add16',
- menu: [{text: 'Paste Menu Item'}]
- },{
- text: 'Format',
- iconCls: 'add16'
- }]
- }
- },
- {
- folder: 'btn-group',
- filename: 'btn-group-{ui}-framed',
- config: {
- columns: 2,
- title: 'Manifest',
- defaults: {
- scale: 'small'
- },
- items: [{
- xtype:'splitbutton',
- text: 'Menu Button',
- iconCls: 'add16',
- menu: [{text: 'Menu Item 1'}]
- },{
- xtype:'splitbutton',
- text: 'Cut',
- iconCls: 'add16',
- menu: [{text: 'Cut Menu Item'}]
- },{
- text: 'Copy',
- iconCls: 'add16'
- },{
- text: 'Paste',
- iconCls: 'add16',
- menu: [{text: 'Paste Menu Item'}]
- },{
- text: 'Format',
- iconCls: 'add16'
- }]
- }
- }
- ],
- 'widget.progressbar': [
- {
- xtype: 'widget.progressbar',
- folder: 'progress',
- filename: 'progress-{ui}',
- delegate: '.' + Ext.baseCSSPrefix + 'progress-bar',
- config: {
- width: 100,
- value: 1,
- animate: false
- }
- }
- ],
- 'widget.tabbar': [
- {
- xtype: 'widget.tabbar',
- filename: 'tab-bar-{ui}',
- folder: 'tab-bar',
- config: {
- orientation: 'horizontal',
- dock: 'top',
- width: 100,
- listeners: {
- render: function(tabbar) {
- tabbar.strip.hide();
- }
- }
- }
- },
- {
- xtype: 'widget.tabbar',
- filename: 'tab-bar-{ui}',
- folder: 'tab-bar',
- config: {
- orientation: 'vertical',
- dock: 'right',
- height: 100,
- listeners: {
- render: function(tabbar) {
- tabbar.strip.hide();
- }
- }
- }
- },
- {
- xtype: 'widget.tabbar',
- filename: 'tab-bar-{ui}',
- folder: 'tab-bar',
- config: {
- orientation: 'horizontal',
- dock: 'bottom',
- width: 100,
- listeners: {
- render: function(tabbar) {
- tabbar.strip.hide();
- }
- }
- }
- },
- {
- xtype: 'widget.tabbar',
- filename: 'tab-bar-{ui}',
- folder: 'tab-bar',
- config: {
- orientation: 'vertical',
- dock: 'left',
- height: 100,
- listeners: {
- render: function(tabbar) {
- tabbar.strip.hide();
- }
- }
- }
- }
- ],
- 'widget.tab': [
- {
- filename: 'tab-{ui}-top',
- config: {
- text: 'Normal Top Tab',
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-top-focus',
- config: {
- text: 'Focused Top Tab',
- cls: Ext.baseCSSPrefix + 'tab-focus',
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-top-active',
- config: {
- text: 'Active Top Tab',
- active: true,
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-top-over',
- over: true,
- config: {
- text: 'Over Top Tab',
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-top-focus-active',
- config: {
- text: 'Focused Active Top Tab',
- active: true,
- cls: Ext.baseCSSPrefix + 'tab-focus',
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-top-focus-over',
- over: true,
- config: {
- text: 'Focused Over Top Tab',
- cls: Ext.baseCSSPrefix + 'tab-focus',
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-top-disabled',
- config: {
- text: 'Disabled Top Tab',
- closable: false,
- disabled: true
- }
- },
- {
- filename: 'tab-{ui}-right',
- config: {
- text: 'Normal Right Tab',
- tabPosition: 'right',
- rotation: 0,
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-right-focus',
- config: {
- text: 'Focused Right Tab',
- tabPosition: 'right',
- rotation: 0,
- cls: Ext.baseCSSPrefix + 'tab-focus',
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-right-active',
- config: {
- text: 'Active Right Tab',
- tabPosition: 'right',
- rotation: 0,
- active: true,
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-right-over',
- over: true,
- config: {
- text: 'Over Right Tab',
- tabPosition: 'right',
- rotation: 0,
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-right-focus-active',
- config: {
- text: 'Focused Active Right Tab',
- tabPosition: 'right',
- rotation: 0,
- active: true,
- cls: Ext.baseCSSPrefix + 'tab-focus',
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-right-focus-over',
- over: true,
- config: {
- text: 'Focused Over Right Tab',
- tabPosition: 'right',
- rotation: 0,
- cls: Ext.baseCSSPrefix + 'tab-focus',
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-right-disabled',
- config: {
- text: 'Disabled Right Tab',
- tabPosition: 'right',
- rotation: 0,
- closable: false,
- disabled: true
- }
- },
- {
- filename: 'tab-{ui}-bottom',
- config: {
- text: 'Normal Bottom Tab',
- tabPosition: 'bottom',
- rotation: 0,
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-bottom-focus',
- config: {
- text: 'Focused Bottom Tab',
- tabPosition: 'bottom',
- rotation: 0,
- cls: Ext.baseCSSPrefix + 'tab-focus',
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-bottom-active',
- config: {
- text: 'Active Bottom Tab',
- tabPosition: 'bottom',
- rotation: 0,
- active: true,
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-bottom-over',
- over: true,
- config: {
- text: 'Over Bottom Tab',
- tabPosition: 'bottom',
- rotation: 0,
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-bottom-focus-active',
- config: {
- text: 'Focused Active Bottom Tab',
- tabPosition: 'bottom',
- rotation: 0,
- active: true,
- cls: Ext.baseCSSPrefix + 'tab-focus',
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-bottom-focus-over',
- over: true,
- config: {
- text: 'Focused Over Bottom Tab',
- tabPosition: 'bottom',
- rotation: 0,
- cls: Ext.baseCSSPrefix + 'tab-focus',
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-bottom-disabled',
- config: {
- text: 'Disabled Bottom Tab',
- tabPosition: 'bottom',
- rotation: 0,
- closable: false,
- disabled: true
- }
- },
- {
- filename: 'tab-{ui}-left',
- config: {
- text: 'Normal left Tab',
- tabPosition: 'left',
- rotation: 0,
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-left-focus',
- config: {
- text: 'Focused Left Tab',
- tabPosition: 'left',
- rotation: 0,
- cls: Ext.baseCSSPrefix + 'tab-focus',
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-left-active',
- config: {
- text: 'Active left Tab',
- tabPosition: 'left',
- rotation: 0,
- active: true,
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-left-over',
- over: true,
- config: {
- text: 'Over left Tab',
- tabPosition: 'left',
- rotation: 0,
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-left-focus-active',
- config: {
- text: 'Focused Active Left Tab',
- tabPosition: 'left',
- rotation: 0,
- active: true,
- cls: Ext.baseCSSPrefix + 'tab-focus',
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-left-focus-over',
- over: true,
- config: {
- text: 'Focused Over Left Tab',
- tabPosition: 'left',
- rotation: 0,
- cls: Ext.baseCSSPrefix + 'tab-focus',
- closable: false
- }
- },
- {
- filename: 'tab-{ui}-left-disabled',
- config: {
- text: 'Disabled left Tab',
- tabPosition: 'left',
- rotation: 0,
- closable: false,
- disabled: true
- }
- }
- ],
- 'widget.window': [
- // Floating
- {
- filename: 'window-{ui}',
- config: {
- header: false,
- resizable: false,
- height: 200,
- width: 200
- }
- },
- // window w/header
- {
- delegate: '.' + Ext.baseCSSPrefix + 'window-header',
- config: {
- title: 'Top Window',
- closable: false,
- width: 200,
- html: ' ',
- headerPosition: 'top'
- }
- },
- {
- delegate: '.' + Ext.baseCSSPrefix + 'window-header',
- config: {
- title: 'Bottom Window',
- closable: false,
- width: 200,
- html: ' ',
- headerPosition: 'bottom'
- }
- },
- {
- delegate: '.' + Ext.baseCSSPrefix + 'window-header',
- config: {
- title: 'Left Window',
- closable: false,
- height: 200,
- width: 200,
- headerPosition: 'left'
- }
- },
- {
- delegate: '.' + Ext.baseCSSPrefix + 'window-header',
- config: {
- title: 'Right Window',
- closable: false,
- height: 200,
- width: 200,
- headerPosition: 'right'
- }
- },
- // collapsed window w/header
- {
- delegate: '.' + Ext.baseCSSPrefix + 'window-header',
- config: {
- title: 'Top Collapsed',
- collapsed: true,
- closable: false,
- expandOnShow: false,
- width: 200,
- headerPosition: 'top'
- }
- },
- {
- delegate: '.' + Ext.baseCSSPrefix + 'window-header',
- config: {
- title: 'Bottom Collapsed',
- collapsed: true,
- closable: false,
- expandOnShow: false,
- width: 200,
- headerPosition: 'bottom'
- }
- },
- {
- delegate: '.' + Ext.baseCSSPrefix + 'window-header',
- config: {
- title: 'Left Collapsed',
- collapsed: true,
- closable: false,
- expandOnShow: false,
- height: 200,
- width: 200,
- headerPosition: 'left'
- }
- },
- {
- delegate: '.' + Ext.baseCSSPrefix + 'window-header',
- config: {
- title: 'Right Collapsed',
- collapsed: true,
- closable: false,
- expandOnShow: false,
- height: 200,
- width: 200,
- headerPosition: 'right'
- }
- }
- ], // window
- 'widget.panel': [
- {
- config: {
- width: 200,
- height: 200,
- frame: true,
- bodyPadding: 20,
- html: 'Framed panel'
- }
- },
- // panel w/header
- {
- delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
- config: {
- title: 'Top',
- width: 200,
- html: ' ',
- headerPosition: 'top'
- }
- },
- {
- delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
- config: {
- title: 'Bottom',
- width: 200,
- html: ' ',
- headerPosition: 'bottom'
- }
- },
- {
- delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
- config: {
- title: 'Left',
- height: 200,
- width: 200,
- headerPosition: 'left'
- }
- },
- {
- delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
- config: {
- title: 'Right',
- height: 200,
- width: 200,
- headerPosition: 'right'
- }
- },
- // framed panel w/header
- {
- delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
- config: {
- title: 'Top Framed',
- width: 200,
- frame: true,
- html: ' ',
- headerPosition: 'top'
- }
- },
- {
- delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
- config: {
- title: 'Bottom Framed',
- width: 200,
- frame: true,
- html: ' ',
- headerPosition: 'bottom'
- }
- },
- {
- delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
- config: {
- title: 'Left Framed',
- height: 200,
- width: 200,
- frame: true,
- headerPosition: 'left'
- }
- },
- {
- delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
- config: {
- title: 'Right Framed',
- height: 200,
- width: 200,
- frame: true,
- headerPosition: 'right'
- }
- },
- // collapsed framed panel w/header
- {
- delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
- config: {
- title: 'Top Framed/Collapsed',
- collapsed: true,
- width: 200,
- frame: true,
- headerPosition: 'top'
- }
- },
- {
- delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
- config: {
- title: 'Bottom Framed/Collapsed',
- collapsed: true,
- width: 200,
- frame: true,
- headerPosition: 'bottom'
- }
- },
- {
- delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
- config: {
- title: 'Left Framed/Collapsed',
- collapsed: true,
- height: 200,
- width: 200,
- frame: true,
- headerPosition: 'left'
- }
- },
- {
- delegate: '.' + Ext.baseCSSPrefix + 'panel-header',
- config: {
- title: 'Right Framed/Collapsed',
- collapsed: true,
- height: 200,
- width: 200,
- frame: true,
- headerPosition: 'right'
- }
- }
- ],
- 'widget.toolbar': [
- {
- filename: 'toolbar-{ui}',
- config: {
- width: 200,
- items: [{
- text: 'test'
- }]
- }
- }
- ],
- 'widget.button': [
- //small button
- {
- filename: 'btn-{ui}-small',
- config: {
- scale: 'small',
- text: ' ',
- width: 100
- }
- },
- {
- filename: 'btn-{ui}-small-over',
- over: true,
- config: {
- scale: 'small',
- text: ' ',
- width: 100
- }
- },
- {
- filename: 'btn-{ui}-small-focus',
- config: {
- scale: 'small',
- text: ' ',
- width: 100,
- cls: Ext.baseCSSPrefix + 'btn-focus'
- }
- },
- {
- filename: 'btn-{ui}-small-pressed',
- config: {
- scale: 'small',
- text: ' ',
- width: 100,
- cls: Ext.baseCSSPrefix + 'btn-pressed'
- }
- },
- {
- filename: 'btn-{ui}-small-focus-over',
- config: {
- scale: 'small',
- text: ' ',
- width: 100,
- cls: Ext.baseCSSPrefix + 'btn-focus ' + Ext.baseCSSPrefix + 'btn-over'
- }
- },
- {
- filename: 'btn-{ui}-small-focus-pressed',
- config: {
- scale: 'small',
- text: ' ',
- width: 100,
- cls: Ext.baseCSSPrefix + 'btn-focus ' + Ext.baseCSSPrefix + 'btn-pressed'
- }
- },
- {
- filename: 'btn-{ui}-small-disabled',
- config: {
- scale: 'small',
- text: ' ',
- width: 100,
- disabled: true
- }
- },
- //medium button
- {
- filename: 'btn-{ui}-medium',
- config: {
- scale: 'medium',
- text: ' ',
- width: 100
- }
- },
- {
- filename: 'btn-{ui}-medium-over',
- over: true,
- config: {
- scale: 'medium',
- text: ' ',
- width: 100
- }
- },
- {
- filename: 'btn-{ui}-medium-focus',
- config: {
- scale: 'medium',
- text: ' ',
- width: 100,
- cls: Ext.baseCSSPrefix + 'btn-focus'
- }
- },
- {
- filename: 'btn-{ui}-medium-pressed',
- config: {
- scale: 'medium',
- text: ' ',
- width: 100,
- cls: Ext.baseCSSPrefix + 'btn-pressed'
- }
- },
- {
- filename: 'btn-{ui}-medium-focus-over',
- config: {
- scale: 'medium',
- text: ' ',
- width: 100,
- cls: Ext.baseCSSPrefix + 'btn-focus ' + Ext.baseCSSPrefix + 'btn-over'
- }
- },
- {
- filename: 'btn-{ui}-medium-focus-pressed',
- config: {
- scale: 'medium',
- text: ' ',
- width: 100,
- cls: Ext.baseCSSPrefix + 'btn-focus ' + Ext.baseCSSPrefix + 'btn-pressed'
- }
- },
- {
- filename: 'btn-{ui}-medium-disabled',
- config: {
- scale: 'medium',
- text: ' ',
- width: 100,
- disabled: true
- }
- },
- //large button
- {
- filename: 'btn-{ui}-large',
- config: {
- scale: 'large',
- text: ' ',
- width: 100
- }
- },
- {
- filename: 'btn-{ui}-large-over',
- over: true,
- config: {
- scale: 'large',
- text: ' ',
- width: 100
- }
- },
- {
- filename: 'btn-{ui}-large-focus',
- config: {
- scale: 'large',
- text: ' ',
- width: 100,
- cls: Ext.baseCSSPrefix + 'btn-focus'
- }
- },
- {
- filename: 'btn-{ui}-large-pressed',
- config: {
- scale: 'large',
- text: ' ',
- width: 100,
- cls: Ext.baseCSSPrefix + 'btn-pressed'
- }
- },
- {
- filename: 'btn-{ui}-large-focus-over',
- config: {
- scale: 'large',
- text: ' ',
- width: 100,
- cls: Ext.baseCSSPrefix + 'btn-focus ' + Ext.baseCSSPrefix + 'btn-over'
- }
- },
- {
- filename: 'btn-{ui}-large-focus-pressed',
- config: {
- scale: 'large',
- text: ' ',
- width: 100,
- cls: Ext.baseCSSPrefix + 'btn-focus ' + Ext.baseCSSPrefix + 'btn-pressed'
- }
- },
- {
- filename: 'btn-{ui}-large-disabled',
- config: {
- scale: 'large',
- text: ' ',
- width: 100,
- disabled: true
- }
- }
- ],
- 'widget.roweditorbuttons': [
- {
- config: {
- position: 'bottom',
- style: 'position:static',
- rowEditor: {
- buttonUI: 'default-toolbar',
- saveBtnText: 'Update',
- cancelBtnText: 'Cancel',
- editingPlugin: {
- completeEdit: Ext.emptyFn,
- cancelEdit: Ext.emptyFn
- }
- }
- }
- },
- {
- config: {
- position: 'top',
- style: 'position:static',
- rowEditor: {
- buttonUI: 'default-toolbar',
- saveBtnText: 'Update',
- cancelBtnText: 'Cancel',
- editingPlugin: {
- completeEdit: Ext.emptyFn,
- cancelEdit: Ext.emptyFn
- }
- }
- }
- }
- ]
- });
|