Tests on implementation for the lightbox modal.
More...
Tests on implementation for the lightbox modal.
- Author
- Stefan Wanzenried sw@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Definition at line 31 of file LightboxTest.php.
◆ getExpectedCardPageHTML()
| LightboxTest::getExpectedCardPageHTML |
( |
| ) |
|
|
private |
Definition at line 331 of file LightboxTest.php.
References ILIAS\Repository\button(), and Vendor\Package\foo().
Referenced by getPageProvider().
334 <div
class=
"modal fade il-modal-lightbox il-modal-lightbox-bright" tabindex=
"-1" role=
"dialog" id=
"id_1">
335 <div
class=
"modal-dialog modal-lg" role=
"document">
336 <div
class=
"modal-content il-modal-lightbox-page">
337 <div
class=
"modal-header">
338 <
button type=
"button" class=
"close" data-dismiss=
"modal" aria-label=
"close">
339 <span aria-hidden=
"true"></span>
341 <h1
class=
"modal-title">
345 <div
class=
"modal-body">
346 <div
id=
"id_1_carousel" class=
"carousel slide" data-ride=
"carousel" data-interval=
"false">
347 <div
class=
"carousel-inner" role=
"listbox">
348 <div
class=
"item active" data-title=
"foo">
349 <div
class=
"item-content item-vertical"></div>
358 document.addEventListener(
'DOMContentLoaded',
function() {
359 $(
'#id_1').on(
'shown.bs.modal',
function() {
360 $(
'.modal-backdrop.in').css(
'opacity',
'0.9');
362 $(
'#id_1').on(
'show.bs.modal',
function (e) {
363 var elm = $(
this).find(
'.carousel-inner .item.active').first();
364 if (elm.hasClass(
'text-only')) {
365 elm.closest(
'.carousel').addClass(
'text-only');
367 elm.closest(
'.carousel').removeClass(
'text-only');
370 $(
'#id_1_carousel').on(
'slide.bs.carousel',
function(e) {
371 var elm = $(e.relatedTarget);
372 if (elm.hasClass(
'text-only')) {
373 elm.closest(
'.carousel').addClass(
'text-only');
375 elm.closest(
'.carousel').removeClass(
'text-only');
378 $(
'#id_1_carousel').on(
'slid.bs.carousel',
function() {
379 var title = $(
this).find(
'.carousel-inner .item.active').attr(
'data-title');
380 $(
'#id_1').find(
'.modal-title').text(title);
button(string $caption, string $cmd)
◆ getExpectedImagePageHTML()
| LightboxTest::getExpectedImagePageHTML |
( |
| ) |
|
|
protected |
Definition at line 155 of file LightboxTest.php.
References ILIAS\Repository\button().
Referenced by getPageProvider().
158 <div
class=
"modal fade il-modal-lightbox il-modal-lightbox-dark" tabindex=
"-1" role=
"dialog" id=
"id_1">
159 <div
class=
"modal-dialog modal-lg" role=
"document">
160 <div
class=
"modal-content il-modal-lightbox-page">
161 <div
class=
"modal-header">
162 <
button type=
"button" class=
"close" data-dismiss=
"modal" aria-label=
"close"><span aria-hidden=
"true">×</span></
button>
163 <h1
class=
"modal-title">title</h1>
165 <div
class=
"modal-body">
166 <div
id=
"id_1_carousel" class=
"carousel slide" data-ride=
"carousel" data-interval=
"false">
170 <div
class=
"carousel-inner" role=
"listbox">
172 <div
class=
"item active" data-title=
"title">
173 <div
class=
"item-content ">
179 <img src=
"src/fake/image.jpg" class=
"img-responsive" alt=
"description" />
185 <div
class=
"carousel-caption">
200 document.addEventListener(
'DOMContentLoaded',
function() {
201 $(
'#id_1').on(
'shown.bs.modal',
function() {
202 $(
'.modal-backdrop.in').css(
'opacity',
'0.9');
204 $(
'#id_1').on(
'show.bs.modal',
function (e) {
205 var elm = $(
this).find(
'.carousel-inner .item.active').first();
207 if (elm.hasClass(
'text-only')) {
208 elm.closest(
'.carousel').addClass(
'text-only');
210 elm.closest(
'.carousel').removeClass(
'text-only');
213 $(
'#id_1_carousel').on(
'slide.bs.carousel',
function(e) {
214 var elm = $(e.relatedTarget);
216 if (elm.hasClass(
'text-only')) {
217 elm.closest(
'.carousel').addClass(
'text-only');
219 elm.closest(
'.carousel').removeClass(
'text-only');
222 $(
'#id_1_carousel').on(
'slid.bs.carousel',
function() {
223 var title = $(
this).find(
'.carousel-inner .item.active').attr(
'data-title');
224 $(
'#id_1').find(
'.modal-title').text(title);
button(string $caption, string $cmd)
◆ getExpectedMixedPagesHTML()
| LightboxTest::getExpectedMixedPagesHTML |
( |
| ) |
|
|
protected |
Definition at line 231 of file LightboxTest.php.
References ILIAS\Repository\button(), and ILIAS\ResourceStorage\Flavour\Machine\DefaultMachines\to().
Referenced by testDifferentPageTypeRendering().
234 <div
class=
"modal fade il-modal-lightbox il-modal-lightbox-dark" tabindex=
"-1" role=
"dialog" id=
"id_1">
235 <div
class=
"modal-dialog modal-lg" role=
"document">
236 <div
class=
"modal-content il-modal-lightbox-page">
237 <div
class=
"modal-header">
238 <
button type=
"button" class=
"close" data-dismiss=
"modal" aria-label=
"close"><span aria-hidden=
"true">×</span></
button>
239 <h1
class=
"modal-title">title</h1>
241 <div
class=
"modal-body">
242 <div
id=
"id_1_carousel" class=
"carousel slide" data-ride=
"carousel" data-interval=
"false">
245 <ol
class=
"carousel-indicators">
247 <li data-target=
"#id_1_carousel" data-slide-
to=
"0" class=
"active"></li>
249 <li data-target=
"#id_1_carousel" data-slide-to=
"1" class=
""></li>
254 <div
class=
"carousel-inner" role=
"listbox">
256 <div
class=
"item active text-only" data-title=
"title">
257 <div
class=
"item-content ">
263 <div
class=
"item " data-title=
"title">
264 <div
class=
"item-content ">
270 <img src=
"src/fake/image.jpg" class=
"img-responsive" alt=
"description" />
276 <div
class=
"carousel-caption">
284 <a
class=
"left carousel-control" href=
"#id_1_carousel" role=
"button" data-slide=
"prev">
285 <span
class=
"glyphicon glyphicon-chevron-left" aria-hidden=
"true"></span>
286 <span
class=
"sr-only">Previous</span>
288 <a
class=
"right carousel-control" href=
"#id_1_carousel" role=
"button" data-slide=
"next">
289 <span
class=
"glyphicon glyphicon-chevron-right" aria-hidden=
"true"></span>
290 <span
class=
"sr-only">Next</span>
300 document.addEventListener(
'DOMContentLoaded',
function() {
301 $(
'#id_1').on(
'shown.bs.modal',
function() {
302 $(
'.modal-backdrop.in').css(
'opacity',
'0.9');
304 $(
'#id_1').on(
'show.bs.modal',
function (e) {
305 var elm = $(
this).find(
'.carousel-inner .item.active').first();
307 if (elm.hasClass(
'text-only')) {
308 elm.closest(
'.carousel').addClass(
'text-only');
310 elm.closest(
'.carousel').removeClass(
'text-only');
313 $(
'#id_1_carousel').on(
'slide.bs.carousel',
function(e) {
314 var elm = $(e.relatedTarget);
316 if (elm.hasClass(
'text-only')) {
317 elm.closest(
'.carousel').addClass(
'text-only');
319 elm.closest(
'.carousel').removeClass(
'text-only');
322 $(
'#id_1_carousel').on(
'slid.bs.carousel',
function() {
323 var title = $(
this).find(
'.carousel-inner .item.active').attr(
'data-title');
324 $(
'#id_1').find(
'.modal-title').text(title);
button(string $caption, string $cmd)
to(\GdImage $image, int $quality=null)
Currently this is the only way to make a FileStream from a GD image resource.
Some very basic component implementation.
◆ getExpectedTextPageHTML()
| LightboxTest::getExpectedTextPageHTML |
( |
| ) |
|
|
protected |
Definition at line 90 of file LightboxTest.php.
References ILIAS\Repository\button().
Referenced by getPageProvider().
93 <div
class=
"modal fade il-modal-lightbox il-modal-lightbox-bright" tabindex=
"-1" role=
"dialog" id=
"id_1">
94 <div
class=
"modal-dialog modal-lg" role=
"document">
95 <div
class=
"modal-content il-modal-lightbox-page">
96 <div
class=
"modal-header">
97 <
button type=
"button" class=
"close" data-dismiss=
"modal" aria-label=
"close"><span aria-hidden=
"true">×</span></
button>
98 <h1
class=
"modal-title">title</h1>
100 <div
class=
"modal-body">
101 <div
id=
"id_1_carousel" class=
"carousel slide" data-ride=
"carousel" data-interval=
"false">
105 <div
class=
"carousel-inner" role=
"listbox">
107 <div
class=
"item active text-only" data-title=
"title">
108 <div
class=
"item-content ">
124 document.addEventListener(
'DOMContentLoaded',
function() {
125 $(
'#id_1').on(
'shown.bs.modal',
function() {
126 $(
'.modal-backdrop.in').css(
'opacity',
'0.9');
128 $(
'#id_1').on(
'show.bs.modal',
function (e) {
129 var elm = $(
this).find(
'.carousel-inner .item.active').first();
131 if (elm.hasClass(
'text-only')) {
132 elm.closest(
'.carousel').addClass(
'text-only');
134 elm.closest(
'.carousel').removeClass(
'text-only');
137 $(
'#id_1_carousel').on(
'slide.bs.carousel',
function(e) {
138 var elm = $(e.relatedTarget);
140 if (elm.hasClass(
'text-only')) {
141 elm.closest(
'.carousel').addClass(
'text-only');
143 elm.closest(
'.carousel').removeClass(
'text-only');
146 $(
'#id_1_carousel').on(
'slid.bs.carousel',
function() {
147 var title = $(
this).find(
'.carousel-inner .item.active').attr(
'data-title');
148 $(
'#id_1').find(
'.modal-title').text(title);
button(string $caption, string $cmd)
Some very basic component implementation.
◆ getLightboxPage()
| LightboxTest::getLightboxPage |
( |
| ) |
|
|
protected |
◆ getPageProvider()
| LightboxTest::getPageProvider |
( |
| ) |
|
◆ testDifferentPageTypeRendering()
| LightboxTest::testDifferentPageTypeRendering |
( |
| ) |
|
◆ testGetMultiplePage()
| LightboxTest::testGetMultiplePage |
( |
| ) |
|
◆ testGetSinglePage()
| LightboxTest::testGetSinglePage |
( |
| ) |
|
◆ testSimplePageRendering()
| LightboxTest::testSimplePageRendering |
( |
string |
$method, |
|
|
array |
$args, |
|
|
string |
$expected_html |
|
) |
| |
The documentation for this class was generated from the following file: