upgraded yui to 2.2.2 and yui-ext to 1.0.1a
This commit is contained in:
parent
4d9af2c691
commit
547ced6500
1992 changed files with 645731 additions and 0 deletions
34
www/extras/yui-ext/examples/view/chooser-example.js
vendored
Normal file
34
www/extras/yui-ext/examples/view/chooser-example.js
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Ext JS Library 1.0.1
|
||||
* Copyright(c) 2006-2007, Ext JS, LLC.
|
||||
* licensing@extjs.com
|
||||
*
|
||||
* http://www.extjs.com/license
|
||||
*/
|
||||
|
||||
Ext.onReady(function(){
|
||||
var chooser, btn;
|
||||
|
||||
function insertImage(data){
|
||||
Ext.DomHelper.append('images', {
|
||||
tag: 'img', src: data.url, style:'margin:10px;visibility:hidden;'
|
||||
}, true).show(true);
|
||||
btn.getEl().focus();
|
||||
};
|
||||
|
||||
function choose(btn){
|
||||
if(!chooser){
|
||||
chooser = new ImageChooser({
|
||||
url:'get-images.php',
|
||||
width:515,
|
||||
height:400
|
||||
});
|
||||
}
|
||||
chooser.show(btn.getEl(), insertImage);
|
||||
};
|
||||
|
||||
btn = new Ext.Button('buttons', {
|
||||
text: "Insert Image",
|
||||
handler: choose
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue