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.

64 lines
1.8 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  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 form = new Ext.form.FormPanel({
  9. width : 400,
  10. height: 160,
  11. title : 'Sound Settings',
  12. bodyStyle : 'padding: 10px;',
  13. renderTo : 'container',
  14. defaultType: 'sliderfield',
  15. buttonAlign: 'left',
  16. defaults: {
  17. anchor: '95%',
  18. tipText: function(thumb){
  19. return String(thumb.value) + '%';
  20. }
  21. },
  22. items: [{
  23. fieldLabel: 'Sound Effects',
  24. value: 50,
  25. name: 'fx'
  26. },{
  27. fieldLabel: 'Ambient Sounds',
  28. value: 80,
  29. name: 'ambient'
  30. },{
  31. fieldLabel: 'Interface Sounds',
  32. value: 25,
  33. name: 'iface'
  34. }],
  35. fbar: {
  36. xtype: 'toolbar',
  37. items: [{
  38. text: 'Max All',
  39. handler: function(){
  40. form.items.each(function(c){
  41. c.setValue(100);
  42. });
  43. }
  44. }, '->', {
  45. text: 'Save',
  46. handler: function(){
  47. var values = form.getForm().getValues(),
  48. s = ['Sounds Effects: <b>{0}%</b>',
  49. 'Ambient Sounds: <b>{1}%</b>',
  50. 'Interface Sounds: <b>{2}%</b>'];
  51. Ext.example.msg('Settings Saved', s.join('<br />'), values.fx, values.ambient, values.iface);
  52. }
  53. },{
  54. text: 'Reset',
  55. handler: function(){
  56. form.getForm().reset();
  57. }
  58. }]
  59. }
  60. });
  61. });