Web Interface For Lite Argus Control modules
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.

33 lines
704 B

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*!
  2. * Ext JS Library 3.3.1
  3. * Copyright(c) 2006-2010 Sencha Inc.
  4. * licensing@sencha.com
  5. * http://www.sencha.com/license
  6. */
  7. Ext.onReady(function(){
  8. var chooser, btn;
  9. function insertImage(data){
  10. Ext.DomHelper.append('images', {
  11. tag: 'img', src: data.url, style:'margin:10px;visibility:hidden;'
  12. }, true).show(true).frame();
  13. btn.focus();
  14. };
  15. function choose(btn){
  16. if(!chooser){
  17. chooser = new ImageChooser({
  18. url:'get-images.php',
  19. width:515,
  20. height:350
  21. });
  22. }
  23. chooser.show(btn.getEl(), insertImage);
  24. };
  25. btn = new Ext.Button({
  26. text: "Insert Image",
  27. handler: choose,
  28. renderTo: 'buttons'
  29. });
  30. });