-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
135 lines (108 loc) · 4.63 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<html>
<head>
<title>Backbone JS test</title>
<style>
body {
font-family: Arial, sans-serif;
}
#calendar {
width: 603px;
margin: 0 auto;
min-height: 600px;
font-size: 0;
}
#calendar .calendar-day-view {
border-left: 1px solid #CCC;
}
#calendar .calendar-day {
width: 85px;
height: 120px;
display: inline-block;
border-right: 1px solid #CCC;
border-bottom: 1px solid #CCC;
font-size: 12px;
position: relative;
vertical-align: top;
}
#calendar .calendar-menu-bar {
height: 30px;
line-height: 30px;
position: relative;
font-size: 12px;
vertical-align: middle;
background-image: linear-gradient(bottom, rgb(191,191,191) 25%, rgb(230,230,230) 74%);
background-image: -o-linear-gradient(bottom, rgb(191,191,191) 25%, rgb(230,230,230) 74%);
background-image: -moz-linear-gradient(bottom, rgb(191,191,191) 25%, rgb(230,230,230) 74%);
background-image: -webkit-linear-gradient(bottom, rgb(191,191,191) 25%, rgb(230,230,230) 74%);
background-image: -ms-linear-gradient(bottom, rgb(191,191,191) 25%, rgb(230,230,230) 74%);
}
#calendar .calendar-day-view {
margin: 0;
border-spacing: 0;
width: 100%;
}
#calendar .calendar-menu-bar .menu-bar-item {
display: inline-block;
font-size: 14px;
margin-left: 5px;
}
</style>
<script type="text/javascript" src="js/external/jquery-requires.js"></script>
<script type="text/javascript" src="js/external/json2.js"></script>
<script type="text/javascript" src="js/external/underscore.js"></script>
<script type="text/javascript" src="js/external/backbone.js"></script>
<script type="text/javascript" src="js/external/moment.js"></script>
<script type="text/javascript" src="initialize.js"></script>
<!-- Collections -->
<script type="text/javascript" src="js/collections/Cal.DayList.js"></script>
<!-- Models -->
<script type="text/javascript" src="js/models/Cal.CalendarDay.js"></script>
<script type="text/javascript" src="js/models/Cal.CalendarMonth.js"></script>
<script type="text/javascript" src="js/models/Cal.MenuBar.js"></script>
<!-- Views -->
<script type="text/javascript" src="js/views/controls/Cal.Button.js"></script>
<script type="text/javascript" src="js/views/Cal.MenuBarView.js"></script>
<script type="text/javascript" src="js/views/Cal.CalendarMonthView.js"></script>
<script type="text/javascript" src="js/views/Cal.CalendarDayView.js"></script>
<script type="text/javascript" src="js/views/Cal.CalendarView.js"></script>
<script type="text/javascript" src="js/controllers/Cal.Main.js"></script>
<script type="text/javascript">
//
// Utility methods to setup environment
//
var DateUtils = {
count: 1,
addDay: function () {
var d = new Date(new Date().getTime() + (1000 * 60 * 60 * 24 * DateUtils.count));
DateUtils.count = DateUtils.count + 1;
return d;
},
buildMonthDays: function(year, month) {
var daysInMonth = moment([year, month]).daysInMonth(),
count,
dayCollection = new Cal.DayList(),
day;
for (count = 1; count <= daysInMonth; count++) {
day = new Cal.CalendarDay();
day.set({'dayDate': new Date(year, month, count)});
dayCollection.add(day);
}
return dayCollection;
}
}
</script>
</head>
<body>
<div id="calendar"></div>
<script type="text/javascript">
var listview;
$('document').ready(function () {
new Cal.Main({
'target': "#calendar",
'month': '2',
'year': '2012'
});
});
</script>
</body>
</html>