Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git] / examples / toolbar / reorderable.js
index 07a4e65..e9826c1 100644 (file)
@@ -1,17 +1,36 @@
-/*!
- * Ext JS Library 3.2.1
- * Copyright(c) 2006-2010 Ext JS, Inc.
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
+/*
+
+This file is part of Ext JS 4
+
+Copyright (c) 2011 Sencha Inc
+
+Contact:  http://www.sencha.com/contact
+
+GNU General Public License Usage
+This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file.  Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+
+If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
+
+*/
+Ext.Loader.setConfig({enabled: true});
+
+Ext.Loader.setPath('Ext.ux', '../ux/');
+
+Ext.require([
+    'Ext.panel.*',
+    'Ext.fx.*',
+    'Ext.toolbar.*',
+    'Ext.button.*',
+    'Ext.ux.BoxReorderer'
+]);
+
 Ext.onReady(function() {
-    var toolbar = new Ext.Toolbar({
-        renderTo: 'docbody',
-        plugins : [
-            new Ext.ux.ToolbarReorderer({
-                defaultReorderable: true
-            })
-        ],
+    var toolbar = Ext.createWidget('toolbar', {
+        renderTo: Ext.getBody(),
+        defaults: {
+            reorderable: true
+        },
+        plugins : Ext.create('Ext.ux.BoxReorderer', {}),
         items   : [
             {
                 xtype:'splitbutton',
@@ -33,21 +52,20 @@ Ext.onReady(function() {
             {
                 text: 'Paste',
                 iconCls: 'add16',
-                menu: [{text: 'Paste Menu Item'}],
-                reorderable: true
+                menu: [{text: 'Paste Menu Item'}]
             },
             {
                 text: 'Format',
-                iconCls: 'add16',
-                reorderable: true
+                iconCls: 'add16'
             }
         ]
     });
     
-    new Ext.Panel({
-        renderTo: 'docbody',
+    Ext.createWidget('panel', {
+        renderTo: Ext.getBody(),
         tbar    : toolbar,
         border  : true,
-        width   : 600
+        width   : 600,
+        height  : 400
     });
-});
\ No newline at end of file
+});