source: trunk/web/addons/job_monarch/lib/extjs/examples/resizable/basic.js @ 619

Last change on this file since 619 was 619, checked in by ramonb, 15 years ago

lib/:

  • added new AJAX dependancies: ExtJS, pChart, Lightbox2
File size: 2.4 KB
Line 
1/*
2 * Ext JS Library 2.2.1
3 * Copyright(c) 2006-2009, Ext JS, LLC.
4 * licensing@extjs.com
5 *
6 * http://extjs.com/license
7 */
8
9var ResizableExample = {
10    init : function(){
11       
12        var basic = new Ext.Resizable('basic', {
13                width: 200,
14                height: 100,
15                minWidth:100,
16                minHeight:50
17        });
18       
19        var animated = new Ext.Resizable('animated', {
20                width: 200,
21                pinned: true,
22                height: 100,
23                minWidth:100,
24                minHeight:50,
25                animate:true,
26                easing: 'backIn',
27                duration:.6
28        });
29       
30        var wrapped = new Ext.Resizable('wrapped', {
31            wrap:true,
32            pinned:true,
33            minWidth:50,
34            minHeight: 50,
35            preserveRatio: true
36        });
37       
38        var transparent = new Ext.Resizable('transparent', {
39            wrap:true,
40            minWidth:50,
41            minHeight: 50,
42            preserveRatio: true,
43            transparent:true
44        });
45       
46        var custom = new Ext.Resizable('custom', {
47            wrap:true,
48            pinned:true,
49            minWidth:50,
50            minHeight: 50,
51            preserveRatio: true,
52            handles: 'all',
53            draggable:true,
54            dynamic:true
55        });
56        var customEl = custom.getEl();
57        // move to the body to prevent overlap on my blog
58        document.body.insertBefore(customEl.dom, document.body.firstChild);
59       
60        customEl.on('dblclick', function(){
61            customEl.hide(true);
62        });
63        customEl.hide();
64       
65        Ext.get('showMe').on('click', function(){
66            customEl.center();
67            customEl.show(true);
68        });
69       
70        var dwrapped = new Ext.Resizable('dwrapped', {
71            wrap:true,
72            pinned:true,
73            width:450,
74            height:150,
75            minWidth:200,
76            minHeight: 50,
77            dynamic: true
78        });
79       
80        var snap = new Ext.Resizable('snap', {
81            pinned:true,
82            width:250,
83            height:100,
84            handles: 'e',
85            widthIncrement:50,
86            minWidth: 50,
87            dynamic: true
88        });
89    }
90};
91
92Ext.EventManager.onDocumentReady(ResizableExample.init, ResizableExample, true);
Note: See TracBrowser for help on using the repository browser.