shortcuts.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779
  1. $Shortcuts = {
  2. 'widget.buttongroup': [
  3. {
  4. folder: 'btn-group',
  5. filename: 'btn-group-{ui}-framed-notitle',
  6. config: {
  7. columns: 2,
  8. defaults: {
  9. scale: 'small'
  10. },
  11. items: [{
  12. xtype:'splitbutton',
  13. text: 'Menu Button',
  14. iconCls: 'add16',
  15. menu: [{text: 'Menu Item 1'}]
  16. },{
  17. xtype:'splitbutton',
  18. text: 'Cut',
  19. iconCls: 'add16',
  20. menu: [{text: 'Cut Menu Item'}]
  21. },{
  22. text: 'Copy',
  23. iconCls: 'add16'
  24. },{
  25. text: 'Paste',
  26. iconCls: 'add16',
  27. menu: [{text: 'Paste Menu Item'}]
  28. },{
  29. text: 'Format',
  30. iconCls: 'add16'
  31. }]
  32. }
  33. },
  34. {
  35. folder: 'btn-group',
  36. filename: 'btn-group-{ui}-framed',
  37. config: {
  38. columns: 2,
  39. title: 'Manifest',
  40. defaults: {
  41. scale: 'small'
  42. },
  43. items: [{
  44. xtype:'splitbutton',
  45. text: 'Menu Button',
  46. iconCls: 'add16',
  47. menu: [{text: 'Menu Item 1'}]
  48. },{
  49. xtype:'splitbutton',
  50. text: 'Cut',
  51. iconCls: 'add16',
  52. menu: [{text: 'Cut Menu Item'}]
  53. },{
  54. text: 'Copy',
  55. iconCls: 'add16'
  56. },{
  57. text: 'Paste',
  58. iconCls: 'add16',
  59. menu: [{text: 'Paste Menu Item'}]
  60. },{
  61. text: 'Format',
  62. iconCls: 'add16'
  63. }]
  64. }
  65. }
  66. ],
  67. 'widget.progressbar': [
  68. {
  69. xtype: 'widget.progressbar',
  70. folder: 'progress',
  71. filename: 'progress-{ui}',
  72. delegate: '.x-progress-bar',
  73. config: {
  74. width: 100,
  75. value: 1,
  76. animate: false
  77. }
  78. }
  79. ],
  80. 'widget.tab': [
  81. {
  82. xtype: 'widget.tabpanel',
  83. filename: 'tabpanel-{ui}',
  84. config: {
  85. height: 200,
  86. width: 200,
  87. items: [{
  88. title: 'Tab 1',
  89. html: 'test'
  90. }, {
  91. title: 'Tab 2',
  92. html: 'test'
  93. }]
  94. }
  95. },
  96. {
  97. xtype: 'widget.tabpanel',
  98. filename: 'tab-bar-{ui}',
  99. folder: 'tab-bar',
  100. delegate: '.x-tab-bar',
  101. offsets: {
  102. bottom: 3,
  103. left: 1
  104. },
  105. config: {
  106. dock: 'top',
  107. items: [{
  108. text: 'Tab 1'
  109. }],
  110. width: 300
  111. }
  112. },
  113. {
  114. filename: 'tab-{ui}-top',
  115. config: {
  116. //hack for 4.0.5
  117. up: function(which) {
  118. if (which == 'tabbar') {
  119. return {
  120. minTabWidth: 20,
  121. maxTabWidth: 80
  122. };
  123. }
  124. },
  125. text: 'Normal Top Tab'
  126. }
  127. },
  128. {
  129. filename: 'tab-{ui}-top-active',
  130. config: {
  131. //hack for 4.0.5
  132. up: function(which) {
  133. if (which == 'tabbar') {
  134. return {
  135. minTabWidth: 20,
  136. maxTabWidth: 80
  137. };
  138. }
  139. },
  140. active: true,
  141. text: 'Active Top Tab'
  142. }
  143. },
  144. {
  145. filename: 'tab-{ui}-top-over',
  146. config: {
  147. //hack for 4.0.5
  148. up: function(which) {
  149. if (which == 'tabbar') {
  150. return {
  151. minTabWidth: 20,
  152. maxTabWidth: 80
  153. };
  154. }
  155. },
  156. cls: 'x-tab-over x-tab-top-over',
  157. text: 'Over Top Tab'
  158. }
  159. },
  160. {
  161. filename: 'tab-{ui}-top-disabled',
  162. config: {
  163. //hack for 4.0.5
  164. up: function(which) {
  165. if (which == 'tabbar') {
  166. return {
  167. minTabWidth: 20,
  168. maxTabWidth: 80
  169. };
  170. }
  171. },
  172. disabled: true,
  173. text: 'Disabled Top Tab'
  174. }
  175. },
  176. {
  177. filename: 'tab-{ui}-bottom',
  178. config: {
  179. //hack for 4.0.5
  180. up: function(which) {
  181. if (which == 'tabbar') {
  182. return {
  183. minTabWidth: 20,
  184. maxTabWidth: 80
  185. };
  186. }
  187. },
  188. position: 'bottom',
  189. text: 'Normal Bottom Tab'
  190. }
  191. },
  192. {
  193. filename: 'tab-{ui}-bottom-active',
  194. config: {
  195. //hack for 4.0.5
  196. up: function(which) {
  197. if (which == 'tabbar') {
  198. return {
  199. minTabWidth: 20,
  200. maxTabWidth: 80
  201. };
  202. }
  203. },
  204. position: 'bottom',
  205. active: true,
  206. text: 'Active Bottom Tab'
  207. }
  208. },
  209. {
  210. filename: 'tab-{ui}-bottom-over',
  211. config: {
  212. //hack for 4.0.5
  213. up: function(which) {
  214. if (which == 'tabbar') {
  215. return {
  216. minTabWidth: 20,
  217. maxTabWidth: 80
  218. };
  219. }
  220. },
  221. position: 'bottom',
  222. cls: 'x-tab-over x-tab-bottom-over',
  223. text: 'Over Bottom Tab'
  224. }
  225. },
  226. {
  227. filename: 'tab-{ui}-bottom-disabled',
  228. config: {
  229. //hack for 4.0.5
  230. up: function(which) {
  231. if (which == 'tabbar') {
  232. return {
  233. minTabWidth: 20,
  234. maxTabWidth: 80
  235. };
  236. }
  237. },
  238. position: 'bottom',
  239. disabled: true,
  240. text: 'Disabled Bottom Tab'
  241. }
  242. }
  243. ],
  244. 'widget.window': [
  245. {
  246. xtype: 'widget.header',
  247. filename: 'window-header-{ui}-top',
  248. folder: 'window-header',
  249. config: {
  250. title: 'Window Header',
  251. baseCls: 'x-window-header',
  252. dock: 'top'
  253. }
  254. },
  255. {
  256. xtype: 'widget.header',
  257. filename: 'window-header-{ui}-bottom',
  258. folder: 'window-header',
  259. config: {
  260. title: 'Window Header',
  261. baseCls: 'x-window-header',
  262. dock: 'bottom'
  263. }
  264. },
  265. {
  266. xtype: 'widget.header',
  267. filename: 'window-header-{ui}-left',
  268. folder: 'window-header',
  269. config: {
  270. title: 'Window Header',
  271. baseCls: 'x-window-header',
  272. dock: 'left'
  273. }
  274. },
  275. {
  276. xtype: 'widget.header',
  277. filename: 'window-header-{ui}-right',
  278. folder: 'window-header',
  279. config: {
  280. title: 'Window Header',
  281. baseCls: 'x-window-header',
  282. dock: 'right'
  283. }
  284. },
  285. {
  286. xtype: 'widget.window',
  287. filename: 'window-{ui}',
  288. title: 'Window',
  289. config: {
  290. setup: function(window, ct) {
  291. this.show();
  292. },
  293. floating: {shadow:false},
  294. height: 200,
  295. width: 200,
  296. x: 500,
  297. y: 10,
  298. fbar: {
  299. items: [{
  300. text: 'Submit'
  301. }]
  302. },
  303. tbar: {
  304. items: [{
  305. text: 'Button'
  306. }]
  307. }
  308. }
  309. }
  310. ],
  311. 'widget.panel': [
  312. //framed panel
  313. {
  314. xtype: 'widget.header',
  315. folder: 'panel-header',
  316. filename: 'panel-header-{ui}-framed-top',
  317. offsets: {
  318. left: 1
  319. },
  320. config: {
  321. title: 'Header',
  322. baseCls: 'x-panel-header',
  323. dock: 'top',
  324. ui: '{ui}-framed'
  325. }
  326. },
  327. {
  328. xtype: 'widget.header',
  329. folder: 'panel-header',
  330. filename: 'panel-header-{ui}-framed-bottom',
  331. reverse: true,
  332. offsets: {
  333. left: 1
  334. },
  335. config: {
  336. title: 'Header',
  337. baseCls: 'x-panel-header',
  338. dock: 'bottom',
  339. ui: '{ui}-framed'
  340. }
  341. },
  342. {
  343. xtype: 'widget.header',
  344. folder: 'panel-header',
  345. filename: 'panel-header-{ui}-framed-left',
  346. config: {
  347. title: 'Header',
  348. baseCls: 'x-panel-header',
  349. height: 200,
  350. dock: 'left',
  351. orientation: 'vertical',
  352. ui: '{ui}-framed'
  353. }
  354. },
  355. {
  356. xtype: 'widget.header',
  357. folder: 'panel-header',
  358. filename: 'panel-header-{ui}-framed-right',
  359. reverse: true,
  360. config: {
  361. title: 'Header',
  362. baseCls: 'x-panel-header',
  363. height: 200,
  364. dock: 'right',
  365. orientation: 'vertical',
  366. ui: '{ui}-framed'
  367. }
  368. },
  369. {
  370. xtype: 'widget.header',
  371. folder: 'panel-header',
  372. filename: 'panel-header-{ui}-framed-collapsed-top',
  373. offsets: {
  374. left: 1
  375. },
  376. config: {
  377. title: 'Header',
  378. baseCls: 'x-panel-header',
  379. cls: 'x-collapsed x-panel-header-collapsed x-panel-header-{ui}-framed-collapsed x-collapsed-top x-panel-header-collapsed-top x-panel-header-{ui}-framed-collapsed-top',
  380. dock: 'top',
  381. ui: '{ui}-framed'
  382. }
  383. },
  384. {
  385. xtype: 'widget.header',
  386. folder: 'panel-header',
  387. filename: 'panel-header-{ui}-framed-collapsed-bottom',
  388. reverse: true,
  389. offsets: {
  390. left: 1
  391. },
  392. config: {
  393. title: 'Header',
  394. baseCls: 'x-panel-header',
  395. cls: 'x-collapsed x-panel-header-collapsed x-panel-header-{ui}-framed-collapsed x-collapsed-bottom x-panel-header-collapsed-bottom x-panel-header-{ui}-framed-collapsed-bottom',
  396. dock: 'bottom',
  397. ui: '{ui}-framed'
  398. }
  399. },
  400. {
  401. xtype: 'widget.header',
  402. folder: 'panel-header',
  403. filename: 'panel-header-{ui}-framed-collapsed-left',
  404. config: {
  405. title: 'Header',
  406. baseCls: 'x-panel-header',
  407. cls: 'x-collapsed x-panel-header-collapsed x-panel-header-{ui}-framed-collapsed x-collapsed-left x-panel-header-collapsed-left x-panel-header-{ui}-framed-collapsed-left',
  408. height: 200,
  409. dock: 'left',
  410. orientation: 'vertical',
  411. ui: '{ui}-framed'
  412. }
  413. },
  414. {
  415. xtype: 'widget.header',
  416. folder: 'panel-header',
  417. filename: 'panel-header-{ui}-framed-collapsed-right',
  418. reverse: true,
  419. config: {
  420. title: 'Header',
  421. baseCls: 'x-panel-header',
  422. cls: 'x-collapsed x-panel-header-collapsed x-panel-header-{ui}-framed-collapsed x-collapsed-right x-panel-header-collapsed-right x-panel-header-{ui}-framed-collapsed-right',
  423. height: 200,
  424. dock: 'right',
  425. orientation: 'vertical',
  426. ui: '{ui}-framed'
  427. }
  428. },
  429. {
  430. xtype: 'widget.panel',
  431. filename: 'panel-{ui}-framed',
  432. config: {
  433. height: 180,
  434. width: 250,
  435. frame: true,
  436. html: 'Framed panel'
  437. }
  438. },
  439. //panel
  440. {
  441. xtype: 'widget.header',
  442. filename: 'panel-header-{ui}-top',
  443. offsets: {
  444. left: 1
  445. },
  446. config: {
  447. title: 'Header',
  448. baseCls: 'x-panel-header',
  449. dock: 'top'
  450. }
  451. },
  452. {
  453. xtype: 'widget.header',
  454. filename: 'panel-header-{ui}-bottom',
  455. reverse: true,
  456. offsets: {
  457. left: 1
  458. },
  459. config: {
  460. title: 'Header',
  461. baseCls: 'x-panel-header',
  462. dock: 'bottom'
  463. }
  464. },
  465. {
  466. xtype: 'widget.panel',
  467. folder: 'panel-header',
  468. filename: 'panel-header-{ui}-left',
  469. delegate: '.x-panel-header',
  470. offsets: {
  471. top: 3
  472. },
  473. config: {
  474. height: 180,
  475. width: 250,
  476. title: 'test',
  477. headerPosition: 'left'
  478. }
  479. },
  480. {
  481. xtype: 'widget.panel',
  482. folder: 'panel-header',
  483. filename: 'panel-header-{ui}-right',
  484. reverse: true,
  485. delegate: '.x-panel-header',
  486. offsets: {
  487. top: 3
  488. },
  489. config: {
  490. height: 180,
  491. width: 250,
  492. title: 'test',
  493. headerPosition: 'right'
  494. }
  495. }
  496. ],
  497. 'widget.toolbar': [
  498. {
  499. filename: 'toolbar-{ui}',
  500. config: {
  501. width: 200,
  502. items: [{
  503. text: 'test'
  504. }]
  505. }
  506. }
  507. ],
  508. 'widget.button': [
  509. //small button
  510. {
  511. filename: 'btn-{ui}-small',
  512. config: {
  513. scale: 'small',
  514. text: 'Button'
  515. }
  516. },
  517. {
  518. filename: 'btn-{ui}-small-over',
  519. config: {
  520. scale: 'small',
  521. text: 'Button',
  522. cls: 'x-btn-{ui}-small-over'
  523. }
  524. },
  525. {
  526. filename: 'btn-{ui}-small-focus',
  527. config: {
  528. scale: 'small',
  529. text: 'Button',
  530. cls: 'x-btn-{ui}-small-focus'
  531. }
  532. },
  533. {
  534. filename: 'btn-{ui}-small-pressed',
  535. config: {
  536. scale: 'small',
  537. text: 'Button',
  538. cls: 'x-btn-{ui}-small-pressed'
  539. }
  540. },
  541. {
  542. filename: 'btn-{ui}-small-disabled',
  543. config: {
  544. scale: 'small',
  545. text: 'Button',
  546. disabled: true
  547. }
  548. },
  549. //medium button
  550. {
  551. filename: 'btn-{ui}-medium',
  552. config: {
  553. scale: 'medium',
  554. text: 'Button'
  555. }
  556. },
  557. {
  558. filename: 'btn-{ui}-medium-over',
  559. config: {
  560. scale: 'medium',
  561. text: 'Button',
  562. cls: 'x-btn-{ui}-medium-over'
  563. }
  564. },
  565. {
  566. filename: 'btn-{ui}-medium-focus',
  567. config: {
  568. scale: 'medium',
  569. text: 'Button',
  570. cls: 'x-btn-{ui}-medium-focus'
  571. }
  572. },
  573. {
  574. filename: 'btn-{ui}-medium-pressed',
  575. config: {
  576. scale: 'medium',
  577. text: 'Button',
  578. cls: 'x-btn-{ui}-medium-pressed'
  579. }
  580. },
  581. {
  582. filename: 'btn-{ui}-medium-disabled',
  583. config: {
  584. scale: 'medium',
  585. text: 'Button',
  586. disabled: true
  587. }
  588. },
  589. //large button
  590. {
  591. filename: 'btn-{ui}-large',
  592. config: {
  593. scale: 'large',
  594. text: 'Button'
  595. }
  596. },
  597. {
  598. filename: 'btn-{ui}-large-over',
  599. config: {
  600. scale: 'large',
  601. text: 'Button',
  602. cls: 'x-btn-{ui}-large-over'
  603. }
  604. },
  605. {
  606. filename: 'btn-{ui}-large-focus',
  607. config: {
  608. scale: 'large',
  609. text: 'Button',
  610. cls: 'x-btn-{ui}-large-focus'
  611. }
  612. },
  613. {
  614. filename: 'btn-{ui}-large-pressed',
  615. config: {
  616. scale: 'large',
  617. text: 'Button',
  618. cls: 'x-btn-{ui}-large-pressed'
  619. }
  620. },
  621. {
  622. filename: 'btn-{ui}-large-disabled',
  623. config: {
  624. scale: 'large',
  625. text: 'Button',
  626. disabled: true
  627. }
  628. },
  629. //small toolbar button
  630. {
  631. filename: 'btn-{ui}-toolbar-small',
  632. config: {
  633. scale: 'small',
  634. ui: '{ui}-toolbar',
  635. text: 'Button'
  636. }
  637. },
  638. {
  639. filename: 'btn-{ui}-toolbar-small-over',
  640. config: {
  641. scale: 'small',
  642. ui: '{ui}-toolbar',
  643. text: 'Button',
  644. cls: 'x-btn-{ui}-toolbar-small-over'
  645. }
  646. },
  647. {
  648. filename: 'btn-{ui}-toolbar-small-focus',
  649. config: {
  650. scale: 'small',
  651. ui: '{ui}-toolbar',
  652. text: 'Button',
  653. cls: 'x-btn-{ui}-toolbar-small-focus'
  654. }
  655. },
  656. {
  657. filename: 'btn-{ui}-toolbar-small-pressed',
  658. config: {
  659. scale: 'small',
  660. ui: '{ui}-toolbar',
  661. text: 'Button',
  662. cls: 'x-btn-{ui}-toolbar-small-pressed'
  663. }
  664. },
  665. {
  666. filename: 'btn-{ui}-toolbar-small-disabled',
  667. config: {
  668. scale: 'small',
  669. ui: '{ui}-toolbar',
  670. text: 'Button',
  671. disabled: true
  672. }
  673. },
  674. //medium toolbar button
  675. {
  676. filename: 'btn-{ui}-toolbar-medium',
  677. config: {
  678. scale: 'medium',
  679. ui: '{ui}-toolbar',
  680. text: 'Button'
  681. }
  682. },
  683. {
  684. filename: 'btn-{ui}-toolbar-medium-over',
  685. config: {
  686. scale: 'medium',
  687. ui: '{ui}-toolbar',
  688. text: 'Button',
  689. cls: 'x-btn-{ui}-toolbar-medium-over'
  690. }
  691. },
  692. {
  693. filename: 'btn-{ui}-toolbar-medium-focus',
  694. config: {
  695. scale: 'medium',
  696. ui: '{ui}-toolbar',
  697. text: 'Button',
  698. cls: 'x-btn-{ui}-toolbar-medium-focus'
  699. }
  700. },
  701. {
  702. filename: 'btn-{ui}-toolbar-medium-pressed',
  703. config: {
  704. scale: 'medium',
  705. ui: '{ui}-toolbar',
  706. text: 'Button',
  707. cls: 'x-btn-{ui}-toolbar-medium-pressed'
  708. }
  709. },
  710. {
  711. filename: 'btn-{ui}-toolbar-medium-disabled',
  712. config: {
  713. scale: 'medium',
  714. ui: '{ui}-toolbar',
  715. text: 'Button',
  716. disabled: true
  717. }
  718. },
  719. //large toolbar button
  720. {
  721. filename: 'btn-{ui}-toolbar-large',
  722. config: {
  723. scale: 'large',
  724. ui: '{ui}-toolbar',
  725. text: 'Button'
  726. }
  727. },
  728. {
  729. filename: 'btn-{ui}-toolbar-large-over',
  730. config: {
  731. scale: 'large',
  732. ui: '{ui}-toolbar',
  733. text: 'Button',
  734. cls: 'x-btn-{ui}-toolbar-large-over'
  735. }
  736. },
  737. {
  738. filename: 'btn-{ui}-toolbar-large-focus',
  739. config: {
  740. scale: 'large',
  741. ui: '{ui}-toolbar',
  742. text: 'Button',
  743. cls: 'x-btn-{ui}-toolbar-large-focus'
  744. }
  745. },
  746. {
  747. filename: 'btn-{ui}-toolbar-large-pressed',
  748. config: {
  749. scale: 'large',
  750. ui: '{ui}-toolbar',
  751. text: 'Button',
  752. cls: 'x-btn-{ui}-toolbar-large-pressed'
  753. }
  754. },
  755. {
  756. filename: 'btn-{ui}-toolbar-large-disabled',
  757. config: {
  758. scale: 'large',
  759. ui: '{ui}-toolbar',
  760. text: 'Button',
  761. disabled: true
  762. }
  763. }
  764. ]
  765. };