Merge branch 'MDL-63663-master' of git://github.com/bmbrands/moodle

This commit is contained in:
Jun Pataleta 2018-11-20 11:59:29 +08:00
commit a7ca299373
18 changed files with 156 additions and 68 deletions

View File

@ -36,13 +36,6 @@
data-paging="{{paging}}"
data-nocoursesimg="{{nocoursesimg}}">
<div data-region="course-view-content">
<div data-region="courses-loading-placeholder">
<div class="card-deck dashboard-card-deck">
{{> block_myoverview/placeholder-course }}
{{> block_myoverview/placeholder-course }}
{{> block_myoverview/placeholder-course }}
{{> block_myoverview/placeholder-course }}
</div>
</div>
{{> block_myoverview/placeholders }}
</div>
</div>

View File

@ -24,8 +24,8 @@
"nocoursesimg": "https://moodlesite/theme/image.php/boost/block_myoverview/1535727318/courses"
}
}}
<div class="text-xs-center text-center m-t-3" data-region="empty-message">
<img class="empty-placeholder-image-lg"
<div class="text-xs-center text-center m-t-1" data-region="empty-message">
<img class="empty-placeholder-image-lg m-t-1"
src="{{nocoursesimg}}"
alt="{{#str}} nocourses, block_myoverview {{/str}}"
role="presentation">

View File

@ -1,33 +0,0 @@
{{!
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/>.
}}
{{!
@template block_myoverview/placeholder-course
This template renders an course card item loading placeholder for the myoverview block.
Example context (json):
{}
}}
<div class="card dashboard-card border-0">
<div class="card-img-top bg-pulse-grey w-100" style="height: 7rem">
</div>
<div class="card-body course-info-container">
<div class="bg-pulse-grey w-100 m-b-3" style="height: 1rem"></div>
</div>
<div class="bg-pulse-grey w-100" style="height: 3rem">
</div>
</div>

View File

