mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-56511 theme_boost: Update to Bootstrap 4 stable
Behat fixes by David Monllao <davidm@moodle.com> - Blocks - Modals - Messaging styling - Breadcrumb - Pagination - Course & categories management
This commit is contained in:
parent
20bf0c45ff
commit
3ec69c2ece
@ -39,7 +39,7 @@
|
||||
</h2>
|
||||
<div>{{{framework.description}}}</div>
|
||||
<h3>{{#str}}competencies, core_competency{{/str}}</h3>
|
||||
<div class="row-fluid">
|
||||
<div class="row-fluid row">
|
||||
<div class="span6 col-lg-6">
|
||||
<p>
|
||||
<form data-region="filtercompetencies" data-frameworkid="{{framework.id}}" class="form-inline">
|
||||
@ -56,7 +56,7 @@
|
||||
</div>
|
||||
|
||||
<div class="span6 card col-lg-6">
|
||||
<div class="card-block">
|
||||
<div class="card-block card-body">
|
||||
<div class="card-title">
|
||||
<h4 data-region="selected-competency">{{#str}}selectedcompetency, tool_lp{{/str}}</h4>
|
||||
<span data-region="competencyactionsmenu" class="pull-xs-right">
|
||||
|
@ -127,12 +127,6 @@ abstract class base_moodleform extends moodleform {
|
||||
*/
|
||||
public function definition_after_data() {
|
||||
$buttonarray = array();
|
||||
$buttonarray[] = $this->_form->createElement(
|
||||
'submit',
|
||||
'submitbutton',
|
||||
get_string($this->uistage->get_ui()->get_name().'stage'.$this->uistage->get_stage().'action', 'backup'),
|
||||
array('class' => 'proceedbutton')
|
||||
);
|
||||
if (!$this->uistage->is_first_stage()) {
|
||||
$buttonarray[] = $this->_form->createElement('submit', 'previous', get_string('previousstage', 'backup'));
|
||||
} else if ($this->uistage instanceof backup_ui_stage) {
|
||||
@ -141,6 +135,12 @@ abstract class base_moodleform extends moodleform {
|
||||
array('class' => 'oneclickbackup'));
|
||||
}
|
||||
$buttonarray[] = $this->_form->createElement('cancel', 'cancel', get_string('cancel'), array('class' => 'confirmcancel'));
|
||||
$buttonarray[] = $this->_form->createElement(
|
||||
'submit',
|
||||
'submitbutton',
|
||||
get_string($this->uistage->get_ui()->get_name().'stage'.$this->uistage->get_stage().'action', 'backup'),
|
||||
array('class' => 'proceedbutton')
|
||||
);
|
||||
$this->_form->addGroup($buttonarray, 'buttonar', '', array(' '), false);
|
||||
$this->_form->closeHeaderBefore('buttonar');
|
||||
|
||||
|
@ -395,7 +395,7 @@ class core_backup_renderer extends plugin_renderer_base {
|
||||
$count ++;
|
||||
$html = html_writer::start_tag('div', array('class' => 'detail-pair'));
|
||||
$html .= html_writer::tag('label', $label, array('class' => 'detail-pair-label', 'for' => 'detail-pair-value-'.$count));
|
||||
$html .= html_writer::tag('div', $value, array('class' => 'detail-pair-value', 'name' => 'detail-pair-value-'.$count));
|
||||
$html .= html_writer::tag('div', $value, array('class' => 'detail-pair-value pl-2', 'name' => 'detail-pair-value-'.$count));
|
||||
$html .= html_writer::end_tag('div');
|
||||
return $html;
|
||||
}
|
||||
@ -792,7 +792,7 @@ class core_backup_renderer extends plugin_renderer_base {
|
||||
$url = $component->get_url();
|
||||
|
||||
$output = html_writer::start_tag('div', array('class' => 'restore-course-search form-inline m-b-1'));
|
||||
$output .= html_writer::start_tag('div', array('class' => 'rcs-results'));
|
||||
$output .= html_writer::start_tag('div', array('class' => 'rcs-results w-100'));
|
||||
|
||||
$table = new html_table();
|
||||
$table->head = array('', get_string('name'), get_string('description'));
|
||||
|
@ -52,7 +52,7 @@
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hidden-md-down col-lg-5 col-xl-4 text-truncate">
|
||||
<div class="hidden-md-down d-none d-md-block col-lg-5 col-xl-4 text-truncate">
|
||||
{{#action.actionable}}
|
||||
<a href="{{{action.url}}}">{{action.name}}</a>
|
||||
{{#action.itemcount}}
|
||||
|
@ -27,17 +27,13 @@
|
||||
}
|
||||
}}
|
||||
<div class="course-info-container" id="course-info-container-{{id}}">
|
||||
<div class="hidden-sm-up hidden-tablet hidden-phone">
|
||||
<div class="d-sm-none d-lg-block">
|
||||
{{> block_myoverview/progress-chart}}
|
||||
<h4 class="h5"><a href="{{viewurl}}" class="{{^visible}}dimmed{{/visible}}">{{{fullnamedisplay}}}</a></h4>
|
||||
</div>
|
||||
<div class="hidden-sm-down hidden-tablet hidden-desktop">
|
||||
{{> block_myoverview/progress-chart}}
|
||||
<h4 class="h5"><a href="{{viewurl}}" class="{{^visible}}dimmed{{/visible}}">{{{fullnamedisplay}}}</a></h4>
|
||||
</div>
|
||||
<div class="hidden-xs-down hidden-md-up visible-tablet">
|
||||
<div class="d-none d-sm-block d-lg-none visible-tablet">
|
||||
<div class="media">
|
||||
<div class="media-left">
|
||||
<div class="media-left pr-3">
|
||||
<div class="media-object">
|
||||
{{> block_myoverview/progress-chart}}
|
||||
</div>
|
||||
|
@ -27,27 +27,21 @@
|
||||
}
|
||||
}}
|
||||
<div class="col-lg-6">
|
||||
<div class="card m-b-1 courses-view-course-item">
|
||||
<div class="card-block course-info-container" id="course-info-container-{{id}}">
|
||||
<div class="hidden-sm-up hidden-phone">
|
||||
{{> block_myoverview/progress-chart}}
|
||||
<h4 class="h5"><a href="{{viewurl}}" class="{{^visible}}dimmed{{/visible}}">{{{fullnamedisplay}}}</a></h4>
|
||||
</div>
|
||||
<div class="hidden-xs-down visible-phone">
|
||||
<div class="media">
|
||||
<div class="media-left">
|
||||
<div class="media-object">
|
||||
{{> block_myoverview/progress-chart}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<h4 class="h5"><a href="{{viewurl}}" class="{{^visible}}dimmed{{/visible}}">{{{fullnamedisplay}}}</a></h4>
|
||||
</div>
|
||||
<div class="card mb-3 courses-view-course-item">
|
||||
<div class="card-body course-info-container" id="course-info-container-{{id}}">
|
||||
|
||||
<div class="media">
|
||||
<div class="mr-2">
|
||||
{{> block_myoverview/progress-chart}}
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<h4 class="h5"><a href="{{viewurl}}" class="{{^visible}}dimmed{{/visible}}">{{{fullnamedisplay}}}</a></h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="text-muted">
|
||||
{{#shortentext}} 140, {{summary}}{{/shortentext}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -24,21 +24,27 @@
|
||||
}}
|
||||
<div id="courses-view-{{uniqid}}" data-region="courses-view">
|
||||
{{#hascourses}}
|
||||
<div class="text-xs-center text-center">
|
||||
<div class="btn-group m-y-2" role="group" data-toggle="btns">
|
||||
<a class="btn btn-default active" href="#myoverview_courses_view_in_progress" data-toggle="tab">
|
||||
{{#str}} inprogress, block_myoverview {{/str}}
|
||||
</a>
|
||||
<a class="btn btn-default" href="#myoverview_courses_view_future" data-toggle="tab">
|
||||
{{#str}} future, block_myoverview {{/str}}
|
||||
</a>
|
||||
<a class="btn btn-default" href="#myoverview_courses_view_past" data-toggle="tab">
|
||||
{{#str}} past, block_myoverview {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="d-flex justify-content-center">
|
||||
<ul class="nav nav-pills my-5">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#myoverview_courses_view_in_progress" data-toggle="tab">
|
||||
{{#str}} inprogress, block_myoverview {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#myoverview_courses_view_future" data-toggle="tab">
|
||||
{{#str}} future, block_myoverview {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#myoverview_courses_view_past" data-toggle="tab">
|
||||
{{#str}} past, block_myoverview {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active fade in" id="myoverview_courses_view_in_progress">
|
||||
<div class="tab-pane active fade show" id="myoverview_courses_view_in_progress">
|
||||
{{#inprogress}}
|
||||
{{< block_myoverview/courses-view-by-status }}
|
||||
{{$id}}courses-view-in-progress{{/id}}
|
||||
@ -48,12 +54,12 @@
|
||||
{{/ block_myoverview/courses-view-by-status }}
|
||||
{{/inprogress}}
|
||||
{{^inprogress}}
|
||||
<div class="text-xs-center text-center m-t-3">
|
||||
<div class="justify-content-center text-center mt-5">
|
||||
<img class="empty-placeholder-image-lg"
|
||||
src="{{urls.nocourses}}"
|
||||
alt="{{#str}} nocoursesinprogress, block_myoverview {{/str}}"
|
||||
role="presentation">
|
||||
<p class="text-muted m-t-1">{{#str}} nocoursesinprogress, block_myoverview {{/str}}</p>
|
||||
<p class="text-muted mt-3">{{#str}} nocoursesinprogress, block_myoverview {{/str}}</p>
|
||||
</div>
|
||||
{{/inprogress}}
|
||||
</div>
|
||||
@ -67,12 +73,12 @@
|
||||
{{/ block_myoverview/courses-view-by-status }}
|
||||
{{/future}}
|
||||
{{^future}}
|
||||
<div class="text-xs-center text-center m-t-3">
|
||||
<div class="justify-content-center text-center mt-5">
|
||||
<img class="empty-placeholder-image-lg"
|
||||
src="{{urls.nocourses}}"
|
||||
alt="{{#str}} nocoursesfuture, block_myoverview {{/str}}"
|
||||
role="presentation">
|
||||
<p class="text-muted m-t-1">{{#str}} nocoursesfuture, block_myoverview {{/str}}</p>
|
||||
<p class="text-muted mt-3">{{#str}} nocoursesfuture, block_myoverview {{/str}}</p>
|
||||
</div>
|
||||
{{/future}}
|
||||
</div>
|
||||
@ -86,33 +92,24 @@
|
||||
{{/ block_myoverview/courses-view-by-status }}
|
||||
{{/past}}
|
||||
{{^past}}
|
||||
<div class="text-xs-center text-center m-t-3">
|
||||
<div class="justify-content-center text-center mt-5">
|
||||
<img class="empty-placeholder-image-lg"
|
||||
src="{{urls.nocourses}}"
|
||||
alt="{{#str}} nocoursespast, block_myoverview {{/str}}"
|
||||
role="presentation">
|
||||
<p class="text-muted m-t-1">{{#str}} nocoursespast, block_myoverview {{/str}}</p>
|
||||
<p class="text-muted mt-3">{{#str}} nocoursespast, block_myoverview {{/str}}</p>
|
||||
</div>
|
||||
{{/past}}
|
||||
</div>
|
||||
</div>
|
||||
{{/hascourses}}
|
||||
{{^hascourses}}
|
||||
<div class="text-xs-center text-center m-t-3">
|
||||
<div class="justify-content-center text-center mt-5">
|
||||
<img class="empty-placeholder-image-lg"
|
||||
src="{{urls.nocourses}}"
|
||||
alt="{{#str}} nocourses, block_myoverview {{/str}}"
|
||||
role="presentation">
|
||||
<p class="text-muted m-t-1">{{#str}} nocourses, block_myoverview {{/str}}</p>
|
||||
<p class="text-muted mt-3">{{#str}} nocourses, block_myoverview {{/str}}</p>
|
||||
</div>
|
||||
{{/hascourses}}
|
||||
</div>
|
||||
{{#js}}
|
||||
require(['jquery', 'core/custom_interaction_events'], function($, customEvents) {
|
||||
var root = $('#courses-view-{{uniqid}}');
|
||||
customEvents.define(root, [customEvents.events.activate]);
|
||||
root.on(customEvents.events.activate, '[data-toggle="btns"] > .btn', function() {
|
||||
root.find('.btn.active').removeClass('active');
|
||||
});
|
||||
});
|
||||
{{/js}}
|
||||
</div>
|
@ -57,7 +57,7 @@
|
||||
<div class="col-lg-5 text-xs-right text-lg-left text-truncate">
|
||||
{{#userdate}} {{timesort}}, {{#str}} strftimerecent {{/str}} {{/userdate}}
|
||||
</div>
|
||||
<div class="hidden-md-down col-lg-7 text-truncate">
|
||||
<div class="hidden-md-down d-none d-md-block col-lg-7 text-truncate">
|
||||
{{#action.actionable}}
|
||||
<a href="{{{action.url}}}">{{action.name}}</a>
|
||||
{{#action.itemcount}}
|
||||
|
@ -23,32 +23,27 @@
|
||||
{}
|
||||
}}
|
||||
<div id="timeline-view-{{uniqid}}" data-region="timeline-view">
|
||||
<div class="row text-xs-center">
|
||||
<div class="btn-group m-t-2" role="group" data-toggle="btns">
|
||||
<a class="btn btn-default active" href="#myoverview_timeline_dates" data-toggle="tab">
|
||||
<div class="d-flex justify-content-center">
|
||||
<ul class="nav nav-pills my-5">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#myoverview_timeline_dates" data-toggle="tab">
|
||||
{{#str}} sortbydates, block_myoverview {{/str}}
|
||||
</a>
|
||||
<a class="btn btn-default" href="#myoverview_timeline_courses" data-toggle="tab">
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#myoverview_timeline_courses" data-toggle="tab">
|
||||
{{#str}} sortbycourses, block_myoverview {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active fade in" id="myoverview_timeline_dates">
|
||||
<div class="tab-pane active fade show" id="myoverview_timeline_dates">
|
||||
{{> block_myoverview/timeline-view-dates }}
|
||||
</div>
|
||||
<div class="tab-pane fade" id="myoverview_timeline_courses">
|
||||
{{> block_myoverview/timeline-view-courses }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{#js}}
|
||||
require(['jquery', 'core/custom_interaction_events'], function($, customEvents) {
|
||||
var root = $('#timeline-view-{{uniqid}}');
|
||||
customEvents.define(root, [customEvents.events.activate]);
|
||||
root.on(customEvents.events.activate, '[data-toggle="btns"] > .btn', function() {
|
||||
root.find('.btn.active').removeClass('active');
|
||||
});
|
||||
});
|
||||
{{/js}}
|
||||
</div>
|
@ -108,7 +108,7 @@ class behat_blocks extends behat_base {
|
||||
}
|
||||
|
||||
$this->execute('behat_general::i_click_on_in_the',
|
||||
array("a[role='menuitem']", "css_element", $this->escape($blockname), "block")
|
||||
array("a[role='button']", "css_element", $this->escape($blockname), "block")
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
||||
{{> core_calendar/header }}
|
||||
{{> core_calendar/month_navigation }}
|
||||
{{> core/overlay_loading}}
|
||||
<table id="month-detailed-{{uniqid}}" class="calendarmonth calendartable card-deck m-b-0">
|
||||
<table id="month-detailed-{{uniqid}}" class="calendarmonth calendartable m-b-0">
|
||||
<thead>
|
||||
<tr>
|
||||
{{# daynames }}
|
||||
@ -71,7 +71,7 @@
|
||||
data-drop-zone="month-view-day"
|
||||
data-region="day"
|
||||
data-new-event-timestamp="{{neweventtimestamp}}">
|
||||
<div class="hidden-sm-down hidden-phone text-xs-center">
|
||||
<div class="d-none d-md-block hidden-phone text-xs-center">
|
||||
{{#hasevents}}
|
||||
<a data-action="view-day-link" href="{{viewdaylink}}" class="day" title="{{viewdaylinktitle}}">{{mday}}</a>
|
||||
{{/hasevents}}
|
||||
@ -119,7 +119,7 @@
|
||||
</div>
|
||||
{{/hasevents}}
|
||||
</div>
|
||||
<div class="hidden-md-up hidden-desktop hidden-tablet">
|
||||
<div class="d-md-none hidden-desktop hidden-tablet">
|
||||
{{#hasevents}}
|
||||
<a data-action="view-day-link" href="{{viewdaylink}}" class="day" title="{{viewdaylinktitle}}">{{mday}}</a>
|
||||
{{/hasevents}}
|
||||
|
@ -139,7 +139,7 @@ class core_course_management_renderer extends plugin_renderer_base {
|
||||
$listing = coursecat::get(0)->get_children();
|
||||
|
||||
$attributes = array(
|
||||
'class' => 'ml',
|
||||
'class' => 'ml-1',
|
||||
'role' => 'tree',
|
||||
'aria-labelledby' => 'category-listing-title'
|
||||
);
|
||||
@ -288,7 +288,7 @@ class core_course_management_renderer extends plugin_renderer_base {
|
||||
$html .= html_writer::end_div();
|
||||
if ($isexpanded) {
|
||||
$html .= html_writer::start_tag('ul',
|
||||
array('class' => 'ml', 'role' => 'group', 'id' => 'subcategoryof'.$category->id));
|
||||
array('class' => 'ml-1', 'role' => 'group', 'id' => 'subcategoryof'.$category->id));
|
||||
$catatlevel = \core_course\management\helper::get_expanded_categories($category->path);
|
||||
$catatlevel[] = array_shift($selectedcategories);
|
||||
$catatlevel = array_unique($catatlevel);
|
||||
@ -528,7 +528,7 @@ class core_course_management_renderer extends plugin_renderer_base {
|
||||
array('id' => 'course-listing-title', 'tabindex' => '0'));
|
||||
$html .= $this->course_listing_actions($category, $course, $perpage);
|
||||
$html .= $this->listing_pagination($category, $page, $perpage);
|
||||
$html .= html_writer::start_tag('ul', array('class' => 'ml', 'role' => 'group'));
|
||||
$html .= html_writer::start_tag('ul', array('class' => 'ml-1', 'role' => 'group'));
|
||||
foreach ($category->get_courses($options) as $listitem) {
|
||||
$html .= $this->course_listitem($category, $listitem, $courseid);
|
||||
}
|
||||
@ -1109,7 +1109,7 @@ class core_course_management_renderer extends plugin_renderer_base {
|
||||
));
|
||||
$html .= html_writer::tag('h3', get_string('courses'));
|
||||
$html .= $this->search_pagination($totalcourses, $page, $perpage);
|
||||
$html .= html_writer::start_tag('ul', array('class' => 'ml'));
|
||||
$html .= html_writer::start_tag('ul', array('class' => 'ml-1'));
|
||||
foreach ($courses as $listitem) {
|
||||
$i++;
|
||||
if ($i == $totalcourses) {
|
||||
|
@ -16,7 +16,7 @@ Feature: We can change the visibility of categories in the management interface.
|
||||
And I log in as "admin"
|
||||
And I go to the courses management page
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#category-listing ul" "css_element"
|
||||
And category in management listing should be visible "CAT1"
|
||||
And I toggle visibility of category "CAT1" in management listing
|
||||
# Redirect.
|
||||
@ -38,7 +38,7 @@ Feature: We can change the visibility of categories in the management interface.
|
||||
And I go to the courses management page
|
||||
And I start watching to see if a new page loads
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#category-listing ul" "css_element"
|
||||
And category in management listing should be visible "CAT1"
|
||||
And I toggle visibility of category "CAT1" in management listing
|
||||
And a new page should not have loaded since I started watching
|
||||
@ -57,28 +57,28 @@ Feature: We can change the visibility of categories in the management interface.
|
||||
And I log in as "admin"
|
||||
And I go to the courses management page
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element"
|
||||
And I should not see "Cat 2" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#category-listing ul" "css_element"
|
||||
And I should not see "Cat 2" in the "#category-listing ul" "css_element"
|
||||
And category in management listing should be visible "CAT1"
|
||||
And I click on category "Cat 1" in the management interface
|
||||
# Redirect.
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#category-listing ul" "css_element"
|
||||
And I should see "Cat 2" in the "#category-listing ul" "css_element"
|
||||
And category in management listing should be visible "CAT1"
|
||||
And category in management listing should be visible "CAT2"
|
||||
And I toggle visibility of category "CAT2" in management listing
|
||||
# Redirect.
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#category-listing ul" "css_element"
|
||||
And I should see "Cat 2" in the "#category-listing ul" "css_element"
|
||||
And category in management listing should be visible "CAT1"
|
||||
And category in management listing should be dimmed "CAT2"
|
||||
And I toggle visibility of category "CAT2" in management listing
|
||||
# Redirect.
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#category-listing ul" "css_element"
|
||||
And I should see "Cat 2" in the "#category-listing ul" "css_element"
|
||||
And category in management listing should be visible "CAT1"
|
||||
And category in management listing should be visible "CAT2"
|
||||
|
||||
@ -94,8 +94,8 @@ Feature: We can change the visibility of categories in the management interface.
|
||||
And I go to the courses management page
|
||||
And I start watching to see if a new page loads
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element"
|
||||
And I should not see "Cat 2" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#category-listing ul" "css_element"
|
||||
And I should not see "Cat 2" in the "#category-listing ul" "css_element"
|
||||
And category in management listing should be visible "CAT1"
|
||||
And I click to expand category "CAT1" in the management interface
|
||||
And a new page should not have loaded since I started watching
|
||||
@ -130,13 +130,13 @@ Feature: We can change the visibility of categories in the management interface.
|
||||
And I click on category "Cat 1" in the management interface
|
||||
# Redirect.
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 3" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 4" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Course 1" in the "#course-listing ul.ml" "css_element"
|
||||
And I should see "Course 2" in the "#course-listing ul.ml" "css_element"
|
||||
And I should see "Course 3" in the "#course-listing ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#category-listing ul" "css_element"
|
||||
And I should see "Cat 2" in the "#category-listing ul" "css_element"
|
||||
And I should see "Cat 3" in the "#category-listing ul" "css_element"
|
||||
And I should see "Cat 4" in the "#category-listing ul" "css_element"
|
||||
And I should see "Course 1" in the "#course-listing ul" "css_element"
|
||||
And I should see "Course 2" in the "#course-listing ul" "css_element"
|
||||
And I should see "Course 3" in the "#course-listing ul" "css_element"
|
||||
And category in management listing should be visible "CAT1"
|
||||
And category in management listing should be visible "CAT2"
|
||||
And category in management listing should be visible "CAT3"
|
||||
@ -207,13 +207,13 @@ Feature: We can change the visibility of categories in the management interface.
|
||||
And a new page should have loaded since I started watching
|
||||
And I start watching to see if a new page loads
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 3" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 4" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Course 1" in the "#course-listing ul.ml" "css_element"
|
||||
And I should see "Course 2" in the "#course-listing ul.ml" "css_element"
|
||||
And I should see "Course 3" in the "#course-listing ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#category-listing ul" "css_element"
|
||||
And I should see "Cat 2" in the "#category-listing ul" "css_element"
|
||||
And I should see "Cat 3" in the "#category-listing ul" "css_element"
|
||||
And I should see "Cat 4" in the "#category-listing ul" "css_element"
|
||||
And I should see "Course 1" in the "#course-listing ul" "css_element"
|
||||
And I should see "Course 2" in the "#course-listing ul" "css_element"
|
||||
And I should see "Course 3" in the "#course-listing ul" "css_element"
|
||||
And category in management listing should be visible "CAT1"
|
||||
And category in management listing should be visible "CAT2"
|
||||
And category in management listing should be visible "CAT3"
|
||||
@ -223,7 +223,7 @@ Feature: We can change the visibility of categories in the management interface.
|
||||
And course in management listing should be visible "C3"
|
||||
And I toggle visibility of course "C2" in management listing
|
||||
And a new page should not have loaded since I started watching
|
||||
And I should see "Cat 3" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 3" in the "#category-listing ul" "css_element"
|
||||
And course in management listing should be visible "C1"
|
||||
And course in management listing should be dimmed "C2"
|
||||
And course in management listing should be visible "C3"
|
||||
|
@ -56,9 +56,9 @@ Feature: Test category management actions
|
||||
And I log in as "admin"
|
||||
And I go to the courses management page
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 3" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#category-listing ul" "css_element"
|
||||
And I should see "Cat 2" in the "#category-listing ul" "css_element"
|
||||
And I should see "Cat 3" in the "#category-listing ul" "css_element"
|
||||
And I click on "delete" action for "Cat 2" in management category listing
|
||||
# Redirect
|
||||
And I should see "Delete category: Cat 2"
|
||||
@ -67,9 +67,9 @@ Feature: Test category management actions
|
||||
And I press "Cancel"
|
||||
# Redirect
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 3" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#category-listing ul" "css_element"
|
||||
And I should see "Cat 2" in the "#category-listing ul" "css_element"
|
||||
And I should see "Cat 3" in the "#category-listing ul" "css_element"
|
||||
And I click on "delete" action for "Cat 2" in management category listing
|
||||
# Redirect
|
||||
And I should see "Delete category: Cat 2"
|
||||
@ -82,9 +82,9 @@ Feature: Test category management actions
|
||||
And I press "Continue"
|
||||
# Redirect
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element"
|
||||
And I should not see "Cat 2" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 3" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#category-listing ul" "css_element"
|
||||
And I should not see "Cat 2" in the "#category-listing ul" "css_element"
|
||||
And I should see "Cat 3" in the "#category-listing ul" "css_element"
|
||||
And I click on "delete" action for "Cat 3" in management category listing
|
||||
# Redirect
|
||||
And I should see "Delete category: Cat 3"
|
||||
@ -98,10 +98,10 @@ Feature: Test category management actions
|
||||
And I press "Continue"
|
||||
# Redirect
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element"
|
||||
And I should not see "Cat 2" in the "#category-listing ul.ml" "css_element"
|
||||
And I should not see "Cat 3" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Course 1" in the "#course-listing ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#category-listing ul" "css_element"
|
||||
And I should not see "Cat 2" in the "#category-listing ul" "css_element"
|
||||
And I should not see "Cat 3" in the "#category-listing ul" "css_element"
|
||||
And I should see "Course 1" in the "#course-listing ul" "css_element"
|
||||
|
||||
Scenario: Test I can assign roles for a category through the management interface.
|
||||
Given the following "categories" exist:
|
||||
@ -222,9 +222,9 @@ Feature: Test category management actions
|
||||
And I log in as "admin"
|
||||
And I go to the courses management page
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 3" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#category-listing ul" "css_element"
|
||||
And I should see "Cat 2" in the "#category-listing ul" "css_element"
|
||||
And I should see "Cat 3" in the "#category-listing ul" "css_element"
|
||||
And I select category "Cat 2" in the management interface
|
||||
And I select category "Cat 3" in the management interface
|
||||
And I set the field "menumovecategoriesto" to "Cat 1"
|
||||
@ -253,9 +253,9 @@ Feature: Test category management actions
|
||||
And I log in as "admin"
|
||||
And I go to the courses management page
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 3" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#category-listing ul" "css_element"
|
||||
And I should see "Cat 2" in the "#category-listing ul" "css_element"
|
||||
And I should see "Cat 3" in the "#category-listing ul" "css_element"
|
||||
And the "movecategoriesto" "select" should be disabled
|
||||
And the "resortcategoriesby" "select" should be disabled
|
||||
And the "resortcoursesby" "select" should be disabled
|
||||
@ -298,8 +298,8 @@ Feature: Test category management actions
|
||||
And I click on category "Cat 3" in the management interface
|
||||
#Redirect
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Course 1" in the "#course-listing ul.ml" "css_element"
|
||||
And I should see "Course 2" in the "#course-listing ul.ml" "css_element"
|
||||
And I should see "Course 1" in the "#course-listing ul" "css_element"
|
||||
And I should see "Course 2" in the "#course-listing ul" "css_element"
|
||||
And the "movecategoriesto" "select" should be disabled
|
||||
And the "resortcategoriesby" "select" should be disabled
|
||||
And the "resortcoursesby" "select" should be disabled
|
||||
|
@ -99,47 +99,47 @@ Feature: Course category management interface performs as expected
|
||||
And I log in as "admin"
|
||||
And I go to the courses management page
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 2-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 2-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I click on "Cat 1" "link"
|
||||
# Redirect.
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 2-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 2-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I click on "Cat 1-1" "link"
|
||||
# Redirect.
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 2-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 2-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I click on "Cat 2" "link"
|
||||
# Redirect.
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 2-1-1" in the "#course-category-listings ul" "css_element"
|
||||
|
||||
# This is similar to the above scenario except here we are going to use AJAX
|
||||
# to load the categories.
|
||||
@ -170,74 +170,74 @@ Feature: Course category management interface performs as expected
|
||||
And I go to the courses management page
|
||||
And I start watching to see if a new page loads
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 2-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 2-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I click to expand category "CAT1" in the management interface
|
||||
And a new page should not have loaded since I started watching
|
||||
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 2-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 2-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I click to expand category "CAT3" in the management interface
|
||||
And a new page should not have loaded since I started watching
|
||||
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 2-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 2-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I click to expand category "CAT2" in the management interface
|
||||
And a new page should not have loaded since I started watching
|
||||
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 2-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I click to expand category "CAT7" in the management interface
|
||||
And a new page should not have loaded since I started watching
|
||||
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I click to expand category "CAT1" in the management interface
|
||||
And a new page should not have loaded since I started watching
|
||||
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I click to expand category "CAT1" in the management interface
|
||||
And a new page should not have loaded since I started watching
|
||||
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2-1-1" in the "#course-category-listings ul" "css_element"
|
||||
|
||||
@javascript
|
||||
Scenario Outline: Top level categories are displayed correctly when resorted
|
||||
@ -746,51 +746,51 @@ Feature: Course category management interface performs as expected
|
||||
And I go to the courses management page
|
||||
And I start watching to see if a new page loads
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 2-1" in the "#course-category-listings ul" "css_element"
|
||||
And I click to expand category "CAT2" in the management interface
|
||||
And a new page should not have loaded since I started watching
|
||||
And I click to expand category "CAT7" in the management interface
|
||||
And a new page should not have loaded since I started watching
|
||||
And I click to expand category "CAT9" in the management interface
|
||||
And a new page should not have loaded since I started watching
|
||||
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2-1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 2-1-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2-1-2-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2-1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 2-1-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2-1-2-1" in the "#course-category-listings ul" "css_element"
|
||||
And I click on "Cat 1" category in the management category listing
|
||||
And a new page should have loaded since I started watching
|
||||
And I start watching to see if a new page loads
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2-1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 2-1-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2-1-2-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2-1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 2-1-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2-1-2-1" in the "#course-category-listings ul" "css_element"
|
||||
And I click on "resortbyidnumber" action for "Cat 1" in management category listing
|
||||
And a new page should have loaded since I started watching
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2-1-2" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat 2-1-1-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 2-1-2-1" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2-1-2" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat 2-1-1-1" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat 2-1-2-1" in the "#course-category-listings ul" "css_element"
|
||||
|
||||
@javascript
|
||||
Scenario: Test category expansion after deletion
|
||||
@ -806,19 +806,19 @@ Feature: Course category management interface performs as expected
|
||||
And I go to the courses management page
|
||||
And I start watching to see if a new page loads
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat A (1)" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat B (2)" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat C (1-1)" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat D (2-1)" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat E (2-1-1)" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat A (1)" in the "#course-category-listings ul" "css_element"
|
||||
And I should see "Cat B (2)" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat C (1-1)" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat D (2-1)" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat E (2-1-1)" in the "#course-category-listings ul" "css_element"
|
||||
And I click to expand category "CAT1" in the management interface
|
||||
And I should see "Cat C (1-1)" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat C (1-1)" in the "#course-category-listings ul" "css_element"
|
||||
And a new page should not have loaded since I started watching
|
||||
And I click to expand category "CAT2" in the management interface
|
||||
And I should see "Cat D (2-1)" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat D (2-1)" in the "#course-category-listings ul" "css_element"
|
||||
And a new page should not have loaded since I started watching
|
||||
And I click to expand category "CAT4" in the management interface
|
||||
And I should see "Cat E (2-1-1)" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat E (2-1-1)" in the "#course-category-listings ul" "css_element"
|
||||
And a new page should not have loaded since I started watching
|
||||
And I click on "delete" action for "Cat B (2)" in management category listing
|
||||
And a new page should have loaded since I started watching
|
||||
@ -833,5 +833,5 @@ Feature: Course category management interface performs as expected
|
||||
And I press "Continue"
|
||||
And a new page should have loaded since I started watching
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat A (1)" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should not see "Cat B (2)" in the "#course-category-listings ul.ml" "css_element"
|
||||
And I should see "Cat A (1)" in the "#course-category-listings ul" "css_element"
|
||||
And I should not see "Cat B (2)" in the "#course-category-listings ul" "css_element"
|
||||
|
@ -19,8 +19,8 @@ Feature: We can change the visibility of courses in the management interface.
|
||||
And I click on category "Cat 1" in the management interface
|
||||
# Redirect.
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Course 1" in the "#course-listing ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#category-listing ul" "css_element"
|
||||
And I should see "Course 1" in the "#course-listing ul" "css_element"
|
||||
And category in management listing should be visible "CAT1"
|
||||
And course in management listing should be visible "C1"
|
||||
And I toggle visibility of course "C1" in management listing
|
||||
@ -68,8 +68,8 @@ Feature: We can change the visibility of courses in the management interface.
|
||||
And a new page should have loaded since I started watching
|
||||
And I start watching to see if a new page loads
|
||||
And I should see the "Course categories and courses" management page
|
||||
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element"
|
||||
And I should see "Course 1" in the "#course-listing ul.ml" "css_element"
|
||||
And I should see "Cat 1" in the "#category-listing ul" "css_element"
|
||||
And I should see "Course 1" in the "#course-listing ul" "css_element"
|
||||
And category in management listing should be visible "CAT1"
|
||||
And course in management listing should be visible "C1"
|
||||
And I toggle visibility of course "C1" in management listing
|
||||
@ -98,7 +98,7 @@ Feature: We can change the visibility of courses in the management interface.
|
||||
And I click on "Courses" "link" in the ".view-mode-selector" "css_element"
|
||||
And a new page should have loaded since I started watching
|
||||
And I start watching to see if a new page loads
|
||||
And I should see "Course 1" in the "#course-listing ul.ml" "css_element"
|
||||
And I should see "Course 1" in the "#course-listing ul" "css_element"
|
||||
And I toggle visibility of course "C1" in management listing
|
||||
And a new page should not have loaded since I started watching
|
||||
And course in management listing should be dimmed "C1"
|
||||
|
@ -20,7 +20,7 @@ Feature: Courses can be searched for and moved in bulk.
|
||||
Scenario: Search courses finds correct results
|
||||
Given I log in as "admin"
|
||||
And I go to the courses management page
|
||||
When I set the field "Search courses" to "Biology"
|
||||
When I set the field "coursesearchbox" to "Biology"
|
||||
And I press "Go"
|
||||
Then I should see "Biology Y1"
|
||||
And I should see "Biology Y2"
|
||||
@ -31,7 +31,7 @@ Feature: Courses can be searched for and moved in bulk.
|
||||
Scenario: Search courses and move results in bulk
|
||||
Given I log in as "admin"
|
||||
And I go to the courses management page
|
||||
And I set the field "Search courses" to "Biology"
|
||||
And I set the field "coursesearchbox" to "Biology"
|
||||
And I press "Go"
|
||||
When I select course "Biology Y1" in the management interface
|
||||
And I select course "Biology Y2" in the management interface
|
||||
|
@ -23,12 +23,12 @@ Feature: Browse course list and return back from enrolment page
|
||||
And I follow "Miscellaneous"
|
||||
And I follow "Sample course"
|
||||
And I press "Continue"
|
||||
Then I should see "Courses" in the ".breadcrumb-nav" "css_element"
|
||||
And I click on "Courses" "link" in the ".breadcrumb-nav" "css_element"
|
||||
Then I should see "Courses" in the ".breadcrumb" "css_element"
|
||||
And I click on "Courses" "link" in the ".breadcrumb" "css_element"
|
||||
And I follow "Sample category"
|
||||
And I am on "Course 1" course homepage
|
||||
And I press "Continue"
|
||||
And I should see "Sample category" in the ".breadcrumb-nav" "css_element"
|
||||
And I should see "Sample category" in the ".breadcrumb" "css_element"
|
||||
|
||||
@javascript
|
||||
Scenario: A user can return to the previous page from enrolment page by clicking navigation links
|
||||
@ -47,7 +47,7 @@ Feature: Browse course list and return back from enrolment page
|
||||
And I expand "Sample category" node
|
||||
And I follow "Course 1"
|
||||
And I press "Continue"
|
||||
Then I should see "Edit profile" in the ".breadcrumb-nav" "css_element"
|
||||
Then I should see "Edit profile" in the ".breadcrumb" "css_element"
|
||||
|
||||
Scenario: User can return to the choice activity from enrolment page
|
||||
Given the following "roles" exist:
|
||||
@ -72,4 +72,4 @@ Feature: Browse course list and return back from enrolment page
|
||||
And I should see "Sorry, only enrolled users are allowed to make choices."
|
||||
And I press "Enrol me in this course"
|
||||
And I press "Continue"
|
||||
Then I should see "Test choice" in the ".breadcrumb-nav" "css_element"
|
||||
Then I should see "Test choice" in the ".breadcrumb" "css_element"
|
||||
|
@ -127,7 +127,7 @@ class behat_partial_named_selector extends \Behat\Mink\Selector\PartialNamedSele
|
||||
XPATH
|
||||
, 'block' => <<<XPATH
|
||||
.//*[@data-block][contains(concat(' ', normalize-space(@class), ' '), concat(' ', %locator%, ' ')) or
|
||||
descendant::*[self::h2|self::h3][normalize-space(.) = %locator%] or
|
||||
descendant::*[self::h2|self::h3|self::h4|self::h5][normalize-space(.) = %locator%] or
|
||||
@aria-label = %locator%]
|
||||
XPATH
|
||||
, 'dialogue' => <<<XPATH
|
||||
@ -143,7 +143,7 @@ XPATH
|
||||
.//div[
|
||||
contains(concat(' ', normalize-space(@class), ' '), ' modal-content ')
|
||||
and
|
||||
normalize-space(descendant::h4[contains(concat(' ', normalize-space(@class), ' '), ' modal-title ')]) = %locator%
|
||||
normalize-space(descendant::*[self::h4 or self::h5][contains(concat(' ', normalize-space(@class), ' '), ' modal-title ')]) = %locator%
|
||||
]
|
||||
|
|
||||
.//div[
|
||||
|
@ -2643,7 +2643,7 @@ class core_renderer extends renderer_base {
|
||||
<div class="filemanager-loading mdl-align" id='filepicker-loading-{$client_id}'>
|
||||
$icon_progress
|
||||
</div>
|
||||
<div id="filepicker-wrapper-{$client_id}" class="mdl-left" style="display:none">
|
||||
<div id="filepicker-wrapper-{$client_id}" class="mdl-left w-100" style="display:none">
|
||||
<div>
|
||||
<input type="button" class="btn btn-secondary fp-btn-choose" id="filepicker-button-{$client_id}" value="{$straddfile}"{$buttonname}/>
|
||||
<span> $maxsize </span>
|
||||
@ -3389,7 +3389,7 @@ EOD;
|
||||
}
|
||||
|
||||
$returnstr .= html_writer::span(
|
||||
html_writer::span($usertextcontents, 'usertext') .
|
||||
html_writer::span($usertextcontents, 'usertext mr-1') .
|
||||
html_writer::span($avatarcontents, $avatarclasses),
|
||||
'userbutton'
|
||||
);
|
||||
|
@ -72,52 +72,52 @@ Feature: Initials bar
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "TestAssignment"
|
||||
When I navigate to "View all submissions" in current page administration
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should see "Cstudent Cstudent"
|
||||
And I click on "A" "link" in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
And I click on "B" "link" in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should not see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "TestAssignment"
|
||||
When I navigate to "View all submissions" in current page administration
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should not see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
And I click on "All" "link" in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
And I click on "All" "link" in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should see "Cstudent Cstudent"
|
||||
@ -131,26 +131,26 @@ Feature: Initials bar
|
||||
And I follow "TestAssignment"
|
||||
When I navigate to "View all submissions" in current page administration
|
||||
And I select "View gradebook" from the "jump" singleselect
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should see "Cstudent Cstudent"
|
||||
And I click on "A" "link" in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
And I click on "B" "link" in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should not see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
@ -158,26 +158,26 @@ Feature: Initials bar
|
||||
And I follow "TestAssignment"
|
||||
When I navigate to "View all submissions" in current page administration
|
||||
And I select "View gradebook" from the "jump" singleselect
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should not see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
And I click on "All" "link" in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
And I click on "All" "link" in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should see "Cstudent Cstudent"
|
||||
@ -195,51 +195,51 @@ Feature: Initials bar
|
||||
And I log in as "teacher"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Participants"
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should see "Cstudent Cstudent"
|
||||
And I click on "A" "link" in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
And I click on "B" "link" in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should not see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Participants"
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should not see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
And I click on "All" "link" in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
And I click on "All" "link" in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should see "Cstudent Cstudent"
|
||||
@ -264,51 +264,51 @@ Feature: Initials bar
|
||||
And I log in as "teacher"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Activity completion" node in "Course administration > Reports"
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should see "Cstudent Cstudent"
|
||||
And I click on "A" "link" in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
And I click on "B" "link" in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should not see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Activity completion" node in "Course administration > Reports"
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should not see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
And I click on "All" "link" in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
And I click on "All" "link" in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.letter.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".letter.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".letter.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I should see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should see "Cstudent Cstudent"
|
||||
|
@ -45,7 +45,7 @@ Feature: Users can edit tags to add description or rename
|
||||
| Description | Description of tag 1 |
|
||||
| Related tags | Dog, Turtle,Fish |
|
||||
And I press "Update"
|
||||
Then "Cat" "text" should exist in the ".breadcrumb-nav" "css_element"
|
||||
Then "Cat" "text" should exist in the ".breadcrumb" "css_element"
|
||||
And "Description of tag 1" "text" should exist in the ".tag-description" "css_element"
|
||||
And I should see "Related tags:" in the ".tag_list" "css_element"
|
||||
And I should see "Dog" in the ".tag_list" "css_element"
|
||||
@ -70,7 +70,7 @@ Feature: Users can edit tags to add description or rename
|
||||
| Related tags | Dog, Turtle,Fish |
|
||||
| Standard | 0 |
|
||||
And I press "Update"
|
||||
Then "Kitten" "text" should exist in the ".breadcrumb-nav" "css_element"
|
||||
Then "Kitten" "text" should exist in the ".breadcrumb" "css_element"
|
||||
And "Description of tag 1" "text" should exist in the ".tag-description" "css_element"
|
||||
And I should see "Related tags:" in the ".tag_list" "css_element"
|
||||
And I should see "Dog" in the ".tag_list" "css_element"
|
||||
@ -79,7 +79,7 @@ Feature: Users can edit tags to add description or rename
|
||||
And I follow "Edit this tag"
|
||||
And I click on "× Dog" "text"
|
||||
And I press "Update"
|
||||
Then "Kitten" "text" should exist in the ".breadcrumb-nav" "css_element"
|
||||
Then "Kitten" "text" should exist in the ".breadcrumb" "css_element"
|
||||
And "Description of tag 1" "text" should exist in the ".tag-description" "css_element"
|
||||
And I should see "Related tags:" in the ".tag_list" "css_element"
|
||||
And I should see "Turtle" in the ".tag_list" "css_element"
|
||||
@ -104,12 +104,12 @@ Feature: Users can edit tags to add description or rename
|
||||
And I set the following fields to these values:
|
||||
| Tag name | Kitten |
|
||||
And I press "Update"
|
||||
Then "Kitten" "text" should exist in the ".breadcrumb-nav" "css_element"
|
||||
Then "Kitten" "text" should exist in the ".breadcrumb" "css_element"
|
||||
And I follow "Edit this tag"
|
||||
And I set the following fields to these values:
|
||||
| Tag name | KITTEN |
|
||||
And I press "Update"
|
||||
And "KITTEN" "text" should exist in the ".breadcrumb-nav" "css_element"
|
||||
And "KITTEN" "text" should exist in the ".breadcrumb" "css_element"
|
||||
And I log out
|
||||
|
||||
@javascript
|
||||
@ -124,7 +124,7 @@ Feature: Users can edit tags to add description or rename
|
||||
| Related tags | Dog, Turtle,Fish |
|
||||
| Standard | 0 |
|
||||
And I press "Update"
|
||||
Then "Default collection" "link" should exist in the ".breadcrumb-nav" "css_element"
|
||||
Then "Default collection" "link" should exist in the ".breadcrumb" "css_element"
|
||||
And I follow "Kitten"
|
||||
And "Description of tag 1" "text" should exist in the ".tag-description" "css_element"
|
||||
And I should see "Related tags:" in the ".tag_list" "css_element"
|
||||
@ -145,12 +145,12 @@ Feature: Users can edit tags to add description or rename
|
||||
And I set the following fields to these values:
|
||||
| Tag name | Kitten |
|
||||
And I press "Update"
|
||||
Then "Default collection" "text" should exist in the ".breadcrumb-nav" "css_element"
|
||||
Then "Default collection" "text" should exist in the ".breadcrumb" "css_element"
|
||||
And I click on "Edit this tag" "link" in the "Kitten" "table_row"
|
||||
And I set the following fields to these values:
|
||||
| Tag name | KITTEN |
|
||||
And I press "Update"
|
||||
And "Default collection" "text" should exist in the ".breadcrumb-nav" "css_element"
|
||||
And "Default collection" "text" should exist in the ".breadcrumb" "css_element"
|
||||
And I should see "KITTEN"
|
||||
And I should not see "Kitten"
|
||||
And I log out
|
||||
|
2
theme/boost/amd/build/alert.min.js
vendored
2
theme/boost/amd/build/alert.min.js
vendored
@ -1 +1 @@
|
||||
define(["exports","./util"],function(a,b){"use strict";function c(a){return a&&a.__esModule?a:{"default":a}}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(a,"__esModule",{value:!0});var e=c(b),f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=function(a){var b="alert",c="4.0.0-alpha.4",g="bs.alert",h="."+g,i=".data-api",j=a.fn[b],k=150,l={DISMISS:'[data-dismiss="alert"]'},m={CLOSE:"close"+h,CLOSED:"closed"+h,CLICK_DATA_API:"click"+h+i},n={ALERT:"alert",FADE:"fade",IN:"in"},o=function(){function b(a){d(this,b),this._element=a}return f(b,[{key:"close",value:function(a){a=a||this._element;var b=this._getRootElement(a),c=this._triggerCloseEvent(b);c.isDefaultPrevented()||this._removeElement(b)}},{key:"dispose",value:function(){a.removeData(this._element,g),this._element=null}},{key:"_getRootElement",value:function(b){var c=e["default"].getSelectorFromElement(b),d=!1;return c&&(d=a(c)[0]),d||(d=a(b).closest("."+n.ALERT)[0]),d}},{key:"_triggerCloseEvent",value:function(b){var c=a.Event(m.CLOSE);return a(b).trigger(c),c}},{key:"_removeElement",value:function(b){return a(b).removeClass(n.IN),e["default"].supportsTransitionEnd()&&a(b).hasClass(n.FADE)?void a(b).one(e["default"].TRANSITION_END,a.proxy(this._destroyElement,this,b)).emulateTransitionEnd(k):void this._destroyElement(b)}},{key:"_destroyElement",value:function(b){a(b).detach().trigger(m.CLOSED).remove()}}],[{key:"_jQueryInterface",value:function(c){return this.each(function(){var d=a(this),e=d.data(g);e||(e=new b(this),d.data(g,e)),"close"===c&&e[c](this)})}},{key:"_handleDismiss",value:function(a){return function(b){b&&b.preventDefault(),a.close(this)}}},{key:"VERSION",get:function(){return c}}]),b}();return a(document).on(m.CLICK_DATA_API,l.DISMISS,o._handleDismiss(new o)),a.fn[b]=o._jQueryInterface,a.fn[b].Constructor=o,a.fn[b].noConflict=function(){return a.fn[b]=j,o._jQueryInterface},o}(jQuery);a["default"]=g});
|
||||
define(["exports","jquery","./util"],function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}function g(a,b,c){return b&&f(a.prototype,b),c&&f(a,c),a}Object.defineProperty(a,"__esModule",{value:!0});var h=d(b),i=d(c),j=function(a){var b="alert",c="4.0.0",d="bs.alert",f=".".concat(d),h=".data-api",j=a.fn[b],k=150,l={DISMISS:'[data-dismiss="alert"]'},m={CLOSE:"close".concat(f),CLOSED:"closed".concat(f),CLICK_DATA_API:"click".concat(f).concat(h)},n={ALERT:"alert",FADE:"fade",SHOW:"show"},o=function(){function b(a){e(this,b),this._element=a}return g(b,[{key:"close",value:function(a){a=a||this._element;var b=this._getRootElement(a),c=this._triggerCloseEvent(b);c.isDefaultPrevented()||this._removeElement(b)}},{key:"dispose",value:function(){a.removeData(this._element,d),this._element=null}},{key:"_getRootElement",value:function(b){var c=i["default"].getSelectorFromElement(b),d=!1;return c&&(d=a(c)[0]),d||(d=a(b).closest(".".concat(n.ALERT))[0]),d}},{key:"_triggerCloseEvent",value:function(b){var c=a.Event(m.CLOSE);return a(b).trigger(c),c}},{key:"_removeElement",value:function(b){var c=this;return a(b).removeClass(n.SHOW),i["default"].supportsTransitionEnd()&&a(b).hasClass(n.FADE)?void a(b).one(i["default"].TRANSITION_END,function(a){return c._destroyElement(b,a)}).emulateTransitionEnd(k):void this._destroyElement(b)}},{key:"_destroyElement",value:function(b){a(b).detach().trigger(m.CLOSED).remove()}}],[{key:"_jQueryInterface",value:function(c){return this.each(function(){var e=a(this),f=e.data(d);f||(f=new b(this),e.data(d,f)),"close"===c&&f[c](this)})}},{key:"_handleDismiss",value:function(a){return function(b){b&&b.preventDefault(),a.close(this)}}},{key:"VERSION",get:function(){return c}}]),b}();return a(document).on(m.CLICK_DATA_API,l.DISMISS,o._handleDismiss(new o)),a.fn[b]=o._jQueryInterface,a.fn[b].Constructor=o,a.fn[b].noConflict=function(){return a.fn[b]=j,o._jQueryInterface},o}(h["default"]);a["default"]=j});
|
2
theme/boost/amd/build/button.min.js
vendored
2
theme/boost/amd/build/button.min.js
vendored
@ -1 +1 @@
|
||||
define(["exports"],function(a){"use strict";function b(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(a,"__esModule",{value:!0});var c=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),d=function(a){var d="button",e="4.0.0-alpha.4",f="bs.button",g="."+f,h=".data-api",i=a.fn[d],j={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},k={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},l={CLICK_DATA_API:"click"+g+h,FOCUS_BLUR_DATA_API:"focus"+g+h+" "+("blur"+g+h)},m=function(){function d(a){b(this,d),this._element=a}return c(d,[{key:"toggle",value:function(){var b=!0,c=a(this._element).closest(k.DATA_TOGGLE)[0];if(c){var d=a(this._element).find(k.INPUT)[0];if(d){if("radio"===d.type)if(d.checked&&a(this._element).hasClass(j.ACTIVE))b=!1;else{var e=a(c).find(k.ACTIVE)[0];e&&a(e).removeClass(j.ACTIVE)}b&&(d.checked=!a(this._element).hasClass(j.ACTIVE),a(this._element).trigger("change")),d.focus()}}else this._element.setAttribute("aria-pressed",!a(this._element).hasClass(j.ACTIVE));b&&a(this._element).toggleClass(j.ACTIVE)}},{key:"dispose",value:function(){a.removeData(this._element,f),this._element=null}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(f);c||(c=new d(this),a(this).data(f,c)),"toggle"===b&&c[b]()})}},{key:"VERSION",get:function(){return e}}]),d}();return a(document).on(l.CLICK_DATA_API,k.DATA_TOGGLE_CARROT,function(b){b.preventDefault();var c=b.target;a(c).hasClass(j.BUTTON)||(c=a(c).closest(k.BUTTON)),m._jQueryInterface.call(a(c),"toggle")}).on(l.FOCUS_BLUR_DATA_API,k.DATA_TOGGLE_CARROT,function(b){var c=a(b.target).closest(k.BUTTON)[0];a(c).toggleClass(j.FOCUS,/^focus(in)?$/.test(b.type))}),a.fn[d]=m._jQueryInterface,a.fn[d].Constructor=m,a.fn[d].noConflict=function(){return a.fn[d]=i,m._jQueryInterface},m}(jQuery);a["default"]=d});
|
||||
define(["exports","jquery"],function(a,b){"use strict";function c(a){return a&&a.__esModule?a:{"default":a}}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}function f(a,b,c){return b&&e(a.prototype,b),c&&e(a,c),a}Object.defineProperty(a,"__esModule",{value:!0});var g=c(b),h=function(a){var b="button",c="4.0.0",e="bs.button",g=".".concat(e),h=".data-api",i=a.fn[b],j={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},k={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},l={CLICK_DATA_API:"click".concat(g).concat(h),FOCUS_BLUR_DATA_API:"focus".concat(g).concat(h," ")+"blur".concat(g).concat(h)},m=function(){function b(a){d(this,b),this._element=a}return f(b,[{key:"toggle",value:function(){var b=!0,c=!0,d=a(this._element).closest(k.DATA_TOGGLE)[0];if(d){var e=a(this._element).find(k.INPUT)[0];if(e){if("radio"===e.type)if(e.checked&&a(this._element).hasClass(j.ACTIVE))b=!1;else{var f=a(d).find(k.ACTIVE)[0];f&&a(f).removeClass(j.ACTIVE)}if(b){if(e.hasAttribute("disabled")||d.hasAttribute("disabled")||e.classList.contains("disabled")||d.classList.contains("disabled"))return;e.checked=!a(this._element).hasClass(j.ACTIVE),a(e).trigger("change")}e.focus(),c=!1}}c&&this._element.setAttribute("aria-pressed",!a(this._element).hasClass(j.ACTIVE)),b&&a(this._element).toggleClass(j.ACTIVE)}},{key:"dispose",value:function(){a.removeData(this._element,e),this._element=null}}],[{key:"_jQueryInterface",value:function(c){return this.each(function(){var d=a(this).data(e);d||(d=new b(this),a(this).data(e,d)),"toggle"===c&&d[c]()})}},{key:"VERSION",get:function(){return c}}]),b}();return a(document).on(l.CLICK_DATA_API,k.DATA_TOGGLE_CARROT,function(b){b.preventDefault();var c=b.target;a(c).hasClass(j.BUTTON)||(c=a(c).closest(k.BUTTON)),m._jQueryInterface.call(a(c),"toggle")}).on(l.FOCUS_BLUR_DATA_API,k.DATA_TOGGLE_CARROT,function(b){var c=a(b.target).closest(k.BUTTON)[0];a(c).toggleClass(j.FOCUS,/^focus(in)?$/.test(b.type))}),a.fn[b]=m._jQueryInterface,a.fn[b].Constructor=m,a.fn[b].noConflict=function(){return a.fn[b]=i,m._jQueryInterface},m}(g["default"]);a["default"]=h});
|
2
theme/boost/amd/build/carousel.min.js
vendored
2
theme/boost/amd/build/carousel.min.js
vendored
File diff suppressed because one or more lines are too long
2
theme/boost/amd/build/collapse.min.js
vendored
2
theme/boost/amd/build/collapse.min.js
vendored
File diff suppressed because one or more lines are too long
2
theme/boost/amd/build/dropdown.min.js
vendored
2
theme/boost/amd/build/dropdown.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
define(["jquery","core/event"],function(a,b){return{enhance:function(c){var d=document.getElementById(c);a(d).on(b.Events.FORM_FIELD_VALIDATION,function(b,c){b.preventDefault();var e=a(d).closest(".form-group"),f=e.find(".form-control-feedback");"TEXTAREA"==a(d).prop("tagName")&&e.find("[contenteditable]")&&(d=e.find("[contenteditable]")),""!==c?(e.addClass("has-danger"),e.data("client-validation-error",!0),a(d).addClass("form-control-danger"),a(d).attr("aria-describedby",f.attr("id")),a(d).attr("aria-invalid",!0),f.attr("tabindex",0),f.html(c),f.is(":visible")||(f.show(),f.focus())):e.data("client-validation-error")===!0&&(e.removeClass("has-danger"),e.data("client-validation-error",!1),a(d).removeClass("form-control-danger"),a(d).removeAttr("aria-describedby"),a(d).attr("aria-invalid",!1),f.hide())})}}});
|
||||
define(["jquery","core/event"],function(a,b){return{enhance:function(c){var d=document.getElementById(c);a(d).on(b.Events.FORM_FIELD_VALIDATION,function(b,c){b.preventDefault();var e=a(d).closest(".form-group"),f=e.find(".form-control-feedback");"TEXTAREA"==a(d).prop("tagName")&&e.find("[contenteditable]")&&(d=e.find("[contenteditable]")),""!==c?(e.addClass("has-danger"),e.data("client-validation-error",!0),a(d).addClass("is-invalid"),a(d).attr("aria-describedby",f.attr("id")),a(d).attr("aria-invalid",!0),f.attr("tabindex",0),f.html(c),f.is(":visible")||(f.show(),f.focus())):e.data("client-validation-error")===!0&&(e.removeClass("has-danger"),e.data("client-validation-error",!1),a(d).removeClass("is-invalid"),a(d).removeAttr("aria-describedby"),a(d).attr("aria-invalid",!1),f.hide())})}}});
|
2
theme/boost/amd/build/modal.min.js
vendored
2
theme/boost/amd/build/modal.min.js
vendored
File diff suppressed because one or more lines are too long
2
theme/boost/amd/build/popover.min.js
vendored
2
theme/boost/amd/build/popover.min.js
vendored
@ -1 +1 @@
|
||||
define(["exports","./tooltip"],function(a,b){"use strict";function c(a){return a&&a.__esModule?a:{"default":a}}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(a,"__esModule",{value:!0});var g=c(b),h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol?"symbol":typeof a},i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=function(a){var b="popover",c="4.0.0-alpha.4",j="bs.popover",k="."+j,l=a.fn[b],m=a.extend({},g["default"].Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),n=a.extend({},g["default"].DefaultType,{content:"(string|element|function)"}),o={FADE:"fade",IN:"in"},p={TITLE:".popover-title",CONTENT:".popover-content",ARROW:".popover-arrow"},q={HIDE:"hide"+k,HIDDEN:"hidden"+k,SHOW:"show"+k,SHOWN:"shown"+k,INSERTED:"inserted"+k,CLICK:"click"+k,FOCUSIN:"focusin"+k,FOCUSOUT:"focusout"+k,MOUSEENTER:"mouseenter"+k,MOUSELEAVE:"mouseleave"+k},r=function(g){function l(){return d(this,l),e(this,(l.__proto__||Object.getPrototypeOf(l)).apply(this,arguments))}return f(l,g),i(l,[{key:"isWithContent",value:function(){return this.getTitle()||this._getContent()}},{key:"getTipElement",value:function(){return this.tip=this.tip||a(this.config.template)[0]}},{key:"setContent",value:function(){var b=a(this.getTipElement());this.setElementContent(b.find(p.TITLE),this.getTitle()),this.setElementContent(b.find(p.CONTENT),this._getContent()),b.removeClass(o.FADE).removeClass(o.IN),this.cleanupTether()}},{key:"_getContent",value:function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(j),d="object"===("undefined"==typeof b?"undefined":h(b))?b:null;if((c||!/destroy|hide/.test(b))&&(c||(c=new l(this,d),a(this).data(j,c)),"string"==typeof b)){if(void 0===c[b])throw new Error('No method named "'+b+'"');c[b]()}})}},{key:"VERSION",get:function(){return c}},{key:"Default",get:function(){return m}},{key:"NAME",get:function(){return b}},{key:"DATA_KEY",get:function(){return j}},{key:"Event",get:function(){return q}},{key:"EVENT_KEY",get:function(){return k}},{key:"DefaultType",get:function(){return n}}]),l}(g["default"]);return a.fn[b]=r._jQueryInterface,a.fn[b].Constructor=r,a.fn[b].noConflict=function(){return a.fn[b]=l,r._jQueryInterface},r}(jQuery);a["default"]=j});
|
||||
define(["exports","jquery","./tooltip"],function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}function h(a,b,c){return b&&g(a.prototype,b),c&&g(a,c),a}function i(a,b){if(b&&("object"===e(b)||"function"==typeof b))return b;if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function j(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function k(){return k=Object.assign||function(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d])}return a},k.apply(this,arguments)}Object.defineProperty(a,"__esModule",{value:!0});var l=d(b),m=d(c),n=function(a){var b="popover",c="4.0.0",d="bs.popover",g=".".concat(d),l=a.fn[b],n="bs-popover",o=new RegExp("(^|\\s)".concat(n,"\\S+"),"g"),p=k({},m["default"].Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),q=k({},m["default"].DefaultType,{content:"(string|element|function)"}),r={FADE:"fade",SHOW:"show"},s={TITLE:".popover-header",CONTENT:".popover-body"},t={HIDE:"hide".concat(g),HIDDEN:"hidden".concat(g),SHOW:"show".concat(g),SHOWN:"shown".concat(g),INSERTED:"inserted".concat(g),CLICK:"click".concat(g),FOCUSIN:"focusin".concat(g),FOCUSOUT:"focusout".concat(g),MOUSEENTER:"mouseenter".concat(g),MOUSELEAVE:"mouseleave".concat(g)},u=function(k){function l(){return f(this,l),i(this,(l.__proto__||Object.getPrototypeOf(l)).apply(this,arguments))}return j(l,k),h(l,[{key:"isWithContent",value:function(){return this.getTitle()||this._getContent()}},{key:"addAttachmentClass",value:function(b){a(this.getTipElement()).addClass("".concat(n,"-").concat(b))}},{key:"getTipElement",value:function(){return this.tip=this.tip||a(this.config.template)[0],this.tip}},{key:"setContent",value:function(){var b=a(this.getTipElement());this.setElementContent(b.find(s.TITLE),this.getTitle());var c=this._getContent();"function"==typeof c&&(c=c.call(this.element)),this.setElementContent(b.find(s.CONTENT),c),b.removeClass("".concat(r.FADE," ").concat(r.SHOW))}},{key:"_getContent",value:function(){return this.element.getAttribute("data-content")||this.config.content}},{key:"_cleanTipClass",value:function(){var b=a(this.getTipElement()),c=b.attr("class").match(o);null!==c&&c.length>0&&b.removeClass(c.join(""))}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(d),f="object"===e(b)?b:null;if((c||!/destroy|hide/.test(b))&&(c||(c=new l(this,f),a(this).data(d,c)),"string"==typeof b)){if("undefined"==typeof c[b])throw new TypeError('No method named "'.concat(b,'"'));c[b]()}})}},{key:"VERSION",get:function(){return c}},{key:"Default",get:function(){return p}},{key:"NAME",get:function(){return b}},{key:"DATA_KEY",get:function(){return d}},{key:"Event",get:function(){return t}},{key:"EVENT_KEY",get:function(){return g}},{key:"DefaultType",get:function(){return q}}]),l}(m["default"]);return a.fn[b]=u._jQueryInterface,a.fn[b].Constructor=u,a.fn[b].noConflict=function(){return a.fn[b]=l,u._jQueryInterface},u}(l["default"]);a["default"]=n});
|
2
theme/boost/amd/build/scrollspy.min.js
vendored
2
theme/boost/amd/build/scrollspy.min.js
vendored
File diff suppressed because one or more lines are too long
2
theme/boost/amd/build/tab.min.js
vendored
2
theme/boost/amd/build/tab.min.js
vendored
@ -1 +1 @@
|
||||
define(["exports","./util"],function(a,b){"use strict";function c(a){return a&&a.__esModule?a:{"default":a}}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(a,"__esModule",{value:!0});var e=c(b),f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=function(a){var b="tab",c="4.0.0-alpha.4",g="bs.tab",h="."+g,i=".data-api",j=a.fn[b],k=150,l={HIDE:"hide"+h,HIDDEN:"hidden"+h,SHOW:"show"+h,SHOWN:"shown"+h,CLICK_DATA_API:"click"+h+i},m={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",FADE:"fade",IN:"in"},n={A:"a",LI:"li",DROPDOWN:".dropdown",UL:"ul:not(.dropdown-menu)",FADE_CHILD:"> .nav-item .fade, > .fade",ACTIVE:".active",ACTIVE_CHILD:"> .nav-item > .active, > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},o=function(){function b(a){d(this,b),this._element=a}return f(b,[{key:"show",value:function(){var b=this;if(!this._element.parentNode||this._element.parentNode.nodeType!==Node.ELEMENT_NODE||!a(this._element).hasClass(m.ACTIVE)){var c=void 0,d=void 0,f=a(this._element).closest(n.UL)[0],g=e["default"].getSelectorFromElement(this._element);f&&(d=a.makeArray(a(f).find(n.ACTIVE)),d=d[d.length-1]);var h=a.Event(l.HIDE,{relatedTarget:this._element}),i=a.Event(l.SHOW,{relatedTarget:d});if(d&&a(d).trigger(h),a(this._element).trigger(i),!i.isDefaultPrevented()&&!h.isDefaultPrevented()){g&&(c=a(g)[0]),this._activate(this._element,f);var j=function(){var c=a.Event(l.HIDDEN,{relatedTarget:b._element}),e=a.Event(l.SHOWN,{relatedTarget:d});a(d).trigger(c),a(b._element).trigger(e)};c?this._activate(c,c.parentNode,j):j()}}}},{key:"dispose",value:function(){a.removeClass(this._element,g),this._element=null}},{key:"_activate",value:function(b,c,d){var f=a(c).find(n.ACTIVE_CHILD)[0],g=d&&e["default"].supportsTransitionEnd()&&(f&&a(f).hasClass(m.FADE)||Boolean(a(c).find(n.FADE_CHILD)[0])),h=a.proxy(this._transitionComplete,this,b,f,g,d);f&&g?a(f).one(e["default"].TRANSITION_END,h).emulateTransitionEnd(k):h(),f&&a(f).removeClass(m.IN)}},{key:"_transitionComplete",value:function(b,c,d,f){if(c){a(c).removeClass(m.ACTIVE);var g=a(c).find(n.DROPDOWN_ACTIVE_CHILD)[0];g&&a(g).removeClass(m.ACTIVE),c.setAttribute("aria-expanded",!1)}if(a(b).addClass(m.ACTIVE),b.setAttribute("aria-expanded",!0),d?(e["default"].reflow(b),a(b).addClass(m.IN)):a(b).removeClass(m.FADE),b.parentNode&&a(b.parentNode).hasClass(m.DROPDOWN_MENU)){var h=a(b).closest(n.DROPDOWN)[0];h&&a(h).find(n.DROPDOWN_TOGGLE).addClass(m.ACTIVE),b.setAttribute("aria-expanded",!0)}f&&f()}}],[{key:"_jQueryInterface",value:function(c){return this.each(function(){var d=a(this),e=d.data(g);if(e||(e=e=new b(this),d.data(g,e)),"string"==typeof c){if(void 0===e[c])throw new Error('No method named "'+c+'"');e[c]()}})}},{key:"VERSION",get:function(){return c}}]),b}();return a(document).on(l.CLICK_DATA_API,n.DATA_TOGGLE,function(b){b.preventDefault(),o._jQueryInterface.call(a(this),"show")}),a.fn[b]=o._jQueryInterface,a.fn[b].Constructor=o,a.fn[b].noConflict=function(){return a.fn[b]=j,o._jQueryInterface},o}(jQuery);a["default"]=g});
|
||||
define(["exports","jquery","./util"],function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}function g(a,b,c){return b&&f(a.prototype,b),c&&f(a,c),a}Object.defineProperty(a,"__esModule",{value:!0});var h=d(b),i=d(c),j=function(a){var b="tab",c="4.0.0",d="bs.tab",f=".".concat(d),h=".data-api",j=a.fn[b],k=150,l={HIDE:"hide".concat(f),HIDDEN:"hidden".concat(f),SHOW:"show".concat(f),SHOWN:"shown".concat(f),CLICK_DATA_API:"click".concat(f).concat(h)},m={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},n={DROPDOWN:".dropdown",NAV_LIST_GROUP:".nav, .list-group",ACTIVE:".active",ACTIVE_UL:"> li > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},o=function(){function b(a){e(this,b),this._element=a}return g(b,[{key:"show",value:function(){var b=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&a(this._element).hasClass(m.ACTIVE)||a(this._element).hasClass(m.DISABLED))){var c,d,e=a(this._element).closest(n.NAV_LIST_GROUP)[0],f=i["default"].getSelectorFromElement(this._element);if(e){var g="UL"===e.nodeName?n.ACTIVE_UL:n.ACTIVE;d=a.makeArray(a(e).find(g)),d=d[d.length-1]}var h=a.Event(l.HIDE,{relatedTarget:this._element}),j=a.Event(l.SHOW,{relatedTarget:d});if(d&&a(d).trigger(h),a(this._element).trigger(j),!j.isDefaultPrevented()&&!h.isDefaultPrevented()){f&&(c=a(f)[0]),this._activate(this._element,e);var k=function(){var c=a.Event(l.HIDDEN,{relatedTarget:b._element}),e=a.Event(l.SHOWN,{relatedTarget:d});a(d).trigger(c),a(b._element).trigger(e)};c?this._activate(c,c.parentNode,k):k()}}}},{key:"dispose",value:function(){a.removeData(this._element,d),this._element=null}},{key:"_activate",value:function(b,c,d){var e,f=this;e="UL"===c.nodeName?a(c).find(n.ACTIVE_UL):a(c).children(n.ACTIVE);var g=e[0],h=d&&i["default"].supportsTransitionEnd()&&g&&a(g).hasClass(m.FADE),j=function(){return f._transitionComplete(b,g,d)};g&&h?a(g).one(i["default"].TRANSITION_END,j).emulateTransitionEnd(k):j()}},{key:"_transitionComplete",value:function(b,c,d){if(c){a(c).removeClass("".concat(m.SHOW," ").concat(m.ACTIVE));var e=a(c.parentNode).find(n.DROPDOWN_ACTIVE_CHILD)[0];e&&a(e).removeClass(m.ACTIVE),"tab"===c.getAttribute("role")&&c.setAttribute("aria-selected",!1)}if(a(b).addClass(m.ACTIVE),"tab"===b.getAttribute("role")&&b.setAttribute("aria-selected",!0),i["default"].reflow(b),a(b).addClass(m.SHOW),b.parentNode&&a(b.parentNode).hasClass(m.DROPDOWN_MENU)){var f=a(b).closest(n.DROPDOWN)[0];f&&a(f).find(n.DROPDOWN_TOGGLE).addClass(m.ACTIVE),b.setAttribute("aria-expanded",!0)}d&&d()}}],[{key:"_jQueryInterface",value:function(c){return this.each(function(){var e=a(this),f=e.data(d);if(f||(f=new b(this),e.data(d,f)),"string"==typeof c){if("undefined"==typeof f[c])throw new TypeError('No method named "'.concat(c,'"'));f[c]()}})}},{key:"VERSION",get:function(){return c}}]),b}();return a(document).on(l.CLICK_DATA_API,n.DATA_TOGGLE,function(b){b.preventDefault(),o._jQueryInterface.call(a(this),"show")}),a.fn[b]=o._jQueryInterface,a.fn[b].Constructor=o,a.fn[b].noConflict=function(){return a.fn[b]=j,o._jQueryInterface},o}(h["default"]);a["default"]=j});
|
2
theme/boost/amd/build/tooltip.min.js
vendored
2
theme/boost/amd/build/tooltip.min.js
vendored
File diff suppressed because one or more lines are too long
2
theme/boost/amd/build/util.min.js
vendored
2
theme/boost/amd/build/util.min.js
vendored
@ -1 +1 @@
|
||||
define(["exports"],function(a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var b=function(a){function b(a){return{}.toString.call(a).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function c(a){return(a[0]||a).nodeType}function d(){return{bindType:h.end,delegateType:h.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}}}function e(){if(window.QUnit)return!1;var a=document.createElement("bootstrap");for(var b in j)if(void 0!==a.style[b])return{end:j[b]};return!1}function f(b){var c=this,d=!1;return a(this).one(k.TRANSITION_END,function(){d=!0}),setTimeout(function(){d||k.triggerTransitionEnd(c)},b),this}function g(){h=e(),a.fn.emulateTransitionEnd=f,k.supportsTransitionEnd()&&(a.event.special[k.TRANSITION_END]=d())}var h=!1,i=1e6,j={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},k={TRANSITION_END:"bsTransitionEnd",getUID:function(a){do a+=~~(Math.random()*i);while(document.getElementById(a));return a},getSelectorFromElement:function(a){var b=a.getAttribute("data-target");return b||(b=a.getAttribute("href")||"",b=/^#[a-z]/i.test(b)?b:null),b},reflow:function(a){new Function("bs","return bs")(a.offsetHeight)},triggerTransitionEnd:function(b){a(b).trigger(h.end)},supportsTransitionEnd:function(){return Boolean(h)},typeCheckConfig:function(a,d,e){for(var f in e)if(e.hasOwnProperty(f)){var g=e[f],h=d[f],i=void 0;if(i=h&&c(h)?"element":b(h),!new RegExp(g).test(i))throw new Error(a.toUpperCase()+": "+('Option "'+f+'" provided type "'+i+'" ')+('but expected type "'+g+'".'))}}};return g(),k}(jQuery);a["default"]=b});
|
||||
define(["exports","jquery"],function(a,b){"use strict";function c(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(a,"__esModule",{value:!0});var d=c(b),e=function(a){function b(a){return{}.toString.call(a).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function c(){return{bindType:h.end,delegateType:h.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}}}function d(){return("undefined"==typeof window||!window.QUnit)&&{end:"transitionend"}}function e(b){var c=this,d=!1;return a(this).one(j.TRANSITION_END,function(){d=!0}),setTimeout(function(){d||j.triggerTransitionEnd(c)},b),this}function f(){h=d(),a.fn.emulateTransitionEnd=e,j.supportsTransitionEnd()&&(a.event.special[j.TRANSITION_END]=c())}function g(b){return b="function"==typeof a.escapeSelector?a.escapeSelector(b).substr(1):b.replace(/(:|\.|\[|\]|,|=|@)/g,"\\$1")}var h=!1,i=1e6,j={TRANSITION_END:"bsTransitionEnd",getUID:function(a){do a+=~~(Math.random()*i);while(document.getElementById(a));return a},getSelectorFromElement:function(b){var c=b.getAttribute("data-target");c&&"#"!==c||(c=b.getAttribute("href")||""),"#"===c.charAt(0)&&(c=g(c));try{var d=a(document).find(c);return d.length>0?c:null}catch(e){return null}},reflow:function(a){return a.offsetHeight},triggerTransitionEnd:function(b){a(b).trigger(h.end)},supportsTransitionEnd:function(){return Boolean(h)},isElement:function(a){return(a[0]||a).nodeType},typeCheckConfig:function(a,c,d){for(var e in d)if(Object.prototype.hasOwnProperty.call(d,e)){var f=d[e],g=c[e],h=g&&j.isElement(g)?"element":b(g);if(!new RegExp(f).test(h))throw new Error("".concat(a.toUpperCase(),": ")+'Option "'.concat(e,'" provided type "').concat(h,'" ')+'but expected type "'.concat(f,'".'))}}};return f(),j}(d["default"]);a["default"]=e});
|
@ -1,10 +1,12 @@
|
||||
define(['exports', './util'], function (exports, _util) {
|
||||
'use strict';
|
||||
define(["exports", "jquery", "./util"], function (exports, _jquery, _util) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _jquery2 = _interopRequireDefault(_jquery);
|
||||
|
||||
var _util2 = _interopRequireDefault(_util);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
@ -19,84 +21,76 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
}
|
||||
|
||||
var _createClass = function () {
|
||||
function defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
return function (Constructor, protoProps, staticProps) {
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
};
|
||||
}();
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.0.0-alpha.4): alert.js
|
||||
* Bootstrap (v4.0.0): alert.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Alert = function ($) {
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'alert';
|
||||
var VERSION = '4.0.0-alpha.4';
|
||||
var VERSION = '4.0.0';
|
||||
var DATA_KEY = 'bs.alert';
|
||||
var EVENT_KEY = '.' + DATA_KEY;
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var TRANSITION_DURATION = 150;
|
||||
|
||||
var Selector = {
|
||||
DISMISS: '[data-dismiss="alert"]'
|
||||
};
|
||||
|
||||
var Event = {
|
||||
CLOSE: 'close' + EVENT_KEY,
|
||||
CLOSED: 'closed' + EVENT_KEY,
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
|
||||
CLOSE: "close".concat(EVENT_KEY),
|
||||
CLOSED: "closed".concat(EVENT_KEY),
|
||||
CLICK_DATA_API: "click".concat(EVENT_KEY).concat(DATA_API_KEY)
|
||||
};
|
||||
|
||||
var ClassName = {
|
||||
ALERT: 'alert',
|
||||
FADE: 'fade',
|
||||
IN: 'in'
|
||||
};
|
||||
SHOW: 'show'
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
};
|
||||
|
||||
var Alert = function () {
|
||||
function Alert(element) {
|
||||
_classCallCheck(this, Alert);
|
||||
|
||||
this._element = element;
|
||||
}
|
||||
} // Getters
|
||||
|
||||
// getters
|
||||
|
||||
_createClass(Alert, [{
|
||||
key: 'close',
|
||||
key: "close",
|
||||
value: function close(element) {
|
||||
element = element || this._element;
|
||||
|
||||
var rootElement = this._getRootElement(element);
|
||||
|
||||
var customEvent = this._triggerCloseEvent(rootElement);
|
||||
|
||||
if (customEvent.isDefaultPrevented()) {
|
||||
@ -106,15 +100,16 @@ define(['exports', './util'], function (exports, _util) {
|
||||
this._removeElement(rootElement);
|
||||
}
|
||||
}, {
|
||||
key: 'dispose',
|
||||
key: "dispose",
|
||||
value: function dispose() {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
}
|
||||
}, {
|
||||
key: '_getRootElement',
|
||||
key: "_getRootElement",
|
||||
value: function _getRootElement(element) {
|
||||
var selector = _util2.default.getSelectorFromElement(element);
|
||||
|
||||
var parent = false;
|
||||
|
||||
if (selector) {
|
||||
@ -122,38 +117,42 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
|
||||
if (!parent) {
|
||||
parent = $(element).closest('.' + ClassName.ALERT)[0];
|
||||
parent = $(element).closest(".".concat(ClassName.ALERT))[0];
|
||||
}
|
||||
|
||||
return parent;
|
||||
}
|
||||
}, {
|
||||
key: '_triggerCloseEvent',
|
||||
key: "_triggerCloseEvent",
|
||||
value: function _triggerCloseEvent(element) {
|
||||
var closeEvent = $.Event(Event.CLOSE);
|
||||
|
||||
$(element).trigger(closeEvent);
|
||||
return closeEvent;
|
||||
}
|
||||
}, {
|
||||
key: '_removeElement',
|
||||
key: "_removeElement",
|
||||
value: function _removeElement(element) {
|
||||
$(element).removeClass(ClassName.IN);
|
||||
var _this = this;
|
||||
|
||||
$(element).removeClass(ClassName.SHOW);
|
||||
|
||||
if (!_util2.default.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {
|
||||
this._destroyElement(element);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$(element).one(_util2.default.TRANSITION_END, $.proxy(this._destroyElement, this, element)).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
$(element).one(_util2.default.TRANSITION_END, function (event) {
|
||||
return _this._destroyElement(element, event);
|
||||
}).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
}
|
||||
}, {
|
||||
key: '_destroyElement',
|
||||
key: "_destroyElement",
|
||||
value: function _destroyElement(element) {
|
||||
$(element).detach().trigger(Event.CLOSED).remove();
|
||||
}
|
||||
}], [{
|
||||
key: '_jQueryInterface',
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $element = $(this);
|
||||
@ -170,7 +169,7 @@ define(['exports', './util'], function (exports, _util) {
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: '_handleDismiss',
|
||||
key: "_handleDismiss",
|
||||
value: function _handleDismiss(alertInstance) {
|
||||
return function (event) {
|
||||
if (event) {
|
||||
@ -181,7 +180,7 @@ define(['exports', './util'], function (exports, _util) {
|
||||
};
|
||||
}
|
||||
}, {
|
||||
key: 'VERSION',
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
@ -195,9 +194,7 @@ define(['exports', './util'], function (exports, _util) {
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
@ -206,13 +203,14 @@ define(['exports', './util'], function (exports, _util) {
|
||||
|
||||
$.fn[NAME] = Alert._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Alert;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Alert._jQueryInterface;
|
||||
};
|
||||
|
||||
return Alert;
|
||||
}(jQuery);
|
||||
}(_jquery2.default);
|
||||
|
||||
exports.default = Alert;
|
||||
});
|
@ -1,62 +1,63 @@
|
||||
define(['exports'], function (exports) {
|
||||
'use strict';
|
||||
define(["exports", "jquery"], function (exports, _jquery) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _jquery2 = _interopRequireDefault(_jquery);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
}
|
||||
}
|
||||
|
||||
var _createClass = function () {
|
||||
function defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
return function (Constructor, protoProps, staticProps) {
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
};
|
||||
}();
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.0.0-alpha.4): button.js
|
||||
* Bootstrap (v4.0.0): button.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Button = function ($) {
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'button';
|
||||
var VERSION = '4.0.0-alpha.4';
|
||||
var VERSION = '4.0.0';
|
||||
var DATA_KEY = 'bs.button';
|
||||
var EVENT_KEY = '.' + DATA_KEY;
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
|
||||
var ClassName = {
|
||||
ACTIVE: 'active',
|
||||
BUTTON: 'btn',
|
||||
FOCUS: 'focus'
|
||||
};
|
||||
|
||||
var Selector = {
|
||||
DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
|
||||
DATA_TOGGLE: '[data-toggle="buttons"]',
|
||||
@ -64,31 +65,30 @@ define(['exports'], function (exports) {
|
||||
ACTIVE: '.active',
|
||||
BUTTON: '.btn'
|
||||
};
|
||||
|
||||
var Event = {
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY,
|
||||
FOCUS_BLUR_DATA_API: 'focus' + EVENT_KEY + DATA_API_KEY + ' ' + ('blur' + EVENT_KEY + DATA_API_KEY)
|
||||
};
|
||||
CLICK_DATA_API: "click".concat(EVENT_KEY).concat(DATA_API_KEY),
|
||||
FOCUS_BLUR_DATA_API: "focus".concat(EVENT_KEY).concat(DATA_API_KEY, " ") + "blur".concat(EVENT_KEY).concat(DATA_API_KEY)
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
};
|
||||
|
||||
var Button = function () {
|
||||
function Button(element) {
|
||||
_classCallCheck(this, Button);
|
||||
|
||||
this._element = element;
|
||||
}
|
||||
} // Getters
|
||||
|
||||
// getters
|
||||
|
||||
_createClass(Button, [{
|
||||
key: 'toggle',
|
||||
key: "toggle",
|
||||
value: function toggle() {
|
||||
var triggerChangeEvent = true;
|
||||
var addAriaPressed = true;
|
||||
var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0];
|
||||
|
||||
if (rootElement) {
|
||||
@ -108,13 +108,20 @@ define(['exports'], function (exports) {
|
||||
}
|
||||
|
||||
if (triggerChangeEvent) {
|
||||
if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
|
||||
return;
|
||||
}
|
||||
|
||||
input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
|
||||
$(this._element).trigger('change');
|
||||
$(input).trigger('change');
|
||||
}
|
||||
|
||||
input.focus();
|
||||
addAriaPressed = false;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
if (addAriaPressed) {
|
||||
this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE));
|
||||
}
|
||||
|
||||
@ -123,13 +130,13 @@ define(['exports'], function (exports) {
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'dispose',
|
||||
key: "dispose",
|
||||
value: function dispose() {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
}
|
||||
}], [{
|
||||
key: '_jQueryInterface',
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
@ -145,7 +152,7 @@ define(['exports'], function (exports) {
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: 'VERSION',
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
@ -159,10 +166,8 @@ define(['exports'], function (exports) {
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
var button = event.target;
|
||||
|
||||
if (!$(button).hasClass(ClassName.BUTTON)) {
|
||||
@ -174,7 +179,6 @@ define(['exports'], function (exports) {
|
||||
var button = $(event.target).closest(Selector.BUTTON)[0];
|
||||
$(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type));
|
||||
});
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
@ -183,13 +187,14 @@ define(['exports'], function (exports) {
|
||||
|
||||
$.fn[NAME] = Button._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Button;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Button._jQueryInterface;
|
||||
};
|
||||
|
||||
return Button;
|
||||
}(jQuery);
|
||||
}(_jquery2.default);
|
||||
|
||||
exports.default = Button;
|
||||
});
|
@ -1,10 +1,12 @@
|
||||
define(['exports', './util'], function (exports, _util) {
|
||||
'use strict';
|
||||
define(["exports", "jquery", "./util"], function (exports, _jquery, _util) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _jquery2 = _interopRequireDefault(_jquery);
|
||||
|
||||
var _util2 = _interopRequireDefault(_util);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
@ -13,11 +15,37 @@ define(['exports', './util'], function (exports, _util) {
|
||||
};
|
||||
}
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
||||
return typeof obj;
|
||||
} : function (obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
||||
};
|
||||
function _typeof(obj) {
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
_typeof = function _typeof(obj) {
|
||||
return typeof obj;
|
||||
};
|
||||
} else {
|
||||
_typeof = function _typeof(obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
||||
};
|
||||
}
|
||||
|
||||
return _typeof(obj);
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
@ -25,49 +53,47 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
}
|
||||
|
||||
var _createClass = function () {
|
||||
function defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
return function (Constructor, protoProps, staticProps) {
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
};
|
||||
}();
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.0.0-alpha.4): carousel.js
|
||||
* Bootstrap (v4.0.0): carousel.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Carousel = function ($) {
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'carousel';
|
||||
var VERSION = '4.0.0-alpha.4';
|
||||
var VERSION = '4.0.0';
|
||||
var DATA_KEY = 'bs.carousel';
|
||||
var EVENT_KEY = '.' + DATA_KEY;
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var TRANSITION_DURATION = 600;
|
||||
var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
|
||||
|
||||
var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
|
||||
|
||||
var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
|
||||
|
||||
var Default = {
|
||||
interval: 5000,
|
||||
keyboard: true,
|
||||
@ -75,7 +101,6 @@ define(['exports', './util'], function (exports, _util) {
|
||||
pause: 'hover',
|
||||
wrap: true
|
||||
};
|
||||
|
||||
var DefaultType = {
|
||||
interval: '(number|boolean)',
|
||||
keyboard: 'boolean',
|
||||
@ -83,46 +108,47 @@ define(['exports', './util'], function (exports, _util) {
|
||||
pause: '(string|boolean)',
|
||||
wrap: 'boolean'
|
||||
};
|
||||
|
||||
var Direction = {
|
||||
NEXT: 'next',
|
||||
PREVIOUS: 'prev'
|
||||
PREV: 'prev',
|
||||
LEFT: 'left',
|
||||
RIGHT: 'right'
|
||||
};
|
||||
|
||||
var Event = {
|
||||
SLIDE: 'slide' + EVENT_KEY,
|
||||
SLID: 'slid' + EVENT_KEY,
|
||||
KEYDOWN: 'keydown' + EVENT_KEY,
|
||||
MOUSEENTER: 'mouseenter' + EVENT_KEY,
|
||||
MOUSELEAVE: 'mouseleave' + EVENT_KEY,
|
||||
LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY,
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
|
||||
SLIDE: "slide".concat(EVENT_KEY),
|
||||
SLID: "slid".concat(EVENT_KEY),
|
||||
KEYDOWN: "keydown".concat(EVENT_KEY),
|
||||
MOUSEENTER: "mouseenter".concat(EVENT_KEY),
|
||||
MOUSELEAVE: "mouseleave".concat(EVENT_KEY),
|
||||
TOUCHEND: "touchend".concat(EVENT_KEY),
|
||||
LOAD_DATA_API: "load".concat(EVENT_KEY).concat(DATA_API_KEY),
|
||||
CLICK_DATA_API: "click".concat(EVENT_KEY).concat(DATA_API_KEY)
|
||||
};
|
||||
|
||||
var ClassName = {
|
||||
CAROUSEL: 'carousel',
|
||||
ACTIVE: 'active',
|
||||
SLIDE: 'slide',
|
||||
RIGHT: 'right',
|
||||
LEFT: 'left',
|
||||
RIGHT: 'carousel-item-right',
|
||||
LEFT: 'carousel-item-left',
|
||||
NEXT: 'carousel-item-next',
|
||||
PREV: 'carousel-item-prev',
|
||||
ITEM: 'carousel-item'
|
||||
};
|
||||
|
||||
var Selector = {
|
||||
ACTIVE: '.active',
|
||||
ACTIVE_ITEM: '.active.carousel-item',
|
||||
ITEM: '.carousel-item',
|
||||
NEXT_PREV: '.next, .prev',
|
||||
NEXT_PREV: '.carousel-item-next, .carousel-item-prev',
|
||||
INDICATORS: '.carousel-indicators',
|
||||
DATA_SLIDE: '[data-slide], [data-slide-to]',
|
||||
DATA_RIDE: '[data-ride="carousel"]'
|
||||
};
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
};
|
||||
|
||||
var Carousel = function () {
|
||||
function Carousel(element, config) {
|
||||
@ -131,43 +157,42 @@ define(['exports', './util'], function (exports, _util) {
|
||||
this._items = null;
|
||||
this._interval = null;
|
||||
this._activeElement = null;
|
||||
|
||||
this._isPaused = false;
|
||||
this._isSliding = false;
|
||||
|
||||
this.touchTimeout = null;
|
||||
this._config = this._getConfig(config);
|
||||
this._element = $(element)[0];
|
||||
this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0];
|
||||
|
||||
this._addEventListeners();
|
||||
}
|
||||
} // Getters
|
||||
|
||||
// getters
|
||||
|
||||
_createClass(Carousel, [{
|
||||
key: 'next',
|
||||
key: "next",
|
||||
value: function next() {
|
||||
if (!this._isSliding) {
|
||||
this._slide(Direction.NEXT);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'nextWhenVisible',
|
||||
key: "nextWhenVisible",
|
||||
value: function nextWhenVisible() {
|
||||
// Don't call next when the page isn't visible
|
||||
if (!document.hidden) {
|
||||
// or the carousel or its parent isn't visible
|
||||
if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') {
|
||||
this.next();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'prev',
|
||||
key: "prev",
|
||||
value: function prev() {
|
||||
if (!this._isSliding) {
|
||||
this._slide(Direction.PREVIOUS);
|
||||
this._slide(Direction.PREV);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'pause',
|
||||
key: "pause",
|
||||
value: function pause(event) {
|
||||
if (!event) {
|
||||
this._isPaused = true;
|
||||
@ -175,6 +200,7 @@ define(['exports', './util'], function (exports, _util) {
|
||||
|
||||
if ($(this._element).find(Selector.NEXT_PREV)[0] && _util2.default.supportsTransitionEnd()) {
|
||||
_util2.default.triggerTransitionEnd(this._element);
|
||||
|
||||
this.cycle(true);
|
||||
}
|
||||
|
||||
@ -182,7 +208,7 @@ define(['exports', './util'], function (exports, _util) {
|
||||
this._interval = null;
|
||||
}
|
||||
}, {
|
||||
key: 'cycle',
|
||||
key: "cycle",
|
||||
value: function cycle(event) {
|
||||
if (!event) {
|
||||
this._isPaused = false;
|
||||
@ -194,11 +220,11 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
|
||||
if (this._config.interval && !this._isPaused) {
|
||||
this._interval = setInterval($.proxy(document.visibilityState ? this.nextWhenVisible : this.next, this), this._config.interval);
|
||||
this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'to',
|
||||
key: "to",
|
||||
value: function to(index) {
|
||||
var _this = this;
|
||||
|
||||
@ -223,16 +249,15 @@ define(['exports', './util'], function (exports, _util) {
|
||||
return;
|
||||
}
|
||||
|
||||
var direction = index > activeIndex ? Direction.NEXT : Direction.PREVIOUS;
|
||||
var direction = index > activeIndex ? Direction.NEXT : Direction.PREV;
|
||||
|
||||
this._slide(direction, this._items[index]);
|
||||
}
|
||||
}, {
|
||||
key: 'dispose',
|
||||
key: "dispose",
|
||||
value: function dispose() {
|
||||
$(this._element).off(EVENT_KEY);
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
|
||||
this._items = null;
|
||||
this._config = null;
|
||||
this._element = null;
|
||||
@ -243,55 +268,89 @@ define(['exports', './util'], function (exports, _util) {
|
||||
this._indicatorsElement = null;
|
||||
}
|
||||
}, {
|
||||
key: '_getConfig',
|
||||
key: "_getConfig",
|
||||
value: function _getConfig(config) {
|
||||
config = $.extend({}, Default, config);
|
||||
config = _extends({}, Default, config);
|
||||
|
||||
_util2.default.typeCheckConfig(NAME, config, DefaultType);
|
||||
|
||||
return config;
|
||||
}
|
||||
}, {
|
||||
key: '_addEventListeners',
|
||||
key: "_addEventListeners",
|
||||
value: function _addEventListeners() {
|
||||
var _this2 = this;
|
||||
|
||||
if (this._config.keyboard) {
|
||||
$(this._element).on(Event.KEYDOWN, $.proxy(this._keydown, this));
|
||||
$(this._element).on(Event.KEYDOWN, function (event) {
|
||||
return _this2._keydown(event);
|
||||
});
|
||||
}
|
||||
|
||||
if (this._config.pause === 'hover' && !('ontouchstart' in document.documentElement)) {
|
||||
$(this._element).on(Event.MOUSEENTER, $.proxy(this.pause, this)).on(Event.MOUSELEAVE, $.proxy(this.cycle, this));
|
||||
if (this._config.pause === 'hover') {
|
||||
$(this._element).on(Event.MOUSEENTER, function (event) {
|
||||
return _this2.pause(event);
|
||||
}).on(Event.MOUSELEAVE, function (event) {
|
||||
return _this2.cycle(event);
|
||||
});
|
||||
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
// If it's a touch-enabled device, mouseenter/leave are fired as
|
||||
// part of the mouse compatibility events on first tap - the carousel
|
||||
// would stop cycling until user tapped out of it;
|
||||
// here, we listen for touchend, explicitly pause the carousel
|
||||
// (as if it's the second time we tap on it, mouseenter compat event
|
||||
// is NOT fired) and after a timeout (to allow for mouse compatibility
|
||||
// events to fire) we explicitly restart cycling
|
||||
$(this._element).on(Event.TOUCHEND, function () {
|
||||
_this2.pause();
|
||||
|
||||
if (_this2.touchTimeout) {
|
||||
clearTimeout(_this2.touchTimeout);
|
||||
}
|
||||
|
||||
_this2.touchTimeout = setTimeout(function (event) {
|
||||
return _this2.cycle(event);
|
||||
}, TOUCHEVENT_COMPAT_WAIT + _this2._config.interval);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: '_keydown',
|
||||
key: "_keydown",
|
||||
value: function _keydown(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (/input|textarea/i.test(event.target.tagName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (event.which) {
|
||||
case ARROW_LEFT_KEYCODE:
|
||||
event.preventDefault();
|
||||
this.prev();
|
||||
break;
|
||||
|
||||
case ARROW_RIGHT_KEYCODE:
|
||||
event.preventDefault();
|
||||
this.next();
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: '_getItemIndex',
|
||||
key: "_getItemIndex",
|
||||
value: function _getItemIndex(element) {
|
||||
this._items = $.makeArray($(element).parent().find(Selector.ITEM));
|
||||
return this._items.indexOf(element);
|
||||
}
|
||||
}, {
|
||||
key: '_getItemByDirection',
|
||||
key: "_getItemByDirection",
|
||||
value: function _getItemByDirection(direction, activeElement) {
|
||||
var isNextDirection = direction === Direction.NEXT;
|
||||
var isPrevDirection = direction === Direction.PREVIOUS;
|
||||
var isPrevDirection = direction === Direction.PREV;
|
||||
|
||||
var activeIndex = this._getItemIndex(activeElement);
|
||||
|
||||
var lastItemIndex = this._items.length - 1;
|
||||
var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
|
||||
|
||||
@ -299,25 +358,28 @@ define(['exports', './util'], function (exports, _util) {
|
||||
return activeElement;
|
||||
}
|
||||
|
||||
var delta = direction === Direction.PREVIOUS ? -1 : 1;
|
||||
var delta = direction === Direction.PREV ? -1 : 1;
|
||||
var itemIndex = (activeIndex + delta) % this._items.length;
|
||||
|
||||
return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
|
||||
}
|
||||
}, {
|
||||
key: '_triggerSlideEvent',
|
||||
value: function _triggerSlideEvent(relatedTarget, directionalClassname) {
|
||||
key: "_triggerSlideEvent",
|
||||
value: function _triggerSlideEvent(relatedTarget, eventDirectionName) {
|
||||
var targetIndex = this._getItemIndex(relatedTarget);
|
||||
|
||||
var fromIndex = this._getItemIndex($(this._element).find(Selector.ACTIVE_ITEM)[0]);
|
||||
|
||||
var slideEvent = $.Event(Event.SLIDE, {
|
||||
relatedTarget: relatedTarget,
|
||||
direction: directionalClassname
|
||||
direction: eventDirectionName,
|
||||
from: fromIndex,
|
||||
to: targetIndex
|
||||
});
|
||||
|
||||
$(this._element).trigger(slideEvent);
|
||||
|
||||
return slideEvent;
|
||||
}
|
||||
}, {
|
||||
key: '_setActiveIndicatorElement',
|
||||
key: "_setActiveIndicatorElement",
|
||||
value: function _setActiveIndicatorElement(element) {
|
||||
if (this._indicatorsElement) {
|
||||
$(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
|
||||
@ -330,29 +392,46 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: '_slide',
|
||||
key: "_slide",
|
||||
value: function _slide(direction, element) {
|
||||
var _this2 = this;
|
||||
var _this3 = this;
|
||||
|
||||
var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
|
||||
|
||||
var activeElementIndex = this._getItemIndex(activeElement);
|
||||
|
||||
var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
|
||||
|
||||
var isCycling = Boolean(this._interval);
|
||||
var nextElementIndex = this._getItemIndex(nextElement);
|
||||
|
||||
var directionalClassName = direction === Direction.NEXT ? ClassName.LEFT : ClassName.RIGHT;
|
||||
var isCycling = Boolean(this._interval);
|
||||
var directionalClassName;
|
||||
var orderClassName;
|
||||
var eventDirectionName;
|
||||
|
||||
if (direction === Direction.NEXT) {
|
||||
directionalClassName = ClassName.LEFT;
|
||||
orderClassName = ClassName.NEXT;
|
||||
eventDirectionName = Direction.LEFT;
|
||||
} else {
|
||||
directionalClassName = ClassName.RIGHT;
|
||||
orderClassName = ClassName.PREV;
|
||||
eventDirectionName = Direction.RIGHT;
|
||||
}
|
||||
|
||||
if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {
|
||||
this._isSliding = false;
|
||||
return;
|
||||
}
|
||||
|
||||
var slideEvent = this._triggerSlideEvent(nextElement, directionalClassName);
|
||||
var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
|
||||
|
||||
if (slideEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!activeElement || !nextElement) {
|
||||
// some weirdness is happening, so we bail
|
||||
// Some weirdness is happening, so we bail
|
||||
return;
|
||||
}
|
||||
|
||||
@ -366,35 +445,29 @@ define(['exports', './util'], function (exports, _util) {
|
||||
|
||||
var slidEvent = $.Event(Event.SLID, {
|
||||
relatedTarget: nextElement,
|
||||
direction: directionalClassName
|
||||
direction: eventDirectionName,
|
||||
from: activeElementIndex,
|
||||
to: nextElementIndex
|
||||
});
|
||||
|
||||
if (_util2.default.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) {
|
||||
|
||||
$(nextElement).addClass(direction);
|
||||
$(nextElement).addClass(orderClassName);
|
||||
|
||||
_util2.default.reflow(nextElement);
|
||||
|
||||
$(activeElement).addClass(directionalClassName);
|
||||
$(nextElement).addClass(directionalClassName);
|
||||
|
||||
$(activeElement).one(_util2.default.TRANSITION_END, function () {
|
||||
$(nextElement).removeClass(directionalClassName).removeClass(direction);
|
||||
|
||||
$(nextElement).addClass(ClassName.ACTIVE);
|
||||
|
||||
$(activeElement).removeClass(ClassName.ACTIVE).removeClass(direction).removeClass(directionalClassName);
|
||||
|
||||
_this2._isSliding = false;
|
||||
|
||||
$(nextElement).removeClass("".concat(directionalClassName, " ").concat(orderClassName)).addClass(ClassName.ACTIVE);
|
||||
$(activeElement).removeClass("".concat(ClassName.ACTIVE, " ").concat(orderClassName, " ").concat(directionalClassName));
|
||||
_this3._isSliding = false;
|
||||
setTimeout(function () {
|
||||
return $(_this2._element).trigger(slidEvent);
|
||||
return $(_this3._element).trigger(slidEvent);
|
||||
}, 0);
|
||||
}).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
} else {
|
||||
$(activeElement).removeClass(ClassName.ACTIVE);
|
||||
$(nextElement).addClass(ClassName.ACTIVE);
|
||||
|
||||
this._isSliding = false;
|
||||
$(this._element).trigger(slidEvent);
|
||||
}
|
||||
@ -404,14 +477,15 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
}
|
||||
}], [{
|
||||
key: '_jQueryInterface',
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
var _config = $.extend({}, Default, $(this).data());
|
||||
|
||||
if ((typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object') {
|
||||
$.extend(_config, config);
|
||||
var _config = _extends({}, Default, $(this).data());
|
||||
|
||||
if (_typeof(config) === 'object') {
|
||||
_config = _extends({}, _config, config);
|
||||
}
|
||||
|
||||
var action = typeof config === 'string' ? config : _config.slide;
|
||||
@ -424,9 +498,10 @@ define(['exports', './util'], function (exports, _util) {
|
||||
if (typeof config === 'number') {
|
||||
data.to(config);
|
||||
} else if (typeof action === 'string') {
|
||||
if (data[action] === undefined) {
|
||||
throw new Error('No method named "' + action + '"');
|
||||
if (typeof data[action] === 'undefined') {
|
||||
throw new TypeError("No method named \"".concat(action, "\""));
|
||||
}
|
||||
|
||||
data[action]();
|
||||
} else if (_config.interval) {
|
||||
data.pause();
|
||||
@ -435,7 +510,7 @@ define(['exports', './util'], function (exports, _util) {
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: '_dataApiClickHandler',
|
||||
key: "_dataApiClickHandler",
|
||||
value: function _dataApiClickHandler(event) {
|
||||
var selector = _util2.default.getSelectorFromElement(this);
|
||||
|
||||
@ -449,7 +524,8 @@ define(['exports', './util'], function (exports, _util) {
|
||||
return;
|
||||
}
|
||||
|
||||
var config = $.extend({}, $(target).data(), $(this).data());
|
||||
var config = _extends({}, $(target).data(), $(this).data());
|
||||
|
||||
var slideIndex = this.getAttribute('data-slide-to');
|
||||
|
||||
if (slideIndex) {
|
||||
@ -465,12 +541,12 @@ define(['exports', './util'], function (exports, _util) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}, {
|
||||
key: 'VERSION',
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: 'Default',
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
@ -484,16 +560,14 @@ define(['exports', './util'], function (exports, _util) {
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
|
||||
|
||||
$(window).on(Event.LOAD_DATA_API, function () {
|
||||
$(Selector.DATA_RIDE).each(function () {
|
||||
var $carousel = $(this);
|
||||
|
||||
Carousel._jQueryInterface.call($carousel, $carousel.data());
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
@ -502,13 +576,14 @@ define(['exports', './util'], function (exports, _util) {
|
||||
|
||||
$.fn[NAME] = Carousel._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Carousel;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Carousel._jQueryInterface;
|
||||
};
|
||||
|
||||
return Carousel;
|
||||
}(jQuery);
|
||||
}(_jquery2.default);
|
||||
|
||||
exports.default = Carousel;
|
||||
});
|
@ -1,10 +1,12 @@
|
||||
define(['exports', './util'], function (exports, _util) {
|
||||
'use strict';
|
||||
define(["exports", "jquery", "./util"], function (exports, _jquery, _util) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _jquery2 = _interopRequireDefault(_jquery);
|
||||
|
||||
var _util2 = _interopRequireDefault(_util);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
@ -13,11 +15,37 @@ define(['exports', './util'], function (exports, _util) {
|
||||
};
|
||||
}
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
||||
return typeof obj;
|
||||
} : function (obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
||||
};
|
||||
function _typeof(obj) {
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
_typeof = function _typeof(obj) {
|
||||
return typeof obj;
|
||||
};
|
||||
} else {
|
||||
_typeof = function _typeof(obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
||||
};
|
||||
}
|
||||
|
||||
return _typeof(obj);
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
@ -25,87 +53,76 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
}
|
||||
|
||||
var _createClass = function () {
|
||||
function defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
return function (Constructor, protoProps, staticProps) {
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
};
|
||||
}();
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.0.0-alpha.4): collapse.js
|
||||
* Bootstrap (v4.0.0): collapse.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Collapse = function ($) {
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'collapse';
|
||||
var VERSION = '4.0.0-alpha.4';
|
||||
var VERSION = '4.0.0';
|
||||
var DATA_KEY = 'bs.collapse';
|
||||
var EVENT_KEY = '.' + DATA_KEY;
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var TRANSITION_DURATION = 600;
|
||||
|
||||
var Default = {
|
||||
toggle: true,
|
||||
parent: ''
|
||||
};
|
||||
|
||||
var DefaultType = {
|
||||
toggle: 'boolean',
|
||||
parent: 'string'
|
||||
parent: '(string|element)'
|
||||
};
|
||||
|
||||
var Event = {
|
||||
SHOW: 'show' + EVENT_KEY,
|
||||
SHOWN: 'shown' + EVENT_KEY,
|
||||
HIDE: 'hide' + EVENT_KEY,
|
||||
HIDDEN: 'hidden' + EVENT_KEY,
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
|
||||
SHOW: "show".concat(EVENT_KEY),
|
||||
SHOWN: "shown".concat(EVENT_KEY),
|
||||
HIDE: "hide".concat(EVENT_KEY),
|
||||
HIDDEN: "hidden".concat(EVENT_KEY),
|
||||
CLICK_DATA_API: "click".concat(EVENT_KEY).concat(DATA_API_KEY)
|
||||
};
|
||||
|
||||
var ClassName = {
|
||||
IN: 'in',
|
||||
SHOW: 'show',
|
||||
COLLAPSE: 'collapse',
|
||||
COLLAPSING: 'collapsing',
|
||||
COLLAPSED: 'collapsed'
|
||||
};
|
||||
|
||||
var Dimension = {
|
||||
WIDTH: 'width',
|
||||
HEIGHT: 'height'
|
||||
};
|
||||
|
||||
var Selector = {
|
||||
ACTIVES: '.panel > .in, .panel > .collapsing',
|
||||
ACTIVES: '.show, .collapsing',
|
||||
DATA_TOGGLE: '[data-toggle="collapse"]'
|
||||
};
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
};
|
||||
|
||||
var Collapse = function () {
|
||||
function Collapse(element, config) {
|
||||
@ -114,7 +131,20 @@ define(['exports', './util'], function (exports, _util) {
|
||||
this._isTransitioning = false;
|
||||
this._element = element;
|
||||
this._config = this._getConfig(config);
|
||||
this._triggerArray = $.makeArray($('[data-toggle="collapse"][href="#' + element.id + '"],' + ('[data-toggle="collapse"][data-target="#' + element.id + '"]')));
|
||||
this._triggerArray = $.makeArray($("[data-toggle=\"collapse\"][href=\"#".concat(element.id, "\"],") + "[data-toggle=\"collapse\"][data-target=\"#".concat(element.id, "\"]")));
|
||||
var tabToggles = $(Selector.DATA_TOGGLE);
|
||||
|
||||
for (var i = 0; i < tabToggles.length; i++) {
|
||||
var elem = tabToggles[i];
|
||||
|
||||
var selector = _util2.default.getSelectorFromElement(elem);
|
||||
|
||||
if (selector !== null && $(selector).filter(element).length > 0) {
|
||||
this._selector = selector;
|
||||
|
||||
this._triggerArray.push(elem);
|
||||
}
|
||||
}
|
||||
|
||||
this._parent = this._config.parent ? this._getParent() : null;
|
||||
|
||||
@ -125,40 +155,41 @@ define(['exports', './util'], function (exports, _util) {
|
||||
if (this._config.toggle) {
|
||||
this.toggle();
|
||||
}
|
||||
}
|
||||
} // Getters
|
||||
|
||||
// getters
|
||||
|
||||
_createClass(Collapse, [{
|
||||
key: 'toggle',
|
||||
key: "toggle",
|
||||
value: function toggle() {
|
||||
if ($(this._element).hasClass(ClassName.IN)) {
|
||||
if ($(this._element).hasClass(ClassName.SHOW)) {
|
||||
this.hide();
|
||||
} else {
|
||||
this.show();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'show',
|
||||
key: "show",
|
||||
value: function show() {
|
||||
var _this = this;
|
||||
|
||||
if (this._isTransitioning || $(this._element).hasClass(ClassName.IN)) {
|
||||
if (this._isTransitioning || $(this._element).hasClass(ClassName.SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var actives = void 0;
|
||||
var activesData = void 0;
|
||||
var actives;
|
||||
var activesData;
|
||||
|
||||
if (this._parent) {
|
||||
actives = $.makeArray($(Selector.ACTIVES));
|
||||
if (!actives.length) {
|
||||
actives = $.makeArray($(this._parent).find(Selector.ACTIVES).filter("[data-parent=\"".concat(this._config.parent, "\"]")));
|
||||
|
||||
if (actives.length === 0) {
|
||||
actives = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (actives) {
|
||||
activesData = $(actives).data(DATA_KEY);
|
||||
activesData = $(actives).not(this._selector).data(DATA_KEY);
|
||||
|
||||
if (activesData && activesData._isTransitioning) {
|
||||
return;
|
||||
}
|
||||
@ -166,12 +197,14 @@ define(['exports', './util'], function (exports, _util) {
|
||||
|
||||
var startEvent = $.Event(Event.SHOW);
|
||||
$(this._element).trigger(startEvent);
|
||||
|
||||
if (startEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (actives) {
|
||||
Collapse._jQueryInterface.call($(actives), 'hide');
|
||||
Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide');
|
||||
|
||||
if (!activesData) {
|
||||
$(actives).data(DATA_KEY, null);
|
||||
}
|
||||
@ -180,19 +213,16 @@ define(['exports', './util'], function (exports, _util) {
|
||||
var dimension = this._getDimension();
|
||||
|
||||
$(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
|
||||
|
||||
this._element.style[dimension] = 0;
|
||||
this._element.setAttribute('aria-expanded', true);
|
||||
|
||||
if (this._triggerArray.length) {
|
||||
if (this._triggerArray.length > 0) {
|
||||
$(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);
|
||||
}
|
||||
|
||||
this.setTransitioning(true);
|
||||
|
||||
var complete = function complete() {
|
||||
$(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.IN);
|
||||
|
||||
$(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);
|
||||
_this._element.style[dimension] = '';
|
||||
|
||||
_this.setTransitioning(false);
|
||||
@ -206,50 +236,59 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
|
||||
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
|
||||
var scrollSize = 'scroll' + capitalizedDimension;
|
||||
|
||||
var scrollSize = "scroll".concat(capitalizedDimension);
|
||||
$(this._element).one(_util2.default.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
|
||||
this._element.style[dimension] = this._element[scrollSize] + 'px';
|
||||
this._element.style[dimension] = "".concat(this._element[scrollSize], "px");
|
||||
}
|
||||
}, {
|
||||
key: 'hide',
|
||||
key: "hide",
|
||||
value: function hide() {
|
||||
var _this2 = this;
|
||||
|
||||
if (this._isTransitioning || !$(this._element).hasClass(ClassName.IN)) {
|
||||
if (this._isTransitioning || !$(this._element).hasClass(ClassName.SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var startEvent = $.Event(Event.HIDE);
|
||||
$(this._element).trigger(startEvent);
|
||||
|
||||
if (startEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
var dimension = this._getDimension();
|
||||
var offsetDimension = dimension === Dimension.WIDTH ? 'offsetWidth' : 'offsetHeight';
|
||||
|
||||
this._element.style[dimension] = this._element[offsetDimension] + 'px';
|
||||
this._element.style[dimension] = "".concat(this._element.getBoundingClientRect()[dimension], "px");
|
||||
|
||||
_util2.default.reflow(this._element);
|
||||
|
||||
$(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.IN);
|
||||
$(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);
|
||||
|
||||
this._element.setAttribute('aria-expanded', false);
|
||||
if (this._triggerArray.length > 0) {
|
||||
for (var i = 0; i < this._triggerArray.length; i++) {
|
||||
var trigger = this._triggerArray[i];
|
||||
|
||||
if (this._triggerArray.length) {
|
||||
$(this._triggerArray).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
|
||||
var selector = _util2.default.getSelectorFromElement(trigger);
|
||||
|
||||
if (selector !== null) {
|
||||
var $elem = $(selector);
|
||||
|
||||
if (!$elem.hasClass(ClassName.SHOW)) {
|
||||
$(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.setTransitioning(true);
|
||||
|
||||
var complete = function complete() {
|
||||
_this2.setTransitioning(false);
|
||||
|
||||
$(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
|
||||
};
|
||||
|
||||
this._element.style[dimension] = 0;
|
||||
this._element.style[dimension] = '';
|
||||
|
||||
if (!_util2.default.supportsTransitionEnd()) {
|
||||
complete();
|
||||
@ -259,15 +298,14 @@ define(['exports', './util'], function (exports, _util) {
|
||||
$(this._element).one(_util2.default.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
}
|
||||
}, {
|
||||
key: 'setTransitioning',
|
||||
key: "setTransitioning",
|
||||
value: function setTransitioning(isTransitioning) {
|
||||
this._isTransitioning = isTransitioning;
|
||||
}
|
||||
}, {
|
||||
key: 'dispose',
|
||||
key: "dispose",
|
||||
value: function dispose() {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
|
||||
this._config = null;
|
||||
this._parent = null;
|
||||
this._element = null;
|
||||
@ -275,58 +313,70 @@ define(['exports', './util'], function (exports, _util) {
|
||||
this._isTransitioning = null;
|
||||
}
|
||||
}, {
|
||||
key: '_getConfig',
|
||||
key: "_getConfig",
|
||||
value: function _getConfig(config) {
|
||||
config = $.extend({}, Default, config);
|
||||
config.toggle = Boolean(config.toggle); // coerce string values
|
||||
config = _extends({}, Default, config);
|
||||
config.toggle = Boolean(config.toggle); // Coerce string values
|
||||
|
||||
_util2.default.typeCheckConfig(NAME, config, DefaultType);
|
||||
|
||||
return config;
|
||||
}
|
||||
}, {
|
||||
key: '_getDimension',
|
||||
key: "_getDimension",
|
||||
value: function _getDimension() {
|
||||
var hasWidth = $(this._element).hasClass(Dimension.WIDTH);
|
||||
return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
|
||||
}
|
||||
}, {
|
||||
key: '_getParent',
|
||||
key: "_getParent",
|
||||
value: function _getParent() {
|
||||
var _this3 = this;
|
||||
|
||||
var parent = $(this._config.parent)[0];
|
||||
var selector = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]';
|
||||
var parent = null;
|
||||
|
||||
if (_util2.default.isElement(this._config.parent)) {
|
||||
parent = this._config.parent; // It's a jQuery object
|
||||
|
||||
if (typeof this._config.parent.jquery !== 'undefined') {
|
||||
parent = this._config.parent[0];
|
||||
}
|
||||
} else {
|
||||
parent = $(this._config.parent)[0];
|
||||
}
|
||||
|
||||
var selector = "[data-toggle=\"collapse\"][data-parent=\"".concat(this._config.parent, "\"]");
|
||||
$(parent).find(selector).each(function (i, element) {
|
||||
_this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
|
||||
});
|
||||
|
||||
return parent;
|
||||
}
|
||||
}, {
|
||||
key: '_addAriaAndCollapsedClass',
|
||||
key: "_addAriaAndCollapsedClass",
|
||||
value: function _addAriaAndCollapsedClass(element, triggerArray) {
|
||||
if (element) {
|
||||
var isOpen = $(element).hasClass(ClassName.IN);
|
||||
element.setAttribute('aria-expanded', isOpen);
|
||||
var isOpen = $(element).hasClass(ClassName.SHOW);
|
||||
|
||||
if (triggerArray.length) {
|
||||
if (triggerArray.length > 0) {
|
||||
$(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
|
||||
}
|
||||
}
|
||||
}
|
||||
}], [{
|
||||
key: '_getTargetFromElement',
|
||||
key: "_getTargetFromElement",
|
||||
value: function _getTargetFromElement(element) {
|
||||
var selector = _util2.default.getSelectorFromElement(element);
|
||||
|
||||
return selector ? $(selector)[0] : null;
|
||||
}
|
||||
}, {
|
||||
key: '_jQueryInterface',
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $this = $(this);
|
||||
var data = $this.data(DATA_KEY);
|
||||
var _config = $.extend({}, Default, $this.data(), (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config);
|
||||
|
||||
var _config = _extends({}, Default, $this.data(), _typeof(config) === 'object' && config);
|
||||
|
||||
if (!data && _config.toggle && /show|hide/.test(config)) {
|
||||
_config.toggle = false;
|
||||
@ -338,20 +388,21 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (data[config] === undefined) {
|
||||
throw new Error('No method named "' + config + '"');
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"".concat(config, "\""));
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: 'VERSION',
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: 'Default',
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
@ -365,17 +416,24 @@ define(['exports', './util'], function (exports, _util) {
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
event.preventDefault();
|
||||
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
|
||||
if (event.currentTarget.tagName === 'A') {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
var target = Collapse._getTargetFromElement(this);
|
||||
var data = $(target).data(DATA_KEY);
|
||||
var config = data ? 'toggle' : $(this).data();
|
||||
var $trigger = $(this);
|
||||
|
||||
Collapse._jQueryInterface.call($(target), config);
|
||||
var selector = _util2.default.getSelectorFromElement(this);
|
||||
|
||||
$(selector).each(function () {
|
||||
var $target = $(this);
|
||||
var data = $target.data(DATA_KEY);
|
||||
var config = data ? 'toggle' : $trigger.data();
|
||||
|
||||
Collapse._jQueryInterface.call($target, config);
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
@ -384,13 +442,14 @@ define(['exports', './util'], function (exports, _util) {
|
||||
|
||||
$.fn[NAME] = Collapse._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Collapse;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Collapse._jQueryInterface;
|
||||
};
|
||||
|
||||
return Collapse;
|
||||
}(jQuery);
|
||||
}(_jquery2.default);
|
||||
|
||||
exports.default = Collapse;
|
||||
});
|
@ -1,10 +1,14 @@
|
||||
define(['exports', './util'], function (exports, _util) {
|
||||
'use strict';
|
||||
define(["exports", "jquery", "core/popper", "./util"], function (exports, _jquery, _popper, _util) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _jquery2 = _interopRequireDefault(_jquery);
|
||||
|
||||
var _popper2 = _interopRequireDefault(_popper);
|
||||
|
||||
var _util2 = _interopRequireDefault(_util);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
@ -13,212 +17,417 @@ define(['exports', './util'], function (exports, _util) {
|
||||
};
|
||||
}
|
||||
|
||||
function _typeof(obj) {
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
_typeof = function _typeof(obj) {
|
||||
return typeof obj;
|
||||
};
|
||||
} else {
|
||||
_typeof = function _typeof(obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
||||
};
|
||||
}
|
||||
|
||||
return _typeof(obj);
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
}
|
||||
}
|
||||
|
||||
var _createClass = function () {
|
||||
function defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
return function (Constructor, protoProps, staticProps) {
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
};
|
||||
}();
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.0.0-alpha.4): dropdown.js
|
||||
* Bootstrap (v4.0.0): dropdown.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Dropdown = function ($) {
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'dropdown';
|
||||
var VERSION = '4.0.0-alpha.4';
|
||||
var VERSION = '4.0.0';
|
||||
var DATA_KEY = 'bs.dropdown';
|
||||
var EVENT_KEY = '.' + DATA_KEY;
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
|
||||
|
||||
var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
|
||||
|
||||
var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key
|
||||
|
||||
var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key
|
||||
|
||||
var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key
|
||||
|
||||
var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
|
||||
|
||||
var REGEXP_KEYDOWN = new RegExp("".concat(ARROW_UP_KEYCODE, "|").concat(ARROW_DOWN_KEYCODE, "|").concat(ESCAPE_KEYCODE));
|
||||
var Event = {
|
||||
HIDE: 'hide' + EVENT_KEY,
|
||||
HIDDEN: 'hidden' + EVENT_KEY,
|
||||
SHOW: 'show' + EVENT_KEY,
|
||||
SHOWN: 'shown' + EVENT_KEY,
|
||||
CLICK: 'click' + EVENT_KEY,
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY,
|
||||
KEYDOWN_DATA_API: 'keydown' + EVENT_KEY + DATA_API_KEY
|
||||
HIDE: "hide".concat(EVENT_KEY),
|
||||
HIDDEN: "hidden".concat(EVENT_KEY),
|
||||
SHOW: "show".concat(EVENT_KEY),
|
||||
SHOWN: "shown".concat(EVENT_KEY),
|
||||
CLICK: "click".concat(EVENT_KEY),
|
||||
CLICK_DATA_API: "click".concat(EVENT_KEY).concat(DATA_API_KEY),
|
||||
KEYDOWN_DATA_API: "keydown".concat(EVENT_KEY).concat(DATA_API_KEY),
|
||||
KEYUP_DATA_API: "keyup".concat(EVENT_KEY).concat(DATA_API_KEY)
|
||||
};
|
||||
|
||||
var ClassName = {
|
||||
BACKDROP: 'dropdown-backdrop',
|
||||
DISABLED: 'disabled',
|
||||
OPEN: 'open'
|
||||
SHOW: 'show',
|
||||
DROPUP: 'dropup',
|
||||
DROPRIGHT: 'dropright',
|
||||
DROPLEFT: 'dropleft',
|
||||
MENURIGHT: 'dropdown-menu-right',
|
||||
MENULEFT: 'dropdown-menu-left',
|
||||
POSITION_STATIC: 'position-static'
|
||||
};
|
||||
|
||||
var Selector = {
|
||||
BACKDROP: '.dropdown-backdrop',
|
||||
DATA_TOGGLE: '[data-toggle="dropdown"]',
|
||||
FORM_CHILD: '.dropdown form',
|
||||
ROLE_MENU: '[role="menu"]',
|
||||
ROLE_LISTBOX: '[role="listbox"]',
|
||||
MENU: '.dropdown-menu',
|
||||
NAVBAR_NAV: '.navbar-nav',
|
||||
VISIBLE_ITEMS: '[role="menu"] li:not(.disabled) a, ' + '[role="listbox"] li:not(.disabled) a'
|
||||
VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled)'
|
||||
};
|
||||
var AttachmentMap = {
|
||||
TOP: 'top-start',
|
||||
TOPEND: 'top-end',
|
||||
BOTTOM: 'bottom-start',
|
||||
BOTTOMEND: 'bottom-end',
|
||||
RIGHT: 'right-start',
|
||||
RIGHTEND: 'right-end',
|
||||
LEFT: 'left-start',
|
||||
LEFTEND: 'left-end'
|
||||
};
|
||||
var Default = {
|
||||
offset: 0,
|
||||
flip: false,
|
||||
boundary: 'scrollParent'
|
||||
};
|
||||
var DefaultType = {
|
||||
offset: '(number|string|function)',
|
||||
flip: 'boolean',
|
||||
boundary: '(string|element)'
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Dropdown = function () {
|
||||
function Dropdown(element) {
|
||||
function Dropdown(element, config) {
|
||||
_classCallCheck(this, Dropdown);
|
||||
|
||||
this._element = element;
|
||||
this._popper = null;
|
||||
this._config = this._getConfig(config);
|
||||
this._menu = this._getMenuElement();
|
||||
this._inNavbar = this._detectNavbar();
|
||||
|
||||
this._addEventListeners();
|
||||
}
|
||||
} // Getters
|
||||
|
||||
// getters
|
||||
|
||||
_createClass(Dropdown, [{
|
||||
key: 'toggle',
|
||||
key: "toggle",
|
||||
value: function toggle() {
|
||||
if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
|
||||
return false;
|
||||
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var parent = Dropdown._getParentFromElement(this);
|
||||
var isActive = $(parent).hasClass(ClassName.OPEN);
|
||||
var parent = Dropdown._getParentFromElement(this._element);
|
||||
|
||||
var isActive = $(this._menu).hasClass(ClassName.SHOW);
|
||||
|
||||
Dropdown._clearMenus();
|
||||
|
||||
if (isActive) {
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {
|
||||
|
||||
// if mobile we use a backdrop because click events don't delegate
|
||||
var dropdown = document.createElement('div');
|
||||
dropdown.className = ClassName.BACKDROP;
|
||||
$(dropdown).insertBefore(this);
|
||||
$(dropdown).on('click', Dropdown._clearMenus);
|
||||
}
|
||||
|
||||
var relatedTarget = { relatedTarget: this };
|
||||
var relatedTarget = {
|
||||
relatedTarget: this._element
|
||||
};
|
||||
var showEvent = $.Event(Event.SHOW, relatedTarget);
|
||||
|
||||
$(parent).trigger(showEvent);
|
||||
|
||||
if (showEvent.isDefaultPrevented()) {
|
||||
return false;
|
||||
return;
|
||||
} // Disable totally Popper.js for Dropdown in Navbar
|
||||
|
||||
|
||||
if (!this._inNavbar) {
|
||||
/**
|
||||
* Check for Popper dependency
|
||||
* Popper - https://popper.js.org
|
||||
*/
|
||||
if (typeof _popper2.default === 'undefined') {
|
||||
throw new TypeError('Bootstrap dropdown require Popper.js (https://popper.js.org)');
|
||||
}
|
||||
|
||||
var element = this._element; // For dropup with alignment we use the parent as popper container
|
||||
|
||||
if ($(parent).hasClass(ClassName.DROPUP)) {
|
||||
if ($(this._menu).hasClass(ClassName.MENULEFT) || $(this._menu).hasClass(ClassName.MENURIGHT)) {
|
||||
element = parent;
|
||||
}
|
||||
} // If boundary is not `scrollParent`, then set position to `static`
|
||||
// to allow the menu to "escape" the scroll parent's boundaries
|
||||
// https://github.com/twbs/bootstrap/issues/24251
|
||||
|
||||
|
||||
if (this._config.boundary !== 'scrollParent') {
|
||||
$(parent).addClass(ClassName.POSITION_STATIC);
|
||||
}
|
||||
|
||||
this._popper = new _popper2.default(element, this._menu, this._getPopperConfig());
|
||||
} // If this is a touch-enabled device we add extra
|
||||
// empty mouseover listeners to the body's immediate children;
|
||||
// only needed because of broken event delegation on iOS
|
||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||
|
||||
|
||||
if ('ontouchstart' in document.documentElement && $(parent).closest(Selector.NAVBAR_NAV).length === 0) {
|
||||
$('body').children().on('mouseover', null, $.noop);
|
||||
}
|
||||
|
||||
this.focus();
|
||||
this.setAttribute('aria-expanded', 'true');
|
||||
this._element.focus();
|
||||
|
||||
$(parent).toggleClass(ClassName.OPEN);
|
||||
$(parent).trigger($.Event(Event.SHOWN, relatedTarget));
|
||||
this._element.setAttribute('aria-expanded', true);
|
||||
|
||||
return false;
|
||||
$(this._menu).toggleClass(ClassName.SHOW);
|
||||
$(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.SHOWN, relatedTarget));
|
||||
}
|
||||
}, {
|
||||
key: 'dispose',
|
||||
key: "dispose",
|
||||
value: function dispose() {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
$(this._element).off(EVENT_KEY);
|
||||
this._element = null;
|
||||
this._menu = null;
|
||||
|
||||
if (this._popper !== null) {
|
||||
this._popper.destroy();
|
||||
|
||||
this._popper = null;
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: '_addEventListeners',
|
||||
key: "update",
|
||||
value: function update() {
|
||||
this._inNavbar = this._detectNavbar();
|
||||
|
||||
if (this._popper !== null) {
|
||||
this._popper.scheduleUpdate();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "_addEventListeners",
|
||||
value: function _addEventListeners() {
|
||||
$(this._element).on(Event.CLICK, this.toggle);
|
||||
var _this = this;
|
||||
|
||||
$(this._element).on(Event.CLICK, function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
_this.toggle();
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "_getConfig",
|
||||
value: function _getConfig(config) {
|
||||
config = _extends({}, this.constructor.Default, $(this._element).data(), config);
|
||||
|
||||
_util2.default.typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||
|
||||
return config;
|
||||
}
|
||||
}, {
|
||||
key: "_getMenuElement",
|
||||
value: function _getMenuElement() {
|
||||
if (!this._menu) {
|
||||
var parent = Dropdown._getParentFromElement(this._element);
|
||||
|
||||
this._menu = $(parent).find(Selector.MENU)[0];
|
||||
}
|
||||
|
||||
return this._menu;
|
||||
}
|
||||
}, {
|
||||
key: "_getPlacement",
|
||||
value: function _getPlacement() {
|
||||
var $parentDropdown = $(this._element).parent();
|
||||
var placement = AttachmentMap.BOTTOM; // Handle dropup
|
||||
|
||||
if ($parentDropdown.hasClass(ClassName.DROPUP)) {
|
||||
placement = AttachmentMap.TOP;
|
||||
|
||||
if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
|
||||
placement = AttachmentMap.TOPEND;
|
||||
}
|
||||
} else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) {
|
||||
placement = AttachmentMap.RIGHT;
|
||||
} else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) {
|
||||
placement = AttachmentMap.LEFT;
|
||||
} else if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
|
||||
placement = AttachmentMap.BOTTOMEND;
|
||||
}
|
||||
|
||||
return placement;
|
||||
}
|
||||
}, {
|
||||
key: "_detectNavbar",
|
||||
value: function _detectNavbar() {
|
||||
return $(this._element).closest('.navbar').length > 0;
|
||||
}
|
||||
}, {
|
||||
key: "_getPopperConfig",
|
||||
value: function _getPopperConfig() {
|
||||
var _this2 = this;
|
||||
|
||||
var offsetConf = {};
|
||||
|
||||
if (typeof this._config.offset === 'function') {
|
||||
offsetConf.fn = function (data) {
|
||||
data.offsets = _extends({}, data.offsets, _this2._config.offset(data.offsets) || {});
|
||||
return data;
|
||||
};
|
||||
} else {
|
||||
offsetConf.offset = this._config.offset;
|
||||
}
|
||||
|
||||
var popperConfig = {
|
||||
placement: this._getPlacement(),
|
||||
modifiers: {
|
||||
offset: offsetConf,
|
||||
flip: {
|
||||
enabled: this._config.flip
|
||||
},
|
||||
preventOverflow: {
|
||||
boundariesElement: this._config.boundary
|
||||
}
|
||||
}
|
||||
};
|
||||
return popperConfig;
|
||||
}
|
||||
}], [{
|
||||
key: '_jQueryInterface',
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
|
||||
var _config = _typeof(config) === 'object' ? config : null;
|
||||
|
||||
if (!data) {
|
||||
$(this).data(DATA_KEY, data = new Dropdown(this));
|
||||
data = new Dropdown(this, _config);
|
||||
$(this).data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (data[config] === undefined) {
|
||||
throw new Error('No method named "' + config + '"');
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"".concat(config, "\""));
|
||||
}
|
||||
data[config].call(this);
|
||||
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: '_clearMenus',
|
||||
key: "_clearMenus",
|
||||
value: function _clearMenus(event) {
|
||||
if (event && event.which === RIGHT_MOUSE_BUTTON_WHICH) {
|
||||
if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var backdrop = $(Selector.BACKDROP)[0];
|
||||
if (backdrop) {
|
||||
backdrop.parentNode.removeChild(backdrop);
|
||||
}
|
||||
|
||||
var toggles = $.makeArray($(Selector.DATA_TOGGLE));
|
||||
|
||||
for (var i = 0; i < toggles.length; i++) {
|
||||
var parent = Dropdown._getParentFromElement(toggles[i]);
|
||||
var relatedTarget = { relatedTarget: toggles[i] };
|
||||
|
||||
if (!$(parent).hasClass(ClassName.OPEN)) {
|
||||
var context = $(toggles[i]).data(DATA_KEY);
|
||||
var relatedTarget = {
|
||||
relatedTarget: toggles[i]
|
||||
};
|
||||
|
||||
if (!context) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (event && event.type === 'click' && /input|textarea/i.test(event.target.tagName) && $.contains(parent, event.target)) {
|
||||
var dropdownMenu = context._menu;
|
||||
|
||||
if (!$(parent).hasClass(ClassName.SHOW)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var hideEvent = $.Event(Event.HIDE, relatedTarget);
|
||||
$(parent).trigger(hideEvent);
|
||||
|
||||
if (hideEvent.isDefaultPrevented()) {
|
||||
continue;
|
||||
} // If this is a touch-enabled device we remove the extra
|
||||
// empty mouseover listeners we added for iOS support
|
||||
|
||||
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$('body').children().off('mouseover', null, $.noop);
|
||||
}
|
||||
|
||||
toggles[i].setAttribute('aria-expanded', 'false');
|
||||
|
||||
$(parent).removeClass(ClassName.OPEN).trigger($.Event(Event.HIDDEN, relatedTarget));
|
||||
$(dropdownMenu).removeClass(ClassName.SHOW);
|
||||
$(parent).removeClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: '_getParentFromElement',
|
||||
key: "_getParentFromElement",
|
||||
value: function _getParentFromElement(element) {
|
||||
var parent = void 0;
|
||||
var parent;
|
||||
|
||||
var selector = _util2.default.getSelectorFromElement(element);
|
||||
|
||||
if (selector) {
|
||||
@ -228,9 +437,16 @@ define(['exports', './util'], function (exports, _util) {
|
||||
return parent || element.parentNode;
|
||||
}
|
||||
}, {
|
||||
key: '_dataApiKeydownHandler',
|
||||
key: "_dataApiKeydownHandler",
|
||||
value: function _dataApiKeydownHandler(event) {
|
||||
if (!/(38|40|27|32)/.test(event.which) || /input|textarea/i.test(event.target.tagName)) {
|
||||
// If not input/textarea:
|
||||
// - And not a key in REGEXP_KEYDOWN => not a dropdown command
|
||||
// If input/textarea:
|
||||
// - If space key => not a dropdown command
|
||||
// - If key is other than escape
|
||||
// - If key is not up or down => not a dropdown command
|
||||
// - If trigger inside the menu => not a dropdown command
|
||||
if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $(event.target).closest(Selector.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -242,10 +458,10 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
|
||||
var parent = Dropdown._getParentFromElement(this);
|
||||
var isActive = $(parent).hasClass(ClassName.OPEN);
|
||||
|
||||
if (!isActive && event.which !== ESCAPE_KEYCODE || isActive && event.which === ESCAPE_KEYCODE) {
|
||||
var isActive = $(parent).hasClass(ClassName.SHOW);
|
||||
|
||||
if (!isActive && (event.which !== ESCAPE_KEYCODE || event.which !== SPACE_KEYCODE) || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
|
||||
if (event.which === ESCAPE_KEYCODE) {
|
||||
var toggle = $(parent).find(Selector.DATA_TOGGLE)[0];
|
||||
$(toggle).trigger('focus');
|
||||
@ -255,25 +471,21 @@ define(['exports', './util'], function (exports, _util) {
|
||||
return;
|
||||
}
|
||||
|
||||
var items = $.makeArray($(Selector.VISIBLE_ITEMS));
|
||||
var items = $(parent).find(Selector.VISIBLE_ITEMS).get();
|
||||
|
||||
items = items.filter(function (item) {
|
||||
return item.offsetWidth || item.offsetHeight;
|
||||
});
|
||||
|
||||
if (!items.length) {
|
||||
if (items.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
var index = items.indexOf(event.target);
|
||||
|
||||
if (event.which === ARROW_UP_KEYCODE && index > 0) {
|
||||
// up
|
||||
// Up
|
||||
index--;
|
||||
}
|
||||
|
||||
if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
|
||||
// down
|
||||
// Down
|
||||
index++;
|
||||
}
|
||||
|
||||
@ -284,10 +496,20 @@ define(['exports', './util'], function (exports, _util) {
|
||||
items[index].focus();
|
||||
}
|
||||
}, {
|
||||
key: 'VERSION',
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}, {
|
||||
key: "DefaultType",
|
||||
get: function get() {
|
||||
return DefaultType;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Dropdown;
|
||||
@ -298,11 +520,14 @@ define(['exports', './util'], function (exports, _util) {
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
$(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on("".concat(Event.CLICK_DATA_API, " ").concat(Event.KEYUP_DATA_API), Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
$(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_MENU, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_LISTBOX, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
|
||||
Dropdown._jQueryInterface.call($(this), 'toggle');
|
||||
}).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
@ -311,13 +536,14 @@ define(['exports', './util'], function (exports, _util) {
|
||||
|
||||
$.fn[NAME] = Dropdown._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Dropdown;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Dropdown._jQueryInterface;
|
||||
};
|
||||
|
||||
return Dropdown;
|
||||
}(jQuery);
|
||||
}(_jquery2.default, _popper2.default);
|
||||
|
||||
exports.default = Dropdown;
|
||||
});
|
@ -37,7 +37,7 @@ define(['jquery', 'core/event'], function($, Event) {
|
||||
if (msg !== '') {
|
||||
parent.addClass('has-danger');
|
||||
parent.data('client-validation-error', true);
|
||||
$(element).addClass('form-control-danger');
|
||||
$(element).addClass('is-invalid');
|
||||
$(element).attr('aria-describedby', feedback.attr('id'));
|
||||
$(element).attr('aria-invalid', true);
|
||||
feedback.attr('tabindex', 0);
|
||||
@ -53,7 +53,7 @@ define(['jquery', 'core/event'], function($, Event) {
|
||||
if (parent.data('client-validation-error') === true) {
|
||||
parent.removeClass('has-danger');
|
||||
parent.data('client-validation-error', false);
|
||||
$(element).removeClass('form-control-danger');
|
||||
$(element).removeClass('is-invalid');
|
||||
$(element).removeAttr('aria-describedby');
|
||||
$(element).attr('aria-invalid', false);
|
||||
feedback.hide();
|
||||
|
@ -1,10 +1,12 @@
|
||||
define(['exports', './util'], function (exports, _util) {
|
||||
'use strict';
|
||||
define(["exports", "jquery", "./util"], function (exports, _jquery, _util) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _jquery2 = _interopRequireDefault(_jquery);
|
||||
|
||||
var _util2 = _interopRequireDefault(_util);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
@ -13,11 +15,37 @@ define(['exports', './util'], function (exports, _util) {
|
||||
};
|
||||
}
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
||||
return typeof obj;
|
||||
} : function (obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
||||
};
|
||||
function _typeof(obj) {
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
_typeof = function _typeof(obj) {
|
||||
return typeof obj;
|
||||
};
|
||||
} else {
|
||||
_typeof = function _typeof(obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
||||
};
|
||||
}
|
||||
|
||||
return _typeof(obj);
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
@ -25,43 +53,38 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
}
|
||||
|
||||
var _createClass = function () {
|
||||
function defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
return function (Constructor, protoProps, staticProps) {
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
};
|
||||
}();
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.0.0-alpha.4): modal.js
|
||||
* Bootstrap (v4.0.0): modal.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Modal = function ($) {
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'modal';
|
||||
var VERSION = '4.0.0-alpha.4';
|
||||
var VERSION = '4.0.0';
|
||||
var DATA_KEY = 'bs.modal';
|
||||
var EVENT_KEY = '.' + DATA_KEY;
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var TRANSITION_DURATION = 300;
|
||||
@ -74,48 +97,46 @@ define(['exports', './util'], function (exports, _util) {
|
||||
focus: true,
|
||||
show: true
|
||||
};
|
||||
|
||||
var DefaultType = {
|
||||
backdrop: '(boolean|string)',
|
||||
keyboard: 'boolean',
|
||||
focus: 'boolean',
|
||||
show: 'boolean'
|
||||
};
|
||||
|
||||
var Event = {
|
||||
HIDE: 'hide' + EVENT_KEY,
|
||||
HIDDEN: 'hidden' + EVENT_KEY,
|
||||
SHOW: 'show' + EVENT_KEY,
|
||||
SHOWN: 'shown' + EVENT_KEY,
|
||||
FOCUSIN: 'focusin' + EVENT_KEY,
|
||||
RESIZE: 'resize' + EVENT_KEY,
|
||||
CLICK_DISMISS: 'click.dismiss' + EVENT_KEY,
|
||||
KEYDOWN_DISMISS: 'keydown.dismiss' + EVENT_KEY,
|
||||
MOUSEUP_DISMISS: 'mouseup.dismiss' + EVENT_KEY,
|
||||
MOUSEDOWN_DISMISS: 'mousedown.dismiss' + EVENT_KEY,
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
|
||||
HIDE: "hide".concat(EVENT_KEY),
|
||||
HIDDEN: "hidden".concat(EVENT_KEY),
|
||||
SHOW: "show".concat(EVENT_KEY),
|
||||
SHOWN: "shown".concat(EVENT_KEY),
|
||||
FOCUSIN: "focusin".concat(EVENT_KEY),
|
||||
RESIZE: "resize".concat(EVENT_KEY),
|
||||
CLICK_DISMISS: "click.dismiss".concat(EVENT_KEY),
|
||||
KEYDOWN_DISMISS: "keydown.dismiss".concat(EVENT_KEY),
|
||||
MOUSEUP_DISMISS: "mouseup.dismiss".concat(EVENT_KEY),
|
||||
MOUSEDOWN_DISMISS: "mousedown.dismiss".concat(EVENT_KEY),
|
||||
CLICK_DATA_API: "click".concat(EVENT_KEY).concat(DATA_API_KEY)
|
||||
};
|
||||
|
||||
var ClassName = {
|
||||
SCROLLBAR_MEASURER: 'modal-scrollbar-measure',
|
||||
BACKDROP: 'modal-backdrop',
|
||||
OPEN: 'modal-open',
|
||||
FADE: 'fade',
|
||||
IN: 'in'
|
||||
SHOW: 'show'
|
||||
};
|
||||
|
||||
var Selector = {
|
||||
DIALOG: '.modal-dialog',
|
||||
DATA_TOGGLE: '[data-toggle="modal"]',
|
||||
DATA_DISMISS: '[data-dismiss="modal"]',
|
||||
FIXED_CONTENT: '.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed'
|
||||
};
|
||||
FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
|
||||
STICKY_CONTENT: '.sticky-top',
|
||||
NAVBAR_TOGGLER: '.navbar-toggler'
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
};
|
||||
|
||||
var Modal = function () {
|
||||
function Modal(element, config) {
|
||||
@ -130,24 +151,30 @@ define(['exports', './util'], function (exports, _util) {
|
||||
this._ignoreBackdropClick = false;
|
||||
this._originalBodyPadding = 0;
|
||||
this._scrollbarWidth = 0;
|
||||
}
|
||||
} // Getters
|
||||
|
||||
// getters
|
||||
|
||||
_createClass(Modal, [{
|
||||
key: 'toggle',
|
||||
key: "toggle",
|
||||
value: function toggle(relatedTarget) {
|
||||
return this._isShown ? this.hide() : this.show(relatedTarget);
|
||||
}
|
||||
}, {
|
||||
key: 'show',
|
||||
key: "show",
|
||||
value: function show(relatedTarget) {
|
||||
var _this = this;
|
||||
|
||||
if (this._isTransitioning || this._isShown) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_util2.default.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
|
||||
this._isTransitioning = true;
|
||||
}
|
||||
|
||||
var showEvent = $.Event(Event.SHOW, {
|
||||
relatedTarget: relatedTarget
|
||||
});
|
||||
|
||||
$(this._element).trigger(showEvent);
|
||||
|
||||
if (this._isShown || showEvent.isDefaultPrevented()) {
|
||||
@ -157,15 +184,20 @@ define(['exports', './util'], function (exports, _util) {
|
||||
this._isShown = true;
|
||||
|
||||
this._checkScrollbar();
|
||||
|
||||
this._setScrollbar();
|
||||
|
||||
this._adjustDialog();
|
||||
|
||||
$(document.body).addClass(ClassName.OPEN);
|
||||
|
||||
this._setEscapeEvent();
|
||||
|
||||
this._setResizeEvent();
|
||||
|
||||
$(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, $.proxy(this.hide, this));
|
||||
|
||||
$(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) {
|
||||
return _this.hide(event);
|
||||
});
|
||||
$(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {
|
||||
$(_this._element).one(Event.MOUSEUP_DISMISS, function (event) {
|
||||
if ($(event.target).is(_this._element)) {
|
||||
@ -174,17 +206,24 @@ define(['exports', './util'], function (exports, _util) {
|
||||
});
|
||||
});
|
||||
|
||||
this._showBackdrop($.proxy(this._showElement, this, relatedTarget));
|
||||
this._showBackdrop(function () {
|
||||
return _this._showElement(relatedTarget);
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: 'hide',
|
||||
key: "hide",
|
||||
value: function hide(event) {
|
||||
var _this2 = this;
|
||||
|
||||
if (event) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
var hideEvent = $.Event(Event.HIDE);
|
||||
if (this._isTransitioning || !this._isShown) {
|
||||
return;
|
||||
}
|
||||
|
||||
var hideEvent = $.Event(Event.HIDE);
|
||||
$(this._element).trigger(hideEvent);
|
||||
|
||||
if (!this._isShown || hideEvent.isDefaultPrevented()) {
|
||||
@ -192,34 +231,34 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
|
||||
this._isShown = false;
|
||||
var transition = _util2.default.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
|
||||
|
||||
if (transition) {
|
||||
this._isTransitioning = true;
|
||||
}
|
||||
|
||||
this._setEscapeEvent();
|
||||
|
||||
this._setResizeEvent();
|
||||
|
||||
$(document).off(Event.FOCUSIN);
|
||||
|
||||
$(this._element).removeClass(ClassName.IN);
|
||||
|
||||
$(this._element).removeClass(ClassName.SHOW);
|
||||
$(this._element).off(Event.CLICK_DISMISS);
|
||||
$(this._dialog).off(Event.MOUSEDOWN_DISMISS);
|
||||
|
||||
if (_util2.default.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
|
||||
|
||||
$(this._element).one(_util2.default.TRANSITION_END, $.proxy(this._hideModal, this)).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
if (transition) {
|
||||
$(this._element).one(_util2.default.TRANSITION_END, function (event) {
|
||||
return _this2._hideModal(event);
|
||||
}).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
} else {
|
||||
this._hideModal();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'dispose',
|
||||
key: "dispose",
|
||||
value: function dispose() {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
|
||||
$(window).off(EVENT_KEY);
|
||||
$(document).off(EVENT_KEY);
|
||||
$(this._element).off(EVENT_KEY);
|
||||
$(this._backdrop).off(EVENT_KEY);
|
||||
|
||||
$(window, document, this._element, this._backdrop).off(EVENT_KEY);
|
||||
this._config = null;
|
||||
this._element = null;
|
||||
this._dialog = null;
|
||||
@ -227,37 +266,45 @@ define(['exports', './util'], function (exports, _util) {
|
||||
this._isShown = null;
|
||||
this._isBodyOverflowing = null;
|
||||
this._ignoreBackdropClick = null;
|
||||
this._originalBodyPadding = null;
|
||||
this._scrollbarWidth = null;
|
||||
}
|
||||
}, {
|
||||
key: '_getConfig',
|
||||
key: "handleUpdate",
|
||||
value: function handleUpdate() {
|
||||
this._adjustDialog();
|
||||
}
|
||||
}, {
|
||||
key: "_getConfig",
|
||||
value: function _getConfig(config) {
|
||||
config = $.extend({}, Default, config);
|
||||
config = _extends({}, Default, config);
|
||||
|
||||
_util2.default.typeCheckConfig(NAME, config, DefaultType);
|
||||
|
||||
return config;
|
||||
}
|
||||
}, {
|
||||
key: '_showElement',
|
||||
key: "_showElement",
|
||||
value: function _showElement(relatedTarget) {
|
||||
var _this2 = this;
|
||||
var _this3 = this;
|
||||
|
||||
var transition = _util2.default.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
|
||||
|
||||
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
|
||||
// don't move modals dom position
|
||||
// Don't move modal's DOM position
|
||||
document.body.appendChild(this._element);
|
||||
}
|
||||
|
||||
this._element.style.display = 'block';
|
||||
|
||||
this._element.removeAttribute('aria-hidden');
|
||||
|
||||
this._element.scrollTop = 0;
|
||||
|
||||
if (transition) {
|
||||
_util2.default.reflow(this._element);
|
||||
}
|
||||
|
||||
$(this._element).addClass(ClassName.IN);
|
||||
$(this._element).addClass(ClassName.SHOW);
|
||||
|
||||
if (this._config.focus) {
|
||||
this._enforceFocus();
|
||||
@ -268,10 +315,12 @@ define(['exports', './util'], function (exports, _util) {
|
||||
});
|
||||
|
||||
var transitionComplete = function transitionComplete() {
|
||||
if (_this2._config.focus) {
|
||||
_this2._element.focus();
|
||||
if (_this3._config.focus) {
|
||||
_this3._element.focus();
|
||||
}
|
||||
$(_this2._element).trigger(shownEvent);
|
||||
|
||||
_this3._isTransitioning = false;
|
||||
$(_this3._element).trigger(shownEvent);
|
||||
};
|
||||
|
||||
if (transition) {
|
||||
@ -281,26 +330,28 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: '_enforceFocus',
|
||||
key: "_enforceFocus",
|
||||
value: function _enforceFocus() {
|
||||
var _this3 = this;
|
||||
var _this4 = this;
|
||||
|
||||
$(document).off(Event.FOCUSIN) // guard against infinite focus loop
|
||||
$(document).off(Event.FOCUSIN) // Guard against infinite focus loop
|
||||
.on(Event.FOCUSIN, function (event) {
|
||||
if (document !== event.target && _this3._element !== event.target && !$(_this3._element).has(event.target).length) {
|
||||
_this3._element.focus();
|
||||
if (document !== event.target && _this4._element !== event.target && $(_this4._element).has(event.target).length === 0) {
|
||||
_this4._element.focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: '_setEscapeEvent',
|
||||
key: "_setEscapeEvent",
|
||||
value: function _setEscapeEvent() {
|
||||
var _this4 = this;
|
||||
var _this5 = this;
|
||||
|
||||
if (this._isShown && this._config.keyboard) {
|
||||
$(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
|
||||
if (event.which === ESCAPE_KEYCODE) {
|
||||
_this4.hide();
|
||||
event.preventDefault();
|
||||
|
||||
_this5.hide();
|
||||
}
|
||||
});
|
||||
} else if (!this._isShown) {
|
||||
@ -308,30 +359,41 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: '_setResizeEvent',
|
||||
key: "_setResizeEvent",
|
||||
value: function _setResizeEvent() {
|
||||
var _this6 = this;
|
||||
|
||||
if (this._isShown) {
|
||||
$(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this));
|
||||
$(window).on(Event.RESIZE, function (event) {
|
||||
return _this6.handleUpdate(event);
|
||||
});
|
||||
} else {
|
||||
$(window).off(Event.RESIZE);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: '_hideModal',
|
||||
key: "_hideModal",
|
||||
value: function _hideModal() {
|
||||
var _this5 = this;
|
||||
var _this7 = this;
|
||||
|
||||
this._element.style.display = 'none';
|
||||
this._element.setAttribute('aria-hidden', 'true');
|
||||
|
||||
this._element.setAttribute('aria-hidden', true);
|
||||
|
||||
this._isTransitioning = false;
|
||||
|
||||
this._showBackdrop(function () {
|
||||
$(document.body).removeClass(ClassName.OPEN);
|
||||
_this5._resetAdjustments();
|
||||
_this5._resetScrollbar();
|
||||
$(_this5._element).trigger(Event.HIDDEN);
|
||||
|
||||
_this7._resetAdjustments();
|
||||
|
||||
_this7._resetScrollbar();
|
||||
|
||||
$(_this7._element).trigger(Event.HIDDEN);
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: '_removeBackdrop',
|
||||
key: "_removeBackdrop",
|
||||
value: function _removeBackdrop() {
|
||||
if (this._backdrop) {
|
||||
$(this._backdrop).remove();
|
||||
@ -339,15 +401,14 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: '_showBackdrop',
|
||||
key: "_showBackdrop",
|
||||
value: function _showBackdrop(callback) {
|
||||
var _this6 = this;
|
||||
var _this8 = this;
|
||||
|
||||
var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
|
||||
|
||||
if (this._isShown && this._config.backdrop) {
|
||||
var doAnimate = _util2.default.supportsTransitionEnd() && animate;
|
||||
|
||||
this._backdrop = document.createElement('div');
|
||||
this._backdrop.className = ClassName.BACKDROP;
|
||||
|
||||
@ -356,19 +417,20 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
|
||||
$(this._backdrop).appendTo(document.body);
|
||||
|
||||
$(this._element).on(Event.CLICK_DISMISS, function (event) {
|
||||
if (_this6._ignoreBackdropClick) {
|
||||
_this6._ignoreBackdropClick = false;
|
||||
if (_this8._ignoreBackdropClick) {
|
||||
_this8._ignoreBackdropClick = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.target !== event.currentTarget) {
|
||||
return;
|
||||
}
|
||||
if (_this6._config.backdrop === 'static') {
|
||||
_this6._element.focus();
|
||||
|
||||
if (_this8._config.backdrop === 'static') {
|
||||
_this8._element.focus();
|
||||
} else {
|
||||
_this6.hide();
|
||||
_this8.hide();
|
||||
}
|
||||
});
|
||||
|
||||
@ -376,7 +438,7 @@ define(['exports', './util'], function (exports, _util) {
|
||||
_util2.default.reflow(this._backdrop);
|
||||
}
|
||||
|
||||
$(this._backdrop).addClass(ClassName.IN);
|
||||
$(this._backdrop).addClass(ClassName.SHOW);
|
||||
|
||||
if (!callback) {
|
||||
return;
|
||||
@ -389,10 +451,11 @@ define(['exports', './util'], function (exports, _util) {
|
||||
|
||||
$(this._backdrop).one(_util2.default.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
|
||||
} else if (!this._isShown && this._backdrop) {
|
||||
$(this._backdrop).removeClass(ClassName.IN);
|
||||
$(this._backdrop).removeClass(ClassName.SHOW);
|
||||
|
||||
var callbackRemove = function callbackRemove() {
|
||||
_this6._removeBackdrop();
|
||||
_this8._removeBackdrop();
|
||||
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
@ -408,68 +471,107 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: '_handleUpdate',
|
||||
value: function _handleUpdate() {
|
||||
this._adjustDialog();
|
||||
}
|
||||
}, {
|
||||
key: '_adjustDialog',
|
||||
key: "_adjustDialog",
|
||||
value: function _adjustDialog() {
|
||||
var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
|
||||
|
||||
if (!this._isBodyOverflowing && isModalOverflowing) {
|
||||
this._element.style.paddingLeft = this._scrollbarWidth + 'px';
|
||||
this._element.style.paddingLeft = "".concat(this._scrollbarWidth, "px");
|
||||
}
|
||||
|
||||
if (this._isBodyOverflowing && !isModalOverflowing) {
|
||||
this._element.style.paddingRight = this._scrollbarWidth + 'px';
|
||||
this._element.style.paddingRight = "".concat(this._scrollbarWidth, "px");
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: '_resetAdjustments',
|
||||
key: "_resetAdjustments",
|
||||
value: function _resetAdjustments() {
|
||||
this._element.style.paddingLeft = '';
|
||||
this._element.style.paddingRight = '';
|
||||
}
|
||||
}, {
|
||||
key: '_checkScrollbar',
|
||||
key: "_checkScrollbar",
|
||||
value: function _checkScrollbar() {
|
||||
this._isBodyOverflowing = document.body.clientWidth < window.innerWidth;
|
||||
var rect = document.body.getBoundingClientRect();
|
||||
this._isBodyOverflowing = rect.left + rect.right < window.innerWidth;
|
||||
this._scrollbarWidth = this._getScrollbarWidth();
|
||||
}
|
||||
}, {
|
||||
key: '_setScrollbar',
|
||||
key: "_setScrollbar",
|
||||
value: function _setScrollbar() {
|
||||
var bodyPadding = parseInt($(Selector.FIXED_CONTENT).css('padding-right') || 0, 10);
|
||||
|
||||
this._originalBodyPadding = document.body.style.paddingRight || '';
|
||||
var _this9 = this;
|
||||
|
||||
if (this._isBodyOverflowing) {
|
||||
document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px';
|
||||
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set
|
||||
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
|
||||
// Adjust fixed content padding
|
||||
$(Selector.FIXED_CONTENT).each(function (index, element) {
|
||||
var actualPadding = $(element)[0].style.paddingRight;
|
||||
var calculatedPadding = $(element).css('padding-right');
|
||||
$(element).data('padding-right', actualPadding).css('padding-right', "".concat(parseFloat(calculatedPadding) + _this9._scrollbarWidth, "px"));
|
||||
}); // Adjust sticky content margin
|
||||
|
||||
$(Selector.STICKY_CONTENT).each(function (index, element) {
|
||||
var actualMargin = $(element)[0].style.marginRight;
|
||||
var calculatedMargin = $(element).css('margin-right');
|
||||
$(element).data('margin-right', actualMargin).css('margin-right', "".concat(parseFloat(calculatedMargin) - _this9._scrollbarWidth, "px"));
|
||||
}); // Adjust navbar-toggler margin
|
||||
|
||||
$(Selector.NAVBAR_TOGGLER).each(function (index, element) {
|
||||
var actualMargin = $(element)[0].style.marginRight;
|
||||
var calculatedMargin = $(element).css('margin-right');
|
||||
$(element).data('margin-right', actualMargin).css('margin-right', "".concat(parseFloat(calculatedMargin) + _this9._scrollbarWidth, "px"));
|
||||
}); // Adjust body padding
|
||||
|
||||
var actualPadding = document.body.style.paddingRight;
|
||||
var calculatedPadding = $('body').css('padding-right');
|
||||
$('body').data('padding-right', actualPadding).css('padding-right', "".concat(parseFloat(calculatedPadding) + this._scrollbarWidth, "px"));
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: '_resetScrollbar',
|
||||
key: "_resetScrollbar",
|
||||
value: function _resetScrollbar() {
|
||||
document.body.style.paddingRight = this._originalBodyPadding;
|
||||
// Restore fixed content padding
|
||||
$(Selector.FIXED_CONTENT).each(function (index, element) {
|
||||
var padding = $(element).data('padding-right');
|
||||
|
||||
if (typeof padding !== 'undefined') {
|
||||
$(element).css('padding-right', padding).removeData('padding-right');
|
||||
}
|
||||
}); // Restore sticky content and navbar-toggler margin
|
||||
|
||||
$("".concat(Selector.STICKY_CONTENT, ", ").concat(Selector.NAVBAR_TOGGLER)).each(function (index, element) {
|
||||
var margin = $(element).data('margin-right');
|
||||
|
||||
if (typeof margin !== 'undefined') {
|
||||
$(element).css('margin-right', margin).removeData('margin-right');
|
||||
}
|
||||
}); // Restore body padding
|
||||
|
||||
var padding = $('body').data('padding-right');
|
||||
|
||||
if (typeof padding !== 'undefined') {
|
||||
$('body').css('padding-right', padding).removeData('padding-right');
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: '_getScrollbarWidth',
|
||||
key: "_getScrollbarWidth",
|
||||
value: function _getScrollbarWidth() {
|
||||
// thx d.walsh
|
||||
var scrollDiv = document.createElement('div');
|
||||
scrollDiv.className = ClassName.SCROLLBAR_MEASURER;
|
||||
document.body.appendChild(scrollDiv);
|
||||
var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
|
||||
var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
|
||||
document.body.removeChild(scrollDiv);
|
||||
return scrollbarWidth;
|
||||
}
|
||||
}], [{
|
||||
key: '_jQueryInterface',
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config, relatedTarget) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
var _config = $.extend({}, Modal.Default, $(this).data(), (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config);
|
||||
|
||||
var _config = _extends({}, Modal.Default, $(this).data(), _typeof(config) === 'object' && config);
|
||||
|
||||
if (!data) {
|
||||
data = new Modal(this, _config);
|
||||
@ -477,9 +579,10 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (data[config] === undefined) {
|
||||
throw new Error('No method named "' + config + '"');
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"".concat(config, "\""));
|
||||
}
|
||||
|
||||
data[config](relatedTarget);
|
||||
} else if (_config.show) {
|
||||
data.show(relatedTarget);
|
||||
@ -487,12 +590,12 @@ define(['exports', './util'], function (exports, _util) {
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: 'VERSION',
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: 'Default',
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
@ -506,39 +609,38 @@ define(['exports', './util'], function (exports, _util) {
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
var _this7 = this;
|
||||
var _this10 = this;
|
||||
|
||||
var target;
|
||||
|
||||
var target = void 0;
|
||||
var selector = _util2.default.getSelectorFromElement(this);
|
||||
|
||||
if (selector) {
|
||||
target = $(selector)[0];
|
||||
}
|
||||
|
||||
var config = $(target).data(DATA_KEY) ? 'toggle' : $.extend({}, $(target).data(), $(this).data());
|
||||
var config = $(target).data(DATA_KEY) ? 'toggle' : _extends({}, $(target).data(), $(this).data());
|
||||
|
||||
if (this.tagName === 'A') {
|
||||
if (this.tagName === 'A' || this.tagName === 'AREA') {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
var $target = $(target).one(Event.SHOW, function (showEvent) {
|
||||
if (showEvent.isDefaultPrevented()) {
|
||||
// only register focus restorer if modal will actually get shown
|
||||
// Only register focus restorer if modal will actually get shown
|
||||
return;
|
||||
}
|
||||
|
||||
$target.one(Event.HIDDEN, function () {
|
||||
if ($(_this7).is(':visible')) {
|
||||
_this7.focus();
|
||||
if ($(_this10).is(':visible')) {
|
||||
_this10.focus();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Modal._jQueryInterface.call($(target), config, this);
|
||||
});
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
@ -547,13 +649,14 @@ define(['exports', './util'], function (exports, _util) {
|
||||
|
||||
$.fn[NAME] = Modal._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Modal;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Modal._jQueryInterface;
|
||||
};
|
||||
|
||||
return Modal;
|
||||
}(jQuery);
|
||||
}(_jquery2.default);
|
||||
|
||||
exports.default = Modal;
|
||||
});
|
@ -1,10 +1,12 @@
|
||||
define(['exports', './tooltip'], function (exports, _tooltip) {
|
||||
'use strict';
|
||||
define(["exports", "jquery", "./tooltip"], function (exports, _jquery, _tooltip) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _jquery2 = _interopRequireDefault(_jquery);
|
||||
|
||||
var _tooltip2 = _interopRequireDefault(_tooltip);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
@ -13,11 +15,19 @@ define(['exports', './tooltip'], function (exports, _tooltip) {
|
||||
};
|
||||
}
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
||||
return typeof obj;
|
||||
} : function (obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
||||
};
|
||||
function _typeof(obj) {
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
_typeof = function _typeof(obj) {
|
||||
return typeof obj;
|
||||
};
|
||||
} else {
|
||||
_typeof = function _typeof(obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
||||
};
|
||||
}
|
||||
|
||||
return _typeof(obj);
|
||||
}
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
@ -25,35 +35,37 @@ define(['exports', './tooltip'], function (exports, _tooltip) {
|
||||
}
|
||||
}
|
||||
|
||||
var _createClass = function () {
|
||||
function defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
return function (Constructor, protoProps, staticProps) {
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
};
|
||||
}();
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _possibleConstructorReturn(self, call) {
|
||||
if (!self) {
|
||||
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
||||
return call;
|
||||
}
|
||||
|
||||
if (self === void 0) {
|
||||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
||||
}
|
||||
|
||||
return call && (typeof call === "object" || typeof call === "function") ? call : self;
|
||||
return self;
|
||||
}
|
||||
|
||||
function _inherits(subClass, superClass) {
|
||||
if (typeof superClass !== "function" && superClass !== null) {
|
||||
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
|
||||
throw new TypeError("Super expression must either be null or a function");
|
||||
}
|
||||
|
||||
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
||||
@ -67,67 +79,81 @@ define(['exports', './tooltip'], function (exports, _tooltip) {
|
||||
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.0.0-alpha.4): popover.js
|
||||
* Bootstrap (v4.0.0): popover.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Popover = function ($) {
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'popover';
|
||||
var VERSION = '4.0.0-alpha.4';
|
||||
var VERSION = '4.0.0';
|
||||
var DATA_KEY = 'bs.popover';
|
||||
var EVENT_KEY = '.' + DATA_KEY;
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var CLASS_PREFIX = 'bs-popover';
|
||||
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)".concat(CLASS_PREFIX, "\\S+"), 'g');
|
||||
|
||||
var Default = $.extend({}, _tooltip2.default.Default, {
|
||||
var Default = _extends({}, _tooltip2.default.Default, {
|
||||
placement: 'right',
|
||||
trigger: 'click',
|
||||
content: '',
|
||||
template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"></div></div>'
|
||||
template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
|
||||
});
|
||||
|
||||
var DefaultType = $.extend({}, _tooltip2.default.DefaultType, {
|
||||
var DefaultType = _extends({}, _tooltip2.default.DefaultType, {
|
||||
content: '(string|element|function)'
|
||||
});
|
||||
|
||||
var ClassName = {
|
||||
FADE: 'fade',
|
||||
IN: 'in'
|
||||
SHOW: 'show'
|
||||
};
|
||||
|
||||
var Selector = {
|
||||
TITLE: '.popover-title',
|
||||
CONTENT: '.popover-content',
|
||||
ARROW: '.popover-arrow'
|
||||
TITLE: '.popover-header',
|
||||
CONTENT: '.popover-body'
|
||||
};
|
||||
|
||||
var Event = {
|
||||
HIDE: 'hide' + EVENT_KEY,
|
||||
HIDDEN: 'hidden' + EVENT_KEY,
|
||||
SHOW: 'show' + EVENT_KEY,
|
||||
SHOWN: 'shown' + EVENT_KEY,
|
||||
INSERTED: 'inserted' + EVENT_KEY,
|
||||
CLICK: 'click' + EVENT_KEY,
|
||||
FOCUSIN: 'focusin' + EVENT_KEY,
|
||||
FOCUSOUT: 'focusout' + EVENT_KEY,
|
||||
MOUSEENTER: 'mouseenter' + EVENT_KEY,
|
||||
MOUSELEAVE: 'mouseleave' + EVENT_KEY
|
||||
};
|
||||
HIDE: "hide".concat(EVENT_KEY),
|
||||
HIDDEN: "hidden".concat(EVENT_KEY),
|
||||
SHOW: "show".concat(EVENT_KEY),
|
||||
SHOWN: "shown".concat(EVENT_KEY),
|
||||
INSERTED: "inserted".concat(EVENT_KEY),
|
||||
CLICK: "click".concat(EVENT_KEY),
|
||||
FOCUSIN: "focusin".concat(EVENT_KEY),
|
||||
FOCUSOUT: "focusout".concat(EVENT_KEY),
|
||||
MOUSEENTER: "mouseenter".concat(EVENT_KEY),
|
||||
MOUSELEAVE: "mouseleave".concat(EVENT_KEY)
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
};
|
||||
|
||||
var Popover = function (_Tooltip) {
|
||||
_inherits(Popover, _Tooltip);
|
||||
@ -139,39 +165,59 @@ define(['exports', './tooltip'], function (exports, _tooltip) {
|
||||
}
|
||||
|
||||
_createClass(Popover, [{
|
||||
key: 'isWithContent',
|
||||
key: "isWithContent",
|
||||
value: function isWithContent() {
|
||||
return this.getTitle() || this._getContent();
|
||||
}
|
||||
}, {
|
||||
key: 'getTipElement',
|
||||
key: "addAttachmentClass",
|
||||
value: function addAttachmentClass(attachment) {
|
||||
$(this.getTipElement()).addClass("".concat(CLASS_PREFIX, "-").concat(attachment));
|
||||
}
|
||||
}, {
|
||||
key: "getTipElement",
|
||||
value: function getTipElement() {
|
||||
return this.tip = this.tip || $(this.config.template)[0];
|
||||
this.tip = this.tip || $(this.config.template)[0];
|
||||
return this.tip;
|
||||
}
|
||||
}, {
|
||||
key: 'setContent',
|
||||
key: "setContent",
|
||||
value: function setContent() {
|
||||
var $tip = $(this.getTipElement());
|
||||
var $tip = $(this.getTipElement()); // We use append for html objects to maintain js events
|
||||
|
||||
// we use append for html objects to maintain js events
|
||||
this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
|
||||
this.setElementContent($tip.find(Selector.CONTENT), this._getContent());
|
||||
|
||||
$tip.removeClass(ClassName.FADE).removeClass(ClassName.IN);
|
||||
var content = this._getContent();
|
||||
|
||||
this.cleanupTether();
|
||||
if (typeof content === 'function') {
|
||||
content = content.call(this.element);
|
||||
}
|
||||
|
||||
this.setElementContent($tip.find(Selector.CONTENT), content);
|
||||
$tip.removeClass("".concat(ClassName.FADE, " ").concat(ClassName.SHOW));
|
||||
}
|
||||
}, {
|
||||
key: '_getContent',
|
||||
key: "_getContent",
|
||||
value: function _getContent() {
|
||||
return this.element.getAttribute('data-content') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content);
|
||||
return this.element.getAttribute('data-content') || this.config.content;
|
||||
}
|
||||
}, {
|
||||
key: "_cleanTipClass",
|
||||
value: function _cleanTipClass() {
|
||||
var $tip = $(this.getTipElement());
|
||||
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
|
||||
|
||||
if (tabClass !== null && tabClass.length > 0) {
|
||||
$tip.removeClass(tabClass.join(''));
|
||||
}
|
||||
}
|
||||
}], [{
|
||||
key: '_jQueryInterface',
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' ? config : null;
|
||||
|
||||
var _config = _typeof(config) === 'object' ? config : null;
|
||||
|
||||
if (!data && /destroy|hide/.test(config)) {
|
||||
return;
|
||||
@ -183,45 +229,46 @@ define(['exports', './tooltip'], function (exports, _tooltip) {
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (data[config] === undefined) {
|
||||
throw new Error('No method named "' + config + '"');
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"".concat(config, "\""));
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: 'VERSION',
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: 'Default',
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}, {
|
||||
key: 'NAME',
|
||||
key: "NAME",
|
||||
get: function get() {
|
||||
return NAME;
|
||||
}
|
||||
}, {
|
||||
key: 'DATA_KEY',
|
||||
key: "DATA_KEY",
|
||||
get: function get() {
|
||||
return DATA_KEY;
|
||||
}
|
||||
}, {
|
||||
key: 'Event',
|
||||
key: "Event",
|
||||
get: function get() {
|
||||
return Event;
|
||||
}
|
||||
}, {
|
||||
key: 'EVENT_KEY',
|
||||
key: "EVENT_KEY",
|
||||
get: function get() {
|
||||
return EVENT_KEY;
|
||||
}
|
||||
}, {
|
||||
key: 'DefaultType',
|
||||
key: "DefaultType",
|
||||
get: function get() {
|
||||
return DefaultType;
|
||||
}
|
||||
@ -235,16 +282,16 @@ define(['exports', './tooltip'], function (exports, _tooltip) {
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Popover._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Popover;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Popover._jQueryInterface;
|
||||
};
|
||||
|
||||
return Popover;
|
||||
}(jQuery);
|
||||
}(_jquery2.default);
|
||||
|
||||
exports.default = Popover;
|
||||
});
|
@ -1,10 +1,12 @@
|
||||
define(['exports', './util'], function (exports, _util) {
|
||||
'use strict';
|
||||
define(["exports", "jquery", "./util"], function (exports, _jquery, _util) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _jquery2 = _interopRequireDefault(_jquery);
|
||||
|
||||
var _util2 = _interopRequireDefault(_util);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
@ -13,11 +15,37 @@ define(['exports', './util'], function (exports, _util) {
|
||||
};
|
||||
}
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
||||
return typeof obj;
|
||||
} : function (obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
||||
};
|
||||
function _typeof(obj) {
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
_typeof = function _typeof(obj) {
|
||||
return typeof obj;
|
||||
};
|
||||
} else {
|
||||
_typeof = function _typeof(obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
||||
};
|
||||
}
|
||||
|
||||
return _typeof(obj);
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
@ -25,162 +53,151 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
}
|
||||
|
||||
var _createClass = function () {
|
||||
function defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
return function (Constructor, protoProps, staticProps) {
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
};
|
||||
}();
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.0.0-alpha.4): scrollspy.js
|
||||
* Bootstrap (v4.0.0): scrollspy.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var ScrollSpy = function ($) {
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'scrollspy';
|
||||
var VERSION = '4.0.0-alpha.4';
|
||||
var VERSION = '4.0.0';
|
||||
var DATA_KEY = 'bs.scrollspy';
|
||||
var EVENT_KEY = '.' + DATA_KEY;
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
|
||||
var Default = {
|
||||
offset: 10,
|
||||
method: 'auto',
|
||||
target: ''
|
||||
};
|
||||
|
||||
var DefaultType = {
|
||||
offset: 'number',
|
||||
method: 'string',
|
||||
target: '(string|element)'
|
||||
};
|
||||
|
||||
var Event = {
|
||||
ACTIVATE: 'activate' + EVENT_KEY,
|
||||
SCROLL: 'scroll' + EVENT_KEY,
|
||||
LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY
|
||||
ACTIVATE: "activate".concat(EVENT_KEY),
|
||||
SCROLL: "scroll".concat(EVENT_KEY),
|
||||
LOAD_DATA_API: "load".concat(EVENT_KEY).concat(DATA_API_KEY)
|
||||
};
|
||||
|
||||
var ClassName = {
|
||||
DROPDOWN_ITEM: 'dropdown-item',
|
||||
DROPDOWN_MENU: 'dropdown-menu',
|
||||
NAV_LINK: 'nav-link',
|
||||
NAV: 'nav',
|
||||
ACTIVE: 'active'
|
||||
};
|
||||
|
||||
var Selector = {
|
||||
DATA_SPY: '[data-spy="scroll"]',
|
||||
ACTIVE: '.active',
|
||||
LIST_ITEM: '.list-item',
|
||||
LI: 'li',
|
||||
LI_DROPDOWN: 'li.dropdown',
|
||||
NAV_LIST_GROUP: '.nav, .list-group',
|
||||
NAV_LINKS: '.nav-link',
|
||||
NAV_ITEMS: '.nav-item',
|
||||
LIST_ITEMS: '.list-group-item',
|
||||
DROPDOWN: '.dropdown',
|
||||
DROPDOWN_ITEMS: '.dropdown-item',
|
||||
DROPDOWN_TOGGLE: '.dropdown-toggle'
|
||||
};
|
||||
|
||||
var OffsetMethod = {
|
||||
OFFSET: 'offset',
|
||||
POSITION: 'position'
|
||||
};
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
};
|
||||
|
||||
var ScrollSpy = function () {
|
||||
function ScrollSpy(element, config) {
|
||||
var _this = this;
|
||||
|
||||
_classCallCheck(this, ScrollSpy);
|
||||
|
||||
this._element = element;
|
||||
this._scrollElement = element.tagName === 'BODY' ? window : element;
|
||||
this._config = this._getConfig(config);
|
||||
this._selector = this._config.target + ' ' + Selector.NAV_LINKS + ',' + (this._config.target + ' ' + Selector.DROPDOWN_ITEMS);
|
||||
this._selector = "".concat(this._config.target, " ").concat(Selector.NAV_LINKS, ",") + "".concat(this._config.target, " ").concat(Selector.LIST_ITEMS, ",") + "".concat(this._config.target, " ").concat(Selector.DROPDOWN_ITEMS);
|
||||
this._offsets = [];
|
||||
this._targets = [];
|
||||
this._activeTarget = null;
|
||||
this._scrollHeight = 0;
|
||||
|
||||
$(this._scrollElement).on(Event.SCROLL, $.proxy(this._process, this));
|
||||
|
||||
$(this._scrollElement).on(Event.SCROLL, function (event) {
|
||||
return _this._process(event);
|
||||
});
|
||||
this.refresh();
|
||||
this._process();
|
||||
}
|
||||
|
||||
// getters
|
||||
this._process();
|
||||
} // Getters
|
||||
|
||||
|
||||
_createClass(ScrollSpy, [{
|
||||
key: 'refresh',
|
||||
key: "refresh",
|
||||
value: function refresh() {
|
||||
var _this = this;
|
||||
|
||||
var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET;
|
||||
var _this2 = this;
|
||||
|
||||
var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION;
|
||||
var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
|
||||
|
||||
var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0;
|
||||
|
||||
this._offsets = [];
|
||||
this._targets = [];
|
||||
|
||||
this._scrollHeight = this._getScrollHeight();
|
||||
|
||||
var targets = $.makeArray($(this._selector));
|
||||
|
||||
targets.map(function (element) {
|
||||
var target = void 0;
|
||||
var target;
|
||||
|
||||
var targetSelector = _util2.default.getSelectorFromElement(element);
|
||||
|
||||
if (targetSelector) {
|
||||
target = $(targetSelector)[0];
|
||||
}
|
||||
|
||||
if (target && (target.offsetWidth || target.offsetHeight)) {
|
||||
// todo (fat): remove sketch reliance on jQuery position/offset
|
||||
return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
|
||||
if (target) {
|
||||
var targetBCR = target.getBoundingClientRect();
|
||||
|
||||
if (targetBCR.width || targetBCR.height) {
|
||||
// TODO (fat): remove sketch reliance on jQuery position/offset
|
||||
return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}).filter(function (item) {
|
||||
return item;
|
||||
}).sort(function (a, b) {
|
||||
return a[0] - b[0];
|
||||
}).forEach(function (item) {
|
||||
_this._offsets.push(item[0]);
|
||||
_this._targets.push(item[1]);
|
||||
_this2._offsets.push(item[0]);
|
||||
|
||||
_this2._targets.push(item[1]);
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: 'dispose',
|
||||
key: "dispose",
|
||||
value: function dispose() {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
$(this._scrollElement).off(EVENT_KEY);
|
||||
|
||||
this._element = null;
|
||||
this._scrollElement = null;
|
||||
this._config = null;
|
||||
@ -191,17 +208,19 @@ define(['exports', './util'], function (exports, _util) {
|
||||
this._scrollHeight = null;
|
||||
}
|
||||
}, {
|
||||
key: '_getConfig',
|
||||
key: "_getConfig",
|
||||
value: function _getConfig(config) {
|
||||
config = $.extend({}, Default, config);
|
||||
config = _extends({}, Default, config);
|
||||
|
||||
if (typeof config.target !== 'string') {
|
||||
var id = $(config.target).attr('id');
|
||||
|
||||
if (!id) {
|
||||
id = _util2.default.getUID(NAME);
|
||||
$(config.target).attr('id', id);
|
||||
}
|
||||
config.target = '#' + id;
|
||||
|
||||
config.target = "#".concat(id);
|
||||
}
|
||||
|
||||
_util2.default.typeCheckConfig(NAME, config, DefaultType);
|
||||
@ -209,21 +228,28 @@ define(['exports', './util'], function (exports, _util) {
|
||||
return config;
|
||||
}
|
||||
}, {
|
||||
key: '_getScrollTop',
|
||||
key: "_getScrollTop",
|
||||
value: function _getScrollTop() {
|
||||
return this._scrollElement === window ? this._scrollElement.scrollY : this._scrollElement.scrollTop;
|
||||
return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
|
||||
}
|
||||
}, {
|
||||
key: '_getScrollHeight',
|
||||
key: "_getScrollHeight",
|
||||
value: function _getScrollHeight() {
|
||||
return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
|
||||
}
|
||||
}, {
|
||||
key: '_process',
|
||||
key: "_getOffsetHeight",
|
||||
value: function _getOffsetHeight() {
|
||||
return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
|
||||
}
|
||||
}, {
|
||||
key: "_process",
|
||||
value: function _process() {
|
||||
var scrollTop = this._getScrollTop() + this._config.offset;
|
||||
|
||||
var scrollHeight = this._getScrollHeight();
|
||||
var maxScroll = this._config.offset + scrollHeight - this._scrollElement.offsetHeight;
|
||||
|
||||
var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
|
||||
|
||||
if (this._scrollHeight !== scrollHeight) {
|
||||
this.refresh();
|
||||
@ -235,16 +261,20 @@ define(['exports', './util'], function (exports, _util) {
|
||||
if (this._activeTarget !== target) {
|
||||
this._activate(target);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._activeTarget && scrollTop < this._offsets[0]) {
|
||||
if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
|
||||
this._activeTarget = null;
|
||||
|
||||
this._clear();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
for (var i = this._offsets.length; i--;) {
|
||||
var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (this._offsets[i + 1] === undefined || scrollTop < this._offsets[i + 1]);
|
||||
var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
|
||||
|
||||
if (isActiveTarget) {
|
||||
this._activate(this._targets[i]);
|
||||
@ -252,26 +282,31 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: '_activate',
|
||||
key: "_activate",
|
||||
value: function _activate(target) {
|
||||
this._activeTarget = target;
|
||||
|
||||
this._clear();
|
||||
|
||||
var queries = this._selector.split(',');
|
||||
queries = queries.map(function (selector) {
|
||||
return selector + '[data-target="' + target + '"],' + (selector + '[href="' + target + '"]');
|
||||
});
|
||||
var queries = this._selector.split(','); // eslint-disable-next-line arrow-body-style
|
||||
|
||||
|
||||
queries = queries.map(function (selector) {
|
||||
return "".concat(selector, "[data-target=\"").concat(target, "\"],") + "".concat(selector, "[href=\"").concat(target, "\"]");
|
||||
});
|
||||
var $link = $(queries.join(','));
|
||||
|
||||
if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {
|
||||
$link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
|
||||
$link.addClass(ClassName.ACTIVE);
|
||||
} else {
|
||||
// todo (fat) this is kinda sus...
|
||||
// recursively add actives to tested nav-links
|
||||
$link.parents(Selector.LI).find(Selector.NAV_LINKS).addClass(ClassName.ACTIVE);
|
||||
// Set triggered link as active
|
||||
$link.addClass(ClassName.ACTIVE); // Set triggered links parents as active
|
||||
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
|
||||
|
||||
$link.parents(Selector.NAV_LIST_GROUP).prev("".concat(Selector.NAV_LINKS, ", ").concat(Selector.LIST_ITEMS)).addClass(ClassName.ACTIVE); // Handle special case when .nav-link is inside .nav-item
|
||||
|
||||
$link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_ITEMS).children(Selector.NAV_LINKS).addClass(ClassName.ACTIVE);
|
||||
}
|
||||
|
||||
$(this._scrollElement).trigger(Event.ACTIVATE, {
|
||||
@ -279,16 +314,17 @@ define(['exports', './util'], function (exports, _util) {
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: '_clear',
|
||||
key: "_clear",
|
||||
value: function _clear() {
|
||||
$(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
|
||||
}
|
||||
}], [{
|
||||
key: '_jQueryInterface',
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config || null;
|
||||
|
||||
var _config = _typeof(config) === 'object' && config;
|
||||
|
||||
if (!data) {
|
||||
data = new ScrollSpy(this, _config);
|
||||
@ -296,20 +332,21 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (data[config] === undefined) {
|
||||
throw new Error('No method named "' + config + '"');
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"".concat(config, "\""));
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: 'VERSION',
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: 'Default',
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
@ -323,16 +360,15 @@ define(['exports', './util'], function (exports, _util) {
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(window).on(Event.LOAD_DATA_API, function () {
|
||||
var scrollSpys = $.makeArray($(Selector.DATA_SPY));
|
||||
|
||||
for (var i = scrollSpys.length; i--;) {
|
||||
var $spy = $(scrollSpys[i]);
|
||||
|
||||
ScrollSpy._jQueryInterface.call($spy, $spy.data());
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
@ -341,13 +377,14 @@ define(['exports', './util'], function (exports, _util) {
|
||||
|
||||
$.fn[NAME] = ScrollSpy._jQueryInterface;
|
||||
$.fn[NAME].Constructor = ScrollSpy;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return ScrollSpy._jQueryInterface;
|
||||
};
|
||||
|
||||
return ScrollSpy;
|
||||
}(jQuery);
|
||||
}(_jquery2.default);
|
||||
|
||||
exports.default = ScrollSpy;
|
||||
});
|
@ -1,10 +1,12 @@
|
||||
define(['exports', './util'], function (exports, _util) {
|
||||
'use strict';
|
||||
define(["exports", "jquery", "./util"], function (exports, _jquery, _util) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _jquery2 = _interopRequireDefault(_jquery);
|
||||
|
||||
var _util2 = _interopRequireDefault(_util);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
@ -19,113 +21,103 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
}
|
||||
|
||||
var _createClass = function () {
|
||||
function defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
return function (Constructor, protoProps, staticProps) {
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
};
|
||||
}();
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.0.0-alpha.4): tab.js
|
||||
* Bootstrap (v4.0.0): tab.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Tab = function ($) {
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'tab';
|
||||
var VERSION = '4.0.0-alpha.4';
|
||||
var VERSION = '4.0.0';
|
||||
var DATA_KEY = 'bs.tab';
|
||||
var EVENT_KEY = '.' + DATA_KEY;
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var TRANSITION_DURATION = 150;
|
||||
|
||||
var Event = {
|
||||
HIDE: 'hide' + EVENT_KEY,
|
||||
HIDDEN: 'hidden' + EVENT_KEY,
|
||||
SHOW: 'show' + EVENT_KEY,
|
||||
SHOWN: 'shown' + EVENT_KEY,
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
|
||||
HIDE: "hide".concat(EVENT_KEY),
|
||||
HIDDEN: "hidden".concat(EVENT_KEY),
|
||||
SHOW: "show".concat(EVENT_KEY),
|
||||
SHOWN: "shown".concat(EVENT_KEY),
|
||||
CLICK_DATA_API: "click".concat(EVENT_KEY).concat(DATA_API_KEY)
|
||||
};
|
||||
|
||||
var ClassName = {
|
||||
DROPDOWN_MENU: 'dropdown-menu',
|
||||
ACTIVE: 'active',
|
||||
DISABLED: 'disabled',
|
||||
FADE: 'fade',
|
||||
IN: 'in'
|
||||
SHOW: 'show'
|
||||
};
|
||||
|
||||
var Selector = {
|
||||
A: 'a',
|
||||
LI: 'li',
|
||||
DROPDOWN: '.dropdown',
|
||||
UL: 'ul:not(.dropdown-menu)',
|
||||
FADE_CHILD: '> .nav-item .fade, > .fade',
|
||||
NAV_LIST_GROUP: '.nav, .list-group',
|
||||
ACTIVE: '.active',
|
||||
ACTIVE_CHILD: '> .nav-item > .active, > .active',
|
||||
DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"]',
|
||||
ACTIVE_UL: '> li > .active',
|
||||
DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
|
||||
DROPDOWN_TOGGLE: '.dropdown-toggle',
|
||||
DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
|
||||
};
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
};
|
||||
|
||||
var Tab = function () {
|
||||
function Tab(element) {
|
||||
_classCallCheck(this, Tab);
|
||||
|
||||
this._element = element;
|
||||
}
|
||||
} // Getters
|
||||
|
||||
// getters
|
||||
|
||||
_createClass(Tab, [{
|
||||
key: 'show',
|
||||
key: "show",
|
||||
value: function show() {
|
||||
var _this = this;
|
||||
|
||||
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE)) {
|
||||
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE) || $(this._element).hasClass(ClassName.DISABLED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var target = void 0;
|
||||
var previous = void 0;
|
||||
var ulElement = $(this._element).closest(Selector.UL)[0];
|
||||
var target;
|
||||
var previous;
|
||||
var listElement = $(this._element).closest(Selector.NAV_LIST_GROUP)[0];
|
||||
|
||||
var selector = _util2.default.getSelectorFromElement(this._element);
|
||||
|
||||
if (ulElement) {
|
||||
previous = $.makeArray($(ulElement).find(Selector.ACTIVE));
|
||||
if (listElement) {
|
||||
var itemSelector = listElement.nodeName === 'UL' ? Selector.ACTIVE_UL : Selector.ACTIVE;
|
||||
previous = $.makeArray($(listElement).find(itemSelector));
|
||||
previous = previous[previous.length - 1];
|
||||
}
|
||||
|
||||
var hideEvent = $.Event(Event.HIDE, {
|
||||
relatedTarget: this._element
|
||||
});
|
||||
|
||||
var showEvent = $.Event(Event.SHOW, {
|
||||
relatedTarget: previous
|
||||
});
|
||||
@ -144,17 +136,15 @@ define(['exports', './util'], function (exports, _util) {
|
||||
target = $(selector)[0];
|
||||
}
|
||||
|
||||
this._activate(this._element, ulElement);
|
||||
this._activate(this._element, listElement);
|
||||
|
||||
var complete = function complete() {
|
||||
var hiddenEvent = $.Event(Event.HIDDEN, {
|
||||
relatedTarget: _this._element
|
||||
});
|
||||
|
||||
var shownEvent = $.Event(Event.SHOWN, {
|
||||
relatedTarget: previous
|
||||
});
|
||||
|
||||
$(previous).trigger(hiddenEvent);
|
||||
$(_this._element).trigger(shownEvent);
|
||||
};
|
||||
@ -166,57 +156,66 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'dispose',
|
||||
key: "dispose",
|
||||
value: function dispose() {
|
||||
$.removeClass(this._element, DATA_KEY);
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
}
|
||||
}, {
|
||||
key: '_activate',
|
||||
key: "_activate",
|
||||
value: function _activate(element, container, callback) {
|
||||
var active = $(container).find(Selector.ACTIVE_CHILD)[0];
|
||||
var isTransitioning = callback && _util2.default.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || Boolean($(container).find(Selector.FADE_CHILD)[0]));
|
||||
var _this2 = this;
|
||||
|
||||
var complete = $.proxy(this._transitionComplete, this, element, active, isTransitioning, callback);
|
||||
var activeElements;
|
||||
|
||||
if (container.nodeName === 'UL') {
|
||||
activeElements = $(container).find(Selector.ACTIVE_UL);
|
||||
} else {
|
||||
activeElements = $(container).children(Selector.ACTIVE);
|
||||
}
|
||||
|
||||
var active = activeElements[0];
|
||||
var isTransitioning = callback && _util2.default.supportsTransitionEnd() && active && $(active).hasClass(ClassName.FADE);
|
||||
|
||||
var complete = function complete() {
|
||||
return _this2._transitionComplete(element, active, callback);
|
||||
};
|
||||
|
||||
if (active && isTransitioning) {
|
||||
$(active).one(_util2.default.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
|
||||
if (active) {
|
||||
$(active).removeClass(ClassName.IN);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: '_transitionComplete',
|
||||
value: function _transitionComplete(element, active, isTransitioning, callback) {
|
||||
key: "_transitionComplete",
|
||||
value: function _transitionComplete(element, active, callback) {
|
||||
if (active) {
|
||||
$(active).removeClass(ClassName.ACTIVE);
|
||||
|
||||
var dropdownChild = $(active).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
|
||||
$(active).removeClass("".concat(ClassName.SHOW, " ").concat(ClassName.ACTIVE));
|
||||
var dropdownChild = $(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
|
||||
|
||||
if (dropdownChild) {
|
||||
$(dropdownChild).removeClass(ClassName.ACTIVE);
|
||||
}
|
||||
|
||||
active.setAttribute('aria-expanded', false);
|
||||
if (active.getAttribute('role') === 'tab') {
|
||||
active.setAttribute('aria-selected', false);
|
||||
}
|
||||
}
|
||||
|
||||
$(element).addClass(ClassName.ACTIVE);
|
||||
element.setAttribute('aria-expanded', true);
|
||||
|
||||
if (isTransitioning) {
|
||||
_util2.default.reflow(element);
|
||||
$(element).addClass(ClassName.IN);
|
||||
} else {
|
||||
$(element).removeClass(ClassName.FADE);
|
||||
if (element.getAttribute('role') === 'tab') {
|
||||
element.setAttribute('aria-selected', true);
|
||||
}
|
||||
|
||||
if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
|
||||
_util2.default.reflow(element);
|
||||
|
||||
$(element).addClass(ClassName.SHOW);
|
||||
|
||||
if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
|
||||
var dropdownElement = $(element).closest(Selector.DROPDOWN)[0];
|
||||
|
||||
if (dropdownElement) {
|
||||
$(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
|
||||
}
|
||||
@ -229,27 +228,28 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
}
|
||||
}], [{
|
||||
key: '_jQueryInterface',
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $this = $(this);
|
||||
var data = $this.data(DATA_KEY);
|
||||
|
||||
if (!data) {
|
||||
data = data = new Tab(this);
|
||||
data = new Tab(this);
|
||||
$this.data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (data[config] === undefined) {
|
||||
throw new Error('No method named "' + config + '"');
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"".concat(config, "\""));
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: 'VERSION',
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
@ -263,12 +263,11 @@ define(['exports', './util'], function (exports, _util) {
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
Tab._jQueryInterface.call($(this), 'show');
|
||||
});
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
@ -277,13 +276,14 @@ define(['exports', './util'], function (exports, _util) {
|
||||
|
||||
$.fn[NAME] = Tab._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Tab;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Tab._jQueryInterface;
|
||||
};
|
||||
|
||||
return Tab;
|
||||
}(jQuery);
|
||||
}(_jquery2.default);
|
||||
|
||||
exports.default = Tab;
|
||||
});
|
@ -1,10 +1,14 @@
|
||||
define(['exports', './util'], function (exports, _util) {
|
||||
'use strict';
|
||||
define(["exports", "jquery", "core/popper", "./util"], function (exports, _jquery, _popper, _util) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _jquery2 = _interopRequireDefault(_jquery);
|
||||
|
||||
var _popper2 = _interopRequireDefault(_popper);
|
||||
|
||||
var _util2 = _interopRequireDefault(_util);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
@ -13,11 +17,37 @@ define(['exports', './util'], function (exports, _util) {
|
||||
};
|
||||
}
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
||||
return typeof obj;
|
||||
} : function (obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
||||
};
|
||||
function _extends() {
|
||||
_extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
|
||||
function _typeof(obj) {
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
_typeof = function _typeof(obj) {
|
||||
return typeof obj;
|
||||
};
|
||||
} else {
|
||||
_typeof = function _typeof(obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
||||
};
|
||||
}
|
||||
|
||||
return _typeof(obj);
|
||||
}
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
@ -25,68 +55,42 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
}
|
||||
|
||||
var _createClass = function () {
|
||||
function defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
return function (Constructor, protoProps, staticProps) {
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
};
|
||||
}();
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.0.0-alpha.4): tooltip.js
|
||||
* Bootstrap (v4.0.0): tooltip.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Tooltip = function ($) {
|
||||
|
||||
/**
|
||||
* Check for Tether dependency
|
||||
* Tether - http://github.hubspot.com/tether/
|
||||
*/
|
||||
if (window.Tether === undefined) {
|
||||
throw new Error('Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)');
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'tooltip';
|
||||
var VERSION = '4.0.0-alpha.4';
|
||||
var VERSION = '4.0.0';
|
||||
var DATA_KEY = 'bs.tooltip';
|
||||
var EVENT_KEY = '.' + DATA_KEY;
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var TRANSITION_DURATION = 150;
|
||||
var CLASS_PREFIX = 'bs-tether';
|
||||
|
||||
var Default = {
|
||||
animation: true,
|
||||
template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div></div>',
|
||||
trigger: 'hover focus',
|
||||
title: '',
|
||||
delay: 0,
|
||||
html: false,
|
||||
selector: false,
|
||||
placement: 'top',
|
||||
offset: '0 0',
|
||||
constraints: []
|
||||
};
|
||||
|
||||
var CLASS_PREFIX = 'bs-tooltip';
|
||||
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)".concat(CLASS_PREFIX, "\\S+"), 'g');
|
||||
var DefaultType = {
|
||||
animation: 'boolean',
|
||||
template: 'string',
|
||||
@ -96,102 +100,119 @@ define(['exports', './util'], function (exports, _util) {
|
||||
html: 'boolean',
|
||||
selector: '(string|boolean)',
|
||||
placement: '(string|function)',
|
||||
offset: 'string',
|
||||
constraints: 'array'
|
||||
offset: '(number|string)',
|
||||
container: '(string|element|boolean)',
|
||||
fallbackPlacement: '(string|array)',
|
||||
boundary: '(string|element)'
|
||||
};
|
||||
|
||||
var AttachmentMap = {
|
||||
TOP: 'bottom center',
|
||||
RIGHT: 'middle left',
|
||||
BOTTOM: 'top center',
|
||||
LEFT: 'middle right'
|
||||
AUTO: 'auto',
|
||||
TOP: 'top',
|
||||
RIGHT: 'right',
|
||||
BOTTOM: 'bottom',
|
||||
LEFT: 'left'
|
||||
};
|
||||
var Default = {
|
||||
animation: true,
|
||||
template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
|
||||
trigger: 'hover focus',
|
||||
title: '',
|
||||
delay: 0,
|
||||
html: false,
|
||||
selector: false,
|
||||
placement: 'top',
|
||||
offset: 0,
|
||||
container: false,
|
||||
fallbackPlacement: 'flip',
|
||||
boundary: 'scrollParent'
|
||||
};
|
||||
|
||||
var HoverState = {
|
||||
IN: 'in',
|
||||
SHOW: 'show',
|
||||
OUT: 'out'
|
||||
};
|
||||
|
||||
var Event = {
|
||||
HIDE: 'hide' + EVENT_KEY,
|
||||
HIDDEN: 'hidden' + EVENT_KEY,
|
||||
SHOW: 'show' + EVENT_KEY,
|
||||
SHOWN: 'shown' + EVENT_KEY,
|
||||
INSERTED: 'inserted' + EVENT_KEY,
|
||||
CLICK: 'click' + EVENT_KEY,
|
||||
FOCUSIN: 'focusin' + EVENT_KEY,
|
||||
FOCUSOUT: 'focusout' + EVENT_KEY,
|
||||
MOUSEENTER: 'mouseenter' + EVENT_KEY,
|
||||
MOUSELEAVE: 'mouseleave' + EVENT_KEY
|
||||
HIDE: "hide".concat(EVENT_KEY),
|
||||
HIDDEN: "hidden".concat(EVENT_KEY),
|
||||
SHOW: "show".concat(EVENT_KEY),
|
||||
SHOWN: "shown".concat(EVENT_KEY),
|
||||
INSERTED: "inserted".concat(EVENT_KEY),
|
||||
CLICK: "click".concat(EVENT_KEY),
|
||||
FOCUSIN: "focusin".concat(EVENT_KEY),
|
||||
FOCUSOUT: "focusout".concat(EVENT_KEY),
|
||||
MOUSEENTER: "mouseenter".concat(EVENT_KEY),
|
||||
MOUSELEAVE: "mouseleave".concat(EVENT_KEY)
|
||||
};
|
||||
|
||||
var ClassName = {
|
||||
FADE: 'fade',
|
||||
IN: 'in'
|
||||
SHOW: 'show'
|
||||
};
|
||||
|
||||
var Selector = {
|
||||
TOOLTIP: '.tooltip',
|
||||
TOOLTIP_INNER: '.tooltip-inner'
|
||||
TOOLTIP_INNER: '.tooltip-inner',
|
||||
ARROW: '.arrow'
|
||||
};
|
||||
|
||||
var TetherClass = {
|
||||
element: false,
|
||||
enabled: false
|
||||
};
|
||||
|
||||
var Trigger = {
|
||||
HOVER: 'hover',
|
||||
FOCUS: 'focus',
|
||||
CLICK: 'click',
|
||||
MANUAL: 'manual'
|
||||
};
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
};
|
||||
|
||||
var Tooltip = function () {
|
||||
function Tooltip(element, config) {
|
||||
_classCallCheck(this, Tooltip);
|
||||
|
||||
// private
|
||||
/**
|
||||
* Check for Popper dependency
|
||||
* Popper - https://popper.js.org
|
||||
*/
|
||||
if (typeof _popper2.default === 'undefined') {
|
||||
throw new TypeError('Bootstrap tooltips require Popper.js (https://popper.js.org)');
|
||||
} // private
|
||||
|
||||
|
||||
this._isEnabled = true;
|
||||
this._timeout = 0;
|
||||
this._hoverState = '';
|
||||
this._activeTrigger = {};
|
||||
this._tether = null;
|
||||
this._popper = null; // Protected
|
||||
|
||||
// protected
|
||||
this.element = element;
|
||||
this.config = this._getConfig(config);
|
||||
this.tip = null;
|
||||
|
||||
this._setListeners();
|
||||
}
|
||||
} // Getters
|
||||
|
||||
// getters
|
||||
|
||||
_createClass(Tooltip, [{
|
||||
key: 'enable',
|
||||
key: "enable",
|
||||
value: function enable() {
|
||||
this._isEnabled = true;
|
||||
}
|
||||
}, {
|
||||
key: 'disable',
|
||||
key: "disable",
|
||||
value: function disable() {
|
||||
this._isEnabled = false;
|
||||
}
|
||||
}, {
|
||||
key: 'toggleEnabled',
|
||||
key: "toggleEnabled",
|
||||
value: function toggleEnabled() {
|
||||
this._isEnabled = !this._isEnabled;
|
||||
}
|
||||
}, {
|
||||
key: 'toggle',
|
||||
key: "toggle",
|
||||
value: function toggle(event) {
|
||||
if (!this._isEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event) {
|
||||
var dataKey = this.constructor.DATA_KEY;
|
||||
var context = $(event.currentTarget).data(dataKey);
|
||||
@ -209,9 +230,9 @@ define(['exports', './util'], function (exports, _util) {
|
||||
context._leave(null, context);
|
||||
}
|
||||
} else {
|
||||
|
||||
if ($(this.getTipElement()).hasClass(ClassName.IN)) {
|
||||
if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {
|
||||
this._leave(null, this);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -219,15 +240,12 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'dispose',
|
||||
key: "dispose",
|
||||
value: function dispose() {
|
||||
clearTimeout(this._timeout);
|
||||
|
||||
this.cleanupTether();
|
||||
|
||||
$.removeData(this.element, this.constructor.DATA_KEY);
|
||||
|
||||
$(this.element).off(this.constructor.EVENT_KEY);
|
||||
$(this.element).closest('.modal').off('hide.bs.modal');
|
||||
|
||||
if (this.tip) {
|
||||
$(this.tip).remove();
|
||||
@ -237,22 +255,29 @@ define(['exports', './util'], function (exports, _util) {
|
||||
this._timeout = null;
|
||||
this._hoverState = null;
|
||||
this._activeTrigger = null;
|
||||
this._tether = null;
|
||||
|
||||
if (this._popper !== null) {
|
||||
this._popper.destroy();
|
||||
}
|
||||
|
||||
this._popper = null;
|
||||
this.element = null;
|
||||
this.config = null;
|
||||
this.tip = null;
|
||||
}
|
||||
}, {
|
||||
key: 'show',
|
||||
key: "show",
|
||||
value: function show() {
|
||||
var _this = this;
|
||||
|
||||
if ($(this.element).css('display') === 'none') {
|
||||
throw new Error('Please use show on visible elements');
|
||||
}
|
||||
|
||||
var showEvent = $.Event(this.constructor.Event.SHOW);
|
||||
|
||||
if (this.isWithContent() && this._isEnabled) {
|
||||
$(this.element).trigger(showEvent);
|
||||
|
||||
var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element);
|
||||
|
||||
if (showEvent.isDefaultPrevented() || !isInTheDom) {
|
||||
@ -260,11 +285,11 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
|
||||
var tip = this.getTipElement();
|
||||
|
||||
var tipId = _util2.default.getUID(this.constructor.NAME);
|
||||
|
||||
tip.setAttribute('id', tipId);
|
||||
this.element.setAttribute('aria-describedby', tipId);
|
||||
|
||||
this.setContent();
|
||||
|
||||
if (this.config.animation) {
|
||||
@ -275,30 +300,56 @@ define(['exports', './util'], function (exports, _util) {
|
||||
|
||||
var attachment = this._getAttachment(placement);
|
||||
|
||||
$(tip).data(this.constructor.DATA_KEY, this).appendTo(document.body);
|
||||
this.addAttachmentClass(attachment);
|
||||
var container = this.config.container === false ? document.body : $(this.config.container);
|
||||
$(tip).data(this.constructor.DATA_KEY, this);
|
||||
|
||||
if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
|
||||
$(tip).appendTo(container);
|
||||
}
|
||||
|
||||
$(this.element).trigger(this.constructor.Event.INSERTED);
|
||||
|
||||
this._tether = new Tether({
|
||||
attachment: attachment,
|
||||
element: tip,
|
||||
target: this.element,
|
||||
classes: TetherClass,
|
||||
classPrefix: CLASS_PREFIX,
|
||||
offset: this.config.offset,
|
||||
constraints: this.config.constraints,
|
||||
addTargetClasses: false
|
||||
this._popper = new _popper2.default(this.element, tip, {
|
||||
placement: attachment,
|
||||
modifiers: {
|
||||
offset: {
|
||||
offset: this.config.offset
|
||||
},
|
||||
flip: {
|
||||
behavior: this.config.fallbackPlacement
|
||||
},
|
||||
arrow: {
|
||||
element: Selector.ARROW
|
||||
},
|
||||
preventOverflow: {
|
||||
boundariesElement: this.config.boundary
|
||||
}
|
||||
},
|
||||
onCreate: function onCreate(data) {
|
||||
if (data.originalPlacement !== data.placement) {
|
||||
_this._handlePopperPlacementChange(data);
|
||||
}
|
||||
},
|
||||
onUpdate: function onUpdate(data) {
|
||||
_this._handlePopperPlacementChange(data);
|
||||
}
|
||||
});
|
||||
$(tip).addClass(ClassName.SHOW); // If this is a touch-enabled device we add extra
|
||||
// empty mouseover listeners to the body's immediate children;
|
||||
// only needed because of broken event delegation on iOS
|
||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||
|
||||
_util2.default.reflow(tip);
|
||||
this._tether.position();
|
||||
|
||||
$(tip).addClass(ClassName.IN);
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$('body').children().on('mouseover', null, $.noop);
|
||||
}
|
||||
|
||||
var complete = function complete() {
|
||||
if (_this.config.animation) {
|
||||
_this._fixTransition();
|
||||
}
|
||||
|
||||
var prevHoverState = _this._hoverState;
|
||||
_this._hoverState = null;
|
||||
|
||||
$(_this.element).trigger(_this.constructor.Event.SHOWN);
|
||||
|
||||
if (prevHoverState === HoverState.OUT) {
|
||||
@ -308,27 +359,33 @@ define(['exports', './util'], function (exports, _util) {
|
||||
|
||||
if (_util2.default.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
|
||||
$(this.tip).one(_util2.default.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);
|
||||
return;
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
|
||||
complete();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'hide',
|
||||
key: "hide",
|
||||
value: function hide(callback) {
|
||||
var _this2 = this;
|
||||
|
||||
var tip = this.getTipElement();
|
||||
var hideEvent = $.Event(this.constructor.Event.HIDE);
|
||||
|
||||
var complete = function complete() {
|
||||
if (_this2._hoverState !== HoverState.IN && tip.parentNode) {
|
||||
if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
|
||||
tip.parentNode.removeChild(tip);
|
||||
}
|
||||
|
||||
_this2._cleanTipClass();
|
||||
|
||||
_this2.element.removeAttribute('aria-describedby');
|
||||
|
||||
$(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
|
||||
_this2.cleanupTether();
|
||||
|
||||
if (_this2._popper !== null) {
|
||||
_this2._popper.destroy();
|
||||
}
|
||||
|
||||
if (callback) {
|
||||
callback();
|
||||
@ -341,10 +398,18 @@ define(['exports', './util'], function (exports, _util) {
|
||||
return;
|
||||
}
|
||||
|
||||
$(tip).removeClass(ClassName.IN);
|
||||
$(tip).removeClass(ClassName.SHOW); // If this is a touch-enabled device we remove the extra
|
||||
// empty mouseover listeners we added for iOS support
|
||||
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$('body').children().off('mouseover', null, $.noop);
|
||||
}
|
||||
|
||||
this._activeTrigger[Trigger.CLICK] = false;
|
||||
this._activeTrigger[Trigger.FOCUS] = false;
|
||||
this._activeTrigger[Trigger.HOVER] = false;
|
||||
|
||||
if (_util2.default.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
|
||||
|
||||
$(tip).one(_util2.default.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
} else {
|
||||
complete();
|
||||
@ -353,32 +418,42 @@ define(['exports', './util'], function (exports, _util) {
|
||||
this._hoverState = '';
|
||||
}
|
||||
}, {
|
||||
key: 'isWithContent',
|
||||
key: "update",
|
||||
value: function update() {
|
||||
if (this._popper !== null) {
|
||||
this._popper.scheduleUpdate();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "isWithContent",
|
||||
value: function isWithContent() {
|
||||
return Boolean(this.getTitle());
|
||||
}
|
||||
}, {
|
||||
key: 'getTipElement',
|
||||
value: function getTipElement() {
|
||||
return this.tip = this.tip || $(this.config.template)[0];
|
||||
key: "addAttachmentClass",
|
||||
value: function addAttachmentClass(attachment) {
|
||||
$(this.getTipElement()).addClass("".concat(CLASS_PREFIX, "-").concat(attachment));
|
||||
}
|
||||
}, {
|
||||
key: 'setContent',
|
||||
key: "getTipElement",
|
||||
value: function getTipElement() {
|
||||
this.tip = this.tip || $(this.config.template)[0];
|
||||
return this.tip;
|
||||
}
|
||||
}, {
|
||||
key: "setContent",
|
||||
value: function setContent() {
|
||||
var $tip = $(this.getTipElement());
|
||||
|
||||
this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());
|
||||
|
||||
$tip.removeClass(ClassName.FADE).removeClass(ClassName.IN);
|
||||
|
||||
this.cleanupTether();
|
||||
$tip.removeClass("".concat(ClassName.FADE, " ").concat(ClassName.SHOW));
|
||||
}
|
||||
}, {
|
||||
key: 'setElementContent',
|
||||
key: "setElementContent",
|
||||
value: function setElementContent($element, content) {
|
||||
var html = this.config.html;
|
||||
if ((typeof content === 'undefined' ? 'undefined' : _typeof(content)) === 'object' && (content.nodeType || content.jquery)) {
|
||||
// content is a DOM node or a jQuery
|
||||
|
||||
if (_typeof(content) === 'object' && (content.nodeType || content.jquery)) {
|
||||
// Content is a DOM node or a jQuery
|
||||
if (html) {
|
||||
if (!$(content).parent().is($element)) {
|
||||
$element.empty().append(content);
|
||||
@ -391,7 +466,7 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'getTitle',
|
||||
key: "getTitle",
|
||||
value: function getTitle() {
|
||||
var title = this.element.getAttribute('data-original-title');
|
||||
|
||||
@ -402,37 +477,38 @@ define(['exports', './util'], function (exports, _util) {
|
||||
return title;
|
||||
}
|
||||
}, {
|
||||
key: 'cleanupTether',
|
||||
value: function cleanupTether() {
|
||||
if (this._tether) {
|
||||
this._tether.destroy();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: '_getAttachment',
|
||||
key: "_getAttachment",
|
||||
value: function _getAttachment(placement) {
|
||||
return AttachmentMap[placement.toUpperCase()];
|
||||
}
|
||||
}, {
|
||||
key: '_setListeners',
|
||||
key: "_setListeners",
|
||||
value: function _setListeners() {
|
||||
var _this3 = this;
|
||||
|
||||
var triggers = this.config.trigger.split(' ');
|
||||
|
||||
triggers.forEach(function (trigger) {
|
||||
if (trigger === 'click') {
|
||||
$(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, $.proxy(_this3.toggle, _this3));
|
||||
$(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function (event) {
|
||||
return _this3.toggle(event);
|
||||
});
|
||||
} else if (trigger !== Trigger.MANUAL) {
|
||||
var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN;
|
||||
var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT;
|
||||
|
||||
$(_this3.element).on(eventIn, _this3.config.selector, $.proxy(_this3._enter, _this3)).on(eventOut, _this3.config.selector, $.proxy(_this3._leave, _this3));
|
||||
$(_this3.element).on(eventIn, _this3.config.selector, function (event) {
|
||||
return _this3._enter(event);
|
||||
}).on(eventOut, _this3.config.selector, function (event) {
|
||||
return _this3._leave(event);
|
||||
});
|
||||
}
|
||||
|
||||
$(_this3.element).closest('.modal').on('hide.bs.modal', function () {
|
||||
return _this3.hide();
|
||||
});
|
||||
});
|
||||
|
||||
if (this.config.selector) {
|
||||
this.config = $.extend({}, this.config, {
|
||||
this.config = _extends({}, this.config, {
|
||||
trigger: 'manual',
|
||||
selector: ''
|
||||
});
|
||||
@ -441,19 +517,19 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: '_fixTitle',
|
||||
key: "_fixTitle",
|
||||
value: function _fixTitle() {
|
||||
var titleType = _typeof(this.element.getAttribute('data-original-title'));
|
||||
|
||||
if (this.element.getAttribute('title') || titleType !== 'string') {
|
||||
this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
|
||||
this.element.setAttribute('title', '');
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: '_enter',
|
||||
key: "_enter",
|
||||
value: function _enter(event, context) {
|
||||
var dataKey = this.constructor.DATA_KEY;
|
||||
|
||||
context = context || $(event.currentTarget).data(dataKey);
|
||||
|
||||
if (!context) {
|
||||
@ -465,14 +541,13 @@ define(['exports', './util'], function (exports, _util) {
|
||||
context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
|
||||
}
|
||||
|
||||
if ($(context.getTipElement()).hasClass(ClassName.IN) || context._hoverState === HoverState.IN) {
|
||||
context._hoverState = HoverState.IN;
|
||||
if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {
|
||||
context._hoverState = HoverState.SHOW;
|
||||
return;
|
||||
}
|
||||
|
||||
clearTimeout(context._timeout);
|
||||
|
||||
context._hoverState = HoverState.IN;
|
||||
context._hoverState = HoverState.SHOW;
|
||||
|
||||
if (!context.config.delay || !context.config.delay.show) {
|
||||
context.show();
|
||||
@ -480,16 +555,15 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
|
||||
context._timeout = setTimeout(function () {
|
||||
if (context._hoverState === HoverState.IN) {
|
||||
if (context._hoverState === HoverState.SHOW) {
|
||||
context.show();
|
||||
}
|
||||
}, context.config.delay.show);
|
||||
}
|
||||
}, {
|
||||
key: '_leave',
|
||||
key: "_leave",
|
||||
value: function _leave(event, context) {
|
||||
var dataKey = this.constructor.DATA_KEY;
|
||||
|
||||
context = context || $(event.currentTarget).data(dataKey);
|
||||
|
||||
if (!context) {
|
||||
@ -506,7 +580,6 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
|
||||
clearTimeout(context._timeout);
|
||||
|
||||
context._hoverState = HoverState.OUT;
|
||||
|
||||
if (!context.config.delay || !context.config.delay.hide) {
|
||||
@ -521,7 +594,7 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}, context.config.delay.hide);
|
||||
}
|
||||
}, {
|
||||
key: '_isWithActiveTrigger',
|
||||
key: "_isWithActiveTrigger",
|
||||
value: function _isWithActiveTrigger() {
|
||||
for (var trigger in this._activeTrigger) {
|
||||
if (this._activeTrigger[trigger]) {
|
||||
@ -532,23 +605,31 @@ define(['exports', './util'], function (exports, _util) {
|
||||
return false;
|
||||
}
|
||||
}, {
|
||||
key: '_getConfig',
|
||||
key: "_getConfig",
|
||||
value: function _getConfig(config) {
|
||||
config = $.extend({}, this.constructor.Default, $(this.element).data(), config);
|
||||
config = _extends({}, this.constructor.Default, $(this.element).data(), config);
|
||||
|
||||
if (config.delay && typeof config.delay === 'number') {
|
||||
if (typeof config.delay === 'number') {
|
||||
config.delay = {
|
||||
show: config.delay,
|
||||
hide: config.delay
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof config.title === 'number') {
|
||||
config.title = config.title.toString();
|
||||
}
|
||||
|
||||
if (typeof config.content === 'number') {
|
||||
config.content = config.content.toString();
|
||||
}
|
||||
|
||||
_util2.default.typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||
|
||||
return config;
|
||||
}
|
||||
}, {
|
||||
key: '_getDelegateConfig',
|
||||
key: "_getDelegateConfig",
|
||||
value: function _getDelegateConfig() {
|
||||
var config = {};
|
||||
|
||||
@ -562,14 +643,48 @@ define(['exports', './util'], function (exports, _util) {
|
||||
|
||||
return config;
|
||||
}
|
||||
}, {
|
||||
key: "_cleanTipClass",
|
||||
value: function _cleanTipClass() {
|
||||
var $tip = $(this.getTipElement());
|
||||
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
|
||||
|
||||
if (tabClass !== null && tabClass.length > 0) {
|
||||
$tip.removeClass(tabClass.join(''));
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "_handlePopperPlacementChange",
|
||||
value: function _handlePopperPlacementChange(data) {
|
||||
this._cleanTipClass();
|
||||
|
||||
this.addAttachmentClass(this._getAttachment(data.placement));
|
||||
}
|
||||
}, {
|
||||
key: "_fixTransition",
|
||||
value: function _fixTransition() {
|
||||
var tip = this.getTipElement();
|
||||
var initConfigAnimation = this.config.animation;
|
||||
|
||||
if (tip.getAttribute('x-placement') !== null) {
|
||||
return;
|
||||
}
|
||||
|
||||
$(tip).removeClass(ClassName.FADE);
|
||||
this.config.animation = false;
|
||||
this.hide();
|
||||
this.show();
|
||||
this.config.animation = initConfigAnimation;
|
||||
}
|
||||
}], [{
|
||||
key: '_jQueryInterface',
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' ? config : null;
|
||||
|
||||
if (!data && /destroy|hide/.test(config)) {
|
||||
var _config = _typeof(config) === 'object' && config;
|
||||
|
||||
if (!data && /dispose|hide/.test(config)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -579,45 +694,46 @@ define(['exports', './util'], function (exports, _util) {
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (data[config] === undefined) {
|
||||
throw new Error('No method named "' + config + '"');
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"".concat(config, "\""));
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: 'VERSION',
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: 'Default',
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}, {
|
||||
key: 'NAME',
|
||||
key: "NAME",
|
||||
get: function get() {
|
||||
return NAME;
|
||||
}
|
||||
}, {
|
||||
key: 'DATA_KEY',
|
||||
key: "DATA_KEY",
|
||||
get: function get() {
|
||||
return DATA_KEY;
|
||||
}
|
||||
}, {
|
||||
key: 'Event',
|
||||
key: "Event",
|
||||
get: function get() {
|
||||
return Event;
|
||||
}
|
||||
}, {
|
||||
key: 'EVENT_KEY',
|
||||
key: "EVENT_KEY",
|
||||
get: function get() {
|
||||
return EVENT_KEY;
|
||||
}
|
||||
}, {
|
||||
key: 'DefaultType',
|
||||
key: "DefaultType",
|
||||
get: function get() {
|
||||
return DefaultType;
|
||||
}
|
||||
@ -631,16 +747,16 @@ define(['exports', './util'], function (exports, _util) {
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Tooltip._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Tooltip;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Tooltip._jQueryInterface;
|
||||
};
|
||||
|
||||
return Tooltip;
|
||||
}(jQuery);
|
||||
}(_jquery2.default, _popper2.default);
|
||||
|
||||
exports.default = Tooltip;
|
||||
});
|
@ -1,44 +1,37 @@
|
||||
define(['exports'], function (exports) {
|
||||
'use strict';
|
||||
define(["exports", "jquery"], function (exports, _jquery) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _jquery2 = _interopRequireDefault(_jquery);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.0.0-alpha.4): util.js
|
||||
* Bootstrap (v4.0.0): util.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Util = function ($) {
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Private TransitionEnd Helpers
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var transition = false;
|
||||
var MAX_UID = 1000000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
|
||||
var MAX_UID = 1000000;
|
||||
|
||||
var TransitionEndEvent = {
|
||||
WebkitTransition: 'webkitTransitionEnd',
|
||||
MozTransition: 'transitionend',
|
||||
OTransition: 'oTransitionEnd otransitionend',
|
||||
transition: 'transitionend'
|
||||
};
|
||||
|
||||
// shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
function toType(obj) {
|
||||
return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
|
||||
}
|
||||
|
||||
function isElement(obj) {
|
||||
return (obj[0] || obj).nodeType;
|
||||
}
|
||||
|
||||
function getSpecialTransitionEndEvent() {
|
||||
return {
|
||||
bindType: transition.end,
|
||||
@ -47,48 +40,39 @@ define(['exports'], function (exports) {
|
||||
if ($(event.target).is(this)) {
|
||||
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
|
||||
}
|
||||
return undefined;
|
||||
|
||||
return undefined; // eslint-disable-line no-undefined
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function transitionEndTest() {
|
||||
if (window.QUnit) {
|
||||
if (typeof window !== 'undefined' && window.QUnit) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var el = document.createElement('bootstrap');
|
||||
|
||||
for (var name in TransitionEndEvent) {
|
||||
if (el.style[name] !== undefined) {
|
||||
return { end: TransitionEndEvent[name] };
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return {
|
||||
end: 'transitionend'
|
||||
};
|
||||
}
|
||||
|
||||
function transitionEndEmulator(duration) {
|
||||
var _this = this;
|
||||
|
||||
var called = false;
|
||||
|
||||
$(this).one(Util.TRANSITION_END, function () {
|
||||
called = true;
|
||||
});
|
||||
|
||||
setTimeout(function () {
|
||||
if (!called) {
|
||||
Util.triggerTransitionEnd(_this);
|
||||
}
|
||||
}, duration);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
function setTransitionEndSupport() {
|
||||
transition = transitionEndTest();
|
||||
|
||||
$.fn.emulateTransitionEnd = transitionEndEmulator;
|
||||
|
||||
if (Util.supportsTransitionEnd()) {
|
||||
@ -96,36 +80,50 @@ define(['exports'], function (exports) {
|
||||
}
|
||||
}
|
||||
|
||||
function escapeId(selector) {
|
||||
// We escape IDs in case of special selectors (selector = '#myId:something')
|
||||
// $.escapeSelector does not exist in jQuery < 3
|
||||
selector = typeof $.escapeSelector === 'function' ? $.escapeSelector(selector).substr(1) : selector.replace(/(:|\.|\[|\]|,|=|@)/g, '\\$1');
|
||||
return selector;
|
||||
}
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Public Util Api
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
var Util = {
|
||||
|
||||
TRANSITION_END: 'bsTransitionEnd',
|
||||
|
||||
getUID: function getUID(prefix) {
|
||||
do {
|
||||
/* eslint-disable no-bitwise */
|
||||
// eslint-disable-next-line no-bitwise
|
||||
prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
|
||||
/* eslint-enable no-bitwise */
|
||||
} while (document.getElementById(prefix));
|
||||
|
||||
return prefix;
|
||||
},
|
||||
getSelectorFromElement: function getSelectorFromElement(element) {
|
||||
var selector = element.getAttribute('data-target');
|
||||
|
||||
if (!selector) {
|
||||
if (!selector || selector === '#') {
|
||||
selector = element.getAttribute('href') || '';
|
||||
selector = /^#[a-z]/i.test(selector) ? selector : null;
|
||||
} // If it's an ID
|
||||
|
||||
|
||||
if (selector.charAt(0) === '#') {
|
||||
selector = escapeId(selector);
|
||||
}
|
||||
|
||||
return selector;
|
||||
try {
|
||||
var $selector = $(document).find(selector);
|
||||
return $selector.length > 0 ? selector : null;
|
||||
} catch (err) {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
reflow: function reflow(element) {
|
||||
new Function('bs', 'return bs')(element.offsetHeight);
|
||||
return element.offsetHeight;
|
||||
},
|
||||
triggerTransitionEnd: function triggerTransitionEnd(element) {
|
||||
$(element).trigger(transition.end);
|
||||
@ -133,31 +131,26 @@ define(['exports'], function (exports) {
|
||||
supportsTransitionEnd: function supportsTransitionEnd() {
|
||||
return Boolean(transition);
|
||||
},
|
||||
isElement: function isElement(obj) {
|
||||
return (obj[0] || obj).nodeType;
|
||||
},
|
||||
typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
|
||||
for (var property in configTypes) {
|
||||
if (configTypes.hasOwnProperty(property)) {
|
||||
if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
|
||||
var expectedTypes = configTypes[property];
|
||||
var value = config[property];
|
||||
var valueType = void 0;
|
||||
|
||||
if (value && isElement(value)) {
|
||||
valueType = 'element';
|
||||
} else {
|
||||
valueType = toType(value);
|
||||
}
|
||||
var valueType = value && Util.isElement(value) ? 'element' : toType(value);
|
||||
|
||||
if (!new RegExp(expectedTypes).test(valueType)) {
|
||||
throw new Error(componentName.toUpperCase() + ': ' + ('Option "' + property + '" provided type "' + valueType + '" ') + ('but expected type "' + expectedTypes + '".'));
|
||||
throw new Error("".concat(componentName.toUpperCase(), ": ") + "Option \"".concat(property, "\" provided type \"").concat(valueType, "\" ") + "but expected type \"".concat(expectedTypes, "\"."));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
setTransitionEndSupport();
|
||||
|
||||
return Util;
|
||||
}(jQuery);
|
||||
}(_jquery2.default);
|
||||
|
||||
exports.default = Util;
|
||||
});
|
@ -1,52 +0,0 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Admin renderer.
|
||||
*
|
||||
* @package theme_noanme
|
||||
* @copyright 2016 Frédéric Massart - FMCorz.net
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
namespace theme_boost\output\core;
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
use moodle_url;
|
||||
|
||||
require_once($CFG->dirroot . '/' . $CFG->admin . '/renderer.php');
|
||||
|
||||
/**
|
||||
* Admin renderer class.
|
||||
*
|
||||
* @package theme_noanme
|
||||
* @copyright 2016 Frédéric Massart - FMCorz.net
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class admin_renderer extends \core_admin_renderer {
|
||||
|
||||
/**
|
||||
* Output a warning message.
|
||||
*
|
||||
* @param string $message the message to display.
|
||||
* @param string $type type class
|
||||
* @return string HTML to output.
|
||||
*/
|
||||
protected function warning($message, $type = 'warning') {
|
||||
return $this->box($message, 'generalbox m-b-1 admin' . $type);
|
||||
}
|
||||
|
||||
}
|
748
theme/boost/classes/output/core_course/management/renderer.php
Normal file
748
theme/boost/classes/output/core_course/management/renderer.php
Normal file
@ -0,0 +1,748 @@
|
||||
<?php
|
||||
// This file is part of The Bootstrap Moodle theme
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Renderers to align Moodle's HTML with that expected by Bootstrap
|
||||
*
|
||||
* @package theme_boost
|
||||
* @copyright 2018 Bas Brands
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
namespace theme_boost\output\core_course\management;
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
require_once($CFG->dirroot . "/course/classes/management_renderer.php");
|
||||
|
||||
use html_writer;
|
||||
use coursecat;
|
||||
use moodle_url;
|
||||
use course_in_list;
|
||||
use lang_string;
|
||||
use context_system;
|
||||
use stdClass;
|
||||
use action_menu;
|
||||
use action_menu_link_secondary;
|
||||
|
||||
/**
|
||||
* Main renderer for the course management pages.
|
||||
*
|
||||
* @package theme_boost
|
||||
* @copyright 2013 Sam Hemelryk
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class renderer extends \core_course_management_renderer {
|
||||
|
||||
/**
|
||||
* Opens a grid.
|
||||
*
|
||||
* Call {@link core_course_management_renderer::grid_column_start()} to create columns.
|
||||
*
|
||||
* @param string $id An id to give this grid.
|
||||
* @param string $class A class to give this grid.
|
||||
* @return string
|
||||
*/
|
||||
public function grid_start($id = null, $class = null) {
|
||||
$gridclass = 'grid-start grid-row-r d-flex flex-wrap row';
|
||||
if (is_null($class)) {
|
||||
$class = $gridclass;
|
||||
} else {
|
||||
$class .= ' ' . $gridclass;
|
||||
}
|
||||
$attributes = array();
|
||||
if (!is_null($id)) {
|
||||
$attributes['id'] = $id;
|
||||
}
|
||||
return html_writer::start_div($class, $attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a grid column
|
||||
*
|
||||
* @param int $size The number of segments this column should span.
|
||||
* @param string $id An id to give the column.
|
||||
* @param string $class A class to give the column.
|
||||
* @return string
|
||||
*/
|
||||
public function grid_column_start($size, $id = null, $class = null) {
|
||||
|
||||
if ($id == 'course-detail') {
|
||||
$size = 12;
|
||||
$bootstrapclass = 'col-md-'.$size;
|
||||
} else {
|
||||
$bootstrapclass = 'd-flex flex-wrap px-3 mb-3';
|
||||
}
|
||||
|
||||
$yuigridclass = "col-sm";
|
||||
|
||||
if (is_null($class)) {
|
||||
$class = $yuigridclass . ' ' . $bootstrapclass;
|
||||
} else {
|
||||
$class .= ' ' . $yuigridclass . ' ' . $bootstrapclass;
|
||||
}
|
||||
$attributes = array();
|
||||
if (!is_null($id)) {
|
||||
$attributes['id'] = $id;
|
||||
}
|
||||
return html_writer::start_div($class . " grid_column_start", $attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renderers detailed course information.
|
||||
*
|
||||
* @param course_in_list $course The course to display details for.
|
||||
* @return string
|
||||
*/
|
||||
public function course_detail(course_in_list $course) {
|
||||
$details = \core_course\management\helper::get_course_detail_array($course);
|
||||
$fullname = $details['fullname']['value'];
|
||||
|
||||
$html = html_writer::start_div('course-detail card');
|
||||
$html .= html_writer::start_div('card-header');
|
||||
$html .= html_writer::tag('h3', $fullname, array('id' => 'course-detail-title',
|
||||
'class' => 'card-title', 'tabindex' => '0'));
|
||||
$html .= html_writer::end_div();
|
||||
$html .= html_writer::start_div('card-body');
|
||||
$html .= $this->course_detail_actions($course);
|
||||
foreach ($details as $class => $data) {
|
||||
$html .= $this->detail_pair($data['key'], $data['value'], $class);
|
||||
}
|
||||
$html .= html_writer::end_div();
|
||||
$html .= html_writer::end_div();
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders html to display a course search form
|
||||
*
|
||||
* @param string $value default value to populate the search field
|
||||
* @param string $format display format - 'plain' (default), 'short' or 'navbar'
|
||||
* @return string
|
||||
*/
|
||||
public function course_search_form($value = '', $format = 'plain') {
|
||||
static $count = 0;
|
||||
$formid = 'coursesearch';
|
||||
if ((++$count) > 1) {
|
||||
$formid .= $count;
|
||||
}
|
||||
|
||||
switch ($format) {
|
||||
case 'navbar' :
|
||||
$formid = 'coursesearchnavbar';
|
||||
$inputid = 'navsearchbox';
|
||||
$inputsize = 20;
|
||||
break;
|
||||
case 'short' :
|
||||
$inputid = 'shortsearchbox';
|
||||
$inputsize = 12;
|
||||
break;
|
||||
default :
|
||||
$inputid = 'coursesearchbox';
|
||||
$inputsize = 30;
|
||||
}
|
||||
|
||||
$strsearchcourses = get_string("searchcourses");
|
||||
$searchurl = new moodle_url('/course/management.php');
|
||||
|
||||
$output = html_writer::start_div('row');
|
||||
$output .= html_writer::start_div('col-md-12');
|
||||
$output .= html_writer::start_tag('form', array('class' => 'card', 'id' => $formid,
|
||||
'action' => $searchurl, 'method' => 'get'));
|
||||
$output .= html_writer::start_tag('fieldset', array('class' => 'coursesearchbox invisiblefieldset'));
|
||||
$output .= html_writer::tag('div', $this->output->heading($strsearchcourses.': ', 2, 'm-0'),
|
||||
array('class' => 'card-header'));
|
||||
$output .= html_writer::start_div('card-body');
|
||||
$output .= html_writer::start_div('input-group col-sm-6 col-lg-4 m-auto');
|
||||
$output .= html_writer::empty_tag('input', array('class' => 'form-control', 'type' => 'text', 'id' => $inputid,
|
||||
'size' => $inputsize, 'name' => 'search', 'value' => s($value)));
|
||||
$output .= html_writer::start_tag('span', array('class' => 'input-group-btn'));
|
||||
$output .= html_writer::tag('button', get_string('go'), array('class' => 'btn btn-primary', 'type' => 'submit'));
|
||||
$output .= html_writer::end_tag('span');
|
||||
$output .= html_writer::end_div();
|
||||
$output .= html_writer::end_div();
|
||||
$output .= html_writer::end_tag('fieldset');
|
||||
$output .= html_writer::end_tag('form');
|
||||
$output .= html_writer::end_div();
|
||||
$output .= html_writer::end_div();
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Presents a course category listing.
|
||||
*
|
||||
* @param coursecat $category The currently selected category. Also the category to highlight in the listing.
|
||||
* @return string
|
||||
*/
|
||||
public function category_listing(coursecat $category = null) {
|
||||
|
||||
if ($category === null) {
|
||||
$selectedparents = array();
|
||||
$selectedcategory = null;
|
||||
} else {
|
||||
$selectedparents = $category->get_parents();
|
||||
$selectedparents[] = $category->id;
|
||||
$selectedcategory = $category->id;
|
||||
}
|
||||
$catatlevel = \core_course\management\helper::get_expanded_categories('');
|
||||
$catatlevel[] = array_shift($selectedparents);
|
||||
$catatlevel = array_unique($catatlevel);
|
||||
|
||||
$listing = coursecat::get(0)->get_children();
|
||||
|
||||
$attributes = array(
|
||||
'class' => 'ml-1 list-unstyled',
|
||||
'role' => 'tree',
|
||||
'aria-labelledby' => 'category-listing-title'
|
||||
);
|
||||
|
||||
$html = html_writer::start_div('category-listing card w-100');
|
||||
$html .= html_writer::tag('h3', get_string('categories'),
|
||||
array('class' => 'card-header', 'id' => 'category-listing-title'));
|
||||
$html .= html_writer::start_div('card-body');
|
||||
$html .= $this->category_listing_actions($category);
|
||||
$html .= html_writer::start_tag('ul', $attributes);
|
||||
foreach ($listing as $listitem) {
|
||||
// Render each category in the listing.
|
||||
$subcategories = array();
|
||||
if (in_array($listitem->id, $catatlevel)) {
|
||||
$subcategories = $listitem->get_children();
|
||||
}
|
||||
$html .= $this->category_listitem(
|
||||
$listitem,
|
||||
$subcategories,
|
||||
$listitem->get_children_count(),
|
||||
$selectedcategory,
|
||||
$selectedparents
|
||||
);
|
||||
}
|
||||
$html .= html_writer::end_tag('ul');
|
||||
$html .= $this->category_bulk_actions($category);
|
||||
$html .= html_writer::end_div();
|
||||
$html .= html_writer::end_div();
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders a category list item.
|
||||
*
|
||||
* This function gets called recursively to render sub categories.
|
||||
*
|
||||
* @param coursecat $category The category to render as listitem.
|
||||
* @param coursecat[] $subcategories The subcategories belonging to the category being rented.
|
||||
* @param int $totalsubcategories The total number of sub categories.
|
||||
* @param int $selectedcategory The currently selected category
|
||||
* @param int[] $selectedcategories The path to the selected category and its ID.
|
||||
* @return string
|
||||
*/
|
||||
public function category_listitem(coursecat $category, array $subcategories, $totalsubcategories,
|
||||
$selectedcategory = null, $selectedcategories = array()) {
|
||||
|
||||
$isexpandable = ($totalsubcategories > 0);
|
||||
$isexpanded = (!empty($subcategories));
|
||||
$activecategory = ($selectedcategory === $category->id);
|
||||
$attributes = array(
|
||||
'class' => 'listitem listitem-category list-group-item list-group-item-action',
|
||||
'data-id' => $category->id,
|
||||
'data-expandable' => $isexpandable ? '1' : '0',
|
||||
'data-expanded' => $isexpanded ? '1' : '0',
|
||||
'data-selected' => $activecategory ? '1' : '0',
|
||||
'data-visible' => $category->visible ? '1' : '0',
|
||||
'role' => 'treeitem',
|
||||
'aria-expanded' => $isexpanded ? 'true' : 'false'
|
||||
);
|
||||
$text = $category->get_formatted_name();
|
||||
if ($category->parent) {
|
||||
$a = new stdClass;
|
||||
$a->category = $text;
|
||||
$a->parentcategory = $category->get_parent_coursecat()->get_formatted_name();
|
||||
$textlabel = get_string('categorysubcategoryof', 'moodle', $a);
|
||||
}
|
||||
$courseicon = $this->output->pix_icon('i/course', get_string('courses'));
|
||||
$bcatinput = array(
|
||||
'type' => 'checkbox',
|
||||
'name' => 'bcat[]',
|
||||
'value' => $category->id,
|
||||
'class' => 'bulk-action-checkbox',
|
||||
'aria-label' => get_string('bulkactionselect', 'moodle', $text),
|
||||
'data-action' => 'select'
|
||||
);
|
||||
|
||||
if (!$category->can_resort_subcategories() && !$category->has_manage_capability()) {
|
||||
// Very very hardcoded here.
|
||||
$bcatinput['style'] = 'visibility:hidden';
|
||||
}
|
||||
|
||||
$viewcaturl = new moodle_url('/course/management.php', array('categoryid' => $category->id));
|
||||
if ($isexpanded) {
|
||||
$icon = $this->output->pix_icon('t/switch_minus', get_string('collapse'),
|
||||
'moodle', array('class' => 'tree-icon', 'title' => ''));
|
||||
$icon = html_writer::link(
|
||||
$viewcaturl,
|
||||
$icon,
|
||||
array(
|
||||
'class' => 'float-left',
|
||||
'data-action' => 'collapse',
|
||||
'title' => get_string('collapsecategory', 'moodle', $text),
|
||||
'aria-controls' => 'subcategoryof'.$category->id
|
||||
)
|
||||
);
|
||||
} else if ($isexpandable) {
|
||||
$icon = $this->output->pix_icon('t/switch_plus', get_string('expand'),
|
||||
'moodle', array('class' => 'tree-icon', 'title' => ''));
|
||||
$icon = html_writer::link(
|
||||
$viewcaturl,
|
||||
$icon,
|
||||
array(
|
||||
'class' => 'float-left',
|
||||
'data-action' => 'expand',
|
||||
'title' => get_string('expandcategory', 'moodle', $text)
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$icon = $this->output->pix_icon(
|
||||
'i/navigationitem',
|
||||
'',
|
||||
'moodle',
|
||||
array('class' => 'tree-icon', 'title' => get_string('showcategory', 'moodle', $text))
|
||||
);
|
||||
$icon = html_writer::span($icon, 'float-left');
|
||||
}
|
||||
$actions = \core_course\management\helper::get_category_listitem_actions($category);
|
||||
$hasactions = !empty($actions) || $category->can_create_course();
|
||||
|
||||
$html = html_writer::start_tag('li', $attributes);
|
||||
$html .= html_writer::start_div('clearfix');
|
||||
$html .= html_writer::start_div('float-left ba-checkbox');
|
||||
$html .= html_writer::empty_tag('input', $bcatinput).' ';
|
||||
$html .= html_writer::end_div();
|
||||
$html .= $icon;
|
||||
if ($hasactions) {
|
||||
$textattributes = array('class' => 'float-left categoryname');
|
||||
} else {
|
||||
$textattributes = array('class' => 'float-left categoryname without-actions');
|
||||
}
|
||||
if (isset($textlabel)) {
|
||||
$textattributes['aria-label'] = $textlabel;
|
||||
}
|
||||
$html .= html_writer::link($viewcaturl, $text, $textattributes);
|
||||
$html .= html_writer::start_div('float-right d-flex');
|
||||
if ($category->idnumber) {
|
||||
$html .= html_writer::tag('span', s($category->idnumber), array('class' => 'dimmed idnumber'));
|
||||
}
|
||||
if ($hasactions) {
|
||||
$html .= $this->category_listitem_actions($category, $actions);
|
||||
}
|
||||
$countid = 'course-count-'.$category->id;
|
||||
$html .= html_writer::span(
|
||||
html_writer::span($category->get_courses_count()) .
|
||||
html_writer::span(get_string('courses'), 'accesshide', array('id' => $countid)) .
|
||||
$courseicon,
|
||||
'course-count dimmed',
|
||||
array('aria-labelledby' => $countid)
|
||||
);
|
||||
$html .= html_writer::end_div();
|
||||
$html .= html_writer::end_div();
|
||||
if ($isexpanded) {
|
||||
$html .= html_writer::start_tag('ul',
|
||||
array('class' => 'ml', 'role' => 'group', 'id' => 'subcategoryof'.$category->id));
|
||||
$catatlevel = \core_course\management\helper::get_expanded_categories($category->path);
|
||||
$catatlevel[] = array_shift($selectedcategories);
|
||||
$catatlevel = array_unique($catatlevel);
|
||||
foreach ($subcategories as $listitem) {
|
||||
$childcategories = (in_array($listitem->id, $catatlevel)) ? $listitem->get_children() : array();
|
||||
$html .= $this->category_listitem(
|
||||
$listitem,
|
||||
$childcategories,
|
||||
$listitem->get_children_count(),
|
||||
$selectedcategory,
|
||||
$selectedcategories
|
||||
);
|
||||
}
|
||||
$html .= html_writer::end_tag('ul');
|
||||
}
|
||||
$html .= html_writer::end_tag('li');
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renderers the actions that are possible for the course category listing.
|
||||
*
|
||||
* These are not the actions associated with an individual category listing.
|
||||
* That happens through category_listitem_actions.
|
||||
*
|
||||
* @param coursecat $category
|
||||
* @return string
|
||||
*/
|
||||
public function category_listing_actions(coursecat $category = null) {
|
||||
$actions = array();
|
||||
|
||||
$cancreatecategory = $category && $category->can_create_subcategory();
|
||||
$cancreatecategory = $cancreatecategory || coursecat::can_create_top_level_category();
|
||||
if ($category === null) {
|
||||
$category = coursecat::get(0);
|
||||
}
|
||||
|
||||
if ($cancreatecategory) {
|
||||
$url = new moodle_url('/course/editcategory.php', array('parent' => $category->id));
|
||||
$actions[] = html_writer::link($url, get_string('createnewcategory'), array('class' => 'btn btn-default'));
|
||||
}
|
||||
if (coursecat::can_approve_course_requests()) {
|
||||
$actions[] = html_writer::link(new moodle_url('/course/pending.php'), get_string('coursespending'));
|
||||
}
|
||||
if (count($actions) === 0) {
|
||||
return '';
|
||||
}
|
||||
return html_writer::div(join(' ', $actions), 'listing-actions category-listing-actions mb-3');
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders a course listing.
|
||||
*
|
||||
* @param coursecat $category The currently selected category. This is what the listing is focused on.
|
||||
* @param course_in_list $course The currently selected course.
|
||||
* @param int $page The page being displayed.
|
||||
* @param int $perpage The number of courses to display per page.
|
||||
* @return string
|
||||
*/
|
||||
public function course_listing(coursecat $category = null, course_in_list $course = null, $page = 0, $perpage = 20) {
|
||||
|
||||
if ($category === null) {
|
||||
$html = html_writer::start_div('select-a-category');
|
||||
$html .= html_writer::tag('h3', get_string('courses'),
|
||||
array('id' => 'course-listing-title', 'tabindex' => '0'));
|
||||
$html .= $this->output->notification(get_string('selectacategory'), 'notifymessage');
|
||||
$html .= html_writer::end_div();
|
||||
return $html;
|
||||
}
|
||||
|
||||
$page = max($page, 0);
|
||||
$perpage = max($perpage, 2);
|
||||
$totalcourses = $category->coursecount;
|
||||
$totalpages = ceil($totalcourses / $perpage);
|
||||
if ($page > $totalpages - 1) {
|
||||
$page = $totalpages - 1;
|
||||
}
|
||||
$options = array(
|
||||
'offset' => $page * $perpage,
|
||||
'limit' => $perpage
|
||||
);
|
||||
$courseid = isset($course) ? $course->id : null;
|
||||
$class = '';
|
||||
if ($page === 0) {
|
||||
$class .= ' firstpage';
|
||||
}
|
||||
if ($page + 1 === (int)$totalpages) {
|
||||
$class .= ' lastpage';
|
||||
}
|
||||
|
||||
$html = html_writer::start_div('card course-listing w-100'.$class, array(
|
||||
'data-category' => $category->id,
|
||||
'data-page' => $page,
|
||||
'data-totalpages' => $totalpages,
|
||||
'data-totalcourses' => $totalcourses,
|
||||
'data-canmoveoutof' => $category->can_move_courses_out_of() && $category->can_move_courses_into()
|
||||
));
|
||||
$html .= html_writer::tag('h3', $category->get_formatted_name(),
|
||||
array('id' => 'course-listing-title', 'tabindex' => '0', 'class' => 'card-header'));
|
||||
$html .= html_writer::start_div('card-body');
|
||||
$html .= $this->course_listing_actions($category, $course, $perpage);
|
||||
$html .= $this->listing_pagination($category, $page, $perpage);
|
||||
$html .= html_writer::start_tag('ul', array('class' => 'ml', 'role' => 'group'));
|
||||
foreach ($category->get_courses($options) as $listitem) {
|
||||
$html .= $this->course_listitem($category, $listitem, $courseid);
|
||||
}
|
||||
$html .= html_writer::end_tag('ul');
|
||||
$html .= $this->listing_pagination($category, $page, $perpage, true);
|
||||
$html .= $this->course_bulk_actions($category);
|
||||
$html .= html_writer::end_div();
|
||||
$html .= html_writer::end_div();
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renderers a course list item.
|
||||
*
|
||||
* This function will be called for every course being displayed by course_listing.
|
||||
*
|
||||
* @param coursecat $category The currently selected category and the category the course belongs to.
|
||||
* @param course_in_list $course The course to produce HTML for.
|
||||
* @param int $selectedcourse The id of the currently selected course.
|
||||
* @return string
|
||||
*/
|
||||
public function course_listitem(coursecat $category, course_in_list $course, $selectedcourse) {
|
||||
|
||||
$text = $course->get_formatted_name();
|
||||
$attributes = array(
|
||||
'class' => 'listitem listitem-course list-group-item list-group-item-action',
|
||||
'data-id' => $course->id,
|
||||
'data-selected' => ($selectedcourse == $course->id) ? '1' : '0',
|
||||
'data-visible' => $course->visible ? '1' : '0'
|
||||
);
|
||||
|
||||
$bulkcourseinput = array(
|
||||
'type' => 'checkbox',
|
||||
'name' => 'bc[]',
|
||||
'value' => $course->id,
|
||||
'class' => 'bulk-action-checkbox',
|
||||
'aria-label' => get_string('bulkactionselect', 'moodle', $text),
|
||||
'data-action' => 'select'
|
||||
);
|
||||
if (!$category->has_manage_capability()) {
|
||||
// Very very hardcoded here.
|
||||
$bulkcourseinput['style'] = 'visibility:hidden';
|
||||
}
|
||||
|
||||
$viewcourseurl = new moodle_url($this->page->url, array('courseid' => $course->id));
|
||||
|
||||
$html = html_writer::start_tag('li', $attributes);
|
||||
$html .= html_writer::start_div('clearfix');
|
||||
|
||||
if ($category->can_resort_courses()) {
|
||||
// In order for dnd to be available the user must be able to resort the category children..
|
||||
$html .= html_writer::div($this->output->pix_icon('i/move_2d', get_string('dndcourse')), 'float-left drag-handle');
|
||||
}
|
||||
|
||||
$html .= html_writer::start_div('ba-checkbox float-left');
|
||||
$html .= html_writer::empty_tag('input', $bulkcourseinput).' ';
|
||||
$html .= html_writer::end_div();
|
||||
$html .= html_writer::link($viewcourseurl, $text, array('class' => 'float-left coursename'));
|
||||
$html .= html_writer::start_div('float-right');
|
||||
if ($course->idnumber) {
|
||||
$html .= html_writer::tag('span', s($course->idnumber), array('class' => 'dimmed idnumber'));
|
||||
}
|
||||
$html .= $this->course_listitem_actions($category, $course);
|
||||
$html .= html_writer::end_div();
|
||||
$html .= html_writer::end_div();
|
||||
$html .= html_writer::end_tag('li');
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renderers actions for the course listing.
|
||||
*
|
||||
* Not to be confused with course_listitem_actions which renderers the actions for individual courses.
|
||||
*
|
||||
* @param coursecat $category
|
||||
* @param course_in_list $course The currently selected course.
|
||||
* @param int $perpage
|
||||
* @return string
|
||||
*/
|
||||
public function course_listing_actions(coursecat $category, course_in_list $course = null, $perpage = 20) {
|
||||
$actions = array();
|
||||
if ($category->can_create_course()) {
|
||||
$url = new moodle_url('/course/edit.php', array('category' => $category->id, 'returnto' => 'catmanage'));
|
||||
$actions[] = html_writer::link($url, get_string('createnewcourse'), array('class' => 'btn btn-default'));
|
||||
}
|
||||
if ($category->can_request_course()) {
|
||||
// Request a new course.
|
||||
$url = new moodle_url('/course/request.php', array('return' => 'management'));
|
||||
$actions[] = html_writer::link($url, get_string('requestcourse'));
|
||||
}
|
||||
if ($category->can_resort_courses()) {
|
||||
$params = $this->page->url->params();
|
||||
$params['action'] = 'resortcourses';
|
||||
$params['sesskey'] = sesskey();
|
||||
$baseurl = new moodle_url('/course/management.php', $params);
|
||||
$fullnameurl = new moodle_url($baseurl, array('resort' => 'fullname'));
|
||||
$fullnameurldesc = new moodle_url($baseurl, array('resort' => 'fullnamedesc'));
|
||||
$shortnameurl = new moodle_url($baseurl, array('resort' => 'shortname'));
|
||||
$shortnameurldesc = new moodle_url($baseurl, array('resort' => 'shortnamedesc'));
|
||||
$idnumberurl = new moodle_url($baseurl, array('resort' => 'idnumber'));
|
||||
$idnumberdescurl = new moodle_url($baseurl, array('resort' => 'idnumberdesc'));
|
||||
$timecreatedurl = new moodle_url($baseurl, array('resort' => 'timecreated'));
|
||||
$timecreateddescurl = new moodle_url($baseurl, array('resort' => 'timecreateddesc'));
|
||||
$menu = new action_menu(array(
|
||||
new action_menu_link_secondary($fullnameurl,
|
||||
null,
|
||||
get_string('sortbyx', 'moodle', get_string('fullnamecourse'))),
|
||||
new action_menu_link_secondary($fullnameurldesc,
|
||||
null,
|
||||
get_string('sortbyxreverse', 'moodle', get_string('fullnamecourse'))),
|
||||
new action_menu_link_secondary($shortnameurl,
|
||||
null,
|
||||
get_string('sortbyx', 'moodle', get_string('shortnamecourse'))),
|
||||
new action_menu_link_secondary($shortnameurldesc,
|
||||
null,
|
||||
get_string('sortbyxreverse', 'moodle', get_string('shortnamecourse'))),
|
||||
new action_menu_link_secondary($idnumberurl,
|
||||
null,
|
||||
get_string('sortbyx', 'moodle', get_string('idnumbercourse'))),
|
||||
new action_menu_link_secondary($idnumberdescurl,
|
||||
null,
|
||||
get_string('sortbyxreverse', 'moodle', get_string('idnumbercourse'))),
|
||||
new action_menu_link_secondary($timecreatedurl,
|
||||
null,
|
||||
get_string('sortbyx', 'moodle', get_string('timecreatedcourse'))),
|
||||
new action_menu_link_secondary($timecreateddescurl,
|
||||
null,
|
||||
get_string('sortbyxreverse', 'moodle', get_string('timecreatedcourse')))
|
||||
));
|
||||
$menu->set_menu_trigger(get_string('resortcourses'));
|
||||
$actions[] = $this->render($menu);
|
||||
}
|
||||
$strall = get_string('all');
|
||||
$menu = new action_menu(array(
|
||||
new action_menu_link_secondary(new moodle_url($this->page->url, array('perpage' => 5)), null, 5),
|
||||
new action_menu_link_secondary(new moodle_url($this->page->url, array('perpage' => 10)), null, 10),
|
||||
new action_menu_link_secondary(new moodle_url($this->page->url, array('perpage' => 20)), null, 20),
|
||||
new action_menu_link_secondary(new moodle_url($this->page->url, array('perpage' => 50)), null, 50),
|
||||
new action_menu_link_secondary(new moodle_url($this->page->url, array('perpage' => 100)), null, 100),
|
||||
new action_menu_link_secondary(new moodle_url($this->page->url, array('perpage' => 999)), null, $strall),
|
||||
));
|
||||
if ((int)$perpage === 999) {
|
||||
$perpage = $strall;
|
||||
}
|
||||
$menu->attributes['class'] .= ' courses-per-page';
|
||||
$menu->set_menu_trigger(get_string('perpagea', 'moodle', $perpage));
|
||||
$actions[] = $this->render($menu);
|
||||
return html_writer::div(join(' ', $actions), 'listing-actions course-listing-actions');
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a search result listing.
|
||||
*
|
||||
* @param array $courses The courses to display.
|
||||
* @param int $totalcourses The total number of courses to display.
|
||||
* @param course_in_list $course The currently selected course if there is one.
|
||||
* @param int $page The current page, starting at 0.
|
||||
* @param int $perpage The number of courses to display per page.
|
||||
* @param string $search The string we are searching for.
|
||||
* @return string
|
||||
*/
|
||||
public function search_listing(array $courses, $totalcourses, course_in_list $course = null, $page = 0, $perpage = 20,
|
||||
$search = '') {
|
||||
$page = max($page, 0);
|
||||
$perpage = max($perpage, 2);
|
||||
$totalpages = ceil($totalcourses / $perpage);
|
||||
if ($page > $totalpages - 1) {
|
||||
$page = $totalpages - 1;
|
||||
}
|
||||
$courseid = isset($course) ? $course->id : null;
|
||||
$first = true;
|
||||
$last = false;
|
||||
$i = $page * $perpage;
|
||||
|
||||
$html = html_writer::start_div('course-listing w-100', array(
|
||||
'data-category' => 'search',
|
||||
'data-page' => $page,
|
||||
'data-totalpages' => $totalpages,
|
||||
'data-totalcourses' => $totalcourses
|
||||
));
|
||||
$html .= html_writer::tag('h3', get_string('courses'));
|
||||
$html .= $this->search_pagination($totalcourses, $page, $perpage);
|
||||
$html .= html_writer::start_tag('ul', array('class' => 'ml'));
|
||||
foreach ($courses as $listitem) {
|
||||
$i++;
|
||||
if ($i == $totalcourses) {
|
||||
$last = true;
|
||||
}
|
||||
$html .= $this->search_listitem($listitem, $courseid, $first, $last);
|
||||
$first = false;
|
||||
}
|
||||
$html .= html_writer::end_tag('ul');
|
||||
$html .= $this->search_pagination($totalcourses, $page, $perpage, true, $search);
|
||||
$html .= $this->course_search_bulk_actions();
|
||||
$html .= html_writer::end_div();
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renderers a search result course list item.
|
||||
*
|
||||
* This function will be called for every course being displayed by course_listing.
|
||||
*
|
||||
* @param course_in_list $course The course to produce HTML for.
|
||||
* @param int $selectedcourse The id of the currently selected course.
|
||||
* @return string
|
||||
*/
|
||||
public function search_listitem(course_in_list $course, $selectedcourse) {
|
||||
|
||||
$text = $course->get_formatted_name();
|
||||
$attributes = array(
|
||||
'class' => 'listitem listitem-course list-group-item list-group-item-action',
|
||||
'data-id' => $course->id,
|
||||
'data-selected' => ($selectedcourse == $course->id) ? '1' : '0',
|
||||
'data-visible' => $course->visible ? '1' : '0'
|
||||
);
|
||||
$bulkcourseinput = '';
|
||||
if (coursecat::get($course->category)->can_move_courses_out_of()) {
|
||||
$bulkcourseinput = array(
|
||||
'type' => 'checkbox',
|
||||
'name' => 'bc[]',
|
||||
'value' => $course->id,
|
||||
'class' => 'bulk-action-checkbox',
|
||||
'aria-label' => get_string('bulkactionselect', 'moodle', $text),
|
||||
'data-action' => 'select'
|
||||
);
|
||||
}
|
||||
$viewcourseurl = new moodle_url($this->page->url, array('courseid' => $course->id));
|
||||
$categoryname = coursecat::get($course->category)->get_formatted_name();
|
||||
|
||||
$html = html_writer::start_tag('li', $attributes);
|
||||
$html .= html_writer::start_div('clearfix');
|
||||
$html .= html_writer::start_div('float-left');
|
||||
if ($bulkcourseinput) {
|
||||
$html .= html_writer::empty_tag('input', $bulkcourseinput).' ';
|
||||
}
|
||||
$html .= html_writer::end_div();
|
||||
$html .= html_writer::link($viewcourseurl, $text, array('class' => 'float-left coursename'));
|
||||
$html .= html_writer::tag('span', $categoryname, array('class' => 'float-left categoryname'));
|
||||
$html .= html_writer::start_div('float-right');
|
||||
$html .= $this->search_listitem_actions($course);
|
||||
$html .= html_writer::tag('span', s($course->idnumber), array('class' => 'dimmed idnumber'));
|
||||
$html .= html_writer::end_div();
|
||||
$html .= html_writer::end_div();
|
||||
$html .= html_writer::end_tag('li');
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renderers a key value pair of information for display.
|
||||
*
|
||||
* @param string $key
|
||||
* @param string $value
|
||||
* @param string $class
|
||||
* @return string
|
||||
*/
|
||||
protected function detail_pair($key, $value, $class ='') {
|
||||
$html = html_writer::start_div('detail-pair row yui3-g '.preg_replace('#[^a-zA-Z0-9_\-]#', '-', $class));
|
||||
$html .= html_writer::div(html_writer::span($key), 'pair-key col-md-4 yui3-u-1-4 font-weight-bold');
|
||||
$html .= html_writer::div(html_writer::span($value), 'pair-value col-md-8 yui3-u-3-4');
|
||||
$html .= html_writer::end_div();
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* A collection of actions for a course.
|
||||
*
|
||||
* @param course_in_list $course The course to display actions for.
|
||||
* @return string
|
||||
*/
|
||||
public function course_detail_actions(course_in_list $course) {
|
||||
$actions = \core_course\management\helper::get_course_detail_actions($course);
|
||||
if (empty($actions)) {
|
||||
return '';
|
||||
}
|
||||
$options = array();
|
||||
foreach ($actions as $action) {
|
||||
$options[] = $this->action_link($action['url'], $action['string'], null,
|
||||
array('class' => 'btn btn-sm btn-secondary mr-1 mb-3'));
|
||||
}
|
||||
return html_writer::div(join('', $options), 'listing-actions course-detail-listing-actions');
|
||||
}
|
||||
|
||||
}
|
@ -62,7 +62,7 @@ class core_renderer extends \core_renderer {
|
||||
if (is_array($classes)) {
|
||||
$classes = implode(' ', $classes);
|
||||
}
|
||||
return parent::box_start($classes . ' p-y-1', $id, $attributes);
|
||||
return parent::box_start($classes . ' py-3', $id, $attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -73,29 +73,14 @@ class core_renderer extends \core_renderer {
|
||||
public function full_header() {
|
||||
global $PAGE;
|
||||
|
||||
$html = html_writer::start_tag('header', array('id' => 'page-header', 'class' => 'row'));
|
||||
$html .= html_writer::start_div('col-xs-12 p-a-1');
|
||||
$html .= html_writer::start_div('card');
|
||||
$html .= html_writer::start_div('card-block');
|
||||
$html .= html_writer::div($this->context_header_settings_menu(), 'pull-xs-right context-header-settings-menu');
|
||||
$html .= html_writer::start_div('pull-xs-left');
|
||||
$html .= $this->context_header();
|
||||
$html .= html_writer::end_div();
|
||||
$pageheadingbutton = $this->page_heading_button();
|
||||
if (empty($PAGE->layout_options['nonavbar'])) {
|
||||
$html .= html_writer::start_div('clearfix w-100 pull-xs-left', array('id' => 'page-navbar'));
|
||||
$html .= html_writer::tag('div', $this->navbar(), array('class' => 'breadcrumb-nav'));
|
||||
$html .= html_writer::div($pageheadingbutton, 'breadcrumb-button pull-xs-right');
|
||||
$html .= html_writer::end_div();
|
||||
} else if ($pageheadingbutton) {
|
||||
$html .= html_writer::div($pageheadingbutton, 'breadcrumb-button nonavbar pull-xs-right');
|
||||
}
|
||||
$html .= html_writer::tag('div', $this->course_header(), array('id' => 'course-header'));
|
||||
$html .= html_writer::end_div();
|
||||
$html .= html_writer::end_div();
|
||||
$html .= html_writer::end_div();
|
||||
$html .= html_writer::end_tag('header');
|
||||
return $html;
|
||||
$header = new stdClass();
|
||||
$header->settingsmenu = $this->context_header_settings_menu();
|
||||
$header->contextheader = $this->context_header();
|
||||
$header->hasnavbar = empty($PAGE->layout_options['nonavbar']);
|
||||
$header->navbar = $this->navbar();
|
||||
$header->pageheadingbutton = $this->page_heading_button();
|
||||
$header->courseheader = $this->course_header();
|
||||
return $this->render_from_template('theme_boost/header', $header);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -463,7 +448,8 @@ class core_renderer extends \core_renderer {
|
||||
$url = $url->out(false);
|
||||
}
|
||||
$context->logourl = $url;
|
||||
$context->sitename = format_string($SITE->fullname, true, ['context' => context_course::instance(SITEID), "escape" => false]);
|
||||
$context->sitename = format_string($SITE->fullname, true,
|
||||
['context' => context_course::instance(SITEID), "escape" => false]);
|
||||
|
||||
return $this->render_from_template('core/loginform', $context);
|
||||
}
|
||||
@ -483,7 +469,8 @@ class core_renderer extends \core_renderer {
|
||||
$url = $url->out(false);
|
||||
}
|
||||
$context['logourl'] = $url;
|
||||
$context['sitename'] = format_string($SITE->fullname, true, ['context' => context_course::instance(SITEID), "escape" => false]);
|
||||
$context['sitename'] = format_string($SITE->fullname, true,
|
||||
['context' => context_course::instance(SITEID), "escape" => false]);
|
||||
|
||||
return $this->render_from_template('core/signup_form_layout', $context);
|
||||
}
|
||||
@ -547,7 +534,6 @@ class core_renderer extends \core_renderer {
|
||||
$showusermenu = true;
|
||||
}
|
||||
|
||||
|
||||
if ($showfrontpagemenu) {
|
||||
$settingsnode = $this->page->settingsnav->find('frontpage', navigation_node::TYPE_SETTING);
|
||||
if ($settingsnode) {
|
||||
@ -692,7 +678,7 @@ class core_renderer extends \core_renderer {
|
||||
$link = new action_link(new moodle_url('#'), $menuitem->text, null, ['disabled' => true], $menuitem->icon);
|
||||
}
|
||||
if ($indent) {
|
||||
$link->add_class('m-l-1');
|
||||
$link->add_class('ml-2');
|
||||
}
|
||||
if (!empty($menuitem->classes)) {
|
||||
$link->add_class(implode(" ", $menuitem->classes));
|
||||
|
@ -80,87 +80,6 @@ if (is_readable($options['bootswatch'])) {
|
||||
cli_error('Error reading the bootswatch file: '.$options['bootswatch']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Local helper function replacing only the first occurrence of a substring.
|
||||
*
|
||||
* @param string $needle Substring to be searched for
|
||||
* @param string $replace New text replacing the old substring
|
||||
* @param string $haystack The text where the replacement happens
|
||||
* @return string
|
||||
*/
|
||||
function str_replace_one($needle, $replace, $haystack) {
|
||||
$pos = strpos($haystack, $needle);
|
||||
if ($pos !== false) {
|
||||
return substr_replace($haystack, $replace, $pos, strlen($needle));
|
||||
} else {
|
||||
return $haystack;
|
||||
}
|
||||
}
|
||||
|
||||
// Now start tweaking the variables strings.
|
||||
$workingvariables = $sourcevariables;
|
||||
|
||||
// Insert a lightest grey colour.
|
||||
$newrule = '$gray-lightest: lighten($gray-lighter, 13.5%);';
|
||||
$nextline = '$brand-primary';
|
||||
$workingvariables = str_replace_one($nextline, "$newrule\n\n$nextline", $workingvariables);
|
||||
|
||||
// Set body-color to text-color.
|
||||
$newrule = '$body-color: $text-color;';
|
||||
$nextline = '//** Global textual link color.';
|
||||
$workingvariables = str_replace_one($nextline, "$newrule\n\n$nextline", $workingvariables);
|
||||
|
||||
// Add a font-size-root the same as font-size-base.
|
||||
$newrule = '$font-size-root: $font-size-base;';
|
||||
$nextline = '$font-size-large';
|
||||
$workingvariables = str_replace_one($nextline, "$newrule\n\n$nextline", $workingvariables);
|
||||
|
||||
// Replace all 'large' with 'lg'.
|
||||
$workingvariables = str_replace('large', 'lg', $workingvariables);
|
||||
// Replace all 'small' with 'sm'.
|
||||
$workingvariables = str_replace('small', 'sm', $workingvariables);
|
||||
// Replace all 'vertical' with 'y'.
|
||||
$workingvariables = str_replace('vertical', 'y', $workingvariables);
|
||||
// Replace all 'horizontal' with 'x'.
|
||||
$workingvariables = str_replace('horizontal', 'x', $workingvariables);
|
||||
// Replace all 'border-radius-base' with 'border-radius'.
|
||||
$workingvariables = str_replace('border-radius-base', 'border-radius', $workingvariables);
|
||||
// Replace all 'condensed-cell' with 'sm-cell'.
|
||||
$workingvariables = str_replace('condensed-cell', 'sm-cell', $workingvariables);
|
||||
|
||||
// Add styles for btn-secondary.
|
||||
$newrule = '$btn-secondary-color: $btn-default-color;
|
||||
$btn-secondary-bg: $btn-default-bg;
|
||||
$btn-secondary-border: $btn-default-border;
|
||||
|
||||
';
|
||||
$nextline = '$btn-primary-color';
|
||||
$workingvariables = str_replace_one($nextline, "$newrule\n\n$nextline", $workingvariables);
|
||||
|
||||
// Add a input-border rule matching input-border-color.
|
||||
$newrule = '$input-border-color: $input-border;';
|
||||
$nextline = '$input-border-radius:';
|
||||
$workingvariables = str_replace_one($nextline, "$newrule\n\n$nextline", $workingvariables);
|
||||
// Replace all 'input-height-base:' with 'input-height:'.
|
||||
$workingvariables = str_replace('input-height-base:', 'input-height:', $workingvariables);
|
||||
|
||||
// Replace all '-default-' with '-light-'.
|
||||
$workingvariables = str_replace('navbar-default-', 'navbar-light-', $workingvariables);
|
||||
|
||||
// Replace all '-inverse-' with '-dark-'.
|
||||
$workingvariables = str_replace('navbar-inverse-', 'navbar-dark-', $workingvariables);
|
||||
|
||||
// Add a pagination-border-color rule matching pagination-border.
|
||||
$newrule = '$pagination-border-color: $pagination-border;';
|
||||
$nextline = '$pagination-hover-color';
|
||||
$workingvariables = str_replace_one($nextline, "$newrule\n\n$nextline", $workingvariables);
|
||||
|
||||
// Replace all 'label-' with 'tag-'.
|
||||
$workingvariables = str_replace('label-', 'tag-', $workingvariables);
|
||||
|
||||
// Replace all 'panel-' with 'card-'.
|
||||
$workingvariables = str_replace('panel-', 'card-', $workingvariables);
|
||||
|
||||
// Write the preset file.
|
||||
$out = fopen($options['preset'], 'w');
|
||||
|
||||
@ -168,74 +87,20 @@ if (!$out) {
|
||||
cli_error('Error writing to the preset file');
|
||||
}
|
||||
|
||||
fwrite($out, $workingvariables);
|
||||
fwrite($out, $sourcevariables);
|
||||
|
||||
fwrite($out, '
|
||||
// Import FontAwesome.
|
||||
@import "fontawesome";
|
||||
|
||||
// Import All of Bootstrap
|
||||
@import "bootstrap";
|
||||
|
||||
// Import Core moodle CSS
|
||||
@import "moodle";
|
||||
');
|
||||
|
||||
// Now replacements on the bootswatch.
|
||||
$workingbootswatch = $sourcebootswatch;
|
||||
|
||||
$mixins = <<<EOD
|
||||
|
||||
@mixin placeholder(\$text) {
|
||||
placeholder: \$text;
|
||||
}
|
||||
@mixin box-shadow(\$text) {
|
||||
box-shadow: \$text;
|
||||
}
|
||||
@mixin transform(\$transforms) {
|
||||
transform: \$transforms;
|
||||
}
|
||||
@mixin rotate (\$deg) {
|
||||
@include transform(rotate(#{\$deg}deg));
|
||||
}
|
||||
@mixin scale(\$scale) {
|
||||
@include transform(scale(\$scale));
|
||||
}
|
||||
@mixin translate (\$x, \$y) {
|
||||
@include transform(translate(\$x, \$y));
|
||||
}
|
||||
@mixin skew (\$x, \$y) {
|
||||
@include transform(skew(#{\$x}deg, #{\$y}deg));
|
||||
}
|
||||
@mixin transform-origin (\$origin) {
|
||||
transform-origin: \$origin;
|
||||
}
|
||||
|
||||
EOD;
|
||||
// Prepend some mixins.
|
||||
$workingbootswatch = $mixins . $workingbootswatch;
|
||||
|
||||
// Replace all 'large' with 'lg'.
|
||||
$workingbootswatch = str_replace('large', 'lg', $workingbootswatch);
|
||||
// Replace all 'small' with 'sm'.
|
||||
$workingbootswatch = str_replace('small', 'sm', $workingbootswatch);
|
||||
// Replace all 'vertical' with 'y'.
|
||||
$workingbootswatch = str_replace('vertical', 'y', $workingbootswatch);
|
||||
// Replace all 'horizontal' with 'x'.
|
||||
$workingbootswatch = str_replace('horizontal', 'x', $workingbootswatch);
|
||||
// Replace all 'border-radius-base' with 'border-radius'.
|
||||
$workingbootswatch = str_replace('border-radius-base', 'border-radius', $workingbootswatch);
|
||||
// Replace all 'condensed-cell' with 'sm-cell'.
|
||||
$workingbootswatch = str_replace('condensed-cell', 'sm-cell', $workingbootswatch);
|
||||
|
||||
// Replace all 'input-height-base:' with 'input-height:'.
|
||||
$workingbootswatch = str_replace('input-height-base:', 'input-height:', $workingbootswatch);
|
||||
|
||||
// Replace all '-default-' with '-light-'.
|
||||
$workingbootswatch = str_replace('navbar-default-', 'navbar-light-', $workingbootswatch);
|
||||
|
||||
// Replace all '-inverse-' with '-dark-'.
|
||||
$workingbootswatch = str_replace('navbar-inverse-', 'navbar-dark-', $workingbootswatch);
|
||||
|
||||
// Replace all 'label-' with 'tag-'.
|
||||
$workingbootswatch = str_replace('label-', 'tag-', $workingbootswatch);
|
||||
|
||||
// Replace all 'panel-' with 'card-'.
|
||||
$workingbootswatch = str_replace('panel-', 'card-', $workingbootswatch);
|
||||
|
||||
fwrite($out, $workingbootswatch);
|
||||
// Add the bootswatch file.
|
||||
fwrite($out, $sourcebootswatch);
|
||||
|
||||
fclose($out);
|
||||
|
@ -29,10 +29,15 @@ $string['backgroundimage'] = 'Background image';
|
||||
$string['backgroundimage_desc'] = 'The image to display as a background of the site. The background image you upload here will override the background image in your theme preset files.';
|
||||
$string['brandcolor'] = 'Brand colour';
|
||||
$string['brandcolor_desc'] = 'The accent colour.';
|
||||
$string['bootswatch'] = 'Bootswatch';
|
||||
$string['bootswatch_desc'] = 'A bootswatch is a set of Bootstrap variables and css to style Bootstrap';
|
||||
$string['choosereadme'] = 'Boost is a modern highly-customisable theme. This theme is intended to be used directly, or as a parent theme when creating new themes utilising Bootstrap 4.';
|
||||
$string['currentinparentheses'] = '(current)';
|
||||
$string['configtitle'] = 'Boost';
|
||||
$string['fontsize'] = 'Theme base fontsize';
|
||||
$string['fontsize_desc'] = 'Enter a fontsize in %';
|
||||
$string['generalsettings'] = 'General settings';
|
||||
$string['nobootswatch'] = 'None';
|
||||
$string['pluginname'] = 'Boost';
|
||||
$string['presetfiles'] = 'Additional theme preset files';
|
||||
$string['presetfiles_desc'] = 'Preset files can be used to dramatically alter the appearance of the theme. See <a href=https://docs.moodle.org/dev/Boost_Presets>Boost presets</a> for information on creating and sharing your own preset files, and see the <a href=http://moodle.net/boost>Presets repository</a> for presets that others have shared.';
|
||||
|
@ -48,7 +48,7 @@ function theme_boost_get_extra_scss($theme) {
|
||||
// Sets the background image, and its settings.
|
||||
if (!empty($imageurl)) {
|
||||
$content .= 'body { ';
|
||||
$content .= "background-image: url('$imageurl');";
|
||||
$content .= "background-image: url('$imageurl'); background-size: cover;";
|
||||
$content .= ' }';
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ function theme_boost_get_pre_scss($theme) {
|
||||
$scss = '';
|
||||
$configurable = [
|
||||
// Config key => [variableName, ...].
|
||||
'brandcolor' => ['brand-primary'],
|
||||
'brandcolor' => ['primary'],
|
||||
];
|
||||
|
||||
// Prepend variables first.
|
||||
@ -140,5 +140,9 @@ function theme_boost_get_pre_scss($theme) {
|
||||
$scss .= $theme->settings->scsspre;
|
||||
}
|
||||
|
||||
if (!empty($theme->settings->fontsize)) {
|
||||
$scss .= '$font-size-base: ' . (1 / 100 * $theme->settings->fontsize) . "rem !default;\n";
|
||||
}
|
||||
|
||||
return $scss;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ Twitter bootstrap
|
||||
-----------------
|
||||
|
||||
Sass:
|
||||
This theme uses the original unmodified version 4.0.0-alpha-3 Twitter bootstrap sass files.
|
||||
This theme uses the original unmodified version 4.0.0 Twitter bootstrap sass files.
|
||||
The bootstrap repository is available on:
|
||||
|
||||
https://github.com/twitter/bootstrap.git
|
||||
@ -21,12 +21,13 @@ Javascript:
|
||||
This theme uses the transpiled javascript from bootstrap4 as amd modules.
|
||||
|
||||
To update the javascript files:
|
||||
Checkout the latest branch of bootstrap to a folder, in that folder run:
|
||||
Checkout the latest branch of bootstrap to a folder, Run the follwing inside the cloned Bootstrap repository:
|
||||
|
||||
> mkdir "out"
|
||||
> npm install babel-cli babel-preset-es2015 babel-plugin-transform-es2015-modules-amd
|
||||
> ./node_modules/babel-cli/bin/babel.js --presets es2015 --plugins transform-es2015-modules-amd -d out/ js/src/
|
||||
```
|
||||
$ npm install @babel/cli@7.0.0-beta.37 @babel/preset-env@7.0.0-beta.37 babel-plugin-transform-es2015-modules-amd @babel/plugin-proposal-object-rest-spread
|
||||
$ mkdir out
|
||||
$ ./node_modules/@babel/cli/bin/babel.js --presets @babel/preset-env --plugins transform-es2015-modules-amd,@babel/plugin-proposal-object-rest-spread -d ./out/ js/src/
|
||||
```
|
||||
|
||||
Copy the transpiled files from out/ into the amd/src/ folder for the theme.
|
||||
Run grunt to re-compile the JS files.
|
||||
|
||||
Run grunt to re-compile the JS files. (thanks to Joby Harding)
|
2
theme/boost/scss/bootstrap.scss
vendored
Normal file
2
theme/boost/scss/bootstrap.scss
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
// Import Bootstrap.
|
||||
@import "bootstrap/bootstrap";
|
@ -1,7 +1,7 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2011-2016 Twitter, Inc.
|
||||
Copyright (c) 2011-2016 The Bootstrap Authors
|
||||
Copyright (c) 2011-2018 Twitter, Inc.
|
||||
Copyright (c) 2011-2018 The Bootstrap Authors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -3,8 +3,9 @@
|
||||
//
|
||||
|
||||
.alert {
|
||||
padding: $alert-padding;
|
||||
margin-bottom: $spacer-y;
|
||||
position: relative;
|
||||
padding: $alert-padding-y $alert-padding-x;
|
||||
margin-bottom: $alert-margin-bottom;
|
||||
border: $alert-border-width solid transparent;
|
||||
@include border-radius($alert-border-radius);
|
||||
}
|
||||
@ -26,13 +27,14 @@
|
||||
// Expand the right padding and account for the close button's positioning.
|
||||
|
||||
.alert-dismissible {
|
||||
padding-right: ($alert-padding * 2);
|
||||
padding-right: ($close-font-size + $alert-padding-x * 2);
|
||||
|
||||
// Adjust close link position
|
||||
.close {
|
||||
position: relative;
|
||||
top: -.125rem;
|
||||
right: -$alert-padding;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
padding: $alert-padding-y $alert-padding-x;
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
@ -42,15 +44,8 @@
|
||||
//
|
||||
// Generate contextual modifier classes for colorizing the alert.
|
||||
|
||||
.alert-success {
|
||||
@include alert-variant($alert-success-bg, $alert-success-border, $alert-success-text);
|
||||
}
|
||||
.alert-info {
|
||||
@include alert-variant($alert-info-bg, $alert-info-border, $alert-info-text);
|
||||
}
|
||||
.alert-warning {
|
||||
@include alert-variant($alert-warning-bg, $alert-warning-border, $alert-warning-text);
|
||||
}
|
||||
.alert-danger {
|
||||
@include alert-variant($alert-danger-bg, $alert-danger-border, $alert-danger-text);
|
||||
@each $color, $value in $theme-colors {
|
||||
.alert-#{$color} {
|
||||
@include alert-variant(theme-color-level($color, $alert-bg-level), theme-color-level($color, $alert-border-level), theme-color-level($color, $alert-color-level));
|
||||
}
|
||||
}
|
||||
|
@ -1,27 +0,0 @@
|
||||
.fade {
|
||||
opacity: 0;
|
||||
transition: opacity .15s linear;
|
||||
|
||||
&.in {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.collapse {
|
||||
display: none;
|
||||
|
||||
&.in {
|
||||
display: block;
|
||||
}
|
||||
// tr&.in { display: table-row; }
|
||||
// tbody&.in { display: table-row-group; }
|
||||
}
|
||||
|
||||
.collapsing {
|
||||
position: relative;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
transition-timing-function: ease;
|
||||
transition-duration: .35s;
|
||||
transition-property: height;
|
||||
}
|
47
theme/boost/scss/bootstrap/_badge.scss
Normal file
47
theme/boost/scss/bootstrap/_badge.scss
Normal file
@ -0,0 +1,47 @@
|
||||
// Base class
|
||||
//
|
||||
// Requires one of the contextual, color modifier classes for `color` and
|
||||
// `background-color`.
|
||||
|
||||
.badge {
|
||||
display: inline-block;
|
||||
padding: $badge-padding-y $badge-padding-x;
|
||||
font-size: $badge-font-size;
|
||||
font-weight: $badge-font-weight;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: baseline;
|
||||
@include border-radius($badge-border-radius);
|
||||
|
||||
// Empty badges collapse automatically
|
||||
&:empty {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Quick fix for badges in buttons
|
||||
.btn .badge {
|
||||
position: relative;
|
||||
top: -1px;
|
||||
}
|
||||
|
||||
// Pill badges
|
||||
//
|
||||
// Make them extra rounded with a modifier to replace v3's badges.
|
||||
|
||||
.badge-pill {
|
||||
padding-right: $badge-pill-padding-x;
|
||||
padding-left: $badge-pill-padding-x;
|
||||
@include border-radius($badge-pill-border-radius);
|
||||
}
|
||||
|
||||
// Colors
|
||||
//
|
||||
// Contextual variations (linked badges get darker on :hover).
|
||||
|
||||
@each $color, $value in $theme-colors {
|
||||
.badge-#{$color} {
|
||||
@include badge-variant($value);
|
||||
}
|
||||
}
|
@ -1,15 +1,14 @@
|
||||
.breadcrumb {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: $breadcrumb-padding-y $breadcrumb-padding-x;
|
||||
margin-bottom: $spacer-y;
|
||||
margin-bottom: $breadcrumb-margin-bottom;
|
||||
list-style: none;
|
||||
background-color: $breadcrumb-bg;
|
||||
@include border-radius($border-radius);
|
||||
@include clearfix;
|
||||
}
|
||||
|
||||
.breadcrumb-item {
|
||||
float: left;
|
||||
|
||||
// The separator between breadcrumbs (by default, a forward-slash: "/")
|
||||
+ .breadcrumb-item::before {
|
||||
display: inline-block; // Suppress underlining of the separator in modern browsers
|
||||
@ -28,6 +27,7 @@
|
||||
+ .breadcrumb-item:hover::before {
|
||||
text-decoration: underline;
|
||||
}
|
||||
// stylelint-disable-next-line no-duplicate-selectors
|
||||
+ .breadcrumb-item:hover::before {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
@ -1,96 +1,64 @@
|
||||
// scss-lint:disable QualifyingElement
|
||||
// stylelint-disable selector-no-qualifying-type
|
||||
|
||||
// Make the div behave like a button
|
||||
.btn-group,
|
||||
.btn-group-vertical {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
display: inline-flex;
|
||||
vertical-align: middle; // match .btn alignment given font-size hack above
|
||||
|
||||
> .btn {
|
||||
position: relative;
|
||||
float: left;
|
||||
flex: 0 1 auto;
|
||||
|
||||
// Bring the "active" button to the front
|
||||
// Bring the hover, focused, and "active" buttons to the front to overlay
|
||||
// the borders properly
|
||||
@include hover {
|
||||
z-index: 1;
|
||||
}
|
||||
&:focus,
|
||||
&:active,
|
||||
&.active {
|
||||
z-index: 2;
|
||||
}
|
||||
@include hover {
|
||||
z-index: 2;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Prevent double borders when buttons are next to each other
|
||||
.btn-group {
|
||||
// Prevent double borders when buttons are next to each other
|
||||
.btn + .btn,
|
||||
.btn + .btn-group,
|
||||
.btn-group + .btn,
|
||||
.btn-group + .btn-group {
|
||||
margin-left: -$input-btn-border-width;
|
||||
margin-left: -$btn-border-width;
|
||||
}
|
||||
}
|
||||
|
||||
// Optional: Group multiple button groups together for a toolbar
|
||||
.btn-toolbar {
|
||||
margin-left: -$btn-toolbar-margin; // Offset the first child's margin
|
||||
@include clearfix();
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
.btn-group,
|
||||
.input-group {
|
||||
float: left;
|
||||
}
|
||||
|
||||
> .btn,
|
||||
> .btn-group,
|
||||
> .input-group {
|
||||
margin-left: $btn-toolbar-margin;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
|
||||
border-radius: 0;
|
||||
}
|
||||
.btn-group {
|
||||
> .btn:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
|
||||
.btn-group > .btn:first-child {
|
||||
margin-left: 0;
|
||||
|
||||
&:not(:last-child):not(.dropdown-toggle) {
|
||||
// Reset rounded corners
|
||||
> .btn:not(:last-child):not(.dropdown-toggle),
|
||||
> .btn-group:not(:last-child) > .btn {
|
||||
@include border-right-radius(0);
|
||||
}
|
||||
}
|
||||
// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
|
||||
.btn-group > .btn:last-child:not(:first-child),
|
||||
.btn-group > .dropdown-toggle:not(:first-child) {
|
||||
@include border-left-radius(0);
|
||||
}
|
||||
|
||||
// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
|
||||
.btn-group > .btn-group {
|
||||
float: left;
|
||||
}
|
||||
.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
|
||||
border-radius: 0;
|
||||
}
|
||||
.btn-group > .btn-group:first-child:not(:last-child) {
|
||||
> .btn:last-child,
|
||||
> .dropdown-toggle {
|
||||
@include border-right-radius(0);
|
||||
> .btn:not(:first-child),
|
||||
> .btn-group:not(:first-child) > .btn {
|
||||
@include border-left-radius(0);
|
||||
}
|
||||
}
|
||||
.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
|
||||
@include border-left-radius(0);
|
||||
}
|
||||
|
||||
// On active and open, don't show outline
|
||||
.btn-group .dropdown-toggle:active,
|
||||
.btn-group.open .dropdown-toggle {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
|
||||
// Sizing
|
||||
//
|
||||
@ -104,7 +72,7 @@
|
||||
// Split button dropdowns
|
||||
//
|
||||
|
||||
.btn + .dropdown-toggle-split {
|
||||
.dropdown-toggle-split {
|
||||
padding-right: $btn-padding-x * .75;
|
||||
padding-left: $btn-padding-x * .75;
|
||||
|
||||
@ -125,8 +93,8 @@
|
||||
|
||||
|
||||
// The clickable button for toggling the menu
|
||||
// Remove the gradient and set the same inset shadow as the :active state
|
||||
.btn-group.open .dropdown-toggle {
|
||||
// Set the same inset shadow as the :active state
|
||||
.btn-group.show .dropdown-toggle {
|
||||
@include box-shadow($btn-active-box-shadow);
|
||||
|
||||
// Show no shadow for `.btn-link` since it has no other button styles.
|
||||
@ -136,77 +104,39 @@
|
||||
}
|
||||
|
||||
|
||||
// Reposition the caret
|
||||
.btn .caret {
|
||||
margin-left: 0;
|
||||
}
|
||||
// Carets in other button sizes
|
||||
.btn-lg .caret {
|
||||
border-width: $caret-width-lg $caret-width-lg 0;
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
// Upside down carets for .dropup
|
||||
.dropup .btn-lg .caret {
|
||||
border-width: 0 $caret-width-lg $caret-width-lg;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Vertical button groups
|
||||
//
|
||||
|
||||
.btn-group-vertical {
|
||||
> .btn,
|
||||
> .btn-group,
|
||||
> .btn-group > .btn {
|
||||
display: block;
|
||||
float: none;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
|
||||
.btn,
|
||||
.btn-group {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
// Clear floats so dropdown menus can be properly placed
|
||||
> .btn-group {
|
||||
@include clearfix();
|
||||
|
||||
> .btn {
|
||||
float: none;
|
||||
}
|
||||
}
|
||||
|
||||
> .btn + .btn,
|
||||
> .btn + .btn-group,
|
||||
> .btn-group + .btn,
|
||||
> .btn-group + .btn-group {
|
||||
margin-top: -$input-btn-border-width;
|
||||
margin-top: -$btn-border-width;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-group-vertical > .btn {
|
||||
&:not(:first-child):not(:last-child) {
|
||||
border-radius: 0;
|
||||
}
|
||||
&:first-child:not(:last-child) {
|
||||
// Reset rounded corners
|
||||
> .btn:not(:last-child):not(.dropdown-toggle),
|
||||
> .btn-group:not(:last-child) > .btn {
|
||||
@include border-bottom-radius(0);
|
||||
}
|
||||
&:last-child:not(:first-child) {
|
||||
|
||||
> .btn:not(:first-child),
|
||||
> .btn-group:not(:first-child) > .btn {
|
||||
@include border-top-radius(0);
|
||||
}
|
||||
}
|
||||
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
|
||||
border-radius: 0;
|
||||
}
|
||||
.btn-group-vertical > .btn-group:first-child:not(:last-child) {
|
||||
> .btn:last-child,
|
||||
> .dropdown-toggle {
|
||||
@include border-bottom-radius(0);
|
||||
}
|
||||
}
|
||||
.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
|
||||
@include border-top-radius(0);
|
||||
}
|
||||
|
||||
|
||||
// Checkbox and radio options
|
||||
@ -221,13 +151,15 @@
|
||||
// See https://github.com/twbs/bootstrap/pull/12794 and
|
||||
// https://github.com/twbs/bootstrap/pull/14559 for more information.
|
||||
|
||||
[data-toggle="buttons"] {
|
||||
.btn-group-toggle {
|
||||
> .btn,
|
||||
> .btn-group > .btn {
|
||||
margin-bottom: 0; // Override default `<label>` value
|
||||
|
||||
input[type="radio"],
|
||||
input[type="checkbox"] {
|
||||
position: absolute;
|
||||
clip: rect(0,0,0,0);
|
||||
clip: rect(0, 0, 0, 0);
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// scss-lint:disable QualifyingElement
|
||||
// stylelint-disable selector-no-qualifying-type
|
||||
|
||||
//
|
||||
// Base styles
|
||||
@ -7,50 +7,51 @@
|
||||
.btn {
|
||||
display: inline-block;
|
||||
font-weight: $btn-font-weight;
|
||||
line-height: $btn-line-height;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
border: $input-btn-border-width solid transparent;
|
||||
@include button-size($btn-padding-y, $btn-padding-x, $font-size-base, $btn-border-radius);
|
||||
@include transition(all .2s ease-in-out);
|
||||
|
||||
&,
|
||||
&:active,
|
||||
&.active {
|
||||
&:focus,
|
||||
&.focus {
|
||||
@include tab-focus();
|
||||
}
|
||||
}
|
||||
border: $btn-border-width solid transparent;
|
||||
@include button-size($btn-padding-y, $btn-padding-x, $font-size-base, $btn-line-height, $btn-border-radius);
|
||||
@include transition($btn-transition);
|
||||
|
||||
// Share hover and focus styles
|
||||
@include hover-focus {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&:focus,
|
||||
&.focus {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
background-image: none;
|
||||
outline: 0;
|
||||
@include box-shadow($btn-active-box-shadow);
|
||||
box-shadow: $btn-focus-box-shadow;
|
||||
}
|
||||
|
||||
// Disabled comes first so active can properly restyle
|
||||
&.disabled,
|
||||
&:disabled {
|
||||
cursor: $cursor-disabled;
|
||||
opacity: .65;
|
||||
opacity: $btn-disabled-opacity;
|
||||
@include box-shadow(none);
|
||||
}
|
||||
|
||||
// Opinionated: add "hand" cursor to non-disabled .btn elements
|
||||
&:not(:disabled):not(.disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&:not(:disabled):not(.disabled):active,
|
||||
&:not(:disabled):not(.disabled).active {
|
||||
background-image: none;
|
||||
@include box-shadow($btn-active-box-shadow);
|
||||
|
||||
&:focus {
|
||||
@include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Future-proof disabling of clicks on `<a>` elements
|
||||
a.btn.disabled,
|
||||
fieldset[disabled] a.btn {
|
||||
fieldset:disabled a.btn {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@ -59,43 +60,16 @@ fieldset[disabled] a.btn {
|
||||
// Alternate buttons
|
||||
//
|
||||
|
||||
.btn-primary {
|
||||
@include button-variant($btn-primary-color, $btn-primary-bg, $btn-primary-border);
|
||||
}
|
||||
.btn-secondary {
|
||||
@include button-variant($btn-secondary-color, $btn-secondary-bg, $btn-secondary-border);
|
||||
}
|
||||
.btn-info {
|
||||
@include button-variant($btn-info-color, $btn-info-bg, $btn-info-border);
|
||||
}
|
||||
.btn-success {
|
||||
@include button-variant($btn-success-color, $btn-success-bg, $btn-success-border);
|
||||
}
|
||||
.btn-warning {
|
||||
@include button-variant($btn-warning-color, $btn-warning-bg, $btn-warning-border);
|
||||
}
|
||||
.btn-danger {
|
||||
@include button-variant($btn-danger-color, $btn-danger-bg, $btn-danger-border);
|
||||
@each $color, $value in $theme-colors {
|
||||
.btn-#{$color} {
|
||||
@include button-variant($value, $value);
|
||||
}
|
||||
}
|
||||
|
||||
// Remove all backgrounds
|
||||
.btn-outline-primary {
|
||||
@include button-outline-variant($btn-primary-bg);
|
||||
}
|
||||
.btn-outline-secondary {
|
||||
@include button-outline-variant($btn-secondary-border);
|
||||
}
|
||||
.btn-outline-info {
|
||||
@include button-outline-variant($btn-info-bg);
|
||||
}
|
||||
.btn-outline-success {
|
||||
@include button-outline-variant($btn-success-bg);
|
||||
}
|
||||
.btn-outline-warning {
|
||||
@include button-outline-variant($btn-warning-bg);
|
||||
}
|
||||
.btn-outline-danger {
|
||||
@include button-outline-variant($btn-danger-bg);
|
||||
@each $color, $value in $theme-colors {
|
||||
.btn-outline-#{$color} {
|
||||
@include button-outline-variant($value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -105,36 +79,30 @@ fieldset[disabled] a.btn {
|
||||
|
||||
// Make a button look and behave like a link
|
||||
.btn-link {
|
||||
font-weight: normal;
|
||||
font-weight: $font-weight-normal;
|
||||
color: $link-color;
|
||||
border-radius: 0;
|
||||
background-color: transparent;
|
||||
|
||||
&,
|
||||
&:active,
|
||||
&.active,
|
||||
&:disabled {
|
||||
background-color: transparent;
|
||||
@include box-shadow(none);
|
||||
}
|
||||
&,
|
||||
&:focus,
|
||||
&:active {
|
||||
border-color: transparent;
|
||||
}
|
||||
@include hover {
|
||||
border-color: transparent;
|
||||
}
|
||||
@include hover-focus {
|
||||
color: $link-hover-color;
|
||||
text-decoration: $link-hover-decoration;
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
}
|
||||
&:disabled {
|
||||
@include hover-focus {
|
||||
color: $btn-link-disabled-color;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&:focus,
|
||||
&.focus {
|
||||
text-decoration: $link-hover-decoration;
|
||||
border-color: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
&:disabled,
|
||||
&.disabled {
|
||||
color: $btn-link-disabled-color;
|
||||
}
|
||||
|
||||
// No need for an active state here
|
||||
}
|
||||
|
||||
|
||||
@ -143,12 +111,11 @@ fieldset[disabled] a.btn {
|
||||
//
|
||||
|
||||
.btn-lg {
|
||||
// line-height: ensure even-numbered height of button next to large input
|
||||
@include button-size($btn-padding-y-lg, $btn-padding-x-lg, $font-size-lg, $btn-border-radius-lg);
|
||||
@include button-size($btn-padding-y-lg, $btn-padding-x-lg, $font-size-lg, $btn-line-height-lg, $btn-border-radius-lg);
|
||||
}
|
||||
|
||||
.btn-sm {
|
||||
// line-height: ensure proper height of button next to small input
|
||||
@include button-size($btn-padding-y-sm, $btn-padding-x-sm, $font-size-sm, $btn-border-radius-sm);
|
||||
@include button-size($btn-padding-y-sm, $btn-padding-x-sm, $font-size-sm, $btn-line-height-sm, $btn-border-radius-sm);
|
||||
}
|
||||
|
||||
|
||||
@ -159,11 +126,11 @@ fieldset[disabled] a.btn {
|
||||
.btn-block {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
// Vertically space out multiple block buttons
|
||||
.btn-block + .btn-block {
|
||||
margin-top: $btn-block-spacing-y;
|
||||
// Vertically space out multiple block buttons
|
||||
+ .btn-block {
|
||||
margin-top: $btn-block-spacing-y;
|
||||
}
|
||||
}
|
||||
|
||||
// Specificity overrides
|
||||
|
@ -4,16 +4,37 @@
|
||||
|
||||
.card {
|
||||
position: relative;
|
||||
display: block;
|
||||
margin-bottom: $card-spacer-y;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
word-wrap: break-word;
|
||||
background-color: $card-bg;
|
||||
// border: $card-border-width solid $card-border-color;
|
||||
@include border-radius($card-border-radius);
|
||||
background-clip: border-box;
|
||||
border: $card-border-width solid $card-border-color;
|
||||
@include border-radius($card-border-radius);
|
||||
|
||||
> hr {
|
||||
margin-right: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
> .list-group:first-child {
|
||||
.list-group-item:first-child {
|
||||
@include border-top-radius($card-border-radius);
|
||||
}
|
||||
}
|
||||
|
||||
> .list-group:last-child {
|
||||
.list-group-item:last-child {
|
||||
@include border-bottom-radius($card-border-radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card-block {
|
||||
@include clearfix;
|
||||
.card-body {
|
||||
// Enable `flex-grow: 1` for decks and groups so that card blocks take up
|
||||
// as much space as possible, ensuring footers are aligned to the bottom.
|
||||
flex: 1 1 auto;
|
||||
padding: $card-spacer-x;
|
||||
}
|
||||
|
||||
@ -30,14 +51,6 @@
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
// .card-actions {
|
||||
// padding: $card-spacer-y $card-spacer-x;
|
||||
|
||||
// .card-link + .card-link {
|
||||
// margin-left: $card-spacer-x;
|
||||
// }
|
||||
// }
|
||||
|
||||
.card-link {
|
||||
@include hover {
|
||||
text-decoration: none;
|
||||
@ -48,44 +61,34 @@
|
||||
}
|
||||
}
|
||||
|
||||
.card {
|
||||
> .list-group:first-child {
|
||||
.list-group-item:first-child {
|
||||
@include border-top-radius($card-border-radius);
|
||||
}
|
||||
}
|
||||
|
||||
> .list-group:last-child {
|
||||
.list-group-item:last-child {
|
||||
@include border-bottom-radius($card-border-radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Optional textual caps
|
||||
//
|
||||
|
||||
.card-header {
|
||||
@include clearfix;
|
||||
padding: $card-spacer-y $card-spacer-x;
|
||||
margin-bottom: 0; // Removes the default margin-bottom of <hN>
|
||||
background-color: $card-cap-bg;
|
||||
border-bottom: $card-border-width solid $card-border-color;
|
||||
|
||||
&:first-child {
|
||||
@include border-radius($card-border-radius-inner $card-border-radius-inner 0 0);
|
||||
@include border-radius($card-inner-border-radius $card-inner-border-radius 0 0);
|
||||
}
|
||||
|
||||
+ .list-group {
|
||||
.list-group-item:first-child {
|
||||
border-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card-footer {
|
||||
@include clearfix;
|
||||
padding: $card-spacer-y $card-spacer-x;
|
||||
background-color: $card-cap-bg;
|
||||
border-top: $card-border-width solid $card-border-color;
|
||||
|
||||
&:last-child {
|
||||
@include border-radius(0 0 $card-border-radius-inner $card-border-radius-inner);
|
||||
@include border-radius(0 0 $card-inner-border-radius $card-inner-border-radius);
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,70 +109,7 @@
|
||||
margin-left: -($card-spacer-x / 2);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Background variations
|
||||
//
|
||||
|
||||
.card-primary {
|
||||
@include card-variant($brand-primary, $brand-primary);
|
||||
}
|
||||
.card-success {
|
||||
@include card-variant($brand-success, $brand-success);
|
||||
}
|
||||
.card-info {
|
||||
@include card-variant($brand-info, $brand-info);
|
||||
}
|
||||
.card-warning {
|
||||
@include card-variant($brand-warning, $brand-warning);
|
||||
}
|
||||
.card-danger {
|
||||
@include card-variant($brand-danger, $brand-danger);
|
||||
}
|
||||
|
||||
// Remove all backgrounds
|
||||
.card-outline-primary {
|
||||
@include card-outline-variant($btn-primary-bg);
|
||||
}
|
||||
.card-outline-secondary {
|
||||
@include card-outline-variant($btn-secondary-border);
|
||||
}
|
||||
.card-outline-info {
|
||||
@include card-outline-variant($btn-info-bg);
|
||||
}
|
||||
.card-outline-success {
|
||||
@include card-outline-variant($btn-success-bg);
|
||||
}
|
||||
.card-outline-warning {
|
||||
@include card-outline-variant($btn-warning-bg);
|
||||
}
|
||||
.card-outline-danger {
|
||||
@include card-outline-variant($btn-danger-bg);
|
||||
}
|
||||
|
||||
//
|
||||
// Inverse text within a card for use with dark backgrounds
|
||||
//
|
||||
|
||||
.card-inverse {
|
||||
@include card-inverse;
|
||||
}
|
||||
|
||||
//
|
||||
// Blockquote
|
||||
//
|
||||
|
||||
.card-blockquote {
|
||||
padding: 0;
|
||||
margin-bottom: 0;
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
// Card image
|
||||
.card-img {
|
||||
// margin: -1.325rem;
|
||||
@include border-radius(.25rem);
|
||||
}
|
||||
.card-img-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@ -179,88 +119,73 @@
|
||||
padding: $card-img-overlay-padding;
|
||||
}
|
||||
|
||||
|
||||
.card-img {
|
||||
width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
|
||||
@include border-radius($card-inner-border-radius);
|
||||
}
|
||||
|
||||
// Card image caps
|
||||
.card-img-top {
|
||||
@include border-top-radius($card-border-radius-inner);
|
||||
width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
|
||||
@include border-top-radius($card-inner-border-radius);
|
||||
}
|
||||
|
||||
.card-img-bottom {
|
||||
@include border-bottom-radius($card-border-radius-inner);
|
||||
width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
|
||||
@include border-bottom-radius($card-inner-border-radius);
|
||||
}
|
||||
|
||||
|
||||
// Card set
|
||||
//
|
||||
// Heads up! We do some funky style resetting here for margins across our two
|
||||
// variations (one flex, one table). Individual cards have margin-bottom by
|
||||
// default, but they're ignored due to table styles. For a consistent design,
|
||||
// we've done the same to the flex variation.
|
||||
//
|
||||
// Those changes are noted by `// Margin balancing`.
|
||||
// Card deck
|
||||
|
||||
.card-deck {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.card {
|
||||
margin-bottom: $card-deck-margin;
|
||||
}
|
||||
|
||||
@if $enable-flex {
|
||||
@include media-breakpoint-up(sm) {
|
||||
.card-deck {
|
||||
flex-flow: row wrap;
|
||||
margin-right: -$card-deck-margin;
|
||||
margin-left: -$card-deck-margin;
|
||||
|
||||
.card {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
margin-right: -$card-deck-margin;
|
||||
margin-bottom: $card-spacer-y; // Margin balancing
|
||||
margin-left: -$card-deck-margin;
|
||||
|
||||
.card {
|
||||
flex: 1 0 0;
|
||||
margin-right: $card-deck-margin;
|
||||
margin-bottom: 0; // Margin balancing
|
||||
margin-left: $card-deck-margin;
|
||||
}
|
||||
}
|
||||
}
|
||||
} @else {
|
||||
@include media-breakpoint-up(sm) {
|
||||
$space-between-cards: (2 * $card-deck-margin);
|
||||
.card-deck {
|
||||
display: table;
|
||||
width: 100%;
|
||||
margin-bottom: $card-spacer-y; // Margin balancing
|
||||
table-layout: fixed;
|
||||
border-spacing: $space-between-cards 0;
|
||||
|
||||
.card {
|
||||
display: table-cell;
|
||||
margin-bottom: 0; // Margin balancing
|
||||
vertical-align: top;
|
||||
}
|
||||
}
|
||||
.card-deck-wrapper {
|
||||
margin-right: (-$space-between-cards);
|
||||
margin-left: (-$space-between-cards);
|
||||
// Flexbugs #4: https://github.com/philipwalton/flexbugs#4-flex-shorthand-declarations-with-unitless-flex-basis-values-are-ignored
|
||||
flex: 1 0 0%;
|
||||
flex-direction: column;
|
||||
margin-right: $card-deck-margin;
|
||||
margin-bottom: 0; // Override the default
|
||||
margin-left: $card-deck-margin;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Card groups
|
||||
//
|
||||
|
||||
@include media-breakpoint-up(sm) {
|
||||
.card-group {
|
||||
@if $enable-flex {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
} @else {
|
||||
display: table;
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
}
|
||||
.card-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.card {
|
||||
@if $enable-flex {
|
||||
flex: 1 0 0;
|
||||
} @else {
|
||||
display: table-cell;
|
||||
vertical-align: top;
|
||||
}
|
||||
// The child selector allows nested `.card` within `.card-group`
|
||||
// to display properly.
|
||||
> .card {
|
||||
margin-bottom: $card-group-margin;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(sm) {
|
||||
flex-flow: row wrap;
|
||||
// The child selector allows nested `.card` within `.card-group`
|
||||
// to display properly.
|
||||
> .card {
|
||||
// Flexbugs #4: https://github.com/philipwalton/flexbugs#4-flex-shorthand-declarations-with-unitless-flex-basis-values-are-ignored
|
||||
flex: 1 0 0%;
|
||||
margin-bottom: 0;
|
||||
|
||||
+ .card {
|
||||
margin-left: 0;
|
||||
@ -272,30 +197,50 @@
|
||||
&:first-child {
|
||||
@include border-right-radius(0);
|
||||
|
||||
.card-img-top {
|
||||
.card-img-top,
|
||||
.card-header {
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
.card-img-bottom {
|
||||
.card-img-bottom,
|
||||
.card-footer {
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
@include border-left-radius(0);
|
||||
|
||||
.card-img-top {
|
||||
.card-img-top,
|
||||
.card-header {
|
||||
border-top-left-radius: 0;
|
||||
}
|
||||
.card-img-bottom {
|
||||
.card-img-bottom,
|
||||
.card-footer {
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(:first-child):not(:last-child) {
|
||||
border-radius: 0;
|
||||
&:only-child {
|
||||
@include border-radius($card-border-radius);
|
||||
|
||||
.card-img-top,
|
||||
.card-img-bottom {
|
||||
border-radius: 0;
|
||||
.card-header {
|
||||
@include border-top-radius($card-border-radius);
|
||||
}
|
||||
.card-img-bottom,
|
||||
.card-footer {
|
||||
@include border-bottom-radius($card-border-radius);
|
||||
}
|
||||
}
|
||||
|
||||
&:not(:first-child):not(:last-child):not(:only-child) {
|
||||
@include border-radius(0);
|
||||
|
||||
.card-img-top,
|
||||
.card-img-bottom,
|
||||
.card-header,
|
||||
.card-footer {
|
||||
@include border-radius(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -305,16 +250,21 @@
|
||||
|
||||
|
||||
//
|
||||
// Card
|
||||
// Columns
|
||||
//
|
||||
|
||||
@include media-breakpoint-up(sm) {
|
||||
.card-columns {
|
||||
column-count: 3;
|
||||
column-gap: $card-columns-sm-up-column-gap;
|
||||
.card-columns {
|
||||
.card {
|
||||
margin-bottom: $card-columns-margin;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(sm) {
|
||||
column-count: $card-columns-count;
|
||||
column-gap: $card-columns-gap;
|
||||
|
||||
.card {
|
||||
width: 100%; // Don't let them exceed the column width
|
||||
display: inline-block; // Don't let them vertically span multiple columns
|
||||
width: 100%; // Don't let their width change
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,109 +7,79 @@
|
||||
position: relative;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
|
||||
> .carousel-item {
|
||||
position: relative;
|
||||
display: none;
|
||||
transition: .6s ease-in-out left;
|
||||
|
||||
// Account for jankitude on images
|
||||
> img,
|
||||
> a > img {
|
||||
@extend .img-fluid;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
// WebKit CSS3 transforms for supported devices
|
||||
@media all and (transform-3d), (-webkit-transform-3d) {
|
||||
transition: transform .6s ease-in-out;
|
||||
backface-visibility: hidden;
|
||||
perspective: 1000px;
|
||||
|
||||
&.next,
|
||||
&.active.right {
|
||||
left: 0;
|
||||
transform: translate3d(100%, 0, 0);
|
||||
}
|
||||
&.prev,
|
||||
&.active.left {
|
||||
left: 0;
|
||||
transform: translate3d(-100%, 0, 0);
|
||||
}
|
||||
&.next.left,
|
||||
&.prev.right,
|
||||
&.active {
|
||||
left: 0;
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> .active,
|
||||
> .next,
|
||||
> .prev {
|
||||
display: block;
|
||||
}
|
||||
|
||||
> .active {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
> .next,
|
||||
> .prev {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
> .next {
|
||||
left: 100%;
|
||||
}
|
||||
> .prev {
|
||||
left: -100%;
|
||||
}
|
||||
> .next.left,
|
||||
> .prev.right {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
> .active.left {
|
||||
left: -100%;
|
||||
}
|
||||
> .active.right {
|
||||
left: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.carousel-item {
|
||||
position: relative;
|
||||
display: none;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
@include transition($carousel-transition);
|
||||
backface-visibility: hidden;
|
||||
perspective: 1000px;
|
||||
}
|
||||
|
||||
.carousel-item.active,
|
||||
.carousel-item-next,
|
||||
.carousel-item-prev {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.carousel-item-next,
|
||||
.carousel-item-prev {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
// CSS3 transforms when supported by the browser
|
||||
// .carousel-item-next.carousel-item-left,
|
||||
// .carousel-item-prev.carousel-item-right {
|
||||
// transform: translateX(0);
|
||||
|
||||
// @supports (transform-style: preserve-3d) {
|
||||
// transform: translate3d(0, 0, 0);
|
||||
// }
|
||||
// }
|
||||
|
||||
// .carousel-item-next,
|
||||
// .active.carousel-item-right {
|
||||
// transform: translateX(100%);
|
||||
|
||||
// @supports (transform-style: preserve-3d) {
|
||||
// transform: translate3d(100%, 0, 0);
|
||||
// }
|
||||
// }
|
||||
|
||||
// .carousel-item-prev,
|
||||
// .active.carousel-item-left {
|
||||
// transform: translateX(-100%);
|
||||
|
||||
// @supports (transform-style: preserve-3d) {
|
||||
// transform: translate3d(-100%, 0, 0);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
//
|
||||
// Left/right controls for nav
|
||||
//
|
||||
|
||||
.carousel-control {
|
||||
.carousel-control-prev,
|
||||
.carousel-control-next {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
// Use flex for alignment (1-3)
|
||||
display: flex; // 1. allow flex styles
|
||||
align-items: center; // 2. vertically center contents
|
||||
justify-content: center; // 3. horizontally center contents
|
||||
width: $carousel-control-width;
|
||||
font-size: $carousel-control-font-size;
|
||||
color: $carousel-control-color;
|
||||
text-align: center;
|
||||
text-shadow: $carousel-text-shadow;
|
||||
opacity: $carousel-control-opacity;
|
||||
// We can't have this transition here because WebKit cancels the carousel
|
||||
// We can't have a transition here because WebKit cancels the carousel
|
||||
// animation if you trip this while in the middle of another animation.
|
||||
|
||||
// Set gradients for backgrounds
|
||||
&.left {
|
||||
@include gradient-x($start-color: rgba(0,0,0,.5), $end-color: rgba(0,0,0,.0001));
|
||||
}
|
||||
&.right {
|
||||
right: 0;
|
||||
left: auto;
|
||||
@include gradient-x($start-color: rgba(0,0,0,.0001), $end-color: rgba(0,0,0,.5));
|
||||
}
|
||||
|
||||
// Hover/focus state
|
||||
@include hover-focus {
|
||||
color: $carousel-control-color;
|
||||
@ -117,79 +87,88 @@
|
||||
outline: 0;
|
||||
opacity: .9;
|
||||
}
|
||||
}
|
||||
.carousel-control-prev {
|
||||
left: 0;
|
||||
@if $enable-gradients {
|
||||
background: linear-gradient(90deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .001));
|
||||
}
|
||||
}
|
||||
.carousel-control-next {
|
||||
right: 0;
|
||||
@if $enable-gradients {
|
||||
background: linear-gradient(270deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .001));
|
||||
}
|
||||
}
|
||||
|
||||
// Toggles
|
||||
.icon-prev,
|
||||
.icon-next {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
z-index: 5;
|
||||
display: inline-block;
|
||||
width: $carousel-icon-width;
|
||||
height: $carousel-icon-width;
|
||||
margin-top: -($carousel-icon-width / 2);
|
||||
font-family: serif;
|
||||
line-height: 1;
|
||||
}
|
||||
.icon-prev {
|
||||
left: 50%;
|
||||
margin-left: -($carousel-icon-width / 2);
|
||||
}
|
||||
.icon-next {
|
||||
right: 50%;
|
||||
margin-right: -($carousel-icon-width / 2);
|
||||
}
|
||||
|
||||
.icon-prev {
|
||||
&::before {
|
||||
content: "\2039";// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)
|
||||
}
|
||||
}
|
||||
.icon-next {
|
||||
&::before {
|
||||
content: "\203a";// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)
|
||||
}
|
||||
}
|
||||
// Icons for within
|
||||
.carousel-control-prev-icon,
|
||||
.carousel-control-next-icon {
|
||||
display: inline-block;
|
||||
width: $carousel-control-icon-width;
|
||||
height: $carousel-control-icon-width;
|
||||
background: transparent no-repeat center center;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.carousel-control-prev-icon {
|
||||
background-image: $carousel-control-prev-icon-bg;
|
||||
}
|
||||
.carousel-control-next-icon {
|
||||
background-image: $carousel-control-next-icon-bg;
|
||||
}
|
||||
|
||||
|
||||
// Optional indicator pips
|
||||
//
|
||||
// Add an unordered list with the following class and add a list item for each
|
||||
// Add an ordered list with the following class and add a list item for each
|
||||
// slide your carousel holds.
|
||||
|
||||
.carousel-indicators {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 10px;
|
||||
left: 50%;
|
||||
left: 0;
|
||||
z-index: 15;
|
||||
width: $carousel-indicators-width;
|
||||
padding-left: 0;
|
||||
margin-left: -($carousel-indicators-width / 2);
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding-left: 0; // override <ol> default
|
||||
// Use the .carousel-control's width as margin so we don't overlay those
|
||||
margin-right: $carousel-control-width;
|
||||
margin-left: $carousel-control-width;
|
||||
list-style: none;
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
width: $carousel-indicator-size;
|
||||
height: $carousel-indicator-size;
|
||||
margin: 1px;
|
||||
position: relative;
|
||||
flex: 0 1 auto;
|
||||
width: $carousel-indicator-width;
|
||||
height: $carousel-indicator-height;
|
||||
margin-right: $carousel-indicator-spacer;
|
||||
margin-left: $carousel-indicator-spacer;
|
||||
text-indent: -999px;
|
||||
cursor: pointer;
|
||||
// IE9 hack for event handling
|
||||
//
|
||||
// Internet Explorer 9 does not properly handle clicks on elements with a `background-color` of `transparent`,
|
||||
// so we use `rgba(0,0,0,0)` instead since it's a non-buggy equivalent.
|
||||
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Internet_Explorer
|
||||
background-color: rgba(0,0,0,0); // IE9
|
||||
border: 1px solid $carousel-indicator-border-color;
|
||||
border-radius: $carousel-indicator-size;
|
||||
background-color: rgba($carousel-indicator-active-bg, .5);
|
||||
|
||||
// Use pseudo classes to increase the hit area by 10px on top and bottom.
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
left: 0;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 10px;
|
||||
content: "";
|
||||
}
|
||||
&::after {
|
||||
position: absolute;
|
||||
bottom: -10px;
|
||||
left: 0;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 10px;
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
width: $carousel-indicator-active-size;
|
||||
height: $carousel-indicator-active-size;
|
||||
margin: 0;
|
||||
background-color: $carousel-indicator-active-bg;
|
||||
}
|
||||
}
|
||||
@ -197,7 +176,7 @@
|
||||
|
||||
// Optional captions
|
||||
//
|
||||
// Hidden by default for smaller viewports.
|
||||
//
|
||||
|
||||
.carousel-caption {
|
||||
position: absolute;
|
||||
@ -209,45 +188,4 @@
|
||||
padding-bottom: 20px;
|
||||
color: $carousel-caption-color;
|
||||
text-align: center;
|
||||
text-shadow: $carousel-text-shadow;
|
||||
|
||||
.btn {
|
||||
text-shadow: none; // No shadow for button elements in carousel-caption
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Responsive variations
|
||||
//
|
||||
|
||||
@include media-breakpoint-up(sm) {
|
||||
// Scale up the controls a smidge
|
||||
.carousel-control {
|
||||
.icon-prev,
|
||||
.icon-next {
|
||||
width: $carousel-control-sm-up-size;
|
||||
height: $carousel-control-sm-up-size;
|
||||
margin-top: -($carousel-control-sm-up-size / 2);
|
||||
font-size: $carousel-control-sm-up-size;
|
||||
}
|
||||
.icon-prev {
|
||||
margin-left: -($carousel-control-sm-up-size / 2);
|
||||
}
|
||||
.icon-next {
|
||||
margin-right: -($carousel-control-sm-up-size / 2);
|
||||
}
|
||||
}
|
||||
|
||||
// Show and left align the captions
|
||||
.carousel-caption {
|
||||
right: ((100% - $carousel-caption-sm-up-width) / 2);
|
||||
left: ((100% - $carousel-caption-sm-up-width) / 2);
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
|
||||
// Move up the indicators
|
||||
.carousel-indicators {
|
||||
bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
@ -1,17 +1,21 @@
|
||||
.close {
|
||||
float: right;
|
||||
font-size: ($font-size-base * 1.5);
|
||||
font-size: $close-font-size;
|
||||
font-weight: $close-font-weight;
|
||||
line-height: 1;
|
||||
color: $close-color;
|
||||
text-shadow: $close-text-shadow;
|
||||
opacity: .2;
|
||||
opacity: .5;
|
||||
|
||||
@include hover-focus {
|
||||
color: $close-color;
|
||||
text-decoration: none;
|
||||
opacity: .75;
|
||||
}
|
||||
|
||||
// Opinionated: add "hand" cursor to non-disabled .close elements
|
||||
&:not(:disabled):not(.disabled) {
|
||||
cursor: pointer;
|
||||
opacity: .5;
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,12 +24,11 @@
|
||||
// If you want the anchor version, it requires `href="#"`.
|
||||
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
|
||||
|
||||
// scss-lint:disable QualifyingElement
|
||||
// stylelint-disable property-no-vendor-prefix, selector-no-qualifying-type
|
||||
button.close {
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
// scss-lint:enable QualifyingElement
|
||||
// stylelint-enable
|
||||
|
@ -8,17 +8,20 @@ samp {
|
||||
|
||||
// Inline code
|
||||
code {
|
||||
padding: $code-padding-y $code-padding-x;
|
||||
font-size: $code-font-size;
|
||||
color: $code-color;
|
||||
background-color: $code-bg;
|
||||
@include border-radius($border-radius);
|
||||
word-break: break-word;
|
||||
|
||||
// Streamline the style when inside anchors to avoid broken underline and more
|
||||
a > & {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
// User input typically entered via keyboard
|
||||
kbd {
|
||||
padding: $code-padding-y $code-padding-x;
|
||||
font-size: $code-font-size;
|
||||
padding: $kbd-padding-y $kbd-padding-x;
|
||||
font-size: $kbd-font-size;
|
||||
color: $kbd-color;
|
||||
background-color: $kbd-bg;
|
||||
@include border-radius($border-radius-sm);
|
||||
@ -35,18 +38,14 @@ kbd {
|
||||
// Blocks of code
|
||||
pre {
|
||||
display: block;
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
font-size: $code-font-size;
|
||||
color: $pre-color;
|
||||
|
||||
// Account for some code outputs that place code tags in pre tags
|
||||
code {
|
||||
padding: 0;
|
||||
font-size: inherit;
|
||||
color: inherit;
|
||||
background-color: transparent;
|
||||
border-radius: 0;
|
||||
word-break: normal;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
// scss-lint:disable PropertyCount
|
||||
|
||||
// Embedded icons from Open Iconic.
|
||||
// Released under MIT and copyright 2014 Waybury.
|
||||
// http://useiconic.com/open
|
||||
// https://useiconic.com/open
|
||||
|
||||
|
||||
// Checkboxes and radios
|
||||
@ -11,13 +9,14 @@
|
||||
|
||||
.custom-control {
|
||||
position: relative;
|
||||
display: inline;
|
||||
display: block;
|
||||
min-height: (1rem * $line-height-base);
|
||||
padding-left: $custom-control-gutter;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
+ .custom-control {
|
||||
margin-left: $custom-control-spacer-x;
|
||||
}
|
||||
.custom-control-inline {
|
||||
display: inline-flex;
|
||||
margin-right: $custom-control-spacer-x;
|
||||
}
|
||||
|
||||
.custom-control-input {
|
||||
@ -25,73 +24,107 @@
|
||||
z-index: -1; // Put the input behind the label so it doesn't overlay text
|
||||
opacity: 0;
|
||||
|
||||
&:checked ~ .custom-control-indicator {
|
||||
color: $custom-control-checked-indicator-color;
|
||||
background-color: $custom-control-checked-indicator-bg;
|
||||
@include box-shadow($custom-control-checked-indicator-box-shadow);
|
||||
&:checked ~ .custom-control-label::before {
|
||||
color: $custom-control-indicator-checked-color;
|
||||
@include gradient-bg($custom-control-indicator-checked-bg);
|
||||
@include box-shadow($custom-control-indicator-checked-box-shadow);
|
||||
}
|
||||
|
||||
&:focus ~ .custom-control-indicator {
|
||||
&:focus ~ .custom-control-label::before {
|
||||
// the mixin is not used here to make sure there is feedback
|
||||
box-shadow: $custom-control-focus-indicator-box-shadow;
|
||||
box-shadow: $custom-control-indicator-focus-box-shadow;
|
||||
}
|
||||
|
||||
&:active ~ .custom-control-indicator {
|
||||
color: $custom-control-active-indicator-color;
|
||||
background-color: $custom-control-active-indicator-bg;
|
||||
@include box-shadow($custom-control-active-indicator-box-shadow);
|
||||
&:active ~ .custom-control-label::before {
|
||||
color: $custom-control-indicator-active-color;
|
||||
background-color: $custom-control-indicator-active-bg;
|
||||
@include box-shadow($custom-control-indicator-active-box-shadow);
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
~ .custom-control-indicator {
|
||||
cursor: $custom-control-disabled-cursor;
|
||||
background-color: $custom-control-disabled-indicator-bg;
|
||||
}
|
||||
~ .custom-control-label {
|
||||
color: $custom-control-label-disabled-color;
|
||||
|
||||
~ .custom-control-description {
|
||||
color: $custom-control-disabled-description-color;
|
||||
cursor: $custom-control-disabled-cursor;
|
||||
&::before {
|
||||
background-color: $custom-control-indicator-disabled-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Custom indicator
|
||||
// Custom control indicators
|
||||
//
|
||||
// Generates a shadow element to create our makeshift checkbox/radio background.
|
||||
// Build the custom controls out of psuedo-elements.
|
||||
|
||||
.custom-control-indicator {
|
||||
position: absolute;
|
||||
top: .0625rem;
|
||||
left: 0;
|
||||
display: block;
|
||||
width: $custom-control-indicator-size;
|
||||
height: $custom-control-indicator-size;
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
background-color: $custom-control-indicator-bg;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
background-size: $custom-control-indicator-bg-size;
|
||||
@include box-shadow($custom-control-indicator-box-shadow);
|
||||
.custom-control-label {
|
||||
margin-bottom: 0;
|
||||
|
||||
// Background-color and (when enabled) gradient
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: (($line-height-base - $custom-control-indicator-size) / 2);
|
||||
left: 0;
|
||||
display: block;
|
||||
width: $custom-control-indicator-size;
|
||||
height: $custom-control-indicator-size;
|
||||
pointer-events: none;
|
||||
content: "";
|
||||
user-select: none;
|
||||
background-color: $custom-control-indicator-bg;
|
||||
@include box-shadow($custom-control-indicator-box-shadow);
|
||||
}
|
||||
|
||||
// Foreground (icon)
|
||||
&::after {
|
||||
position: absolute;
|
||||
top: (($line-height-base - $custom-control-indicator-size) / 2);
|
||||
left: 0;
|
||||
display: block;
|
||||
width: $custom-control-indicator-size;
|
||||
height: $custom-control-indicator-size;
|
||||
content: "";
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
background-size: $custom-control-indicator-bg-size;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Checkboxes
|
||||
//
|
||||
// Tweak just a few things for checkboxes.
|
||||
|
||||
.custom-checkbox {
|
||||
.custom-control-indicator {
|
||||
@include border-radius($custom-checkbox-radius);
|
||||
.custom-control-label::before {
|
||||
@include border-radius($custom-checkbox-indicator-border-radius);
|
||||
}
|
||||
|
||||
.custom-control-input:checked ~ .custom-control-indicator {
|
||||
background-image: $custom-checkbox-checked-icon;
|
||||
.custom-control-input:checked ~ .custom-control-label {
|
||||
&::before {
|
||||
@include gradient-bg($custom-control-indicator-checked-bg);
|
||||
}
|
||||
&::after {
|
||||
background-image: $custom-checkbox-indicator-icon-checked;
|
||||
}
|
||||
}
|
||||
|
||||
.custom-control-input:indeterminate ~ .custom-control-indicator {
|
||||
background-color: $custom-checkbox-indeterminate-bg;
|
||||
background-image: $custom-checkbox-indeterminate-icon;
|
||||
@include box-shadow($custom-checkbox-indeterminate-box-shadow);
|
||||
.custom-control-input:indeterminate ~ .custom-control-label {
|
||||
&::before {
|
||||
@include gradient-bg($custom-checkbox-indicator-indeterminate-bg);
|
||||
@include box-shadow($custom-checkbox-indicator-indeterminate-box-shadow);
|
||||
}
|
||||
&::after {
|
||||
background-image: $custom-checkbox-indicator-icon-indeterminate;
|
||||
}
|
||||
}
|
||||
|
||||
.custom-control-input:disabled {
|
||||
&:checked ~ .custom-control-label::before {
|
||||
background-color: $custom-control-indicator-checked-disabled-bg;
|
||||
}
|
||||
&:indeterminate ~ .custom-control-label::before {
|
||||
background-color: $custom-control-indicator-checked-disabled-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -100,33 +133,22 @@
|
||||
// Tweak just a few things for radios.
|
||||
|
||||
.custom-radio {
|
||||
.custom-control-indicator {
|
||||
border-radius: $custom-radio-radius;
|
||||
.custom-control-label::before {
|
||||
border-radius: $custom-radio-indicator-border-radius;
|
||||
}
|
||||
|
||||
.custom-control-input:checked ~ .custom-control-indicator {
|
||||
background-image: $custom-radio-checked-icon;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Layout options
|
||||
//
|
||||
// By default radios and checkboxes are `inline-block` with no additional spacing
|
||||
// set. Use these optional classes to tweak the layout.
|
||||
|
||||
.custom-controls-stacked {
|
||||
.custom-control {
|
||||
display: inline;
|
||||
|
||||
&::after {
|
||||
display: block;
|
||||
margin-bottom: $custom-control-spacer-y;
|
||||
content: "";
|
||||
.custom-control-input:checked ~ .custom-control-label {
|
||||
&::before {
|
||||
@include gradient-bg($custom-control-indicator-checked-bg);
|
||||
}
|
||||
&::after {
|
||||
background-image: $custom-radio-indicator-icon-checked;
|
||||
}
|
||||
}
|
||||
|
||||
+ .custom-control {
|
||||
margin-left: 0;
|
||||
.custom-control-input:disabled {
|
||||
&:checked ~ .custom-control-label::before {
|
||||
background-color: $custom-control-indicator-checked-disabled-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -137,32 +159,33 @@
|
||||
// Replaces the browser default select with a custom one, mostly pulled from
|
||||
// http://primercss.io.
|
||||
//
|
||||
// Includes IE9-specific hacks (noted by ` \9`).
|
||||
|
||||
.custom-select {
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
height: $custom-select-height;
|
||||
padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x;
|
||||
padding-right: $custom-select-padding-x \9;
|
||||
line-height: $custom-select-line-height;
|
||||
color: $custom-select-color;
|
||||
vertical-align: middle;
|
||||
background: $custom-select-bg $custom-select-indicator no-repeat right $custom-select-padding-x center;
|
||||
background-image: none \9;
|
||||
background-size: $custom-select-bg-size;
|
||||
border: $custom-select-border-width solid $custom-select-border-color;
|
||||
@include border-radius($custom-select-border-radius);
|
||||
// Use vendor prefixes as `appearance` isn't part of the CSS spec.
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
@if $enable-rounded {
|
||||
border-radius: $custom-select-border-radius;
|
||||
} @else {
|
||||
border-radius: 0;
|
||||
}
|
||||
appearance: none;
|
||||
|
||||
&:focus {
|
||||
border-color: $custom-select-focus-border-color;
|
||||
outline: none;
|
||||
@include box-shadow($custom-select-focus-box-shadow);
|
||||
outline: 0;
|
||||
box-shadow: $custom-select-focus-box-shadow;
|
||||
|
||||
&::-ms-value {
|
||||
// For visual consistency with other platforms/browsers,
|
||||
// supress the default white text on blue background highlight given to
|
||||
// suppress the default white text on blue background highlight given to
|
||||
// the selected option text when the (still closed) <select> receives focus
|
||||
// in IE and (under certain conditions) Edge.
|
||||
// See https://github.com/twbs/bootstrap/issues/19398.
|
||||
@ -171,9 +194,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
&[multiple],
|
||||
&[size]:not([size="1"]) {
|
||||
height: auto;
|
||||
padding-right: $custom-select-padding-x;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
color: $custom-select-disabled-color;
|
||||
cursor: $cursor-disabled;
|
||||
background-color: $custom-select-disabled-bg;
|
||||
}
|
||||
|
||||
@ -184,14 +213,17 @@
|
||||
}
|
||||
|
||||
.custom-select-sm {
|
||||
height: $custom-select-height-sm;
|
||||
padding-top: $custom-select-padding-y;
|
||||
padding-bottom: $custom-select-padding-y;
|
||||
font-size: $custom-select-sm-font-size;
|
||||
font-size: $custom-select-font-size-sm;
|
||||
}
|
||||
|
||||
// &:not([multiple]) {
|
||||
// height: 26px;
|
||||
// min-height: 26px;
|
||||
// }
|
||||
.custom-select-lg {
|
||||
height: $custom-select-height-lg;
|
||||
padding-top: $custom-select-padding-y;
|
||||
padding-bottom: $custom-select-padding-y;
|
||||
font-size: $custom-select-font-size-lg;
|
||||
}
|
||||
|
||||
|
||||
@ -202,64 +234,64 @@
|
||||
.custom-file {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
height: $custom-file-height;
|
||||
cursor: pointer;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.custom-file-input {
|
||||
min-width: $custom-file-width;
|
||||
max-width: 100%;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
width: 100%;
|
||||
height: $custom-file-height;
|
||||
margin: 0;
|
||||
filter: alpha(opacity = 0);
|
||||
opacity: 0;
|
||||
|
||||
&:focus ~ .custom-file-control {
|
||||
@include box-shadow($custom-file-focus-box-shadow);
|
||||
border-color: $custom-file-focus-border-color;
|
||||
box-shadow: $custom-file-focus-box-shadow;
|
||||
|
||||
&::before {
|
||||
border-color: $custom-file-focus-border-color;
|
||||
}
|
||||
}
|
||||
|
||||
@each $lang, $value in $custom-file-text {
|
||||
&:lang(#{$lang}) ~ .custom-file-label::after {
|
||||
content: $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.custom-file-control {
|
||||
.custom-file-label {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
z-index: 5;
|
||||
z-index: 1;
|
||||
height: $custom-file-height;
|
||||
padding: $custom-file-padding-x $custom-file-padding-y;
|
||||
padding: $custom-file-padding-y $custom-file-padding-x;
|
||||
line-height: $custom-file-line-height;
|
||||
color: $custom-file-color;
|
||||
user-select: none;
|
||||
background-color: $custom-file-bg;
|
||||
border: $custom-file-border-width solid $custom-file-border-color;
|
||||
@include border-radius($custom-file-border-radius);
|
||||
@include box-shadow($custom-file-box-shadow);
|
||||
|
||||
@each $lang, $text in map-get($custom-file-text, placeholder) {
|
||||
&:lang(#{$lang})::after {
|
||||
content: $text;
|
||||
}
|
||||
}
|
||||
|
||||
&::before {
|
||||
&::after {
|
||||
position: absolute;
|
||||
top: -$custom-file-border-width;
|
||||
right: -$custom-file-border-width;
|
||||
bottom: -$custom-file-border-width;
|
||||
z-index: 6;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 3;
|
||||
display: block;
|
||||
height: $custom-file-height;
|
||||
padding: $custom-file-padding-x $custom-file-padding-y;
|
||||
height: calc(#{$custom-file-height} - #{$custom-file-border-width} * 2);
|
||||
padding: $custom-file-padding-y $custom-file-padding-x;
|
||||
line-height: $custom-file-line-height;
|
||||
color: $custom-file-button-color;
|
||||
background-color: $custom-file-button-bg;
|
||||
border: $custom-file-border-width solid $custom-file-border-color;
|
||||
content: "Browse";
|
||||
@include gradient-bg($custom-file-button-bg);
|
||||
border-left: $custom-file-border-width solid $custom-file-border-color;
|
||||
@include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0);
|
||||
}
|
||||
|
||||
@each $lang, $text in map-get($custom-file-text, button-label) {
|
||||
&:lang(#{$lang})::before {
|
||||
content: $text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +0,0 @@
|
||||
// Bootstrap overrides
|
||||
//
|
||||
// Copy variables from `_variables.scss` to this file to override default values
|
||||
// without modifying source files.
|
@ -6,31 +6,7 @@
|
||||
|
||||
.dropdown-toggle {
|
||||
// Generate the caret automatically
|
||||
&::after {
|
||||
display: inline-block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
margin-left: $caret-width;
|
||||
vertical-align: middle;
|
||||
content: "";
|
||||
border-top: $caret-width solid;
|
||||
border-right: $caret-width solid transparent;
|
||||
border-left: $caret-width solid transparent;
|
||||
}
|
||||
|
||||
// Prevent the focus on the dropdown toggle when closing dropdowns
|
||||
&:focus {
|
||||
outline: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.dropup {
|
||||
.dropdown-toggle {
|
||||
&::after {
|
||||
border-top: 0;
|
||||
border-bottom: $caret-width solid;
|
||||
}
|
||||
}
|
||||
@include caret;
|
||||
}
|
||||
|
||||
// The dropdown menu
|
||||
@ -43,18 +19,59 @@
|
||||
float: left;
|
||||
min-width: $dropdown-min-width;
|
||||
padding: $dropdown-padding-y 0;
|
||||
margin: $dropdown-margin-top 0 0; // override default ul
|
||||
font-size: $font-size-base;
|
||||
margin: $dropdown-spacer 0 0; // override default ul
|
||||
font-size: $font-size-base; // Redeclare because nesting can cause inheritance issues
|
||||
color: $body-color;
|
||||
text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
|
||||
list-style: none;
|
||||
background-color: $dropdown-bg;
|
||||
background-clip: padding-box;
|
||||
border: $dropdown-border-width solid $dropdown-border-color;
|
||||
@include border-radius($border-radius);
|
||||
@include border-radius($dropdown-border-radius);
|
||||
@include box-shadow($dropdown-box-shadow);
|
||||
}
|
||||
|
||||
// Allow for dropdowns to go bottom up (aka, dropup-menu)
|
||||
// Just add .dropup after the standard .dropdown class and you're set.
|
||||
.dropup {
|
||||
.dropdown-menu {
|
||||
margin-top: 0;
|
||||
margin-bottom: $dropdown-spacer;
|
||||
}
|
||||
|
||||
.dropdown-toggle {
|
||||
@include caret(up);
|
||||
}
|
||||
}
|
||||
|
||||
.dropright {
|
||||
.dropdown-menu {
|
||||
margin-top: 0;
|
||||
margin-left: $dropdown-spacer;
|
||||
}
|
||||
|
||||
.dropdown-toggle {
|
||||
@include caret(right);
|
||||
&::after {
|
||||
vertical-align: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dropleft {
|
||||
.dropdown-menu {
|
||||
margin-top: 0;
|
||||
margin-right: $dropdown-spacer;
|
||||
}
|
||||
|
||||
.dropdown-toggle {
|
||||
@include caret(left);
|
||||
&::before {
|
||||
vertical-align: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Dividers (basically an `<hr>`) within the dropdown
|
||||
.dropdown-divider {
|
||||
@include nav-divider($dropdown-divider-bg);
|
||||
@ -66,114 +83,49 @@
|
||||
.dropdown-item {
|
||||
display: block;
|
||||
width: 100%; // For `<button>`s
|
||||
padding: 3px $dropdown-item-padding-x;
|
||||
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
|
||||
clear: both;
|
||||
font-weight: normal;
|
||||
font-weight: $font-weight-normal;
|
||||
color: $dropdown-link-color;
|
||||
text-align: inherit; // For `<button>`s
|
||||
white-space: nowrap; // prevent links from randomly breaking onto new lines
|
||||
background: none; // For `<button>`s
|
||||
background-color: transparent; // For `<button>`s
|
||||
border: 0; // For `<button>`s
|
||||
|
||||
@include hover-focus {
|
||||
color: $dropdown-link-hover-color;
|
||||
text-decoration: none;
|
||||
background-color: $dropdown-link-hover-bg;
|
||||
@include gradient-bg($dropdown-link-hover-bg);
|
||||
}
|
||||
|
||||
// Active state
|
||||
&.active {
|
||||
@include plain-hover-focus {
|
||||
color: $dropdown-link-active-color;
|
||||
text-decoration: none;
|
||||
background-color: $dropdown-link-active-bg;
|
||||
outline: 0;
|
||||
}
|
||||
&.active,
|
||||
&:active {
|
||||
color: $dropdown-link-active-color;
|
||||
text-decoration: none;
|
||||
@include gradient-bg($dropdown-link-active-bg);
|
||||
}
|
||||
|
||||
// Disabled state
|
||||
//
|
||||
// Gray out text and ensure the hover/focus state remains gray
|
||||
&.disabled {
|
||||
@include plain-hover-focus {
|
||||
color: $dropdown-link-disabled-color;
|
||||
}
|
||||
|
||||
// Nuke hover/focus effects
|
||||
@include hover-focus {
|
||||
text-decoration: none;
|
||||
cursor: $cursor-disabled;
|
||||
background-color: transparent;
|
||||
background-image: none; // Remove CSS gradient
|
||||
@include reset-filter();
|
||||
&.disabled,
|
||||
&:disabled {
|
||||
color: $dropdown-link-disabled-color;
|
||||
background-color: transparent;
|
||||
// Remove CSS gradients if they're enabled
|
||||
@if $enable-gradients {
|
||||
background-image: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Open state for the dropdown
|
||||
.open {
|
||||
// Show the menu
|
||||
> .dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
// Remove the outline when :focus is triggered
|
||||
> a {
|
||||
outline: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Menu positioning
|
||||
//
|
||||
// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
|
||||
// menu with the parent.
|
||||
.dropdown-menu-right {
|
||||
right: 0;
|
||||
left: auto; // Reset the default from `.dropdown-menu`
|
||||
}
|
||||
|
||||
.dropdown-menu-left {
|
||||
right: auto;
|
||||
left: 0;
|
||||
.dropdown-menu.show {
|
||||
display: block;
|
||||
}
|
||||
|
||||
// Dropdown section headers
|
||||
.dropdown-header {
|
||||
display: block;
|
||||
padding: $dropdown-padding-y $dropdown-item-padding-x;
|
||||
margin-bottom: 0; // for use with heading elements
|
||||
font-size: $font-size-sm;
|
||||
color: $dropdown-header-color;
|
||||
white-space: nowrap; // as with > li > a
|
||||
}
|
||||
|
||||
// Backdrop to catch body clicks on mobile, etc.
|
||||
.dropdown-backdrop {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: $zindex-dropdown-backdrop;
|
||||
}
|
||||
|
||||
// Allow for dropdowns to go bottom up (aka, dropup-menu)
|
||||
//
|
||||
// Just add .dropup after the standard .dropdown class and you're set.
|
||||
// TODO: abstract this so that the navbar fixed styles are not placed here?
|
||||
|
||||
.dropup,
|
||||
.navbar-fixed-bottom .dropdown {
|
||||
// Reverse the caret
|
||||
.caret {
|
||||
content: "";
|
||||
border-top: 0;
|
||||
border-bottom: $caret-width solid;
|
||||
}
|
||||
|
||||
// Different positioning for bottom up menu
|
||||
.dropdown-menu {
|
||||
top: auto;
|
||||
bottom: 100%;
|
||||
margin-bottom: $dropdown-margin-top;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// scss-lint:disable QualifyingElement
|
||||
// stylelint-disable selector-no-qualifying-type
|
||||
|
||||
//
|
||||
// Textual form controls
|
||||
@ -7,21 +7,25 @@
|
||||
.form-control {
|
||||
display: block;
|
||||
width: 100%;
|
||||
// // Make inputs at least the height of their button counterpart (base line-height + padding + border)
|
||||
// height: $input-height;
|
||||
padding: $input-padding-y $input-padding-x;
|
||||
font-size: $font-size-base;
|
||||
line-height: $input-line-height;
|
||||
color: $input-color;
|
||||
background-color: $input-bg;
|
||||
// Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214.
|
||||
background-image: none;
|
||||
background-clip: padding-box;
|
||||
border: $input-btn-border-width solid $input-border-color;
|
||||
border: $input-border-width solid $input-border-color;
|
||||
|
||||
// Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
|
||||
@include border-radius($input-border-radius);
|
||||
@if $enable-rounded {
|
||||
// Manually use the if/else instead of the mixin to account for iOS override
|
||||
border-radius: $input-border-radius;
|
||||
} @else {
|
||||
// Otherwise undo the iOS default
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
@include box-shadow($input-box-shadow);
|
||||
@include transition(border-color ease-in-out .15s, box-shadow ease-in-out .15s);
|
||||
@include transition($input-transition);
|
||||
|
||||
// Unstyle the caret on `<select>`s in IE10+.
|
||||
&::-ms-expand {
|
||||
@ -34,7 +38,7 @@
|
||||
|
||||
// Placeholder
|
||||
&::placeholder {
|
||||
color: $input-color-placeholder;
|
||||
color: $input-placeholder-color;
|
||||
// Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.
|
||||
opacity: 1;
|
||||
}
|
||||
@ -46,14 +50,10 @@
|
||||
// don't honor that edge case; we style them as disabled anyway.
|
||||
&:disabled,
|
||||
&[readonly] {
|
||||
background-color: $input-bg-disabled;
|
||||
background-color: $input-disabled-bg;
|
||||
// iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
cursor: $cursor-disabled;
|
||||
}
|
||||
}
|
||||
|
||||
select.form-control {
|
||||
@ -76,6 +76,7 @@ select.form-control {
|
||||
.form-control-file,
|
||||
.form-control-range {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
@ -83,53 +84,46 @@ select.form-control {
|
||||
// Labels
|
||||
//
|
||||
|
||||
// For use with horizontal and inline forms, when you need the label text to
|
||||
// align with the form controls.
|
||||
// For use with horizontal and inline forms, when you need the label (or legend)
|
||||
// text to align with the form controls.
|
||||
.col-form-label {
|
||||
padding-top: $input-padding-y;
|
||||
padding-bottom: $input-padding-y;
|
||||
margin-bottom: 0; // Override the `<label>` default
|
||||
padding-top: calc(#{$input-padding-y} + #{$input-border-width});
|
||||
padding-bottom: calc(#{$input-padding-y} + #{$input-border-width});
|
||||
margin-bottom: 0; // Override the `<label>/<legend>` default
|
||||
font-size: inherit; // Override the `<legend>` default
|
||||
line-height: $input-line-height;
|
||||
}
|
||||
|
||||
.col-form-label-lg {
|
||||
padding-top: $input-padding-y-lg;
|
||||
padding-bottom: $input-padding-y-lg;
|
||||
padding-top: calc(#{$input-padding-y-lg} + #{$input-border-width});
|
||||
padding-bottom: calc(#{$input-padding-y-lg} + #{$input-border-width});
|
||||
font-size: $font-size-lg;
|
||||
line-height: $input-line-height-lg;
|
||||
}
|
||||
|
||||
.col-form-label-sm {
|
||||
padding-top: $input-padding-y-sm;
|
||||
padding-bottom: $input-padding-y-sm;
|
||||
padding-top: calc(#{$input-padding-y-sm} + #{$input-border-width});
|
||||
padding-bottom: calc(#{$input-padding-y-sm} + #{$input-border-width});
|
||||
font-size: $font-size-sm;
|
||||
line-height: $input-line-height-sm;
|
||||
}
|
||||
|
||||
|
||||
// Readonly controls as plain text
|
||||
//
|
||||
// Legends
|
||||
//
|
||||
// Apply class to a readonly input to make it appear like regular plain
|
||||
// text (without any border, background color, focus indicator)
|
||||
|
||||
// For use with horizontal and inline forms, when you need the legend text to
|
||||
// be the same size as regular labels, and to align with the form controls.
|
||||
.col-form-legend {
|
||||
.form-control-plaintext {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding-top: $input-padding-y;
|
||||
padding-bottom: $input-padding-y;
|
||||
margin-bottom: 0;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
|
||||
|
||||
// Static form control text
|
||||
//
|
||||
// Apply class to an element to make any string of text align with labels in a
|
||||
// horizontal form layout.
|
||||
|
||||
.form-control-static {
|
||||
min-height: $input-height;
|
||||
// Size it appropriately next to real form controls
|
||||
padding-top: $input-padding-y;
|
||||
padding-bottom: $input-padding-y;
|
||||
// Remove default margin from `p`
|
||||
margin-bottom: 0;
|
||||
margin-bottom: 0; // match inputs if this class comes on inputs with default margins
|
||||
line-height: $input-line-height;
|
||||
background-color: transparent;
|
||||
border: solid transparent;
|
||||
border-width: $input-border-width 0;
|
||||
|
||||
&.form-control-sm,
|
||||
&.form-control-lg {
|
||||
@ -150,6 +144,7 @@ select.form-control {
|
||||
.form-control-sm {
|
||||
padding: $input-padding-y-sm $input-padding-x-sm;
|
||||
font-size: $font-size-sm;
|
||||
line-height: $input-line-height-sm;
|
||||
@include border-radius($input-border-radius-sm);
|
||||
}
|
||||
|
||||
@ -162,6 +157,7 @@ select.form-control-sm {
|
||||
.form-control-lg {
|
||||
padding: $input-padding-y-lg $input-padding-x-lg;
|
||||
font-size: $font-size-lg;
|
||||
line-height: $input-line-height-lg;
|
||||
@include border-radius($input-border-radius-lg);
|
||||
}
|
||||
|
||||
@ -183,7 +179,25 @@ select.form-control-lg {
|
||||
|
||||
.form-text {
|
||||
display: block;
|
||||
margin-top: ($spacer * .25);
|
||||
margin-top: $form-text-margin-top;
|
||||
}
|
||||
|
||||
|
||||
// Form grid
|
||||
//
|
||||
// Special replacement for our grid system's `.row` for tighter form layouts.
|
||||
|
||||
.form-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-right: -5px;
|
||||
margin-left: -5px;
|
||||
|
||||
> .col,
|
||||
> [class*="col-"] {
|
||||
padding-right: 5px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -194,98 +208,48 @@ select.form-control-lg {
|
||||
.form-check {
|
||||
position: relative;
|
||||
display: block;
|
||||
margin-bottom: ($spacer * .75);
|
||||
|
||||
// Move up sibling radios or checkboxes for tighter spacing
|
||||
+ .form-check {
|
||||
margin-top: -.25rem;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
.form-check-label {
|
||||
color: $text-muted;
|
||||
cursor: $cursor-disabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form-check-label {
|
||||
padding-left: 1.25rem;
|
||||
margin-bottom: 0; // Override default `<label>` bottom margin
|
||||
cursor: pointer;
|
||||
padding-left: $form-check-input-gutter;
|
||||
}
|
||||
|
||||
.form-check-input {
|
||||
position: absolute;
|
||||
margin-top: .25rem;
|
||||
margin-left: -1.25rem;
|
||||
margin-top: $form-check-input-margin-y;
|
||||
margin-left: -$form-check-input-gutter;
|
||||
|
||||
&:only-child {
|
||||
position: static;
|
||||
&:disabled ~ .form-check-label {
|
||||
color: $text-muted;
|
||||
}
|
||||
}
|
||||
|
||||
// Radios and checkboxes on same line
|
||||
.form-check-inline {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
padding-left: 1.25rem;
|
||||
.form-check-label {
|
||||
margin-bottom: 0; // Override default `<label>` bottom margin
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
+ .form-check-inline {
|
||||
margin-left: .75rem;
|
||||
}
|
||||
.form-check-inline {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding-left: 0; // Override base .form-check
|
||||
margin-right: $form-check-inline-margin-x;
|
||||
|
||||
&.disabled {
|
||||
cursor: $cursor-disabled;
|
||||
// Undo .form-check-input defaults and add some `margin-right`.
|
||||
.form-check-input {
|
||||
position: static;
|
||||
margin-top: 0;
|
||||
margin-right: $form-check-inline-input-margin-x;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Form control feedback states
|
||||
// Form validation
|
||||
//
|
||||
// Apply contextual and semantic states to individual form controls.
|
||||
|
||||
.form-control-feedback {
|
||||
margin-top: ($spacer * .25);
|
||||
}
|
||||
|
||||
.form-control-success,
|
||||
.form-control-warning,
|
||||
.form-control-danger {
|
||||
padding-right: ($input-padding-x * 3);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center right ($input-height / 4);
|
||||
background-size: ($input-height / 2) ($input-height / 2);
|
||||
}
|
||||
|
||||
// Form validation states
|
||||
.has-success {
|
||||
@include form-control-validation($brand-success);
|
||||
|
||||
.form-control-success {
|
||||
background-image: $form-icon-success;
|
||||
}
|
||||
}
|
||||
|
||||
.has-warning {
|
||||
@include form-control-validation($brand-warning);
|
||||
|
||||
.form-control-warning {
|
||||
background-image: $form-icon-warning;
|
||||
}
|
||||
}
|
||||
|
||||
.has-danger {
|
||||
@include form-control-validation($brand-danger);
|
||||
|
||||
.form-control-danger {
|
||||
background-image: $form-icon-danger;
|
||||
}
|
||||
}
|
||||
// Provide feedback to users when form field values are valid or invalid. Works
|
||||
// primarily for client-side validation via scoped `:invalid` and `:valid`
|
||||
// pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
|
||||
// server side validation.
|
||||
|
||||
@include form-validation-state("valid", $form-feedback-valid-color);
|
||||
@include form-validation-state("invalid", $form-feedback-invalid-color);
|
||||
|
||||
// Inline forms
|
||||
//
|
||||
@ -297,14 +261,33 @@ select.form-control-lg {
|
||||
// default HTML form controls and our custom form controls (e.g., input groups).
|
||||
|
||||
.form-inline {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
align-items: center; // Prevent shorter elements from growing to same height as others (e.g., small buttons growing to normal sized button height)
|
||||
|
||||
// Because we use flex, the initial sizing of checkboxes is collapsed and
|
||||
// doesn't occupy the full-width (which is what we want for xs grid tier),
|
||||
// so we force that here.
|
||||
.form-check {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
// Kick in the inline
|
||||
@include media-breakpoint-up(sm) {
|
||||
label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
// Inline-block all the things for "inline"
|
||||
.form-group {
|
||||
display: inline-block;
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
flex-flow: row wrap;
|
||||
align-items: center;
|
||||
margin-bottom: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
// Allow folks to *not* use `.form-group`
|
||||
@ -315,50 +298,36 @@ select.form-control-lg {
|
||||
}
|
||||
|
||||
// Make static controls behave like regular ones
|
||||
.form-control-static {
|
||||
.form-control-plaintext {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.input-group {
|
||||
display: inline-table;
|
||||
vertical-align: middle;
|
||||
|
||||
.input-group-addon,
|
||||
.input-group-btn,
|
||||
.form-control {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
// Input groups need that 100% width though
|
||||
.input-group > .form-control {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.form-control-label {
|
||||
margin-bottom: 0;
|
||||
vertical-align: middle;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
// Remove default margin on radios/checkboxes that were used for stacking, and
|
||||
// then undo the floating of radios and checkboxes to match.
|
||||
.form-check {
|
||||
display: inline-block;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.form-check-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: auto;
|
||||
padding-left: 0;
|
||||
}
|
||||
.form-check-input {
|
||||
position: relative;
|
||||
margin-top: 0;
|
||||
margin-right: $form-check-input-margin-x;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
// Re-override the feedback icon.
|
||||
.has-feedback .form-control-feedback {
|
||||
top: 0;
|
||||
.custom-control {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.custom-control-label {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
86
theme/boost/scss/bootstrap/_functions.scss
Normal file
86
theme/boost/scss/bootstrap/_functions.scss
Normal file
@ -0,0 +1,86 @@
|
||||
// Bootstrap functions
|
||||
//
|
||||
// Utility mixins and functions for evalutating source code across our variables, maps, and mixins.
|
||||
|
||||
// Ascending
|
||||
// Used to evaluate Sass maps like our grid breakpoints.
|
||||
@mixin _assert-ascending($map, $map-name) {
|
||||
$prev-key: null;
|
||||
$prev-num: null;
|
||||
@each $key, $num in $map {
|
||||
@if $prev-num == null {
|
||||
// Do nothing
|
||||
} @else if not comparable($prev-num, $num) {
|
||||
@warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !";
|
||||
} @else if $prev-num >= $num {
|
||||
@warn "Invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} which isn't greater than #{$prev-num}, the value of the previous key '#{$prev-key}' !";
|
||||
}
|
||||
$prev-key: $key;
|
||||
$prev-num: $num;
|
||||
}
|
||||
}
|
||||
|
||||
// Starts at zero
|
||||
// Another grid mixin that ensures the min-width of the lowest breakpoint starts at 0.
|
||||
@mixin _assert-starts-at-zero($map) {
|
||||
$values: map-values($map);
|
||||
$first-value: nth($values, 1);
|
||||
@if $first-value != 0 {
|
||||
@warn "First breakpoint in `$grid-breakpoints` must start at 0, but starts at #{$first-value}.";
|
||||
}
|
||||
}
|
||||
|
||||
// Replace `$search` with `$replace` in `$string`
|
||||
// Used on our SVG icon backgrounds for custom forms.
|
||||
//
|
||||
// @author Hugo Giraudel
|
||||
// @param {String} $string - Initial string
|
||||
// @param {String} $search - Substring to replace
|
||||
// @param {String} $replace ('') - New value
|
||||
// @return {String} - Updated string
|
||||
@function str-replace($string, $search, $replace: "") {
|
||||
$index: str-index($string, $search);
|
||||
|
||||
@if $index {
|
||||
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
|
||||
}
|
||||
|
||||
@return $string;
|
||||
}
|
||||
|
||||
// Color contrast
|
||||
@function color-yiq($color) {
|
||||
$r: red($color);
|
||||
$g: green($color);
|
||||
$b: blue($color);
|
||||
|
||||
$yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
|
||||
|
||||
@if ($yiq >= $yiq-contrasted-threshold) {
|
||||
@return $yiq-text-dark;
|
||||
} @else {
|
||||
@return $yiq-text-light;
|
||||
}
|
||||
}
|
||||
|
||||
// Retrieve color Sass maps
|
||||
@function color($key: "blue") {
|
||||
@return map-get($colors, $key);
|
||||
}
|
||||
|
||||
@function theme-color($key: "primary") {
|
||||
@return map-get($theme-colors, $key);
|
||||
}
|
||||
|
||||
@function gray($key: "100") {
|
||||
@return map-get($grays, $key);
|
||||
}
|
||||
|
||||
// Request a theme color level
|
||||
@function theme-color-level($color-name: "primary", $level: 0) {
|
||||
$color: theme-color($color-name);
|
||||
$color-base: if($level > 0, #000, #fff);
|
||||
$level: abs($level);
|
||||
|
||||
@return mix($color-base, $color, $level * $theme-color-interval);
|
||||
}
|
@ -11,8 +11,8 @@
|
||||
|
||||
// Fluid container
|
||||
//
|
||||
// Utilizes the mixin meant for fixed width containers, but without any defined
|
||||
// width for fluid, full width layouts.
|
||||
// Utilizes the mixin meant for fixed width containers, but with 100% width for
|
||||
// fluid, full width layouts.
|
||||
|
||||
@if $enable-grid-classes {
|
||||
.container-fluid {
|
||||
@ -28,6 +28,19 @@
|
||||
.row {
|
||||
@include make-row();
|
||||
}
|
||||
|
||||
// Remove the negative margin from default .row, then the horizontal padding
|
||||
// from all immediate children columns (to prevent runaway style inheritance).
|
||||
.no-gutters {
|
||||
margin-right: 0;
|
||||
margin-left: 0;
|
||||
|
||||
> .col,
|
||||
> [class*="col-"] {
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Columns
|
||||
|
@ -6,13 +6,9 @@
|
||||
// which weren't expecting the images within themselves to be involuntarily resized.
|
||||
// See also https://github.com/twbs/bootstrap/issues/18178
|
||||
.img-fluid {
|
||||
@include img-fluid();
|
||||
@include img-fluid;
|
||||
}
|
||||
|
||||
// Rounded corners
|
||||
.img-rounded {
|
||||
@include border-radius($border-radius-lg);
|
||||
}
|
||||
|
||||
// Image thumbnails
|
||||
.img-thumbnail {
|
||||
@ -20,16 +16,10 @@
|
||||
background-color: $thumbnail-bg;
|
||||
border: $thumbnail-border-width solid $thumbnail-border-color;
|
||||
@include border-radius($thumbnail-border-radius);
|
||||
transition: all .2s ease-in-out;
|
||||
@include box-shadow($thumbnail-box-shadow);
|
||||
|
||||
// Keep them at most 100% wide
|
||||
@include img-fluid(inline-block);
|
||||
}
|
||||
|
||||
// Perfect circle
|
||||
.img-circle {
|
||||
border-radius: 50%;
|
||||
@include img-fluid;
|
||||
}
|
||||
|
||||
//
|
||||
@ -42,11 +32,11 @@
|
||||
}
|
||||
|
||||
.figure-img {
|
||||
margin-bottom: ($spacer-y / 2);
|
||||
margin-bottom: ($spacer / 2);
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.figure-caption {
|
||||
font-size: $figure-caption-font-size;
|
||||
color: $gray-light;
|
||||
color: $figure-caption-color;
|
||||
}
|
||||
|
@ -1,188 +1,159 @@
|
||||
// stylelint-disable selector-no-qualifying-type
|
||||
|
||||
//
|
||||
// Base styles
|
||||
//
|
||||
|
||||
.input-group {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-wrap: wrap; // For form validation feedback
|
||||
align-items: stretch;
|
||||
width: 100%;
|
||||
|
||||
@if $enable-flex {
|
||||
display: flex;
|
||||
} @else {
|
||||
display: table;
|
||||
// Prevent input groups from inheriting border styles from table cells when
|
||||
// placed within a table.
|
||||
border-collapse: separate;
|
||||
}
|
||||
> .form-control,
|
||||
> .custom-select,
|
||||
> .custom-file {
|
||||
position: relative; // For focus state's z-index
|
||||
flex: 1 1 auto;
|
||||
// Add width 1% and flex-basis auto to ensure that button will not wrap out
|
||||
// the column. Applies to IE Edge+ and Firefox. Chrome does not require this.
|
||||
width: 1%;
|
||||
margin-bottom: 0;
|
||||
|
||||
.form-control {
|
||||
// Ensure that the input is always above the *appended* addon button for
|
||||
// proper border colors.
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
// Bring the "active" form control to the front
|
||||
@include hover-focus-active {
|
||||
// Bring the "active" form control to the top of surrounding elements
|
||||
&:focus {
|
||||
z-index: 3;
|
||||
}
|
||||
@if $enable-flex {
|
||||
flex: 1;
|
||||
} @else {
|
||||
// IE9 fubars the placeholder attribute in text inputs and the arrows on
|
||||
// select elements in input groups. To fix it, we float the input. Details:
|
||||
// https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855
|
||||
float: left;
|
||||
width: 100%;
|
||||
|
||||
+ .form-control,
|
||||
+ .custom-select,
|
||||
+ .custom-file {
|
||||
margin-left: -$input-border-width;
|
||||
}
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
> .form-control,
|
||||
> .custom-select {
|
||||
&:not(:last-child) { @include border-right-radius(0); }
|
||||
&:not(:first-child) { @include border-left-radius(0); }
|
||||
}
|
||||
|
||||
// Custom file inputs have more complex markup, thus requiring different
|
||||
// border-radius overrides.
|
||||
> .custom-file {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&:not(:last-child) .custom-file-label,
|
||||
&:not(:last-child) .custom-file-label::before { @include border-right-radius(0); }
|
||||
&:not(:first-child) .custom-file-label,
|
||||
&:not(:first-child) .custom-file-label::before { @include border-left-radius(0); }
|
||||
}
|
||||
}
|
||||
|
||||
.input-group-addon,
|
||||
.input-group-btn,
|
||||
.input-group .form-control {
|
||||
@if not $enable-flex {
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
&:not(:first-child):not(:last-child) {
|
||||
@include border-radius(0);
|
||||
}
|
||||
}
|
||||
|
||||
.input-group-addon,
|
||||
.input-group-btn {
|
||||
@if not $enable-flex {
|
||||
width: 1%;
|
||||
}
|
||||
white-space: nowrap;
|
||||
vertical-align: middle; // Match the inputs
|
||||
}
|
||||
|
||||
|
||||
// Sizing options
|
||||
// Prepend and append
|
||||
//
|
||||
// Remix the default form control sizing classes into new ones for easier
|
||||
// manipulation.
|
||||
// While it requires one extra layer of HTML for each, dedicated prepend and
|
||||
// append elements allow us to 1) be less clever, 2) simplify our selectors, and
|
||||
// 3) support HTML5 form validation.
|
||||
|
||||
.input-group-lg > .form-control,
|
||||
.input-group-lg > .input-group-addon,
|
||||
.input-group-lg > .input-group-btn > .btn {
|
||||
@extend .form-control-lg;
|
||||
}
|
||||
.input-group-sm > .form-control,
|
||||
.input-group-sm > .input-group-addon,
|
||||
.input-group-sm > .input-group-btn > .btn {
|
||||
@extend .form-control-sm;
|
||||
.input-group-prepend,
|
||||
.input-group-append {
|
||||
display: flex;
|
||||
|
||||
// Ensure buttons are always above inputs for more visually pleasing borders.
|
||||
// This isn't needed for `.input-group-text` since it shares the same border-color
|
||||
// as our inputs.
|
||||
.btn {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.btn + .btn,
|
||||
.btn + .input-group-text,
|
||||
.input-group-text + .input-group-text,
|
||||
.input-group-text + .btn {
|
||||
margin-left: -$input-border-width;
|
||||
}
|
||||
}
|
||||
|
||||
.input-group-prepend { margin-right: -$input-border-width; }
|
||||
.input-group-append { margin-left: -$input-border-width; }
|
||||
|
||||
//
|
||||
// Text input groups
|
||||
//
|
||||
|
||||
.input-group-addon {
|
||||
// Textual addons
|
||||
//
|
||||
// Serves as a catch-all element for any text or radio/checkbox input you wish
|
||||
// to prepend or append to an input.
|
||||
|
||||
.input-group-text {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: $input-padding-y $input-padding-x;
|
||||
margin-bottom: 0; // Allow use of <label> elements by overriding our default margin-bottom
|
||||
font-size: $font-size-base;
|
||||
font-weight: normal;
|
||||
font-size: $font-size-base; // Match inputs
|
||||
font-weight: $font-weight-normal;
|
||||
line-height: $input-line-height;
|
||||
color: $input-color;
|
||||
color: $input-group-addon-color;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
background-color: $input-group-addon-bg;
|
||||
border: $input-btn-border-width solid $input-group-addon-border-color;
|
||||
border: $input-border-width solid $input-group-addon-border-color;
|
||||
@include border-radius($input-border-radius);
|
||||
|
||||
// Sizing
|
||||
&.form-control-sm {
|
||||
padding: $input-padding-y-sm $input-padding-x-sm;
|
||||
font-size: $font-size-sm;
|
||||
@include border-radius($input-border-radius-sm);
|
||||
}
|
||||
&.form-control-lg {
|
||||
padding: $input-padding-y-lg $input-padding-x-lg;
|
||||
font-size: $font-size-lg;
|
||||
@include border-radius($input-border-radius-lg);
|
||||
}
|
||||
|
||||
// scss-lint:disable QualifyingElement
|
||||
// Nuke default margins from checkboxes and radios to vertically center within.
|
||||
input[type="radio"],
|
||||
input[type="checkbox"] {
|
||||
margin-top: 0;
|
||||
}
|
||||
// scss-lint:enable QualifyingElement
|
||||
}
|
||||
|
||||
|
||||
// Sizing
|
||||
//
|
||||
// Reset rounded corners
|
||||
//
|
||||
// Remix the default form control sizing classes into new ones for easier
|
||||
// manipulation.
|
||||
|
||||
.input-group .form-control:not(:last-child),
|
||||
.input-group-addon:not(:last-child),
|
||||
.input-group-btn:not(:last-child) > .btn,
|
||||
.input-group-btn:not(:last-child) > .btn-group > .btn,
|
||||
.input-group-btn:not(:last-child) > .dropdown-toggle,
|
||||
.input-group-btn:not(:first-child) > .btn:not(:last-child):not(.dropdown-toggle),
|
||||
.input-group-btn:not(:first-child) > .btn-group:not(:last-child) > .btn {
|
||||
.input-group-lg > .form-control,
|
||||
.input-group-lg > .input-group-prepend > .input-group-text,
|
||||
.input-group-lg > .input-group-append > .input-group-text,
|
||||
.input-group-lg > .input-group-prepend > .btn,
|
||||
.input-group-lg > .input-group-append > .btn {
|
||||
@extend .form-control-lg;
|
||||
}
|
||||
|
||||
.input-group-sm > .form-control,
|
||||
.input-group-sm > .input-group-prepend > .input-group-text,
|
||||
.input-group-sm > .input-group-append > .input-group-text,
|
||||
.input-group-sm > .input-group-prepend > .btn,
|
||||
.input-group-sm > .input-group-append > .btn {
|
||||
@extend .form-control-sm;
|
||||
}
|
||||
|
||||
|
||||
// Prepend and append rounded corners
|
||||
//
|
||||
// These rulesets must come after the sizing ones to properly override sm and lg
|
||||
// border-radius values when extending. They're more specific than we'd like
|
||||
// with the `.input-group >` part, but without it, we cannot override the sizing.
|
||||
|
||||
|
||||
.input-group > .input-group-prepend > .btn,
|
||||
.input-group > .input-group-prepend > .input-group-text,
|
||||
.input-group > .input-group-append:not(:last-child) > .btn,
|
||||
.input-group > .input-group-append:not(:last-child) > .input-group-text,
|
||||
.input-group > .input-group-append:last-child > .btn:not(:last-child):not(.dropdown-toggle),
|
||||
.input-group > .input-group-append:last-child > .input-group-text:not(:last-child) {
|
||||
@include border-right-radius(0);
|
||||
}
|
||||
.input-group-addon:not(:last-child) {
|
||||
border-right: 0;
|
||||
}
|
||||
.input-group .form-control:not(:first-child),
|
||||
.input-group-addon:not(:first-child),
|
||||
.input-group-btn:not(:first-child) > .btn,
|
||||
.input-group-btn:not(:first-child) > .btn-group > .btn,
|
||||
.input-group-btn:not(:first-child) > .dropdown-toggle,
|
||||
.input-group-btn:not(:last-child) > .btn:not(:first-child),
|
||||
.input-group-btn:not(:last-child) > .btn-group:not(:first-child) > .btn {
|
||||
|
||||
.input-group > .input-group-append > .btn,
|
||||
.input-group > .input-group-append > .input-group-text,
|
||||
.input-group > .input-group-prepend:not(:first-child) > .btn,
|
||||
.input-group > .input-group-prepend:not(:first-child) > .input-group-text,
|
||||
.input-group > .input-group-prepend:first-child > .btn:not(:first-child),
|
||||
.input-group > .input-group-prepend:first-child > .input-group-text:not(:first-child) {
|
||||
@include border-left-radius(0);
|
||||
}
|
||||
.form-control + .input-group-addon:not(:first-child) {
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
//
|
||||
// Button input groups
|
||||
//
|
||||
|
||||
.input-group-btn {
|
||||
position: relative;
|
||||
// Jankily prevent input button groups from wrapping with `white-space` and
|
||||
// `font-size` in combination with `inline-block` on buttons.
|
||||
font-size: 0;
|
||||
white-space: nowrap;
|
||||
|
||||
// Negative margin for spacing, position for bringing hovered/focused/actived
|
||||
// element above the siblings.
|
||||
> .btn {
|
||||
position: relative;
|
||||
+ .btn {
|
||||
margin-left: (-$input-btn-border-width);
|
||||
}
|
||||
// Bring the "active" button to the front
|
||||
@include hover-focus-active {
|
||||
z-index: 3;
|
||||
}
|
||||
}
|
||||
|
||||
// Negative margin to only have a single, shared border between the two
|
||||
&:not(:last-child) {
|
||||
> .btn,
|
||||
> .btn-group {
|
||||
margin-right: (-$input-btn-border-width);
|
||||
}
|
||||
}
|
||||
&:not(:first-child) {
|
||||
> .btn,
|
||||
> .btn-group {
|
||||
z-index: 2;
|
||||
margin-left: (-$input-btn-border-width);
|
||||
// Because specificity
|
||||
@include hover-focus-active {
|
||||
z-index: 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,10 +9,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.jumbotron-hr {
|
||||
border-top-color: darken($jumbotron-bg, 10%);
|
||||
}
|
||||
|
||||
.jumbotron-fluid {
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
|
@ -3,12 +3,39 @@
|
||||
// Easily usable on <ul>, <ol>, or <div>.
|
||||
|
||||
.list-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
// No need to set list-style: none; since .list-group-item is block level
|
||||
padding-left: 0; // reset padding because ul and ol
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
|
||||
// Interactive list items
|
||||
//
|
||||
// Use anchor or button elements instead of `li`s or `div`s to create interactive
|
||||
// list items. Includes an extra `.active` modifier class for selected items.
|
||||
|
||||
.list-group-item-action {
|
||||
width: 100%; // For `<button>`s (anchors become 100% by default though)
|
||||
color: $list-group-action-color;
|
||||
text-align: inherit; // For `<button>`s (anchors inherit)
|
||||
|
||||
// Hover state
|
||||
@include hover-focus {
|
||||
color: $list-group-action-hover-color;
|
||||
text-decoration: none;
|
||||
background-color: $list-group-hover-bg;
|
||||
}
|
||||
|
||||
&:active {
|
||||
color: $list-group-action-active-color;
|
||||
background-color: $list-group-action-active-bg;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Individual list items
|
||||
//
|
||||
// Use on `li`s or `div`s within the `.list-group` parent.
|
||||
@ -31,69 +58,49 @@
|
||||
@include border-bottom-radius($list-group-border-radius);
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
@include plain-hover-focus {
|
||||
color: $list-group-disabled-color;
|
||||
cursor: $cursor-disabled;
|
||||
background-color: $list-group-disabled-bg;
|
||||
|
||||
// Force color to inherit for custom content
|
||||
.list-group-item-heading {
|
||||
color: inherit;
|
||||
}
|
||||
.list-group-item-text {
|
||||
color: $list-group-disabled-text-color;
|
||||
}
|
||||
}
|
||||
@include hover-focus {
|
||||
z-index: 1; // Place hover/active items above their siblings for proper border styling
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&.active {
|
||||
@include plain-hover-focus {
|
||||
z-index: 2; // Place active items above their siblings for proper border styling
|
||||
color: $list-group-active-color;
|
||||
text-decoration: none; // Repeat here because it inherits global a:hover otherwise
|
||||
background-color: $list-group-active-bg;
|
||||
border-color: $list-group-active-border;
|
||||
&.disabled,
|
||||
&:disabled {
|
||||
color: $list-group-disabled-color;
|
||||
background-color: $list-group-disabled-bg;
|
||||
}
|
||||
|
||||
// Force color to inherit for custom content
|
||||
.list-group-item-heading,
|
||||
.list-group-item-heading > small,
|
||||
.list-group-item-heading > .small {
|
||||
color: inherit;
|
||||
}
|
||||
.list-group-item-text {
|
||||
color: $list-group-active-text-color;
|
||||
}
|
||||
}
|
||||
// Include both here for `<a>`s and `<button>`s
|
||||
&.active {
|
||||
z-index: 2; // Place active items above their siblings for proper border styling
|
||||
color: $list-group-active-color;
|
||||
background-color: $list-group-active-bg;
|
||||
border-color: $list-group-active-border-color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Flush list items
|
||||
//
|
||||
// Remove borders and border-radius to keep list group items edge-to-edge. Most
|
||||
// useful within other components (e.g., cards).
|
||||
|
||||
.list-group-flush {
|
||||
.list-group-item {
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Interactive list items
|
||||
//
|
||||
// Use anchor or button elements instead of `li`s or `div`s to create interactive
|
||||
// list items. Includes an extra `.active` modifier class for selected items.
|
||||
|
||||
.list-group-item-action {
|
||||
width: 100%; // For `<button>`s (anchors become 100% by default though)
|
||||
color: $list-group-link-color;
|
||||
text-align: inherit; // For `<button>`s (anchors inherit)
|
||||
|
||||
.list-group-item-heading {
|
||||
color: $list-group-link-heading-color;
|
||||
border-right: 0;
|
||||
border-left: 0;
|
||||
@include border-radius(0);
|
||||
}
|
||||
|
||||
// Hover state
|
||||
@include hover-focus {
|
||||
color: $list-group-link-hover-color;
|
||||
text-decoration: none;
|
||||
background-color: $list-group-hover-bg;
|
||||
&:first-child {
|
||||
.list-group-item:first-child {
|
||||
border-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
.list-group-item:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -103,21 +110,6 @@
|
||||
// Add modifier classes to change text and background color on individual items.
|
||||
// Organizationally, this must come after the `:hover` states.
|
||||
|
||||
@include list-group-item-variant(success, $state-success-bg, $state-success-text);
|
||||
@include list-group-item-variant(info, $state-info-bg, $state-info-text);
|
||||
@include list-group-item-variant(warning, $state-warning-bg, $state-warning-text);
|
||||
@include list-group-item-variant(danger, $state-danger-bg, $state-danger-text);
|
||||
|
||||
|
||||
// Custom content options
|
||||
//
|
||||
// Extra classes for creating well-formatted content within `.list-group-item`s.
|
||||
|
||||
.list-group-item-heading {
|
||||
margin-top: 0;
|
||||
margin-bottom: $list-group-item-heading-margin-bottom;
|
||||
}
|
||||
.list-group-item-text {
|
||||
margin-bottom: 0;
|
||||
line-height: 1.3;
|
||||
@each $color, $value in $theme-colors {
|
||||
@include list-group-item-variant($color, theme-color-level($color, -9), theme-color-level($color, 6));
|
||||
}
|
||||
|
@ -1,81 +1,8 @@
|
||||
@if $enable-flex {
|
||||
.media {
|
||||
display: flex;
|
||||
}
|
||||
.media-body {
|
||||
flex: 1;
|
||||
}
|
||||
.media-middle {
|
||||
align-self: center;
|
||||
}
|
||||
.media-bottom {
|
||||
align-self: flex-end;
|
||||
}
|
||||
} @else {
|
||||
.media,
|
||||
.media-body {
|
||||
overflow: hidden;
|
||||
}
|
||||
.media-body {
|
||||
width: 10000px;
|
||||
}
|
||||
.media-left,
|
||||
.media-right,
|
||||
.media-body {
|
||||
display: table-cell;
|
||||
vertical-align: top;
|
||||
}
|
||||
.media-middle {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.media-bottom {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.media {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Images/elements as the media anchor
|
||||
//
|
||||
|
||||
.media-object {
|
||||
display: block;
|
||||
|
||||
// Fix collapse in webkit from max-width: 100% and display: table-cell.
|
||||
&.img-thumbnail {
|
||||
max-width: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Alignment
|
||||
//
|
||||
|
||||
.media-right {
|
||||
padding-left: $media-alignment-padding-x;
|
||||
}
|
||||
|
||||
.media-left {
|
||||
padding-right: $media-alignment-padding-x;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Headings
|
||||
//
|
||||
|
||||
.media-heading {
|
||||
margin-top: 0;
|
||||
margin-bottom: $media-heading-margin-bottom;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Media list variation
|
||||
//
|
||||
|
||||
.media-list {
|
||||
padding-left: 0;
|
||||
list-style: none;
|
||||
.media-body {
|
||||
flex: 1;
|
||||
}
|
||||
|
@ -2,53 +2,41 @@
|
||||
//
|
||||
// Used in conjunction with global variables to enable certain theme features.
|
||||
|
||||
@mixin box-shadow($shadow...) {
|
||||
@if $enable-shadows {
|
||||
box-shadow: $shadow;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin transition($transition...) {
|
||||
@if $enable-transitions {
|
||||
transition: $transition;
|
||||
}
|
||||
}
|
||||
|
||||
// Utilities
|
||||
@import "mixins/breakpoints";
|
||||
@import "mixins/hover";
|
||||
@import "mixins/image";
|
||||
@import "mixins/tag";
|
||||
@import "mixins/reset-filter";
|
||||
@import "mixins/badge";
|
||||
@import "mixins/resize";
|
||||
@import "mixins/screen-reader";
|
||||
@import "mixins/size";
|
||||
@import "mixins/tab-focus";
|
||||
@import "mixins/reset-text";
|
||||
@import "mixins/text-emphasis";
|
||||
@import "mixins/text-hide";
|
||||
@import "mixins/text-truncate";
|
||||
@import "mixins/visibility";
|
||||
|
||||
// // Components
|
||||
@import "mixins/alert";
|
||||
@import "mixins/buttons";
|
||||
@import "mixins/cards";
|
||||
@import "mixins/caret";
|
||||
@import "mixins/pagination";
|
||||
@import "mixins/lists";
|
||||
@import "mixins/list-group";
|
||||
@import "mixins/nav-divider";
|
||||
@import "mixins/forms";
|
||||
@import "mixins/progress";
|
||||
@import "mixins/table-row";
|
||||
|
||||
// // Skins
|
||||
@import "mixins/background-variant";
|
||||
@import "mixins/border-radius";
|
||||
@import "mixins/box-shadow";
|
||||
@import "mixins/gradients";
|
||||
@import "mixins/transition";
|
||||
|
||||
// // Layout
|
||||
@import "mixins/clearfix";
|
||||
// @import "mixins/navbar-align";
|
||||
@import "mixins/grid-framework";
|
||||
@import "mixins/grid";
|
||||
@import "mixins/pulls";
|
||||
@import "mixins/float";
|
||||
|
@ -1,7 +1,7 @@
|
||||
// .modal-open - body class for killing the scroll
|
||||
// .modal - container to scroll within
|
||||
// .modal-dialog - positioning shell for the actual modal
|
||||
// .modal-content - actual modal w/ bg and corners and shit
|
||||
// .modal-content - actual modal w/ bg and corners and stuff
|
||||
|
||||
|
||||
// Kill the scroll on the body
|
||||
@ -22,18 +22,14 @@
|
||||
// Prevent Chrome on Windows from adding a focus outline. For details, see
|
||||
// https://github.com/twbs/bootstrap/pull/10951.
|
||||
outline: 0;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
// We deliberately don't use `-webkit-overflow-scrolling: touch;` due to a
|
||||
// gnarly iOS Safari bug: https://bugs.webkit.org/show_bug.cgi?id=158342
|
||||
// See also https://github.com/twbs/bootstrap/issues/17695
|
||||
|
||||
// When fading in the modal, animate it to slide down
|
||||
&.fade .modal-dialog {
|
||||
transition: transform .3s ease-out;
|
||||
transform: translate(0, -25%);
|
||||
.modal-open & {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
&.in .modal-dialog { transform: translate(0, 0); }
|
||||
}
|
||||
.modal-open .modal {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
// Shell div to position the modal with bottom padding
|
||||
@ -41,16 +37,38 @@
|
||||
position: relative;
|
||||
width: auto;
|
||||
margin: $modal-dialog-margin;
|
||||
// allow clicks to pass through for custom click handling to close modal
|
||||
pointer-events: none;
|
||||
|
||||
// When fading in the modal, animate it to slide down
|
||||
.modal.fade & {
|
||||
@include transition($modal-transition);
|
||||
transform: translate(0, -25%);
|
||||
}
|
||||
.modal.show & {
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.modal-dialog-centered {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: calc(100% - (#{$modal-dialog-margin} * 2));
|
||||
}
|
||||
|
||||
// Actual modal
|
||||
.modal-content {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%; // Ensure `.modal-content` extends the full width of the parent `.modal-dialog`
|
||||
// counteract the pointer-events: none; in the .modal-dialog
|
||||
pointer-events: auto;
|
||||
background-color: $modal-content-bg;
|
||||
background-clip: padding-box;
|
||||
border: $modal-content-border-width solid $modal-content-border-color;
|
||||
@include border-radius($border-radius-lg);
|
||||
@include box-shadow($modal-content-xs-box-shadow);
|
||||
@include box-shadow($modal-content-box-shadow-xs);
|
||||
// Remove focus outline from opened modal
|
||||
outline: 0;
|
||||
}
|
||||
@ -62,29 +80,34 @@
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: $zindex-modal-bg;
|
||||
z-index: $zindex-modal-backdrop;
|
||||
background-color: $modal-backdrop-bg;
|
||||
|
||||
// Fade for backdrop
|
||||
&.fade { opacity: 0; }
|
||||
&.in { opacity: $modal-backdrop-opacity; }
|
||||
&.show { opacity: $modal-backdrop-opacity; }
|
||||
}
|
||||
|
||||
// Modal header
|
||||
// Top section of the modal w/ title and dismiss
|
||||
.modal-header {
|
||||
padding: $modal-title-padding;
|
||||
display: flex;
|
||||
align-items: flex-start; // so the close btn always stays on the upper right corner
|
||||
justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends
|
||||
padding: $modal-header-padding;
|
||||
border-bottom: $modal-header-border-width solid $modal-header-border-color;
|
||||
@include clearfix;
|
||||
}
|
||||
// Close icon
|
||||
.modal-header .close {
|
||||
margin-top: -2px;
|
||||
@include border-top-radius($border-radius-lg);
|
||||
|
||||
.close {
|
||||
padding: $modal-header-padding;
|
||||
// auto on the left force icon to the right even when there is no .modal-title
|
||||
margin: (-$modal-header-padding) (-$modal-header-padding) (-$modal-header-padding) auto;
|
||||
}
|
||||
}
|
||||
|
||||
// Title text within header
|
||||
.modal-title {
|
||||
margin: 0;
|
||||
margin-bottom: 0;
|
||||
line-height: $modal-title-line-height;
|
||||
}
|
||||
|
||||
@ -92,15 +115,23 @@
|
||||
// Where all modal content resides (sibling of .modal-header and .modal-footer)
|
||||
.modal-body {
|
||||
position: relative;
|
||||
// Enable `flex-grow: 1` so that the body take up as much space as possible
|
||||
// when should there be a fixed height on `.modal-dialog`.
|
||||
flex: 1 1 auto;
|
||||
padding: $modal-inner-padding;
|
||||
}
|
||||
|
||||
// Footer (for actions)
|
||||
.modal-footer {
|
||||
display: flex;
|
||||
align-items: center; // vertically center
|
||||
justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items
|
||||
padding: $modal-inner-padding;
|
||||
text-align: right; // right align buttons
|
||||
border-top: $modal-footer-border-width solid $modal-footer-border-color;
|
||||
@include clearfix(); // clear it in case folks use .pull-* classes on buttons
|
||||
|
||||
// Easily place margin between footer elements
|
||||
> :not(:first-child) { margin-left: .25rem; }
|
||||
> :not(:last-child) { margin-right: .25rem; }
|
||||
}
|
||||
|
||||
// Measure scrollbar width for padding body during modal show/hide
|
||||
@ -117,14 +148,19 @@
|
||||
// Automatically set modal's width for larger viewports
|
||||
.modal-dialog {
|
||||
max-width: $modal-md;
|
||||
margin: $modal-dialog-sm-up-margin-y auto;
|
||||
margin: $modal-dialog-margin-y-sm-up auto;
|
||||
}
|
||||
|
||||
.modal-dialog-centered {
|
||||
min-height: calc(100% - (#{$modal-dialog-margin-y-sm-up} * 2));
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
@include box-shadow($modal-content-sm-up-box-shadow);
|
||||
@include box-shadow($modal-content-box-shadow-sm-up);
|
||||
}
|
||||
|
||||
.modal-sm { max-width: $modal-sm; }
|
||||
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(lg) {
|
||||
|
@ -4,89 +4,58 @@
|
||||
// `<nav>`s or `<ul>`s.
|
||||
|
||||
.nav {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding-left: 0;
|
||||
margin-bottom: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
display: inline-block;
|
||||
display: block;
|
||||
padding: $nav-link-padding-y $nav-link-padding-x;
|
||||
|
||||
@include hover-focus {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
// Disabled state lightens text and removes hover/tab effects
|
||||
// Disabled state lightens text
|
||||
&.disabled {
|
||||
color: $nav-disabled-link-color;
|
||||
|
||||
@include plain-hover-focus {
|
||||
color: $nav-disabled-link-hover-color;
|
||||
cursor: $cursor-disabled;
|
||||
background-color: $nav-disabled-link-hover-bg;
|
||||
}
|
||||
color: $nav-link-disabled-color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Nav inline
|
||||
|
||||
.nav-inline {
|
||||
.nav-item {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.nav-item + .nav-item,
|
||||
.nav-link + .nav-link {
|
||||
margin-left: $nav-item-inline-spacer;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Tabs
|
||||
//
|
||||
|
||||
.nav-tabs {
|
||||
border-bottom: $nav-tabs-border-width solid $nav-tabs-border-color;
|
||||
@include clearfix();
|
||||
|
||||
.nav-item {
|
||||
float: left;
|
||||
// Make the list-items overlay the bottom border
|
||||
margin-bottom: -$nav-tabs-border-width;
|
||||
|
||||
+ .nav-item {
|
||||
margin-left: $nav-item-margin;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
display: block;
|
||||
padding: $nav-link-padding;
|
||||
border: $nav-tabs-border-width solid transparent;
|
||||
@include border-top-radius($nav-tabs-border-radius);
|
||||
|
||||
@include hover-focus {
|
||||
border-color: $nav-tabs-link-hover-border-color $nav-tabs-link-hover-border-color $nav-tabs-border-color;
|
||||
border-color: $nav-tabs-link-hover-border-color;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
@include plain-hover-focus {
|
||||
color: $nav-disabled-link-color;
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
}
|
||||
color: $nav-link-disabled-color;
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-link.active,
|
||||
.nav-item.open .nav-link {
|
||||
@include plain-hover-focus {
|
||||
color: $nav-tabs-active-link-hover-color;
|
||||
background-color: $nav-tabs-active-link-hover-bg;
|
||||
border-color: $nav-tabs-active-link-hover-border-color $nav-tabs-active-link-hover-border-color transparent;
|
||||
}
|
||||
.nav-item.show .nav-link {
|
||||
color: $nav-tabs-link-active-color;
|
||||
background-color: $nav-tabs-link-active-bg;
|
||||
border-color: $nav-tabs-link-active-border-color;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
@ -103,50 +72,42 @@
|
||||
//
|
||||
|
||||
.nav-pills {
|
||||
@include clearfix();
|
||||
|
||||
.nav-item {
|
||||
float: left;
|
||||
|
||||
+ .nav-item {
|
||||
margin-left: $nav-item-margin;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
display: block;
|
||||
padding: $nav-link-padding;
|
||||
@include border-radius($nav-pills-border-radius);
|
||||
}
|
||||
|
||||
.nav-link.active,
|
||||
.nav-item.open .nav-link {
|
||||
@include plain-hover-focus {
|
||||
color: $nav-pills-active-link-color;
|
||||
cursor: default;
|
||||
background-color: $nav-pills-active-link-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nav-stacked {
|
||||
.nav-item {
|
||||
display: block;
|
||||
float: none;
|
||||
|
||||
+ .nav-item {
|
||||
margin-top: $nav-item-margin;
|
||||
margin-left: 0;
|
||||
}
|
||||
.show > .nav-link {
|
||||
color: $nav-pills-link-active-color;
|
||||
background-color: $nav-pills-link-active-bg;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Justified variants
|
||||
//
|
||||
|
||||
.nav-fill {
|
||||
.nav-item {
|
||||
flex: 1 1 auto;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-justified {
|
||||
.nav-item {
|
||||
flex-basis: 0;
|
||||
flex-grow: 1;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Tabbable tabs
|
||||
//
|
||||
|
||||
// Hide tabbable panes to start, show them when `.active`
|
||||
|
||||
.tab-content {
|
||||
> .tab-pane {
|
||||
display: none;
|
||||
|
@ -1,146 +1,211 @@
|
||||
// Wrapper and base class
|
||||
// Contents
|
||||
//
|
||||
// Navbar
|
||||
// Navbar brand
|
||||
// Navbar nav
|
||||
// Navbar text
|
||||
// Navbar divider
|
||||
// Responsive navbar
|
||||
// Navbar position
|
||||
// Navbar themes
|
||||
|
||||
|
||||
// Navbar
|
||||
//
|
||||
// Provide a static navbar from which we expand to create full-width, fixed, and
|
||||
// other navbar variations.
|
||||
|
||||
.navbar {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-wrap: wrap; // allow us to do the line break for collapsing content
|
||||
align-items: center;
|
||||
justify-content: space-between; // space out brand from logo
|
||||
padding: $navbar-padding-y $navbar-padding-x;
|
||||
@include clearfix;
|
||||
|
||||
@include media-breakpoint-up(sm) {
|
||||
@include border-radius($navbar-border-radius);
|
||||
// Because flex properties aren't inherited, we need to redeclare these first
|
||||
// few properities so that content nested within behave properly.
|
||||
> .container,
|
||||
> .container-fluid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Navbar alignment options
|
||||
//
|
||||
// Display the navbar across the entirety of the page or fixed it to the top or
|
||||
// bottom of the page.
|
||||
|
||||
// A static, full width modifier with no rounded corners.
|
||||
.navbar-full {
|
||||
z-index: $zindex-navbar;
|
||||
|
||||
@include media-breakpoint-up(sm) {
|
||||
@include border-radius(0);
|
||||
}
|
||||
}
|
||||
|
||||
// Fix the top/bottom navbars when screen real estate supports it
|
||||
.navbar-fixed-top,
|
||||
.navbar-fixed-bottom {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
left: 0;
|
||||
z-index: $zindex-navbar-fixed;
|
||||
|
||||
// Undo the rounded corners
|
||||
@include media-breakpoint-up(sm) {
|
||||
@include border-radius(0);
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-fixed-top {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.navbar-fixed-bottom {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.navbar-sticky-top {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: $zindex-navbar-sticky;
|
||||
width: 100%;
|
||||
|
||||
// Undo the rounded corners
|
||||
@include media-breakpoint-up(sm) {
|
||||
@include border-radius(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Brand/project name
|
||||
// Navbar brand
|
||||
//
|
||||
// Used for brand, project, or site names.
|
||||
|
||||
.navbar-brand {
|
||||
float: left;
|
||||
padding-top: $navbar-brand-padding-y;
|
||||
display: inline-block;
|
||||
padding-top: $navbar-brand-padding-y;
|
||||
padding-bottom: $navbar-brand-padding-y;
|
||||
margin-right: 1rem;
|
||||
font-size: $font-size-lg;
|
||||
|
||||
@include hover-focus {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
> img {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.navbar-divider {
|
||||
float: left;
|
||||
width: $border-width;
|
||||
padding-top: .425rem;
|
||||
padding-bottom: .425rem;
|
||||
margin-right: $navbar-padding-x;
|
||||
margin-left: $navbar-padding-x;
|
||||
overflow: hidden;
|
||||
|
||||
&::before {
|
||||
content: "\00a0";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Navbar toggle
|
||||
//
|
||||
// Custom button for toggling the `.navbar-collapse`, powered by the collapse
|
||||
// Bootstrap JavaScript plugin.
|
||||
|
||||
.navbar-toggler {
|
||||
padding: .5rem .75rem;
|
||||
font-size: $font-size-lg;
|
||||
line-height: 1;
|
||||
background: none;
|
||||
border: $border-width solid transparent;
|
||||
@include border-radius($btn-border-radius);
|
||||
font-size: $navbar-brand-font-size;
|
||||
line-height: inherit;
|
||||
white-space: nowrap;
|
||||
|
||||
@include hover-focus {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Navigation
|
||||
|
||||
// Navbar nav
|
||||
//
|
||||
// Custom navbar navigation built on the base `.nav` styles.
|
||||
// Custom navbar navigation (doesn't require `.nav`, but does make use of `.nav-link`).
|
||||
|
||||
.navbar-nav {
|
||||
.nav-item {
|
||||
float: left;
|
||||
}
|
||||
display: flex;
|
||||
flex-direction: column; // cannot use `inherit` to get the `.navbar`s value
|
||||
padding-left: 0;
|
||||
margin-bottom: 0;
|
||||
list-style: none;
|
||||
|
||||
.nav-link {
|
||||
display: block;
|
||||
padding-top: .425rem;
|
||||
padding-bottom: .425rem;
|
||||
|
||||
+ .nav-link {
|
||||
margin-left: 1rem;
|
||||
}
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.nav-item + .nav-item {
|
||||
margin-left: 1rem;
|
||||
.dropdown-menu {
|
||||
position: static;
|
||||
float: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Navbar text
|
||||
//
|
||||
//
|
||||
|
||||
.navbar-text {
|
||||
display: inline-block;
|
||||
padding-top: $nav-link-padding-y;
|
||||
padding-bottom: $nav-link-padding-y;
|
||||
}
|
||||
|
||||
|
||||
// Responsive navbar
|
||||
//
|
||||
// Custom styles for responsive collapsing and toggling of navbar contents.
|
||||
// Powered by the collapse Bootstrap JavaScript plugin.
|
||||
|
||||
// When collapsed, prevent the toggleable navbar contents from appearing in
|
||||
// the default flexbox row orienation. Requires the use of `flex-wrap: wrap`
|
||||
// on the `.navbar` parent.
|
||||
.navbar-collapse {
|
||||
flex-basis: 100%;
|
||||
flex-grow: 1;
|
||||
// For always expanded or extra full navbars, ensure content aligns itself
|
||||
// properly vertically. Can be easily overridden with flex utilities.
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
// Button for toggling the navbar when in its collapsed state
|
||||
.navbar-toggler {
|
||||
padding: $navbar-toggler-padding-y $navbar-toggler-padding-x;
|
||||
font-size: $navbar-toggler-font-size;
|
||||
line-height: 1;
|
||||
background-color: transparent; // remove default button style
|
||||
border: $border-width solid transparent; // remove default button style
|
||||
@include border-radius($navbar-toggler-border-radius);
|
||||
|
||||
@include hover-focus {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
// Opinionated: add "hand" cursor to non-disabled .navbar-toggler elements
|
||||
&:not(:disabled):not(.disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
// Keep as a separate element so folks can easily override it with another icon
|
||||
// or image file as needed.
|
||||
.navbar-toggler-icon {
|
||||
display: inline-block;
|
||||
width: 1.5em;
|
||||
height: 1.5em;
|
||||
vertical-align: middle;
|
||||
content: "";
|
||||
background: no-repeat center center;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
// Generate series of `.navbar-expand-*` responsive classes for configuring
|
||||
// where your navbar collapses.
|
||||
.navbar-expand {
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
$next: breakpoint-next($breakpoint, $grid-breakpoints);
|
||||
$infix: breakpoint-infix($next, $grid-breakpoints);
|
||||
|
||||
&#{$infix} {
|
||||
@include media-breakpoint-down($breakpoint) {
|
||||
> .container,
|
||||
> .container-fluid {
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-up($next) {
|
||||
flex-flow: row nowrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
.navbar-nav {
|
||||
flex-direction: row;
|
||||
|
||||
.dropdown-menu {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.dropdown-menu-right {
|
||||
right: 0;
|
||||
left: auto; // Reset the default from `.dropdown-menu`
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
padding-right: $navbar-nav-link-padding-x;
|
||||
padding-left: $navbar-nav-link-padding-x;
|
||||
}
|
||||
}
|
||||
|
||||
// For nesting containers, have to redeclare for alignment purposes
|
||||
> .container,
|
||||
> .container-fluid {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.navbar-collapse {
|
||||
display: flex !important; // stylelint-disable-line declaration-no-important
|
||||
|
||||
// Changes flex-bases to auto because of an IE10 bug
|
||||
flex-basis: auto;
|
||||
}
|
||||
|
||||
.navbar-toggler {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dropup {
|
||||
.dropdown-menu {
|
||||
top: auto;
|
||||
bottom: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Navbar themes
|
||||
//
|
||||
// Styles for switching between navbars with light or dark background.
|
||||
|
||||
// Dark links against a light background
|
||||
.navbar-light {
|
||||
.navbar-brand {
|
||||
@ -158,20 +223,38 @@
|
||||
@include hover-focus {
|
||||
color: $navbar-light-hover-color;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
color: $navbar-light-disabled-color;
|
||||
}
|
||||
}
|
||||
|
||||
.open > .nav-link,
|
||||
.show > .nav-link,
|
||||
.active > .nav-link,
|
||||
.nav-link.open,
|
||||
.nav-link.show,
|
||||
.nav-link.active {
|
||||
@include plain-hover-focus {
|
||||
color: $navbar-light-active-color;
|
||||
}
|
||||
color: $navbar-light-active-color;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-divider {
|
||||
background-color: rgba(0,0,0,.075);
|
||||
.navbar-toggler {
|
||||
color: $navbar-light-color;
|
||||
border-color: $navbar-light-toggler-border-color;
|
||||
}
|
||||
|
||||
.navbar-toggler-icon {
|
||||
background-image: $navbar-light-toggler-icon-bg;
|
||||
}
|
||||
|
||||
.navbar-text {
|
||||
color: $navbar-light-color;
|
||||
a {
|
||||
color: $navbar-light-active-color;
|
||||
|
||||
@include hover-focus {
|
||||
color: $navbar-light-active-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -192,65 +275,37 @@
|
||||
@include hover-focus {
|
||||
color: $navbar-dark-hover-color;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
color: $navbar-dark-disabled-color;
|
||||
}
|
||||
}
|
||||
|
||||
.open > .nav-link,
|
||||
.show > .nav-link,
|
||||
.active > .nav-link,
|
||||
.nav-link.open,
|
||||
.nav-link.show,
|
||||
.nav-link.active {
|
||||
@include plain-hover-focus {
|
||||
color: $navbar-dark-active-color;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-toggler {
|
||||
color: $navbar-dark-color;
|
||||
border-color: $navbar-dark-toggler-border-color;
|
||||
}
|
||||
|
||||
.navbar-toggler-icon {
|
||||
background-image: $navbar-dark-toggler-icon-bg;
|
||||
}
|
||||
|
||||
.navbar-text {
|
||||
color: $navbar-dark-color;
|
||||
a {
|
||||
color: $navbar-dark-active-color;
|
||||
|
||||
@include hover-focus {
|
||||
color: $navbar-dark-active-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-divider {
|
||||
background-color: rgba(255,255,255,.075);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Navbar toggleable
|
||||
//
|
||||
// Custom override for collapse plugin in navbar.
|
||||
|
||||
.navbar-toggleable {
|
||||
&-xs {
|
||||
@include clearfix;
|
||||
@include media-breakpoint-down(xs) {
|
||||
.navbar-nav .nav-item {
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
@include media-breakpoint-up(sm) {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
|
||||
&-sm {
|
||||
@include clearfix;
|
||||
@include media-breakpoint-down(sm) {
|
||||
.navbar-nav .nav-item {
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
@include media-breakpoint-up(md) {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
|
||||
&-md {
|
||||
@include clearfix;
|
||||
@include media-breakpoint-down(md) {
|
||||
.navbar-nav .nav-item {
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
@include media-breakpoint-up(lg) {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,424 +0,0 @@
|
||||
/*! normalize.css v4.0.0 | MIT License | github.com/necolas/normalize.css */
|
||||
|
||||
//
|
||||
// 1. Change the default font family in all browsers (opinionated).
|
||||
// 2. Prevent adjustments of font size after orientation changes in IE and iOS.
|
||||
//
|
||||
|
||||
html {
|
||||
font-family: sans-serif; // 1
|
||||
-ms-text-size-adjust: 100%; // 2
|
||||
-webkit-text-size-adjust: 100%; // 2
|
||||
}
|
||||
|
||||
//
|
||||
// Remove the margin in all browsers (opinionated).
|
||||
//
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
// HTML5 display definitions
|
||||
// ==========================================================================
|
||||
|
||||
//
|
||||
// Add the correct display in IE 9-.
|
||||
// 1. Add the correct display in Edge, IE, and Firefox.
|
||||
// 2. Add the correct display in IE.
|
||||
//
|
||||
|
||||
article,
|
||||
aside,
|
||||
details, // 1
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
main, // 2
|
||||
menu,
|
||||
nav,
|
||||
section,
|
||||
summary { // 1
|
||||
display: block;
|
||||
}
|
||||
|
||||
//
|
||||
// Add the correct display in IE 9-.
|
||||
//
|
||||
|
||||
audio,
|
||||
canvas,
|
||||
progress,
|
||||
video {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
//
|
||||
// Add the correct display in iOS 4-7.
|
||||
//
|
||||
|
||||
audio:not([controls]) {
|
||||
display: none;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
//
|
||||
// Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
//
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
//
|
||||
// Add the correct display in IE 10-.
|
||||
// 1. Add the correct display in IE.
|
||||
//
|
||||
|
||||
template, // 2
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
// Links
|
||||
// ==========================================================================
|
||||
|
||||
//
|
||||
// Remove the gray background on active links in IE 10.
|
||||
//
|
||||
|
||||
a {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
//
|
||||
// Remove the outline on focused links when they are also active or hovered
|
||||
// in all browsers (opinionated).
|
||||
//
|
||||
|
||||
a:active,
|
||||
a:hover {
|
||||
outline-width: 0;
|
||||
}
|
||||
|
||||
// Text-level semantics
|
||||
// ==========================================================================
|
||||
|
||||
//
|
||||
// 1. Remove the bottom border in Firefox 39-.
|
||||
// 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
//
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: none; // 1
|
||||
text-decoration: underline; // 2
|
||||
text-decoration: underline dotted; // 2
|
||||
}
|
||||
|
||||
//
|
||||
// Prevent the duplicate application of `bolder` by the next rule in Safari 6.
|
||||
//
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
//
|
||||
// Add the correct font weight in Chrome, Edge, and Safari.
|
||||
//
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
//
|
||||
// Add the correct font style in Android 4.3-.
|
||||
//
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
//
|
||||
// Correct the font size and margin on `h1` elements within `section` and
|
||||
// `article` contexts in Chrome, Firefox, and Safari.
|
||||
//
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
//
|
||||
// Add the correct background and color in IE 9-.
|
||||
//
|
||||
|
||||
mark {
|
||||
background-color: #ff0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
//
|
||||
// Add the correct font size in all browsers.
|
||||
//
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
//
|
||||
// Prevent `sub` and `sup` elements from affecting the line height in
|
||||
// all browsers.
|
||||
//
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
// Embedded content
|
||||
// ==========================================================================
|
||||
|
||||
//
|
||||
// Remove the border on images inside links in IE 10-.
|
||||
//
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
//
|
||||
// Hide the overflow in IE.
|
||||
//
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
// Grouping content
|
||||
// ==========================================================================
|
||||
|
||||
//
|
||||
// 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
// 2. Correct the odd `em` font sizing in all browsers.
|
||||
//
|
||||
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp {
|
||||
font-family: monospace, monospace; // 1
|
||||
font-size: 1em; // 2
|
||||
}
|
||||
|
||||
//
|
||||
// Add the correct margin in IE 8.
|
||||
//
|
||||
|
||||
figure {
|
||||
margin: 1em 40px;
|
||||
}
|
||||
|
||||
//
|
||||
// 1. Add the correct box sizing in Firefox.
|
||||
// 2. Show the overflow in Edge and IE.
|
||||
//
|
||||
|
||||
hr {
|
||||
box-sizing: content-box; // 1
|
||||
height: 0; // 1
|
||||
overflow: visible; // 2
|
||||
}
|
||||
|
||||
// Forms
|
||||
// ==========================================================================
|
||||
|
||||
//
|
||||
// Change font properties to `inherit` in all browsers (opinionated).
|
||||
//
|
||||
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
//
|
||||
// Restore the font weight unset by the previous rule.
|
||||
//
|
||||
|
||||
optgroup {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
//
|
||||
// Show the overflow in IE.
|
||||
// 1. Show the overflow in Edge.
|
||||
// 2. Show the overflow in Edge, Firefox, and IE.
|
||||
//
|
||||
|
||||
button,
|
||||
input, // 1
|
||||
select { // 2
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
//
|
||||
// Remove the margin in Safari.
|
||||
// 1. Remove the margin in Firefox and Safari.
|
||||
//
|
||||
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
textarea { // 1
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
//
|
||||
// Remove the inheritence of text transform in Edge, Firefox, and IE.
|
||||
// 1. Remove the inheritence of text transform in Firefox.
|
||||
//
|
||||
|
||||
button,
|
||||
select { // 1
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
//
|
||||
// Change the cursor in all browsers (opinionated).
|
||||
//
|
||||
|
||||
button,
|
||||
[type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
//
|
||||
// Restore the default cursor to disabled elements unset by the previous rule.
|
||||
//
|
||||
|
||||
[disabled] {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
//
|
||||
// 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
|
||||
// controls in Android 4.
|
||||
// 2. Correct the inability to style clickable types in iOS.
|
||||
//
|
||||
|
||||
button,
|
||||
html [type="button"], // 1
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button; // 2
|
||||
}
|
||||
|
||||
//
|
||||
// Remove the inner border and padding in Firefox.
|
||||
//
|
||||
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
//
|
||||
// Restore the focus styles unset by the previous rule.
|
||||
//
|
||||
|
||||
button:-moz-focusring,
|
||||
input:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
//
|
||||
// Change the border, margin, and padding in all browsers (opinionated).
|
||||
//
|
||||
|
||||
fieldset {
|
||||
border: 1px solid #c0c0c0;
|
||||
margin: 0 2px;
|
||||
padding: 0.35em 0.625em 0.75em;
|
||||
}
|
||||
|
||||
//
|
||||
// 1. Correct the text wrapping in Edge and IE.
|
||||
// 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
// 3. Remove the padding so developers are not caught out when they zero out
|
||||
// `fieldset` elements in all browsers.
|
||||
//
|
||||
|
||||
legend {
|
||||
box-sizing: border-box; // 1
|
||||
color: inherit; // 2
|
||||
display: table; // 1
|
||||
max-width: 100%; // 1
|
||||
padding: 0; // 3
|
||||
white-space: normal; // 1
|
||||
}
|
||||
|
||||
//
|
||||
// Remove the default vertical scrollbar in IE.
|
||||
//
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
//
|
||||
// 1. Add the correct box sizing in IE 10-.
|
||||
// 2. Remove the padding in IE 10-.
|
||||
//
|
||||
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
box-sizing: border-box; // 1
|
||||
padding: 0; // 2
|
||||
}
|
||||
|
||||
//
|
||||
// Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
//
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
//
|
||||
// Correct the odd appearance of search inputs in Chrome and Safari.
|
||||
//
|
||||
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield;
|
||||
}
|
||||
|
||||
//
|
||||
// Remove the inner padding and cancel buttons in Chrome on OS X and
|
||||
// Safari on OS X.
|
||||
//
|
||||
|
||||
[type="search"]::-webkit-search-cancel-button,
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
@ -1,14 +1,39 @@
|
||||
.pagination {
|
||||
display: inline-block;
|
||||
padding-left: 0;
|
||||
margin-top: $spacer-y;
|
||||
margin-bottom: $spacer-y;
|
||||
display: flex;
|
||||
@include list-unstyled();
|
||||
@include border-radius();
|
||||
}
|
||||
|
||||
.page-item {
|
||||
display: inline; // Remove list-style and block-level defaults
|
||||
.page-link {
|
||||
position: relative;
|
||||
display: block;
|
||||
padding: $pagination-padding-y $pagination-padding-x;
|
||||
margin-left: -$pagination-border-width;
|
||||
line-height: $pagination-line-height;
|
||||
color: $pagination-color;
|
||||
background-color: $pagination-bg;
|
||||
border: $pagination-border-width solid $pagination-border-color;
|
||||
|
||||
&:hover {
|
||||
color: $pagination-hover-color;
|
||||
text-decoration: none;
|
||||
background-color: $pagination-hover-bg;
|
||||
border-color: $pagination-hover-border-color;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
z-index: 2;
|
||||
outline: 0;
|
||||
box-shadow: $pagination-focus-box-shadow;
|
||||
}
|
||||
|
||||
// Opinionated: add "hand" cursor to non-disabled .page-link elements
|
||||
&:not(:disabled):not(.disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.page-item {
|
||||
&:first-child {
|
||||
.page-link {
|
||||
margin-left: 0;
|
||||
@ -22,40 +47,19 @@
|
||||
}
|
||||
|
||||
&.active .page-link {
|
||||
@include plain-hover-focus {
|
||||
z-index: 2;
|
||||
color: $pagination-active-color;
|
||||
cursor: default;
|
||||
background-color: $pagination-active-bg;
|
||||
border-color: $pagination-active-border;
|
||||
}
|
||||
z-index: 1;
|
||||
color: $pagination-active-color;
|
||||
background-color: $pagination-active-bg;
|
||||
border-color: $pagination-active-border-color;
|
||||
}
|
||||
|
||||
&.disabled .page-link {
|
||||
@include plain-hover-focus {
|
||||
color: $pagination-disabled-color;
|
||||
pointer-events: none;
|
||||
cursor: $cursor-disabled;
|
||||
background-color: $pagination-disabled-bg;
|
||||
border-color: $pagination-disabled-border;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.page-link {
|
||||
position: relative;
|
||||
float: left; // Collapse white-space
|
||||
padding: $pagination-padding-y $pagination-padding-x;
|
||||
margin-left: -1px;
|
||||
color: $pagination-color;
|
||||
text-decoration: none;
|
||||
background-color: $pagination-bg;
|
||||
border: $pagination-border-width solid $pagination-border-color;
|
||||
|
||||
@include hover-focus {
|
||||
color: $pagination-hover-color;
|
||||
background-color: $pagination-hover-bg;
|
||||
border-color: $pagination-hover-border;
|
||||
color: $pagination-disabled-color;
|
||||
pointer-events: none;
|
||||
// Opinionated: remove the "hand" cursor set previously for .page-link
|
||||
cursor: auto;
|
||||
background-color: $pagination-disabled-bg;
|
||||
border-color: $pagination-disabled-border-color;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6,144 +6,180 @@
|
||||
z-index: $zindex-popover;
|
||||
display: block;
|
||||
max-width: $popover-max-width;
|
||||
padding: $popover-inner-padding;
|
||||
// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
|
||||
// So reset our font and text properties to avoid inheriting weird values.
|
||||
@include reset-text();
|
||||
font-size: $font-size-sm;
|
||||
font-size: $popover-font-size;
|
||||
// Allow breaking very long words so they don't overflow the popover's bounds
|
||||
word-wrap: break-word;
|
||||
background-color: $popover-bg;
|
||||
background-clip: padding-box;
|
||||
border: $popover-border-width solid $popover-border-color;
|
||||
@include border-radius($border-radius-lg);
|
||||
@include border-radius($popover-border-radius);
|
||||
@include box-shadow($popover-box-shadow);
|
||||
|
||||
.arrow {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: $popover-arrow-width;
|
||||
height: $popover-arrow-height;
|
||||
margin: 0 $border-radius-lg;
|
||||
|
||||
// Popover directions
|
||||
|
||||
&.popover-top,
|
||||
&.bs-tether-element-attached-bottom {
|
||||
margin-top: -$popover-arrow-width;
|
||||
|
||||
.popover-arrow {
|
||||
bottom: -$popover-arrow-outer-width;
|
||||
left: 50%;
|
||||
margin-left: -$popover-arrow-outer-width;
|
||||
border-top-color: $popover-arrow-outer-color;
|
||||
border-bottom-width: 0;
|
||||
&::after {
|
||||
bottom: 1px;
|
||||
margin-left: -$popover-arrow-width;
|
||||
content: "";
|
||||
border-top-color: $popover-arrow-color;
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
&::before,
|
||||
&::after {
|
||||
position: absolute;
|
||||
display: block;
|
||||
content: "";
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.popover-right,
|
||||
&.bs-tether-element-attached-left {
|
||||
margin-left: $popover-arrow-width;
|
||||
.bs-popover-top {
|
||||
margin-bottom: $popover-arrow-height;
|
||||
|
||||
.popover-arrow {
|
||||
top: 50%;
|
||||
left: -$popover-arrow-outer-width;
|
||||
margin-top: -$popover-arrow-outer-width;
|
||||
border-right-color: $popover-arrow-outer-color;
|
||||
border-left-width: 0;
|
||||
&::after {
|
||||
bottom: -$popover-arrow-width;
|
||||
left: 1px;
|
||||
content: "";
|
||||
border-right-color: $popover-arrow-color;
|
||||
border-left-width: 0;
|
||||
}
|
||||
}
|
||||
.arrow {
|
||||
bottom: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
|
||||
}
|
||||
|
||||
&.popover-bottom,
|
||||
&.bs-tether-element-attached-top {
|
||||
margin-top: $popover-arrow-width;
|
||||
|
||||
.popover-arrow {
|
||||
top: -$popover-arrow-outer-width;
|
||||
left: 50%;
|
||||
margin-left: -$popover-arrow-outer-width;
|
||||
border-top-width: 0;
|
||||
border-bottom-color: $popover-arrow-outer-color;
|
||||
&::after {
|
||||
top: 1px;
|
||||
margin-left: -$popover-arrow-width;
|
||||
content: "";
|
||||
border-top-width: 0;
|
||||
border-bottom-color: $popover-arrow-color;
|
||||
}
|
||||
}
|
||||
.arrow::before,
|
||||
.arrow::after {
|
||||
border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
|
||||
}
|
||||
|
||||
&.popover-left,
|
||||
&.bs-tether-element-attached-right {
|
||||
margin-left: -$popover-arrow-width;
|
||||
.arrow::before {
|
||||
bottom: 0;
|
||||
border-top-color: $popover-arrow-outer-color;
|
||||
}
|
||||
|
||||
.popover-arrow {
|
||||
top: 50%;
|
||||
right: -$popover-arrow-outer-width;
|
||||
margin-top: -$popover-arrow-outer-width;
|
||||
border-right-width: 0;
|
||||
border-left-color: $popover-arrow-outer-color;
|
||||
&::after {
|
||||
right: 1px;
|
||||
bottom: -$popover-arrow-width;
|
||||
content: "";
|
||||
border-right-width: 0;
|
||||
border-left-color: $popover-arrow-color;
|
||||
}
|
||||
}
|
||||
.arrow::after {
|
||||
bottom: $popover-border-width;
|
||||
border-top-color: $popover-arrow-color;
|
||||
}
|
||||
}
|
||||
|
||||
.bs-popover-right {
|
||||
margin-left: $popover-arrow-height;
|
||||
|
||||
.arrow {
|
||||
left: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
|
||||
width: $popover-arrow-height;
|
||||
height: $popover-arrow-width;
|
||||
margin: $border-radius-lg 0; // make sure the arrow does not touch the popover's rounded corners
|
||||
}
|
||||
|
||||
.arrow::before,
|
||||
.arrow::after {
|
||||
border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
|
||||
}
|
||||
|
||||
.arrow::before {
|
||||
left: 0;
|
||||
border-right-color: $popover-arrow-outer-color;
|
||||
}
|
||||
|
||||
.arrow::after {
|
||||
left: $popover-border-width;
|
||||
border-right-color: $popover-arrow-color;
|
||||
}
|
||||
}
|
||||
|
||||
.bs-popover-bottom {
|
||||
margin-top: $popover-arrow-height;
|
||||
|
||||
.arrow {
|
||||
top: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
|
||||
}
|
||||
|
||||
.arrow::before,
|
||||
.arrow::after {
|
||||
border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
|
||||
}
|
||||
|
||||
.arrow::before {
|
||||
top: 0;
|
||||
border-bottom-color: $popover-arrow-outer-color;
|
||||
}
|
||||
|
||||
.arrow::after {
|
||||
top: $popover-border-width;
|
||||
border-bottom-color: $popover-arrow-color;
|
||||
}
|
||||
|
||||
// This will remove the popover-header's border just below the arrow
|
||||
.popover-header::before {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
display: block;
|
||||
width: $popover-arrow-width;
|
||||
margin-left: ($popover-arrow-width / -2);
|
||||
content: "";
|
||||
border-bottom: $popover-border-width solid $popover-header-bg;
|
||||
}
|
||||
}
|
||||
|
||||
.bs-popover-left {
|
||||
margin-right: $popover-arrow-height;
|
||||
|
||||
.arrow {
|
||||
right: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
|
||||
width: $popover-arrow-height;
|
||||
height: $popover-arrow-width;
|
||||
margin: $border-radius-lg 0; // make sure the arrow does not touch the popover's rounded corners
|
||||
}
|
||||
|
||||
.arrow::before,
|
||||
.arrow::after {
|
||||
border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
|
||||
}
|
||||
|
||||
.arrow::before {
|
||||
right: 0;
|
||||
border-left-color: $popover-arrow-outer-color;
|
||||
}
|
||||
|
||||
.arrow::after {
|
||||
right: $popover-border-width;
|
||||
border-left-color: $popover-arrow-color;
|
||||
}
|
||||
}
|
||||
|
||||
.bs-popover-auto {
|
||||
&[x-placement^="top"] {
|
||||
@extend .bs-popover-top;
|
||||
}
|
||||
&[x-placement^="right"] {
|
||||
@extend .bs-popover-right;
|
||||
}
|
||||
&[x-placement^="bottom"] {
|
||||
@extend .bs-popover-bottom;
|
||||
}
|
||||
&[x-placement^="left"] {
|
||||
@extend .bs-popover-left;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Offset the popover to account for the popover arrow
|
||||
.popover-title {
|
||||
padding: $popover-title-padding-y $popover-title-padding-x;
|
||||
margin: 0; // reset heading margin
|
||||
.popover-header {
|
||||
padding: $popover-header-padding-y $popover-header-padding-x;
|
||||
margin-bottom: 0; // Reset the default from Reboot
|
||||
font-size: $font-size-base;
|
||||
background-color: $popover-title-bg;
|
||||
border-bottom: $popover-border-width solid darken($popover-title-bg, 5%);
|
||||
$offset-border-width: ($border-width / $font-size-root);
|
||||
@include border-radius(($border-radius-lg - $offset-border-width) ($border-radius-lg - $offset-border-width) 0 0);
|
||||
color: $popover-header-color;
|
||||
background-color: $popover-header-bg;
|
||||
border-bottom: $popover-border-width solid darken($popover-header-bg, 5%);
|
||||
$offset-border-width: calc(#{$border-radius-lg} - #{$popover-border-width});
|
||||
@include border-top-radius($offset-border-width);
|
||||
|
||||
&:empty {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.popover-content {
|
||||
padding: $popover-content-padding-y $popover-content-padding-x;
|
||||
}
|
||||
|
||||
|
||||
// Arrows
|
||||
//
|
||||
// .popover-arrow is outer, .popover-arrow::after is inner
|
||||
|
||||
.popover-arrow {
|
||||
&,
|
||||
&::after {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
}
|
||||
}
|
||||
.popover-arrow {
|
||||
border-width: $popover-arrow-outer-width;
|
||||
.popover-body {
|
||||
padding: $popover-body-padding-y $popover-body-padding-x;
|
||||
color: $popover-body-color;
|
||||
}
|
||||
/* rtl:end:ignore */
|
||||
.popover-arrow::after {
|
||||
content: "";
|
||||
border-width: $popover-arrow-width;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// scss-lint:disable QualifyingElement
|
||||
// stylelint-disable declaration-no-important, selector-no-qualifying-type
|
||||
|
||||
// Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css
|
||||
|
||||
@ -12,20 +12,18 @@
|
||||
@media print {
|
||||
*,
|
||||
*::before,
|
||||
*::after,
|
||||
*::first-letter,
|
||||
*::first-line {
|
||||
*::after {
|
||||
// Bootstrap specific; comment out `color` and `background`
|
||||
//color: #000 !important; // Black prints faster:
|
||||
// http://www.sanbeiji.com/archives/953
|
||||
//color: #000 !important; // Black prints faster: http://www.sanbeiji.com/archives/953
|
||||
text-shadow: none !important;
|
||||
//background: transparent !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
a,
|
||||
a:visited {
|
||||
text-decoration: underline;
|
||||
a {
|
||||
&:not(.btn) {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
// Bootstrap specific; comment the following selector out
|
||||
@ -45,9 +43,12 @@
|
||||
|
||||
//a[href^="#"]::after,
|
||||
//a[href^="javascript:"]::after {
|
||||
// content: "";
|
||||
// content: "";
|
||||
//}
|
||||
|
||||
pre {
|
||||
white-space: pre-wrap !important;
|
||||
}
|
||||
pre,
|
||||
blockquote {
|
||||
border: $border-width solid #999; // Bootstrap custom code; using `$border-width` instead of 1px
|
||||
@ -82,17 +83,24 @@
|
||||
|
||||
// Bootstrap specific changes start
|
||||
|
||||
// Specify a size and min-width to make printing closer across browsers.
|
||||
// We don't set margin here because it breaks `size` in Chrome. We also
|
||||
// don't use `!important` on `size` as it breaks in Chrome.
|
||||
@page {
|
||||
size: $print-page-size;
|
||||
}
|
||||
body {
|
||||
min-width: $print-body-min-width !important;
|
||||
}
|
||||
.container {
|
||||
min-width: $print-body-min-width !important;
|
||||
}
|
||||
|
||||
// Bootstrap components
|
||||
.navbar {
|
||||
display: none;
|
||||
}
|
||||
.btn,
|
||||
.dropup > .btn {
|
||||
> .caret {
|
||||
border-top-color: #000 !important;
|
||||
}
|
||||
}
|
||||
.tag {
|
||||
.badge {
|
||||
border: $border-width solid #000;
|
||||
}
|
||||
|
||||
|
@ -1,145 +1,33 @@
|
||||
//
|
||||
// Progress animations
|
||||
//
|
||||
|
||||
@keyframes progress-bar-stripes {
|
||||
from { background-position: $spacer-y 0; }
|
||||
from { background-position: $progress-height 0; }
|
||||
to { background-position: 0 0; }
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Basic progress bar
|
||||
//
|
||||
|
||||
.progress {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: $spacer-y; // todo: make a new var for this
|
||||
margin-bottom: $spacer-y;
|
||||
}
|
||||
.progress[value] {
|
||||
// Set overall background
|
||||
background-color: $progress-bg;
|
||||
// Remove Firefox and Opera border
|
||||
border: 0;
|
||||
// Reset the default appearance
|
||||
appearance: none;
|
||||
// Set overall border radius
|
||||
@include border-radius($progress-border-radius);
|
||||
}
|
||||
|
||||
// Filled-in portion of the bar
|
||||
.progress[value]::-ms-fill {
|
||||
background-color: $progress-bar-color;
|
||||
// Remove right-hand border of value bar from IE10+/Edge
|
||||
border: 0;
|
||||
}
|
||||
.progress[value]::-moz-progress-bar {
|
||||
background-color: $progress-bar-color;
|
||||
@include border-left-radius($progress-border-radius);
|
||||
}
|
||||
.progress[value]::-webkit-progress-value {
|
||||
background-color: $progress-bar-color;
|
||||
@include border-left-radius($progress-border-radius);
|
||||
}
|
||||
// Tweaks for full progress bar
|
||||
.progress[value="100"]::-moz-progress-bar {
|
||||
@include border-right-radius($progress-border-radius);
|
||||
}
|
||||
.progress[value="100"]::-webkit-progress-value {
|
||||
@include border-right-radius($progress-border-radius);
|
||||
}
|
||||
|
||||
// Unfilled portion of the bar
|
||||
.progress[value]::-webkit-progress-bar {
|
||||
background-color: $progress-bg;
|
||||
@include border-radius($progress-border-radius);
|
||||
@include box-shadow($progress-box-shadow);
|
||||
}
|
||||
base::-moz-progress-bar, // Absurd-but-syntactically-valid selector to make these styles Firefox-only
|
||||
.progress[value] {
|
||||
display: flex;
|
||||
height: $progress-height;
|
||||
overflow: hidden; // force rounded corners by cropping it
|
||||
font-size: $progress-font-size;
|
||||
background-color: $progress-bg;
|
||||
@include border-radius($progress-border-radius);
|
||||
@include box-shadow($progress-box-shadow);
|
||||
}
|
||||
|
||||
// IE9 hacks to accompany custom markup. We don't need to scope this via media queries, but I feel better doing it anyway.
|
||||
@media screen and (min-width:0\0) {
|
||||
.progress {
|
||||
background-color: $progress-bg;
|
||||
@include border-radius($progress-border-radius);
|
||||
@include box-shadow($progress-box-shadow);
|
||||
}
|
||||
.progress-bar {
|
||||
display: inline-block;
|
||||
height: $spacer-y;
|
||||
text-indent: -999rem; // Simulate hiding of value as in native `<progress>`
|
||||
background-color: $progress-bar-color;
|
||||
@include border-left-radius($progress-border-radius);
|
||||
}
|
||||
.progress[width="100%"] {
|
||||
@include border-right-radius($progress-border-radius);
|
||||
}
|
||||
.progress-bar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
color: $progress-bar-color;
|
||||
text-align: center;
|
||||
background-color: $progress-bar-bg;
|
||||
@include transition($progress-bar-transition);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Striped
|
||||
//
|
||||
|
||||
.progress-striped[value]::-webkit-progress-value {
|
||||
.progress-bar-striped {
|
||||
@include gradient-striped();
|
||||
background-size: $spacer-y $spacer-y;
|
||||
}
|
||||
.progress-striped[value]::-moz-progress-bar {
|
||||
@include gradient-striped();
|
||||
background-size: $spacer-y $spacer-y;
|
||||
}
|
||||
.progress-striped[value]::-ms-fill {
|
||||
@include gradient-striped();
|
||||
background-size: $spacer-y $spacer-y;
|
||||
}
|
||||
// IE9
|
||||
@media screen and (min-width:0\0) {
|
||||
.progress-bar-striped {
|
||||
@include gradient-striped();
|
||||
background-size: $spacer-y $spacer-y;
|
||||
}
|
||||
background-size: $progress-height $progress-height;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Animated
|
||||
//
|
||||
|
||||
.progress-animated[value]::-webkit-progress-value {
|
||||
animation: progress-bar-stripes 2s linear infinite;
|
||||
}
|
||||
.progress-animated[value]::-moz-progress-bar {
|
||||
animation: progress-bar-stripes 2s linear infinite;
|
||||
}
|
||||
// IE9
|
||||
@media screen and (min-width:0\0) {
|
||||
.progress-animated .progress-bar-striped {
|
||||
animation: progress-bar-stripes 2s linear infinite;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Variations
|
||||
//
|
||||
|
||||
.progress-success {
|
||||
@include progress-variant($progress-bar-success-bg);
|
||||
}
|
||||
.progress-info {
|
||||
@include progress-variant($progress-bar-info-bg);
|
||||
}
|
||||
.progress-warning {
|
||||
@include progress-variant($progress-bar-warning-bg);
|
||||
}
|
||||
.progress-danger {
|
||||
@include progress-variant($progress-bar-danger-bg);
|
||||
.progress-bar-animated {
|
||||
animation: progress-bar-stripes $progress-bar-animation-timing;
|
||||
}
|
||||
|
@ -1,82 +1,68 @@
|
||||
// scss-lint:disable QualifyingElement, DuplicateProperty
|
||||
// stylelint-disable at-rule-no-vendor-prefix, declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
|
||||
|
||||
// Reboot
|
||||
//
|
||||
// Global resets to common HTML elements and more for easier usage by Bootstrap.
|
||||
// Adds additional rules on top of Normalize.css, including several overrides.
|
||||
// Normalization of HTML elements, manually forked from Normalize.css to remove
|
||||
// styles targeting irrelevant browsers while applying new styles.
|
||||
//
|
||||
// Normalize is licensed MIT. https://github.com/necolas/normalize.css
|
||||
|
||||
|
||||
// Reset the box-sizing
|
||||
// Document
|
||||
//
|
||||
// Change from `box-sizing: content-box` to `border-box` so that when you add
|
||||
// `padding` or `border`s to an element, the overall declared `width` does not
|
||||
// change. For example, `width: 100px;` will always be `100px` despite the
|
||||
// `border: 10px solid red;` and `padding: 20px;`.
|
||||
//
|
||||
// Heads up! This reset may cause conflicts with some third-party widgets. For
|
||||
// recommendations on resolving such conflicts, see
|
||||
// http://getbootstrap.com/getting-started/#third-box-sizing.
|
||||
//
|
||||
// Credit: https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/
|
||||
|
||||
html {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
// 1. Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
|
||||
// 2. Change the default font family in all browsers.
|
||||
// 3. Correct the line height in all browsers.
|
||||
// 4. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS.
|
||||
// 5. Setting @viewport causes scrollbars to overlap content in IE11 and Edge, so
|
||||
// we force a non-overlapping, non-auto-hiding scrollbar to counteract.
|
||||
// 6. Change the default tap highlight to be completely transparent in iOS.
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: inherit;
|
||||
box-sizing: border-box; // 1
|
||||
}
|
||||
|
||||
|
||||
// Make viewport responsive
|
||||
//
|
||||
// @viewport is needed because IE 10+ doesn't honor <meta name="viewport"> in
|
||||
// some cases. See http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/.
|
||||
// Eventually @viewport will replace <meta name="viewport">.
|
||||
//
|
||||
// However, `device-width` is broken on IE 10 on Windows (Phone) 8,
|
||||
// (see http://timkadlec.com/2013/01/windows-phone-8-and-device-width/ and https://github.com/twbs/bootstrap/issues/10497)
|
||||
// and the fix for that involves a snippet of JavaScript to sniff the user agent
|
||||
// and apply some conditional CSS.
|
||||
//
|
||||
// See http://getbootstrap.com/getting-started/#support-ie10-width for the relevant hack.
|
||||
//
|
||||
// Wrap `@viewport` with `@at-root` for when folks do a nested import (e.g.,
|
||||
// `.class-name { @import "bootstrap"; }`).
|
||||
@at-root {
|
||||
@-ms-viewport { width: device-width; }
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Reset HTML, body, and more
|
||||
//
|
||||
|
||||
html {
|
||||
// Sets a specific default `font-size` for user with `rem` type scales.
|
||||
font-size: $font-size-root;
|
||||
// As a side-effect of setting the @viewport above,
|
||||
// IE11 & Edge make the scrollbar overlap the content and automatically hide itself when not in use.
|
||||
// Unfortunately, the auto-showing of the scrollbar is sometimes too sensitive,
|
||||
// thus making it hard to click on stuff near the right edge of the page.
|
||||
// So we add this style to force IE11 & Edge to use a "normal", non-overlapping, non-auto-hiding scrollbar.
|
||||
// See https://github.com/twbs/bootstrap/issues/18543
|
||||
-ms-overflow-style: scrollbar;
|
||||
// Changes the default tap highlight to be completely transparent in iOS.
|
||||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||||
font-family: sans-serif; // 2
|
||||
line-height: 1.15; // 3
|
||||
-webkit-text-size-adjust: 100%; // 4
|
||||
-ms-text-size-adjust: 100%; // 4
|
||||
-ms-overflow-style: scrollbar; // 5
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); // 6
|
||||
}
|
||||
|
||||
// IE10+ doesn't honor `<meta name="viewport">` in some cases.
|
||||
@at-root {
|
||||
@-ms-viewport {
|
||||
width: device-width;
|
||||
}
|
||||
}
|
||||
|
||||
// stylelint-disable selector-list-comma-newline-after
|
||||
// Shim for "new" HTML5 structural elements to display correctly (IE10, older browsers)
|
||||
article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section {
|
||||
display: block;
|
||||
}
|
||||
// stylelint-enable selector-list-comma-newline-after
|
||||
|
||||
// Body
|
||||
//
|
||||
// 1. Remove the margin in all browsers.
|
||||
// 2. As a best practice, apply a default `background-color`.
|
||||
// 3. Set an explicit initial text-align value so that we can later use the
|
||||
// the `inherit` value on things like `<th>` elements.
|
||||
|
||||
body {
|
||||
// Make the `body` use the `font-size-root`
|
||||
margin: 0; // 1
|
||||
font-family: $font-family-base;
|
||||
font-size: $font-size-base;
|
||||
font-weight: $font-weight-base;
|
||||
line-height: $line-height-base;
|
||||
// Go easy on the eyes and use something other than `#000` for text
|
||||
color: $body-color;
|
||||
// By default, `<body>` has no `background-color` so we set one as a best practice.
|
||||
background-color: $body-bg;
|
||||
text-align: left; // 3
|
||||
background-color: $body-bg; // 2
|
||||
}
|
||||
|
||||
// Suppress the focus outline on elements that cannot be accessed via keyboard.
|
||||
@ -85,7 +71,19 @@ body {
|
||||
//
|
||||
// Credit: https://github.com/suitcss/base
|
||||
[tabindex="-1"]:focus {
|
||||
outline: none !important;
|
||||
outline: 0 !important;
|
||||
}
|
||||
|
||||
|
||||
// Content grouping
|
||||
//
|
||||
// 1. Add the correct box sizing in Firefox.
|
||||
// 2. Show the overflow in Edge and IE.
|
||||
|
||||
hr {
|
||||
box-sizing: content-box; // 1
|
||||
height: 0; // 1
|
||||
overflow: visible; // 2
|
||||
}
|
||||
|
||||
|
||||
@ -97,10 +95,12 @@ body {
|
||||
//
|
||||
// By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
|
||||
// margin for easier control within type scales as it avoids margin collapsing.
|
||||
// stylelint-disable selector-list-comma-newline-after
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
margin-top: 0;
|
||||
margin-bottom: .5rem;
|
||||
margin-bottom: $headings-margin-bottom;
|
||||
}
|
||||
// stylelint-enable selector-list-comma-newline-after
|
||||
|
||||
// Reset margins on paragraphs
|
||||
//
|
||||
@ -108,15 +108,22 @@ h1, h2, h3, h4, h5, h6 {
|
||||
// bottom margin to use `rem` units instead of `em`.
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
margin-bottom: $paragraph-margin-bottom;
|
||||
}
|
||||
|
||||
// Abbreviations and acronyms
|
||||
// Abbreviations
|
||||
//
|
||||
// 1. Remove the bottom border in Firefox 39-.
|
||||
// 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
// 3. Add explicit cursor to indicate changed behavior.
|
||||
// 4. Duplicate behavior to the data-* attribute for our tooltip plugin
|
||||
|
||||
abbr[title],
|
||||
// Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257
|
||||
abbr[data-original-title] {
|
||||
cursor: help;
|
||||
border-bottom: 1px dotted $abbr-border-color;
|
||||
abbr[data-original-title] { // 4
|
||||
text-decoration: underline; // 2
|
||||
text-decoration: underline dotted; // 2
|
||||
cursor: help; // 3
|
||||
border-bottom: 0; // 1
|
||||
}
|
||||
|
||||
address {
|
||||
@ -152,6 +159,37 @@ blockquote {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
dfn {
|
||||
font-style: italic; // Add the correct font style in Android 4.3-
|
||||
}
|
||||
|
||||
// stylelint-disable font-weight-notation
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder; // Add the correct font weight in Chrome, Edge, and Safari
|
||||
}
|
||||
// stylelint-enable font-weight-notation
|
||||
|
||||
small {
|
||||
font-size: 80%; // Add the correct font size in all browsers
|
||||
}
|
||||
|
||||
//
|
||||
// Prevent `sub` and `sup` elements from affecting the line height in
|
||||
// all browsers.
|
||||
//
|
||||
|
||||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub { bottom: -.25em; }
|
||||
sup { top: -.5em; }
|
||||
|
||||
|
||||
//
|
||||
// Links
|
||||
@ -160,15 +198,13 @@ blockquote {
|
||||
a {
|
||||
color: $link-color;
|
||||
text-decoration: $link-decoration;
|
||||
background-color: transparent; // Remove the gray background on active links in IE 10.
|
||||
-webkit-text-decoration-skip: objects; // Remove gaps in links underline in iOS 8+ and Safari 8+.
|
||||
|
||||
@include hover-focus {
|
||||
@include hover {
|
||||
color: $link-hover-color;
|
||||
text-decoration: $link-hover-decoration;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
@include tab-focus();
|
||||
}
|
||||
}
|
||||
|
||||
// And undo these styles for placeholder links/named anchors (without href)
|
||||
@ -187,7 +223,7 @@ a:not([href]):not([tabindex]) {
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
outline: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -196,13 +232,26 @@ a:not([href]):not([tabindex]) {
|
||||
// Code
|
||||
//
|
||||
|
||||
// stylelint-disable font-family-no-duplicate-names
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace, monospace; // Correct the inheritance and scaling of font size in all browsers.
|
||||
font-size: 1em; // Correct the odd `em` font sizing in all browsers.
|
||||
}
|
||||
// stylelint-enable font-family-no-duplicate-names
|
||||
|
||||
pre {
|
||||
// Remove browser default top margin
|
||||
margin-top: 0;
|
||||
// Reset browser default of `1em` to use `rem`s
|
||||
margin-bottom: 1rem;
|
||||
// Normalize v4 removed this property, causing `<pre>` content to break out of wrapping code snippets
|
||||
// Don't allow content to break outside
|
||||
overflow: auto;
|
||||
// We have @viewport set which causes scrollbars to overlap content in IE11 and Edge, so
|
||||
// we force a non-overlapping, non-auto-hiding scrollbar to counteract.
|
||||
-ms-overflow-style: scrollbar;
|
||||
}
|
||||
|
||||
|
||||
@ -211,56 +260,22 @@ pre {
|
||||
//
|
||||
|
||||
figure {
|
||||
// Normalize adds `margin` to `figure`s as browsers apply it inconsistently.
|
||||
// We reset that to create a better flow in-page.
|
||||
// Apply a consistent margin strategy (matches our type styles).
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Images
|
||||
// Images and content
|
||||
//
|
||||
|
||||
img {
|
||||
// By default, `<img>`s are `inline-block`. This assumes that, and vertically
|
||||
// centers them. This won't apply should you reset them to `block` level.
|
||||
vertical-align: middle;
|
||||
// Note: `<img>`s are deliberately not made responsive by default.
|
||||
// For the rationale behind this, see the comments on the `.img-fluid` class.
|
||||
border-style: none; // Remove the border on images inside links in IE 10-.
|
||||
}
|
||||
|
||||
|
||||
// iOS "clickable elements" fix for role="button"
|
||||
//
|
||||
// Fixes "clickability" issue (and more generally, the firing of events such as focus as well)
|
||||
// for traditionally non-focusable elements with role="button"
|
||||
// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
|
||||
|
||||
[role="button"] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
// Avoid 300ms click delay on touch devices that support the `touch-action` CSS property.
|
||||
//
|
||||
// In particular, unlike most other browsers, IE11+Edge on Windows 10 on touch devices and IE Mobile 10-11
|
||||
// DON'T remove the click delay when `<meta name="viewport" content="width=device-width">` is present.
|
||||
// However, they DO support removing the click delay via `touch-action: manipulation`.
|
||||
// See:
|
||||
// * http://v4-alpha.getbootstrap.com/content/reboot/#click-delay-optimization-for-touch
|
||||
// * http://caniuse.com/#feat=css-touch-action
|
||||
// * http://patrickhlauke.github.io/touch/tests/results/#suppressing-300ms-delay
|
||||
|
||||
a,
|
||||
area,
|
||||
button,
|
||||
[role="button"],
|
||||
input,
|
||||
label,
|
||||
select,
|
||||
summary,
|
||||
textarea {
|
||||
touch-action: manipulation;
|
||||
svg:not(:root) {
|
||||
overflow: hidden; // Hide the overflow in IE
|
||||
}
|
||||
|
||||
|
||||
@ -269,10 +284,7 @@ textarea {
|
||||
//
|
||||
|
||||
table {
|
||||
// No longer part of Normalize since v4
|
||||
border-collapse: collapse;
|
||||
// Reset for nesting within parents with `background-color`.
|
||||
background-color: $table-bg;
|
||||
border-collapse: collapse; // Prevent double borders
|
||||
}
|
||||
|
||||
caption {
|
||||
@ -284,8 +296,9 @@ caption {
|
||||
}
|
||||
|
||||
th {
|
||||
// Centered by default, but left-align-ed to match the `td`s below.
|
||||
text-align: left;
|
||||
// Matches default `<td>` alignment by inheriting from the `<body>`, or the
|
||||
// closest parent with a set `text-align`.
|
||||
text-align: inherit;
|
||||
}
|
||||
|
||||
|
||||
@ -299,6 +312,13 @@ label {
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
|
||||
// Remove the default `border-radius` that macOS Chrome adds.
|
||||
//
|
||||
// Details at https://github.com/twbs/bootstrap/issues/24093
|
||||
button {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
// Work around a Firefox/IE bug where the transparent `button` background
|
||||
// results in a loss of the default `button` focus styles.
|
||||
//
|
||||
@ -311,25 +331,47 @@ button:focus {
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
optgroup,
|
||||
textarea {
|
||||
// Remove all `margin`s so our classes don't have to do it themselves.
|
||||
margin: 0;
|
||||
// Normalize includes `font: inherit;`, so `font-family`. `font-size`, etc are
|
||||
// properly inherited. However, `line-height` isn't addressed there. Using this
|
||||
// ensures we don't need to unnecessarily redeclare the global font stack.
|
||||
margin: 0; // Remove the margin in Firefox and Safari
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
// iOS adds rounded borders by default
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button,
|
||||
input {
|
||||
overflow: visible; // Show the overflow in Edge
|
||||
}
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none; // Remove the inheritance of text transform in Firefox
|
||||
}
|
||||
|
||||
// 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
|
||||
// controls in Android 4.
|
||||
// 2. Correct the inability to style clickable types in iOS and Safari.
|
||||
button,
|
||||
html [type="button"], // 1
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button; // 2
|
||||
}
|
||||
|
||||
// Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
input[type="radio"],
|
||||
input[type="checkbox"] {
|
||||
// Apply a disabled cursor for radios and checkboxes.
|
||||
//
|
||||
// Note: Neither radios nor checkboxes can be readonly.
|
||||
&:disabled {
|
||||
cursor: $cursor-disabled;
|
||||
}
|
||||
box-sizing: border-box; // 1. Add the correct box sizing in IE 10-
|
||||
padding: 0; // 2. Remove the padding in IE 10-
|
||||
}
|
||||
|
||||
|
||||
@ -340,20 +382,23 @@ input[type="month"] {
|
||||
// Remove the default appearance of temporal inputs to avoid a Mobile Safari
|
||||
// bug where setting a custom line-height prevents text from being vertically
|
||||
// centered within the input.
|
||||
//
|
||||
// Bug report: https://github.com/twbs/bootstrap/issues/11266
|
||||
// See https://bugs.webkit.org/show_bug.cgi?id=139848
|
||||
// and https://github.com/twbs/bootstrap/issues/11266
|
||||
-webkit-appearance: listbox;
|
||||
}
|
||||
|
||||
textarea {
|
||||
overflow: auto; // Remove the default vertical scrollbar in IE.
|
||||
// Textareas should really only resize vertically so they don't break their (horizontal) containers.
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
// Chrome and Firefox set a `min-width: min-content;` on fieldsets,
|
||||
// so we reset that to ensure it behaves more like a standard block element.
|
||||
// See https://github.com/twbs/bootstrap/issues/12359.
|
||||
// Browsers set a default `min-width: min-content;` on fieldsets,
|
||||
// unlike e.g. `<div>`s, which have `min-width: 0;` by default.
|
||||
// So we reset that to ensure fieldsets behave more like a standard block element.
|
||||
// See https://github.com/twbs/bootstrap/issues/12359
|
||||
// and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
|
||||
min-width: 0;
|
||||
// Reset the default outline behavior of fieldsets so they don't affect page layout.
|
||||
padding: 0;
|
||||
@ -361,33 +406,77 @@ fieldset {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
// 1. Correct the text wrapping in Edge and IE.
|
||||
// 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
legend {
|
||||
// Reset the entire legend element to match the `fieldset`
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-width: 100%; // 1
|
||||
padding: 0;
|
||||
margin-bottom: .5rem;
|
||||
font-size: 1.5rem;
|
||||
line-height: inherit;
|
||||
color: inherit; // 2
|
||||
white-space: normal; // 1
|
||||
}
|
||||
|
||||
input[type="search"] {
|
||||
progress {
|
||||
vertical-align: baseline; // Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
}
|
||||
|
||||
// Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
[type="search"] {
|
||||
// This overrides the extra rounded corners on search inputs in iOS so that our
|
||||
// `.form-control` class can properly style them. Note that this cannot simply
|
||||
// be added to `.form-control` as it's not specific enough. For details, see
|
||||
// https://github.com/twbs/bootstrap/issues/11586.
|
||||
outline-offset: -2px; // 2. Correct the outline style in Safari.
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
// todo: needed?
|
||||
//
|
||||
// Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
|
||||
//
|
||||
|
||||
[type="search"]::-webkit-search-cancel-button,
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
//
|
||||
// 1. Correct the inability to style clickable types in iOS and Safari.
|
||||
// 2. Change font properties to `inherit` in Safari.
|
||||
//
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
font: inherit; // 2
|
||||
-webkit-appearance: button; // 1
|
||||
}
|
||||
|
||||
//
|
||||
// Correct element displays
|
||||
//
|
||||
|
||||
output {
|
||||
display: inline-block;
|
||||
// font-size: $font-size-base;
|
||||
// line-height: $line-height;
|
||||
// color: $input-color;
|
||||
}
|
||||
|
||||
summary {
|
||||
display: list-item; // Add the correct display in all browsers
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
template {
|
||||
display: none; // Add the correct display in IE
|
||||
}
|
||||
|
||||
// Always hide an element with the `hidden` HTML attribute (from PureCSS).
|
||||
// Needed for proper display in IE 10-.
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
19
theme/boost/scss/bootstrap/_root.scss
Normal file
19
theme/boost/scss/bootstrap/_root.scss
Normal file
@ -0,0 +1,19 @@
|
||||
:root {
|
||||
// Custom variable values only support SassScript inside `#{}`.
|
||||
@each $color, $value in $colors {
|
||||
--#{$color}: #{$value};
|
||||
}
|
||||
|
||||
@each $color, $value in $theme-colors {
|
||||
--#{$color}: #{$value};
|
||||
}
|
||||
|
||||
@each $bp, $value in $grid-breakpoints {
|
||||
--breakpoint-#{$bp}: #{$value};
|
||||
}
|
||||
|
||||
// Use `inspect` for lists so that quoted items keep the quotes.
|
||||
// See https://github.com/sass/sass/issues/2383#issuecomment-336349172
|
||||
--font-family-sans-serif: #{inspect($font-family-sans-serif)};
|
||||
--font-family-monospace: #{inspect($font-family-monospace)};
|
||||
}
|
@ -6,6 +6,7 @@
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
margin-bottom: $spacer;
|
||||
background-color: $table-bg; // Reset for nesting within parents with `background-color`.
|
||||
|
||||
th,
|
||||
td {
|
||||
@ -36,7 +37,7 @@
|
||||
.table-sm {
|
||||
th,
|
||||
td {
|
||||
padding: $table-sm-cell-padding;
|
||||
padding: $table-cell-padding-sm;
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,7 +69,7 @@
|
||||
|
||||
.table-striped {
|
||||
tbody tr:nth-of-type(odd) {
|
||||
background-color: $table-bg-accent;
|
||||
background-color: $table-accent-bg;
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,7 +81,7 @@
|
||||
.table-hover {
|
||||
tbody tr {
|
||||
@include hover {
|
||||
background-color: $table-bg-hover;
|
||||
background-color: $table-hover-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -91,106 +92,89 @@
|
||||
// Exact selectors below required to override `.table-striped` and prevent
|
||||
// inheritance to nested tables.
|
||||
|
||||
// Generate the contextual variants
|
||||
@include table-row-variant(active, $table-bg-active);
|
||||
@include table-row-variant(success, $state-success-bg);
|
||||
@include table-row-variant(info, $state-info-bg);
|
||||
@include table-row-variant(warning, $state-warning-bg);
|
||||
@include table-row-variant(danger, $state-danger-bg);
|
||||
@each $color, $value in $theme-colors {
|
||||
@include table-row-variant($color, theme-color-level($color, -9));
|
||||
}
|
||||
|
||||
@include table-row-variant(active, $table-active-bg);
|
||||
|
||||
|
||||
// Inverse styles
|
||||
// Dark styles
|
||||
//
|
||||
// Same table markup, but inverted color scheme: dark background and light text.
|
||||
|
||||
.thead-inverse {
|
||||
th {
|
||||
color: #fff;
|
||||
background-color: $gray-dark;
|
||||
// stylelint-disable-next-line no-duplicate-selectors
|
||||
.table {
|
||||
.thead-dark {
|
||||
th {
|
||||
color: $table-dark-color;
|
||||
background-color: $table-dark-bg;
|
||||
border-color: $table-dark-border-color;
|
||||
}
|
||||
}
|
||||
|
||||
.thead-light {
|
||||
th {
|
||||
color: $table-head-color;
|
||||
background-color: $table-head-bg;
|
||||
border-color: $table-border-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.thead-default {
|
||||
th {
|
||||
color: $gray;
|
||||
background-color: $gray-lighter;
|
||||
}
|
||||
}
|
||||
|
||||
.table-inverse {
|
||||
color: $gray-lighter;
|
||||
background-color: $gray-dark;
|
||||
.table-dark {
|
||||
color: $table-dark-color;
|
||||
background-color: $table-dark-bg;
|
||||
|
||||
th,
|
||||
td,
|
||||
thead th {
|
||||
border-color: $gray;
|
||||
border-color: $table-dark-border-color;
|
||||
}
|
||||
|
||||
&.table-bordered {
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.table-striped {
|
||||
tbody tr:nth-of-type(odd) {
|
||||
background-color: $table-dark-accent-bg;
|
||||
}
|
||||
}
|
||||
|
||||
&.table-hover {
|
||||
tbody tr {
|
||||
@include hover {
|
||||
background-color: $table-dark-hover-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Responsive tables
|
||||
//
|
||||
// Wrap your tables in `.table-responsive` and we'll make them mobile friendly
|
||||
// by enabling horizontal scrolling. Only applies <768px. Everything above that
|
||||
// will display normally.
|
||||
// Generate series of `.table-responsive-*` classes for configuring the screen
|
||||
// size of where your table will overflow.
|
||||
|
||||
.table-responsive {
|
||||
display: block;
|
||||
width: 100%;
|
||||
min-height: .01%; // Workaround for IE9 bug (see https://github.com/twbs/bootstrap/issues/14837)
|
||||
overflow-x: auto;
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
$next: breakpoint-next($breakpoint, $grid-breakpoints);
|
||||
$infix: breakpoint-infix($next, $grid-breakpoints);
|
||||
|
||||
// TODO: find out if we need this still.
|
||||
//
|
||||
// border: $table-border-width solid $table-border-color;
|
||||
// -ms-overflow-style: -ms-autohiding-scrollbar; // See https://github.com/twbs/bootstrap/pull/10057
|
||||
}
|
||||
&#{$infix} {
|
||||
@include media-breakpoint-down($breakpoint) {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
-ms-overflow-style: -ms-autohiding-scrollbar; // See https://github.com/twbs/bootstrap/pull/10057
|
||||
|
||||
|
||||
.table-reflow {
|
||||
thead {
|
||||
float: left;
|
||||
}
|
||||
|
||||
tbody {
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
border-top: $table-border-width solid $table-border-color;
|
||||
border-left: $table-border-width solid $table-border-color;
|
||||
|
||||
&:last-child {
|
||||
border-right: $table-border-width solid $table-border-color;
|
||||
}
|
||||
}
|
||||
|
||||
thead,
|
||||
tbody,
|
||||
tfoot {
|
||||
&:last-child {
|
||||
tr:last-child th,
|
||||
tr:last-child td {
|
||||
border-bottom: $table-border-width solid $table-border-color;
|
||||
// Prevent double border on horizontal scroll due to use of `display: block;`
|
||||
> .table-bordered {
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tr {
|
||||
float: left;
|
||||
|
||||
th,
|
||||
td {
|
||||
display: block !important;
|
||||
border: $table-border-width solid $table-border-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,77 +0,0 @@
|
||||
// Base class
|
||||
//
|
||||
// Requires one of the contextual, color modifier classes for `color` and
|
||||
// `background-color`.
|
||||
|
||||
.tag {
|
||||
display: inline-block;
|
||||
padding: $tag-padding-y $tag-padding-x;
|
||||
font-size: $tag-font-size;
|
||||
font-weight: $tag-font-weight;
|
||||
line-height: 1;
|
||||
color: $tag-color;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: baseline;
|
||||
@include border-radius();
|
||||
|
||||
// Empty tags collapse automatically
|
||||
&:empty {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Quick fix for tags in buttons
|
||||
.btn .tag {
|
||||
position: relative;
|
||||
top: -1px;
|
||||
}
|
||||
|
||||
// scss-lint:disable QualifyingElement
|
||||
// Add hover effects, but only for links
|
||||
a.tag {
|
||||
@include hover-focus {
|
||||
color: $tag-link-hover-color;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
// scss-lint:enable QualifyingElement
|
||||
|
||||
// Pill tags
|
||||
//
|
||||
// Make them extra rounded with a modifier to replace v3's badges.
|
||||
|
||||
.tag-pill {
|
||||
padding-right: $tag-pill-padding-x;
|
||||
padding-left: $tag-pill-padding-x;
|
||||
@include border-radius($tag-pill-border-radius);
|
||||
}
|
||||
|
||||
// Colors
|
||||
//
|
||||
// Contextual variations (linked tags get darker on :hover).
|
||||
|
||||
.tag-default {
|
||||
@include tag-variant($tag-default-bg);
|
||||
}
|
||||
|
||||
.tag-primary {
|
||||
@include tag-variant($tag-primary-bg);
|
||||
}
|
||||
|
||||
.tag-success {
|
||||
@include tag-variant($tag-success-bg);
|
||||
}
|
||||
|
||||
.tag-info {
|
||||
@include tag-variant($tag-info-bg);
|
||||
}
|
||||
|
||||
.tag-warning {
|
||||
@include tag-variant($tag-warning-bg);
|
||||
}
|
||||
|
||||
.tag-danger {
|
||||
@include tag-variant($tag-danger-bg);
|
||||
}
|
@ -3,70 +3,107 @@
|
||||
position: absolute;
|
||||
z-index: $zindex-tooltip;
|
||||
display: block;
|
||||
margin: $tooltip-margin;
|
||||
// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
|
||||
// So reset our font and text properties to avoid inheriting weird values.
|
||||
@include reset-text();
|
||||
font-size: $font-size-sm;
|
||||
font-size: $tooltip-font-size;
|
||||
// Allow breaking very long words so they don't overflow the tooltip's bounds
|
||||
word-wrap: break-word;
|
||||
opacity: 0;
|
||||
|
||||
&.in { opacity: $tooltip-opacity; }
|
||||
&.show { opacity: $tooltip-opacity; }
|
||||
|
||||
&.tooltip-top,
|
||||
&.bs-tether-element-attached-bottom {
|
||||
padding: $tooltip-arrow-width 0;
|
||||
margin-top: -$tooltip-margin;
|
||||
.arrow {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: $tooltip-arrow-width;
|
||||
height: $tooltip-arrow-height;
|
||||
|
||||
.tooltip-arrow {
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
margin-left: -$tooltip-arrow-width;
|
||||
border-width: $tooltip-arrow-width $tooltip-arrow-width 0;
|
||||
&::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bs-tooltip-top {
|
||||
padding: $tooltip-arrow-height 0;
|
||||
|
||||
.arrow {
|
||||
bottom: 0;
|
||||
|
||||
&::before {
|
||||
top: 0;
|
||||
border-width: $tooltip-arrow-height ($tooltip-arrow-width / 2) 0;
|
||||
border-top-color: $tooltip-arrow-color;
|
||||
}
|
||||
}
|
||||
&.tooltip-right,
|
||||
&.bs-tether-element-attached-left {
|
||||
padding: 0 $tooltip-arrow-width;
|
||||
margin-left: $tooltip-margin;
|
||||
}
|
||||
|
||||
.tooltip-arrow {
|
||||
top: 50%;
|
||||
left: 0;
|
||||
margin-top: -$tooltip-arrow-width;
|
||||
border-width: $tooltip-arrow-width $tooltip-arrow-width $tooltip-arrow-width 0;
|
||||
.bs-tooltip-right {
|
||||
padding: 0 $tooltip-arrow-height;
|
||||
|
||||
.arrow {
|
||||
left: 0;
|
||||
width: $tooltip-arrow-height;
|
||||
height: $tooltip-arrow-width;
|
||||
|
||||
&::before {
|
||||
right: 0;
|
||||
border-width: ($tooltip-arrow-width / 2) $tooltip-arrow-height ($tooltip-arrow-width / 2) 0;
|
||||
border-right-color: $tooltip-arrow-color;
|
||||
}
|
||||
}
|
||||
&.tooltip-bottom,
|
||||
&.bs-tether-element-attached-top {
|
||||
padding: $tooltip-arrow-width 0;
|
||||
margin-top: $tooltip-margin;
|
||||
}
|
||||
|
||||
.tooltip-arrow {
|
||||
top: 0;
|
||||
left: 50%;
|
||||
margin-left: -$tooltip-arrow-width;
|
||||
border-width: 0 $tooltip-arrow-width $tooltip-arrow-width;
|
||||
.bs-tooltip-bottom {
|
||||
padding: $tooltip-arrow-height 0;
|
||||
|
||||
.arrow {
|
||||
top: 0;
|
||||
|
||||
&::before {
|
||||
bottom: 0;
|
||||
border-width: 0 ($tooltip-arrow-width / 2) $tooltip-arrow-height;
|
||||
border-bottom-color: $tooltip-arrow-color;
|
||||
}
|
||||
}
|
||||
&.tooltip-left,
|
||||
&.bs-tether-element-attached-right {
|
||||
padding: 0 $tooltip-arrow-width;
|
||||
margin-left: -$tooltip-margin;
|
||||
}
|
||||
|
||||
.tooltip-arrow {
|
||||
top: 50%;
|
||||
right: 0;
|
||||
margin-top: -$tooltip-arrow-width;
|
||||
border-width: $tooltip-arrow-width 0 $tooltip-arrow-width $tooltip-arrow-width;
|
||||
.bs-tooltip-left {
|
||||
padding: 0 $tooltip-arrow-height;
|
||||
|
||||
.arrow {
|
||||
right: 0;
|
||||
width: $tooltip-arrow-height;
|
||||
height: $tooltip-arrow-width;
|
||||
|
||||
&::before {
|
||||
left: 0;
|
||||
border-width: ($tooltip-arrow-width / 2) 0 ($tooltip-arrow-width / 2) $tooltip-arrow-height;
|
||||
border-left-color: $tooltip-arrow-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bs-tooltip-auto {
|
||||
&[x-placement^="top"] {
|
||||
@extend .bs-tooltip-top;
|
||||
}
|
||||
&[x-placement^="right"] {
|
||||
@extend .bs-tooltip-right;
|
||||
}
|
||||
&[x-placement^="bottom"] {
|
||||
@extend .bs-tooltip-bottom;
|
||||
}
|
||||
&[x-placement^="left"] {
|
||||
@extend .bs-tooltip-left;
|
||||
}
|
||||
}
|
||||
|
||||
// Wrapper for the tooltip content
|
||||
.tooltip-inner {
|
||||
max-width: $tooltip-max-width;
|
||||
@ -74,14 +111,5 @@
|
||||
color: $tooltip-color;
|
||||
text-align: center;
|
||||
background-color: $tooltip-bg;
|
||||
@include border-radius($border-radius);
|
||||
}
|
||||
|
||||
// Arrows
|
||||
.tooltip-arrow {
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
@include border-radius($tooltip-border-radius);
|
||||
}
|
||||
|
36
theme/boost/scss/bootstrap/_transitions.scss
Normal file
36
theme/boost/scss/bootstrap/_transitions.scss
Normal file
@ -0,0 +1,36 @@
|
||||
// stylelint-disable selector-no-qualifying-type
|
||||
|
||||
.fade {
|
||||
opacity: 0;
|
||||
@include transition($transition-fade);
|
||||
|
||||
&.show {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.collapse {
|
||||
display: none;
|
||||
&.show {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
tr {
|
||||
&.collapse.show {
|
||||
display: table-row;
|
||||
}
|
||||
}
|
||||
|
||||
tbody {
|
||||
&.collapse.show {
|
||||
display: table-row-group;
|
||||
}
|
||||
}
|
||||
|
||||
.collapsing {
|
||||
position: relative;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
@include transition($transition-collapse);
|
||||
}
|
@ -1,3 +1,5 @@
|
||||
// stylelint-disable declaration-no-important, selector-list-comma-newline-after
|
||||
|
||||
//
|
||||
// Headings
|
||||
//
|
||||
@ -11,12 +13,12 @@ h1, h2, h3, h4, h5, h6,
|
||||
color: $headings-color;
|
||||
}
|
||||
|
||||
h1, .h1 { font-size: $font-size-h1; }
|
||||
h2, .h2 { font-size: $font-size-h2; }
|
||||
h3, .h3 { font-size: $font-size-h3; }
|
||||
h4, .h4 { font-size: $font-size-h4; }
|
||||
h5, .h5 { font-size: $font-size-h5; }
|
||||
h6, .h6 { font-size: $font-size-h6; }
|
||||
h1, .h1 { font-size: $h1-font-size; }
|
||||
h2, .h2 { font-size: $h2-font-size; }
|
||||
h3, .h3 { font-size: $h3-font-size; }
|
||||
h4, .h4 { font-size: $h4-font-size; }
|
||||
h5, .h5 { font-size: $h5-font-size; }
|
||||
h6, .h6 { font-size: $h6-font-size; }
|
||||
|
||||
.lead {
|
||||
font-size: $lead-font-size;
|
||||
@ -27,18 +29,22 @@ h6, .h6 { font-size: $font-size-h6; }
|
||||
.display-1 {
|
||||
font-size: $display1-size;
|
||||
font-weight: $display1-weight;
|
||||
line-height: $display-line-height;
|
||||
}
|
||||
.display-2 {
|
||||
font-size: $display2-size;
|
||||
font-weight: $display2-weight;
|
||||
line-height: $display-line-height;
|
||||
}
|
||||
.display-3 {
|
||||
font-size: $display3-size;
|
||||
font-weight: $display3-weight;
|
||||
line-height: $display-line-height;
|
||||
}
|
||||
.display-4 {
|
||||
font-size: $display4-size;
|
||||
font-weight: $display4-weight;
|
||||
line-height: $display-line-height;
|
||||
}
|
||||
|
||||
|
||||
@ -47,8 +53,8 @@ h6, .h6 { font-size: $font-size-h6; }
|
||||
//
|
||||
|
||||
hr {
|
||||
margin-top: $spacer-y;
|
||||
margin-bottom: $spacer-y;
|
||||
margin-top: $hr-margin-y;
|
||||
margin-bottom: $hr-margin-y;
|
||||
border: 0;
|
||||
border-top: $hr-border-width solid $hr-border-color;
|
||||
}
|
||||
@ -61,7 +67,7 @@ hr {
|
||||
small,
|
||||
.small {
|
||||
font-size: $small-font-size;
|
||||
font-weight: normal;
|
||||
font-weight: $font-weight-normal;
|
||||
}
|
||||
|
||||
mark,
|
||||
@ -104,10 +110,8 @@ mark,
|
||||
|
||||
// Blockquotes
|
||||
.blockquote {
|
||||
padding: ($spacer / 2) $spacer;
|
||||
margin-bottom: $spacer;
|
||||
font-size: $blockquote-font-size;
|
||||
border-left: $blockquote-border-width solid $blockquote-border-color;
|
||||
}
|
||||
|
||||
.blockquote-footer {
|
||||
@ -119,32 +123,3 @@ mark,
|
||||
content: "\2014 \00A0"; // em dash, nbsp
|
||||
}
|
||||
}
|
||||
|
||||
// Opposite alignment of blockquote
|
||||
.blockquote-reverse {
|
||||
padding-right: $spacer;
|
||||
padding-left: 0;
|
||||
text-align: right;
|
||||
border-right: $blockquote-border-width solid $blockquote-border-color;
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
.blockquote-reverse .blockquote-footer {
|
||||
&::before {
|
||||
content: "";
|
||||
}
|
||||
&::after {
|
||||
content: "\00A0 \2014"; // nbsp, em dash
|
||||
}
|
||||
}
|
||||
|
||||
@if not $enable-flex {
|
||||
// Clean up some horizontal `<dl>`s built with grids
|
||||
// scss-lint:disable QualifyingElement
|
||||
dl.row {
|
||||
> dd + dt {
|
||||
clear: left;
|
||||
}
|
||||
}
|
||||
// scss-lint:enable QualifyingElement
|
||||
}
|
||||
|
@ -1,9 +1,14 @@
|
||||
@import "utilities/align";
|
||||
@import "utilities/background";
|
||||
@import "utilities/borders";
|
||||
@import "utilities/clearfix";
|
||||
@import "utilities/display";
|
||||
@import "utilities/embed";
|
||||
@import "utilities/flex";
|
||||
@import "utilities/pulls";
|
||||
@import "utilities/float";
|
||||
@import "utilities/position";
|
||||
@import "utilities/screenreaders";
|
||||
@import "utilities/sizing";
|
||||
@import "utilities/spacing";
|
||||
@import "utilities/text";
|
||||
@import "utilities/visibility";
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,8 +0,0 @@
|
||||
// Bootstrap with Flexbox enabled
|
||||
//
|
||||
// Includes all the imports from the standard Bootstrap project, but enables
|
||||
// the flexbox variable.
|
||||
|
||||
$enable-flex: true;
|
||||
|
||||
@import "bootstrap";
|
35
theme/boost/scss/bootstrap/bootstrap-grid.scss
vendored
35
theme/boost/scss/bootstrap/bootstrap-grid.scss
vendored
@ -1,23 +1,32 @@
|
||||
// Bootstrap Grid only
|
||||
//
|
||||
// Includes relevant variables and mixins for the regular (non-flexbox) grid
|
||||
// system, as well as the generated predefined classes (e.g., `.col-4-sm`).
|
||||
/*!
|
||||
* Bootstrap Grid v4.0.0 (https://getbootstrap.com)
|
||||
* Copyright 2011-2018 The Bootstrap Authors
|
||||
* Copyright 2011-2018 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
@at-root {
|
||||
@-ms-viewport { width: device-width; } // stylelint-disable-line at-rule-no-vendor-prefix
|
||||
}
|
||||
|
||||
//
|
||||
// Variables
|
||||
//
|
||||
html {
|
||||
box-sizing: border-box;
|
||||
-ms-overflow-style: scrollbar;
|
||||
}
|
||||
|
||||
@import "custom";
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
@import "functions";
|
||||
@import "variables";
|
||||
|
||||
//
|
||||
// Grid mixins
|
||||
//
|
||||
|
||||
@import "mixins/clearfix";
|
||||
@import "mixins/breakpoints";
|
||||
@import "mixins/grid-framework";
|
||||
@import "mixins/grid";
|
||||
|
||||
@import "grid";
|
||||
@import "utilities/display";
|
||||
@import "utilities/flex";
|
||||
|
17
theme/boost/scss/bootstrap/bootstrap-reboot.scss
vendored
17
theme/boost/scss/bootstrap/bootstrap-reboot.scss
vendored
@ -1,11 +1,12 @@
|
||||
// Bootstrap Reboot only
|
||||
//
|
||||
// Includes only Normalize and our custom Reboot reset.
|
||||
/*!
|
||||
* Bootstrap Reboot v4.0.0 (https://getbootstrap.com)
|
||||
* Copyright 2011-2018 The Bootstrap Authors
|
||||
* Copyright 2011-2018 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/
|
||||
|
||||
@import "custom";
|
||||
@import "functions";
|
||||
@import "variables";
|
||||
@import "mixins/hover";
|
||||
@import "mixins/tab-focus";
|
||||
|
||||
@import "normalize";
|
||||
@import "mixins";
|
||||
@import "reboot";
|
||||
|
28
theme/boost/scss/bootstrap/bootstrap.scss
vendored
28
theme/boost/scss/bootstrap/bootstrap.scss
vendored
@ -1,20 +1,14 @@
|
||||
/*!
|
||||
* Bootstrap v4.0.0-alpha.4 (http://getbootstrap.com)
|
||||
* Copyright 2011-2016 The Bootstrap Authors
|
||||
* Copyright 2011-2016 Twitter, Inc.
|
||||
* Bootstrap v4.0.0 (https://getbootstrap.com)
|
||||
* Copyright 2011-2018 The Bootstrap Authors
|
||||
* Copyright 2011-2018 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
// Core variables and mixins
|
||||
@import "custom";
|
||||
@import "functions";
|
||||
@import "variables";
|
||||
@import "mixins";
|
||||
|
||||
// Reset and dependencies
|
||||
@import "normalize";
|
||||
@import "print";
|
||||
|
||||
// Core CSS
|
||||
@import "root";
|
||||
@import "reboot";
|
||||
@import "type";
|
||||
@import "images";
|
||||
@ -23,9 +17,7 @@
|
||||
@import "tables";
|
||||
@import "forms";
|
||||
@import "buttons";
|
||||
|
||||
// Components
|
||||
@import "animation";
|
||||
@import "transitions";
|
||||
@import "dropdown";
|
||||
@import "button-group";
|
||||
@import "input-group";
|
||||
@ -35,20 +27,16 @@
|
||||
@import "card";
|
||||
@import "breadcrumb";
|
||||
@import "pagination";
|
||||
@import "tags";
|
||||
@import "badge";
|
||||
@import "jumbotron";
|
||||
@import "alert";
|
||||
@import "progress";
|
||||
@import "media";
|
||||
@import "list-group";
|
||||
@import "responsive-embed";
|
||||
@import "close";
|
||||
|
||||
// Components w/ JavaScript
|
||||
@import "modal";
|
||||
@import "tooltip";
|
||||
@import "popover";
|
||||
@import "carousel";
|
||||
|
||||
// Utility classes
|
||||
@import "utilities";
|
||||
@import "print";
|
||||
|
@ -1,14 +1,13 @@
|
||||
// Alerts
|
||||
|
||||
@mixin alert-variant($background, $border, $body-color) {
|
||||
background-color: $background;
|
||||
@mixin alert-variant($background, $border, $color) {
|
||||
color: $color;
|
||||
@include gradient-bg($background);
|
||||
border-color: $border;
|
||||
color: $body-color;
|
||||
|
||||
hr {
|
||||
border-top-color: darken($border, 5%);
|
||||
}
|
||||
|
||||
.alert-link {
|
||||
color: darken($body-color, 10%);
|
||||
color: darken($color, 10%);
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,21 @@
|
||||
// stylelint-disable declaration-no-important
|
||||
|
||||
// Contextual backgrounds
|
||||
|
||||
@mixin bg-variant($parent, $color) {
|
||||
#{$parent} {
|
||||
color: #fff !important;
|
||||
background-color: $color !important;
|
||||
}
|
||||
a#{$parent} {
|
||||
a#{$parent},
|
||||
button#{$parent} {
|
||||
@include hover-focus {
|
||||
background-color: darken($color, 10%) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin bg-gradient-variant($parent, $color) {
|
||||
#{$parent} {
|
||||
background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important;
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user