Web UI for ARGUS server
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.

80 lines
3.0 KiB

6 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  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.MonthViewTemplate"></div>/**
  16. * @class Ext.calendar.MonthViewTemplate
  17. * @extends Ext.XTemplate
  18. * <p>This is the template used to render the {@link Ext.calendar.MonthView MonthView}. Internally this class defers to an
  19. * instance of {@link Ext.calerndar.BoxLayoutTemplate} to handle the inner layout rendering and adds containing elements around
  20. * that to form the month view.</p>
  21. * <p>This template is automatically bound to the underlying event store by the
  22. * calendar components and expects records of type {@link Ext.calendar.EventRecord}.</p>
  23. * @constructor
  24. * @param {Object} config The config object
  25. */
  26. Ext.calendar.MonthViewTemplate = function(config){
  27. Ext.apply(this, config);
  28. this.weekTpl = new Ext.calendar.BoxLayoutTemplate(config);
  29. this.weekTpl.compile();
  30. var weekLinkTpl = this.showWeekLinks ? '<div class="ext-cal-week-link-hd">&nbsp;</div>' : '';
  31. Ext.calendar.MonthViewTemplate.superclass.constructor.call(this,
  32. '<div class="ext-cal-inner-ct {extraClasses}">',
  33. '<div class="ext-cal-hd-ct ext-cal-month-hd">',
  34. weekLinkTpl,
  35. '<table class="ext-cal-hd-days-tbl" cellpadding="0" cellspacing="0">',
  36. '<tbody>',
  37. '<tr>',
  38. '<tpl for="days">',
  39. '<th class="ext-cal-hd-day{[xindex==1 ? " ext-cal-day-first" : ""]}" title="{.:date("l, F j, Y")}">{.:date("D")}</th>',
  40. '</tpl>',
  41. '</tr>',
  42. '</tbody>',
  43. '</table>',
  44. '</div>',
  45. '<div class="ext-cal-body-ct">{weeks}</div>',
  46. '</div>'
  47. );
  48. };
  49. Ext.extend(Ext.calendar.MonthViewTemplate, Ext.XTemplate, {
  50. // private
  51. applyTemplate : function(o){
  52. var days = [],
  53. weeks = this.weekTpl.apply(o),
  54. dt = o.viewStart;
  55. for(var i = 0; i < 7; i++){
  56. days.push(dt.add(Date.DAY, i));
  57. }
  58. var extraClasses = this.showHeader === true ? '' : 'ext-cal-noheader';
  59. if(this.showWeekLinks){
  60. extraClasses += ' ext-cal-week-links';
  61. }
  62. return Ext.calendar.MonthViewTemplate.superclass.applyTemplate.call(this, {
  63. days: days,
  64. weeks: weeks,
  65. extraClasses: extraClasses
  66. });
  67. }
  68. });
  69. Ext.calendar.MonthViewTemplate.prototype.apply = Ext.calendar.MonthViewTemplate.prototype.applyTemplate;
  70. </pre>
  71. </body>
  72. </html>