You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

364 lines
10 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. This file is part of Ext JS 3.4
  3. Copyright (c) 2011-2013 Sencha Inc
  4. Contact: http://www.sencha.com/contact
  5. GNU General Public License Usage
  6. This file may be used under the terms of the GNU General Public License version 3.0 as
  7. published by the Free Software Foundation and appearing in the file LICENSE included in the
  8. packaging of this file.
  9. Please review the following information to ensure the GNU General Public License version 3.0
  10. requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  11. If you are unsure which license is appropriate for your use, please contact the sales department
  12. at http://www.sencha.com/contact.
  13. Build date: 2013-04-03 15:07:25
  14. */
  15. Ext.onReady(function(){
  16. var SamplePanel = Ext.extend(Ext.Panel, {
  17. width: 500,
  18. height:250,
  19. style: 'margin-top:15px',
  20. bodyStyle: 'padding:10px',
  21. renderTo: 'docbody',
  22. html: Ext.example.shortBogusMarkup,
  23. autoScroll: true
  24. });
  25. new SamplePanel({
  26. title: 'Standard',
  27. tbar: [{
  28. xtype:'splitbutton',
  29. text: 'Menu Button',
  30. iconCls: 'add16',
  31. menu: [{text: 'Menu Button 1'}]
  32. },'-',{
  33. xtype:'splitbutton',
  34. text: 'Cut',
  35. iconCls: 'add16',
  36. menu: [{text: 'Cut Menu Item'}]
  37. },{
  38. text: 'Copy',
  39. iconCls: 'add16'
  40. },{
  41. text: 'Paste',
  42. iconCls: 'add16',
  43. menu: [{text: 'Paste Menu Item'}]
  44. },'-',{
  45. text: 'Format',
  46. iconCls: 'add16'
  47. }]
  48. });
  49. new SamplePanel({
  50. title: 'Multi columns',
  51. tbar: [{
  52. xtype: 'buttongroup',
  53. title: 'Clipboard',
  54. columns: 2,
  55. defaults: {
  56. scale: 'small'
  57. },
  58. items: [{
  59. xtype:'splitbutton',
  60. text: 'Menu Button',
  61. iconCls: 'add16',
  62. menu: [{text: 'Menu Item 1'}]
  63. },{
  64. xtype:'splitbutton',
  65. text: 'Cut',
  66. iconCls: 'add16',
  67. menu: [{text: 'Cut Menu Item'}]
  68. },{
  69. text: 'Copy',
  70. iconCls: 'add16'
  71. },{
  72. text: 'Paste',
  73. iconCls: 'add16',
  74. menu: [{text: 'Paste Menu Item'}]
  75. },{
  76. text: 'Format',
  77. iconCls: 'add16'
  78. }]
  79. },{
  80. xtype: 'buttongroup',
  81. title: 'Other Bogus Actions',
  82. columns: 2,
  83. defaults: {
  84. scale: 'small'
  85. },
  86. items: [{
  87. xtype:'splitbutton',
  88. text: 'Menu Button',
  89. iconCls: 'add16',
  90. menu: [{text: 'Menu Button 1'}]
  91. },{
  92. xtype:'splitbutton',
  93. text: 'Cut',
  94. iconCls: 'add16',
  95. menu: [{text: 'Cut Menu Item'}]
  96. },{
  97. text: 'Copy',
  98. iconCls: 'add16'
  99. },{
  100. text: 'Paste',
  101. iconCls: 'add16',
  102. menu: [{text: 'Paste Menu Item'}]
  103. },{
  104. text: 'Format',
  105. iconCls: 'add16'
  106. }]
  107. }]
  108. });
  109. new SamplePanel({
  110. title: 'Multi columns (No titles, double stack)',
  111. tbar: [{
  112. xtype: 'buttongroup',
  113. columns: 3,
  114. defaults: {
  115. scale: 'small'
  116. },
  117. items: [{
  118. xtype:'splitbutton',
  119. text: 'Menu Button',
  120. iconCls: 'add16',
  121. menu: [{text: 'Menu Item 1'}]
  122. },{
  123. xtype:'splitbutton',
  124. text: 'Cut',
  125. iconCls: 'add16',
  126. menu: [{text: 'Cut Menu Item'}]
  127. },{
  128. text: 'Copy',
  129. iconCls: 'add16'
  130. },{
  131. text: 'Paste',
  132. iconCls: 'add16',
  133. menu: [{text: 'Paste Menu Item'}]
  134. },{
  135. text: 'Format',
  136. iconCls: 'add16'
  137. }]
  138. },{
  139. xtype: 'buttongroup',
  140. columns: 3,
  141. defaults: {
  142. scale: 'small'
  143. },
  144. items: [{
  145. xtype:'splitbutton',
  146. text: 'Menu Button',
  147. iconCls: 'add16',
  148. menu: [{text: 'Menu Item 1'}]
  149. },{
  150. xtype:'splitbutton',
  151. text: 'Cut',
  152. iconCls: 'add16',
  153. menu: [{text: 'Cut Menu Item'}]
  154. },{
  155. text: 'Copy',
  156. iconCls: 'add16'
  157. },{
  158. text: 'Paste',
  159. iconCls: 'add16',
  160. menu: [{text: 'Paste Menu Item'}]
  161. },{
  162. text: 'Format',
  163. iconCls: 'add16'
  164. }]
  165. }]
  166. });
  167. new SamplePanel({
  168. title: 'Mix and match icon sizes to create a huge unusable toolbar',
  169. tbar: [{
  170. xtype: 'buttongroup',
  171. columns: 3,
  172. title: 'Clipboard',
  173. items: [{
  174. text: 'Paste',
  175. scale: 'large',
  176. rowspan: 3, iconCls: 'add',
  177. iconAlign: 'top',
  178. cls: 'x-btn-as-arrow'
  179. },{
  180. xtype:'splitbutton',
  181. text: 'Menu Button',
  182. scale: 'large',
  183. rowspan: 3,
  184. iconCls: 'add',
  185. iconAlign: 'top',
  186. arrowAlign:'bottom',
  187. menu: [{text: 'Menu Item 1'}]
  188. },{
  189. xtype:'splitbutton', text: 'Cut', iconCls: 'add16', menu: [{text: 'Cut Menu Item'}]
  190. },{
  191. text: 'Copy', iconCls: 'add16'
  192. },{
  193. text: 'Format', iconCls: 'add16'
  194. }]
  195. },{
  196. xtype: 'buttongroup',
  197. columns: 3,
  198. title: 'Other Actions',
  199. items: [{
  200. text: 'Paste',
  201. scale: 'large',
  202. rowspan: 3, iconCls: 'add',
  203. iconAlign: 'top',
  204. cls: 'x-btn-as-arrow'
  205. },{
  206. xtype:'splitbutton',
  207. text: 'Menu Button',
  208. scale: 'large',
  209. rowspan: 3,
  210. iconCls: 'add',
  211. iconAlign: 'top',
  212. arrowAlign:'bottom',
  213. menu: [{text: 'Menu Button 1'}]
  214. },{
  215. xtype:'splitbutton', text: 'Cut', iconCls: 'add16', menu: [{text: 'Cut Menu Item'}]
  216. },{
  217. text: 'Copy', iconCls: 'add16'
  218. },{
  219. text: 'Format', iconCls: 'add16'
  220. }]
  221. }]
  222. });
  223. new SamplePanel({
  224. title: 'Medium icons, arrows to the bottom',
  225. tbar: [{
  226. xtype: 'buttongroup',
  227. title: 'Clipboard',
  228. defaults: {
  229. scale: 'medium',
  230. iconAlign:'top'
  231. },
  232. items: [{
  233. xtype:'splitbutton',
  234. text: 'Menu Button',
  235. iconCls: 'add24',
  236. arrowAlign:'bottom',
  237. menu: [{text: 'Menu Item 1'}]
  238. },{
  239. xtype:'splitbutton',
  240. text: 'Cut',
  241. iconCls: 'add24',
  242. arrowAlign:'bottom',
  243. menu: [{text: 'Cut Menu Item'}]
  244. },{
  245. text: 'Copy',
  246. iconCls: 'add24',
  247. cls: 'x-btn-as-arrow'
  248. },{
  249. text: 'Paste',
  250. iconCls: 'add24',
  251. arrowAlign:'bottom',
  252. menu: [{text: 'Paste Menu Item'}]
  253. },{
  254. text: 'Format<br/>Stuff',
  255. iconCls: 'add24'
  256. }]
  257. },{
  258. xtype: 'buttongroup',
  259. title: 'Other Bogus Actions',
  260. defaults: {
  261. scale: 'medium',
  262. iconAlign:'top'
  263. },
  264. items: [{
  265. xtype:'splitbutton',
  266. text: 'Menu Button',
  267. iconCls: 'add24',
  268. arrowAlign:'bottom',
  269. menu: [{text: 'Menu Item 1'}]
  270. },{
  271. xtype:'splitbutton',
  272. text: 'Cut',
  273. iconCls: 'add24',
  274. arrowAlign:'bottom',
  275. menu: [{text: 'Cut Menu Item'}]
  276. },{
  277. text: 'Copy',
  278. iconCls: 'add24',
  279. cls: 'x-btn-as-arrow'
  280. },{
  281. text: 'Paste',
  282. iconCls: 'add24',
  283. arrowAlign:'bottom',
  284. menu: [{text: 'Paste Menu Item'}]
  285. },{
  286. text: 'Format',
  287. iconCls: 'add24',
  288. cls: 'x-btn-as-arrow'
  289. }]
  290. }]
  291. });
  292. new SamplePanel({
  293. title: 'Medium icons, text and arrows to the left',
  294. tbar: [{
  295. xtype:'buttongroup',
  296. items: [{
  297. text: 'Cut',
  298. iconCls: 'add24',
  299. scale: 'medium'
  300. },{
  301. text: 'Copy',
  302. iconCls: 'add24',
  303. scale: 'medium'
  304. },{
  305. text: 'Paste',
  306. iconCls: 'add24',
  307. scale: 'medium',
  308. menu: [{text: 'Paste Menu Item'}]
  309. }]
  310. }, {
  311. xtype:'buttongroup',
  312. items: [{
  313. text: 'Format',
  314. iconCls: 'add24',
  315. scale: 'medium'
  316. }]
  317. }]
  318. });
  319. new SamplePanel({
  320. title: 'Small icons, text and arrows to the left',
  321. tbar: [{
  322. xtype:'buttongroup',
  323. items: [{
  324. text: 'Cut',
  325. iconCls: 'add16',
  326. scale: 'small'
  327. },{
  328. text: 'Copy',
  329. iconCls: 'add16',
  330. scale: 'small'
  331. },{
  332. text: 'Paste',
  333. iconCls: 'add16',
  334. scale: 'small',
  335. menu: [{text: 'Paste Menu Item'}]
  336. }]
  337. }, {
  338. xtype:'buttongroup',
  339. items: [{
  340. text: 'Format',
  341. iconCls: 'add16',
  342. scale: 'small'
  343. }]
  344. }]
  345. });
  346. });