@ -0,0 +1,99 @@
{{!
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/>.
}}
{{!
@template block_myoverview/placeholders
This template renders the loading placeholders for the myoverview block.
Example context (json):
{}
}}
<div data-region="loading-placeholder-content" aria-hidden="true">
{{#cards}}
<div class="card-deck dashboard-card-deck one-row" style="height: 13rem">
<div class="card dashboard-card border-0">
<div class="card-img-top bg-pulse-grey w-100" style="height: 7rem">
</div>
<div class="card-body course-info-container">
<div class="bg-pulse-grey w-100" style="height: 1rem"></div>
</div>
</div>
<div class="card dashboard-card border-0">
<div class="card-img-top bg-pulse-grey w-100" style="height: 7rem">
</div>
<div class="card-body course-info-container">
<div class="bg-pulse-grey w-100" style="height: 1rem"></div>
</div>
</div>
<div class="card dashboard-card border-0">
<div class="card-img-top bg-pulse-grey w-100" style="height: 7rem">
</div>
<div class="card-body course-info-container">
<div class="bg-pulse-grey w-100" style="height: 1rem"></div>
</div>
</div>
<div class="card dashboard-card border-0">
<div class="card-img-top bg-pulse-grey w-100" style="height: 7rem">
</div>
<div class="card-body course-info-container">
<div class="bg-pulse-grey w-100" style="height: 1rem"></div>
</div>
</div>
</div>
{{/cards}}
{{#list}}
<ul class="list-group">
<li class="list-group-item course-listitem">
<div class="col-md-6 span6 p-0 d-flex align-items-center">
<div class="bg-pulse-grey rounded-circle mr-2" style="height: 1rem; width: 1rem;"></div>
<div class="bg-pulse-grey w-50" style="height: 1rem; margin: 0.5rem 0"></div>
</div>
</li>
<li class="list-group-item course-listitem">
<div class="col-md-6 span6 p-0 d-flex align-items-center">
<div class="bg-pulse-grey rounded-circle mr-2" style="height: 1rem; width: 1rem;"></div>
<div class="bg-pulse-grey w-50" style="height: 1rem; margin: 0.5rem 0"></div>
</div>
</li>
<li class="list-group-item course-listitem">
<div class="col-md-6 span6 p-0 d-flex align-items-center">
<div class="bg-pulse-grey rounded-circle mr-2" style="height: 1rem; width: 1rem;"></div>
<div class="bg-pulse-grey w-50" style="height: 1rem; margin: 0.5rem 0"></div>
</div>
</li>
<li class="list-group-item course-listitem">
<div class="col-md-6 span6 p-0 d-flex align-items-center">
<div class="bg-pulse-grey rounded-circle mr-2" style="height: 1rem; width: 1rem;"></div>
<div class="bg-pulse-grey w-50" style="height: 1rem; margin: 0.5rem 0"></div>
</div>
</li>
</ul>
{{/list}}
{{#summary}}
<div class="course-summaryitem m-b-1 p-2">
<div class="d-flex">
<div class="d-flex">
<div class="bg-pulse-grey rounded-circle m-0 p-0 m-r-1" style="height: 7rem; width: 7rem;"></div>
</div>
<div class="d-flex w-100 flex-column">
<div class="bg-pulse-grey w-50 m-b-1" style="height: 1rem; margin: 0.5rem 0"></div>
<div class="bg-pulse-grey w-100" style="height: 13rem"></div>
</div>
</div>
</div>
{{/summary}}
</div>

View File

@ -25,7 +25,7 @@
}
}}
<div class="text-xs-center text-center m-t-3" data-region="empty-message">
<img class="empty-placeholder-image-lg"
<img class="empty-placeholder-image-lg m-t-1"
src="{{nocoursesimgurl}}"
alt="{{#str}} nocourses, block_recentlyaccessedcourses {{/str}}"
role="presentation">

View File

@ -25,7 +25,7 @@
<div class="card dashboard-card border-0">
<div class="card-img-top bg-pulse-grey w-100" style="height: 7rem">
</div>
<div class="card-body recent-course-info-container">
<div class="bg-pulse-grey w-100 m-b-3" style="height: 1rem"></div>
<div class="card-body pr-1 course-info-container">
<div class="bg-pulse-grey w-100" style="height: 1rem"></div>
</div>
</div>
</div>

View File

@ -29,12 +29,7 @@
data-nocoursesimgurl="{{nocoursesimgurl}}">
<div data-region="recentlyaccessedcourses-view-content">
<div data-region="recentlyaccessedcourses-loading-placeholder">
<div class="card-deck dashboard-card-deck one-row">
{{> block_recentlyaccessedcourses/placeholder-course }}
{{> block_recentlyaccessedcourses/placeholder-course }}
{{> block_recentlyaccessedcourses/placeholder-course }}
{{> block_recentlyaccessedcourses/placeholder-course }}
{{> block_recentlyaccessedcourses/placeholder-course }}
<div class="card-deck dashboard-card-deck one-row" style="height: 11.1rem">
{{> block_recentlyaccessedcourses/placeholder-course }}
{{> block_recentlyaccessedcourses/placeholder-course }}
{{> block_recentlyaccessedcourses/placeholder-course }}

View File

@ -24,11 +24,11 @@
"noitemsimgurl": "https://moodlesite/theme/image.php/boost/block_recentlyaccesseditems/1535727318/items"
}
}}
<div class="text-center mt-3" data-region="empty-message">
<div class="text-center" data-region="empty-message">
<img class="empty-placeholder-image-lg"
src="{{noitemsimgurl}}"
alt="{{#str}} noitems, block_recentlyaccesseditems {{/str}}"
role="presentation"
>
<p class="text-muted mt-3">{{#str}} noitems, block_recentlyaccesseditems {{/str}}</p>
<p class="text-muted mt-3 mb-0">{{#str}} noitems, block_recentlyaccesseditems {{/str}}</p>
</div>

View File

@ -22,14 +22,12 @@
Example context (json):
{}
}}
<div class="card dashboard-card border-0">
<div class="card-body course-info-container">
<div class="d-flex flex-row align-items-center" style="height: 32px">
<div class="bg-pulse-grey rounded-circle" style="height: 32px; width: 32px;"></div>
<div class="card dashboard-card border-0 mb-0">
<div class="d-flex flex-row align-items-center" style="height: 6rem">
<div class="bg-pulse-grey rounded-circle" style="height: 2rem; width: 2rem;"></div>
<div class="w-100 line-height-3 ml-1">
<div class="bg-pulse-grey w-100" style="height: 15px;"></div>
<div class="bg-pulse-grey w-75 mt-1" style="height: 10px;"></div>
<div class="bg-pulse-grey w-100" style="height: 1rem;"></div>
<div class="bg-pulse-grey w-75 mt-1" style="height: 0.8rem;"></div>
</div>
</div>
</div>
</div>

View File

@ -20,7 +20,7 @@
}
}}
<div class="text-xs-center text-center m-t-3" data-region="empty-message">
<img class="empty-placeholder-image-lg"
<img class="empty-placeholder-image-lg m-t-1"
src="{{nocoursesimg}}"
alt="{{#str}} nocourses, block_starredcourses {{/str}}"
role="presentation">

