فهرست منبع

Restructure number cells to allow other elements

To pave the way for week number display in the day cell, the number
cell is changed so that it can contain more than only the day number.
Peter Nowee 10 سال پیش
والد
کامیت
3b41e9d833
2فایلهای تغییر یافته به همراه8 افزوده شده و 6 حذف شده
  1. 4 4
      src/basic/basic.css
  2. 4 2
      src/common/DayGrid.js

+ 4 - 4
src/basic/basic.css

@@ -36,7 +36,7 @@
 }
 
 .fc-basic-view td.fc-week-number span,
-.fc-basic-view td.fc-day-number {
+.fc-basic-view td.fc-numbercell span {
 	padding-top: 2px;
 	padding-bottom: 2px;
 }
@@ -52,14 +52,14 @@
 }
 
 .fc-ltr .fc-basic-view .fc-day-number {
-	text-align: right;
+	float: right;
 }
 
 .fc-rtl .fc-basic-view .fc-day-number {
-	text-align: left;
+	float: left;
 }
 
-.fc-day-number.fc-other-month {
+.fc-numbercell.fc-other-month {
 	opacity: 0.3;
 	filter: alpha(opacity=30); /* for IE */
 	/* opacity with small font can sometimes look too faded

+ 4 - 2
src/common/DayGrid.js

@@ -143,11 +143,13 @@ var DayGrid = FC.DayGrid = Grid.extend(DayTableMixin, {
 		}
 
 		classes = this.getDayClasses(date);
-		classes.unshift('fc-day-number');
+		classes.unshift('fc-numbercell');
 
 		return '' +
 			'<td class="' + classes.join(' ') + '" data-date="' + date.format() + '">' +
-				date.date() +
+				'<span class="fc-day-number">' +
+					date.date() +
+				'</span>' +
 			'</td>';
 	},