فهرست منبع

bootstrap theme iprovements

Adam Shaw 8 سال پیش
والد
کامیت
1d5f781816
5فایلهای تغییر یافته به همراه24 افزوده شده و 14 حذف شده
  1. 2 2
      src/common/common.bootstrap3.scss
  2. 6 5
      src/common/common.bootstrap4.scss
  3. 4 1
      src/list/ListView.ts
  4. 6 3
      src/theme/Bootstrap4Theme.ts
  5. 6 3
      src/theme/BootstrapTheme.ts

+ 2 - 2
src/common/common.bootstrap3.scss

@@ -19,8 +19,8 @@
 /* Popover
 --------------------------------------------------------------------------------------------------*/
 
-.fc-bootstrap3 .fc-popover .card-body {
-  padding: 0; /* undo built-in padding */
+.fc-bootstrap3 .fc-popover .panel-body {
+  padding: 0; // undo built-in padding
 }
 
 

+ 6 - 5
src/common/common.bootstrap4.scss

@@ -15,20 +15,21 @@
   border-radius: 0;
 }
 
-.fc-bootstrap4 .fc-event-container {
-  color: #fff !important;
+.fc-bootstrap4 a.fc-event:not([href]):not([tabindex]) {
+  // bootstrap has a rule that sets these links to color:inherit. override.
+  color: #fff;
 }
 
 .fc-bootstrap4 .fc-popover.card {
-  position: absolute;
+  position: absolute; // because .card sets it to position:relative
 }
 
 
 /* Popover
 --------------------------------------------------------------------------------------------------*/
 
-.fc-bootstrap4 .fc-popover .panel-body {
-  padding: 0; /* undo built-in padding */
+.fc-bootstrap4 .fc-popover .card-body {
+  padding: 0; // undo built-in padding
 }
 
 

+ 4 - 1
src/list/ListView.ts

@@ -193,7 +193,10 @@ export default class ListView extends View {
     let altFormat = this.opt('listDayAltFormat')
 
     return '<tr class="fc-list-heading" data-date="' + dayDate.format('YYYY-MM-DD') + '">' +
-      '<td class="' + this.calendar.theme.getClass('widgetHeader') + '" colspan="3">' +
+      '<td class="' + (
+        this.calendar.theme.getClass('tableListHeading') ||
+        this.calendar.theme.getClass('widgetHeader')
+      ) + '" colspan="3">' +
         (mainFormat ?
           this.buildGotoAnchorHtml(
             dayDate,

+ 6 - 3
src/theme/Bootstrap4Theme.ts

@@ -7,7 +7,8 @@ Bootstrap4Theme.prototype.classes = {
   widget: 'fc-bootstrap4',
 
   tableGrid: 'table-bordered', // avoid `table` class b/c don't want margins. only border color
-  tableList: 'table table-striped', // `table` class creates bottom margin but who cares
+  tableList: 'table', // `table` class creates bottom margin but who cares
+  tableListHeading: 'table-active',
 
   buttonGroup: 'btn-group',
   button: 'btn btn-primary',
@@ -21,8 +22,10 @@ Bootstrap4Theme.prototype.classes = {
   popoverContent: 'card-body',
 
   // day grid
-  headerRow: 'table-bordered', // avoid `panel` class b/c don't want margins/radius. only border color
-  dayRow: 'table-bordered', // "
+  // for left/right border color when border is inset from edges (all-day in agenda view)
+  // avoid `table` class b/c don't want margins/padding/structure. only border color.
+  headerRow: 'table-bordered',
+  dayRow: 'table-bordered',
 
   // list view
   listView: 'card card-primary'

+ 6 - 3
src/theme/BootstrapTheme.ts

@@ -7,7 +7,8 @@ BootstrapTheme.prototype.classes = {
   widget: 'fc-bootstrap3',
 
   tableGrid: 'table-bordered', // avoid `table` class b/c don't want margins. only border color
-  tableList: 'table table-striped', // `table` class creates bottom margin but who cares
+  tableList: 'table', // `table` class creates bottom margin but who cares
+  tableListHeading: 'active',
 
   buttonGroup: 'btn-group',
   button: 'btn btn-default',
@@ -21,8 +22,10 @@ BootstrapTheme.prototype.classes = {
   popoverContent: 'panel-body',
 
   // day grid
-  headerRow: 'panel-default', // avoid `panel` class b/c don't want margins/radius. only border color
-  dayRow: 'panel-default', // "
+  // for left/right border color when border is inset from edges (all-day in agenda view)
+  // avoid `panel` class b/c don't want margins/radius. only border color.
+  headerRow: 'panel-default',
+  dayRow: 'panel-default',
 
   // list view
   listView: 'panel panel-default'