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.

85 lines
2.7 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4. <title>The source code</title>
  5. <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  6. <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  7. </head>
  8. <body onload="prettyPrint();">
  9. <pre class="prettyprint lang-js">/*!
  10. * Ext JS Library 3.3.1
  11. * Copyright(c) 2006-2010 Sencha Inc.
  12. * licensing@sencha.com
  13. * http://www.sencha.com/license
  14. */
  15. <div id="cls-Ext.calendar.ReminderField"></div>/**
  16. * @class Ext.calendar.ReminderField
  17. * @extends Ext.form.ComboBox
  18. * <p>A custom combo used for choosing a reminder setting for an event.</p>
  19. * <p>This is pretty much a standard combo that is simply pre-configured for the options needed by the
  20. * calendar components. The default configs are as follows:<pre><code>
  21. width: 200,
  22. fieldLabel: 'Reminder',
  23. mode: 'local',
  24. triggerAction: 'all',
  25. forceSelection: true,
  26. displayField: 'desc',
  27. valueField: 'value'
  28. </code></pre>
  29. * @constructor
  30. * @param {Object} config The config object
  31. */
  32. Ext.calendar.ReminderField = Ext.extend(Ext.form.ComboBox, {
  33. width: 200,
  34. fieldLabel: 'Reminder',
  35. mode: 'local',
  36. triggerAction: 'all',
  37. forceSelection: true,
  38. displayField: 'desc',
  39. valueField: 'value',
  40. // private
  41. initComponent: function() {
  42. Ext.calendar.ReminderField.superclass.initComponent.call(this);
  43. this.store = this.store || new Ext.data.ArrayStore({
  44. fields: ['value', 'desc'],
  45. idIndex: 0,
  46. data: [
  47. ['', 'None'],
  48. ['0', 'At start time'],
  49. ['5', '5 minutes before start'],
  50. ['15', '15 minutes before start'],
  51. ['30', '30 minutes before start'],
  52. ['60', '1 hour before start'],
  53. ['90', '1.5 hours before start'],
  54. ['120', '2 hours before start'],
  55. ['180', '3 hours before start'],
  56. ['360', '6 hours before start'],
  57. ['720', '12 hours before start'],
  58. ['1440', '1 day before start'],
  59. ['2880', '2 days before start'],
  60. ['4320', '3 days before start'],
  61. ['5760', '4 days before start'],
  62. ['7200', '5 days before start'],
  63. ['10080', '1 week before start'],
  64. ['20160', '2 weeks before start']
  65. ]
  66. });
  67. },
  68. // inherited docs
  69. initValue: function() {
  70. if (this.value !== undefined) {
  71. this.setValue(this.value);
  72. }
  73. else {
  74. this.setValue('');
  75. }
  76. this.originalValue = this.getValue();
  77. }
  78. });
  79. Ext.reg('reminderfield', Ext.calendar.ReminderField);
  80. </pre>
  81. </body>
  82. </html>