View File

@ -21,6 +21,6 @@
<div class="card-img-top bg-pulse-grey w-100" style="height: 7rem">
</div>
<div class="card-body recent-course-info-container">
<div class="bg-pulse-grey w-100 m-b-3" style="height: 1rem"></div>
<div class="bg-pulse-grey w-100" style="height: 1rem"></div>
</div>
</div>

View File

@ -29,7 +29,7 @@
data-nocoursesimg="{{nocoursesimg}}">
<div data-region="starred-courses-view-content">
<div data-region="starred-courses-loading-placeholder">
<div class="card-deck dashboard-card-deck one-row">
<div class="card-deck dashboard-card-deck one-row" style="height: 11.1rem">
{{> block_starredcourses/placeholder-course }}
{{> block_starredcourses/placeholder-course }}
{{> block_starredcourses/placeholder-course }}

View File

@ -37,8 +37,8 @@
}}
<div
id="{{$pagingcontentid}}page-container-{{uniqid}}{{/pagingcontentid}}"
style="min-height: 50px"
data-region="page-container"
class="paged-content-page-container"
aria-live="polite"
>
{{#pages}}

View File

@ -78,7 +78,7 @@ $blocks-plus-gutter: $blocks-column-width + ( $grid-gutter-width / 2 );
$card-gutter : $card-deck-margin * 2;
.block .empty-placeholder-image-lg {
height: 125px;
height: 5rem;
}
.block .block-cards {
@ -248,6 +248,15 @@ body.drawer-open-left #region-main.has-blocks {
}
}
.block_myoverview {
.content {
min-height: 19.35rem;
}
.paged-content-page-container {
min-height: 13rem;
}
}
// Show expand collapse with font-awesome.
.block_settings .block_tree [aria-expanded="true"],
.block_settings .block_tree [aria-expanded="true"].emptybranch,

View File

@ -2242,3 +2242,6 @@ $switch-transition: .2s all !default;
}
}
.paged-content-page-container {
min-height: 3.125rem;
}

View File

@ -10525,6 +10525,9 @@ div.editor_atto_toolbar button .icon {
.switch input:disabled + label::before {
background-color: #e9ecef; }
.paged-content-page-container {
min-height: 3.125rem; }
.icon {
font-size: 16px;
width: 16px;
@ -11207,7 +11210,7 @@ div.editor_atto_toolbar button .icon {
width: 100%; } }
.block .empty-placeholder-image-lg {
height: 125px; }
height: 5rem; }
.block .block-cards .course-info-container {
padding: 0.8rem; }
@ -11326,6 +11329,12 @@ div.editor_atto_toolbar button .icon {
width: auto;
margin-right: 6px; }
.block_myoverview .content {
min-height: 19.35rem; }
.block_myoverview .paged-content-page-container {
min-height: 13rem; }
.block_settings .block_tree [aria-expanded="true"],
.block_settings .block_tree [aria-expanded="true"].emptybranch,
.block_settings .block_tree [aria-expanded="false"],

View File

@ -326,6 +326,15 @@
}
}
.block_myoverview {
.content {
min-height: 19.35rem;
}
.paged-content-page-container {
min-height: 13rem;
}
}
.dashboard-card-deck {
box-sizing: border-box;
*,

View File

@ -16367,6 +16367,12 @@ body {
text-decoration: none;
color: unset;
}
.block_myoverview .content {
min-height: 19.35rem;
}
.block_myoverview .paged-content-page-container {
min-height: 13rem;
}
.dashboard-card-deck {
box-sizing: border-box;
display: flex;