Posted By

robotpsyche on 03/01/13


Tagged


Versions (?)

Model definition


 / Published in: JavaScript
 

Model definition

  1. fields: [
  2. {
  3. name: 'groupBy',
  4. type: 'int'
  5. },
  6. {
  7. name: 'quickSelect',
  8. type: 'string'
  9. },
  10. {
  11. name: 'displayedStartDate',
  12. dateFormat: 'M j, Y',
  13. type: 'date'
  14. },
  15. {
  16. name: 'displayedEndDate',
  17. dateFormat: 'M j, Y',
  18. type: 'date'
  19. },
  20. {
  21. name: 'compareActive',
  22. type: 'boolean'
  23. },
  24. {
  25. name: 'comparedStartDate',
  26. dateFormat: 'M j, Y',
  27. type: 'date'
  28. },
  29. {
  30. name: 'comparedEndDate',
  31. dateFormat: 'M j, Y',
  32. type: 'date'
  33. },
  34. {
  35. name: 'selectedMarket',
  36. type: 'int'
  37. },
  38. {
  39. name: 'selectedCampaignYear',
  40. type: 'int'
  41. },
  42. {
  43. name: 'selectedEvent',
  44. type: 'int'
  45. },
  46. {
  47. name: 'selectedSponsor',
  48. type: 'int'
  49. },
  50. {
  51. name: 'showBy',
  52. type: 'int'
  53. },
  54. {
  55. name: 'trendLineActive',
  56. type: 'boolean'
  57. },
  58. {
  59. name: 'forecastActive',
  60. type: 'boolean'
  61. },
  62. {
  63. name: 'cumulativeActive',
  64. type: 'boolean'
  65. },
  66. {
  67. name: 'goalActive',
  68. type: 'boolean'
  69. }
  70. ]
  71.  
  72.  
  73. defaultModel = Ext.create('', {
  74. groupBy : 0,
  75. quickSelect : 0,
  76. displayedStartDate : MyApp.app.getDateTimeFor('firstSecondOfTheWeek'),
  77. displayedEndDate : MyApp.app.getDateTimeFor('lastSecondOfToday'),
  78. compareActive : false,
  79. comparedStartDate : MyApp.app.getDateTimeFor('firstSecondOfThePreviousWeek'),
  80. comparedEndDate : MyApp.app.getDateTimeFor('lastSecondOfThePreviousWeek'),
  81. selectedMarket : 0,
  82. selectedCampaignYear : 0,
  83. selectedEvent : 0,
  84. selectedSponsor : 0,
  85. showBy : 0,
  86. trendLineActive : false,
  87. forecastActive : false,
  88. cumulativeActive : false,
  89. goalActive : false
  90. });

Report this snippet  

You need to login to post a comment.