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 13 of file LightboxTest.php.
◆ getExpectedImagePageHTML()
LightboxTest::getExpectedImagePageHTML |
( |
| ) |
|
|
protected |
Definition at line 130 of file LightboxTest.php.
References data, and Sabre\Event\on().
Referenced by test_simple_image_page_rendering().
133 <div
class=
"modal fade il-modal-lightbox" tabindex=
"-1" role=
"dialog" id=
"id_1">
134 <div
class=
"modal-dialog modal-lg" role=
"document">
135 <div
class=
"modal-content il-modal-lightbox-page">
136 <div
class=
"modal-header">
137 <button type=
"button" class=
"close" data-dismiss=
"modal" aria-label=
"Close"><span aria-hidden=
"true">×</span></button>
138 <h4
class=
"modal-title">title</h4>
140 <div
class=
"modal-body">
141 <div
id=
"id_1_carousel" class=
"carousel slide" data-ride=
"carousel" data-interval=
"false">
145 <div
class=
"carousel-inner" role=
"listbox">
147 <div
class=
"item active" data-title=
"title">
153 <img src=
"src/fake/image.jpg" class=
"img-responsive" alt=
"description" />
157 <div
class=
"carousel-caption">
173 $(
'#id_1').
on(
'shown.bs.modal',
function() {
174 $(
'.modal-backdrop.in').css(
'opacity',
'0.9');
176 $(
'#id_1').
on(
'show.bs.modal',
function (e) {
177 var elm = $(
this).find(
'.carousel-inner .item.active').first();
179 if (elm.hasClass(
'text-only')) {
180 elm.closest(
'.carousel').addClass(
'text-only');
182 elm.closest(
'.carousel').removeClass(
'text-only');
185 $(
'#id_1_carousel').
on(
'slide.bs.carousel',
function(e) {
186 var elm = $(e.relatedTarget);
188 if (elm.hasClass(
'text-only')) {
189 elm.closest(
'.carousel').addClass(
'text-only');
191 elm.closest(
'.carousel').removeClass(
'text-only');
194 $(
'#id_1_carousel').
on(
'slid.bs.carousel',
function() {
195 var title = $(
this).find(
'.carousel-inner .item.active').attr(
'data-title');
196 $(
'#id_1').find(
'.modal-title').text(title);
on($eventName, callable $callBack, $priority=100)
Subscribe to an event.
◆ getExpectedMixedPagesHTML()
LightboxTest::getExpectedMixedPagesHTML |
( |
| ) |
|
|
protected |
Definition at line 205 of file LightboxTest.php.
References data, and Sabre\Event\on().
Referenced by test_different_page_type_rendering().
208 <div
class=
"modal fade il-modal-lightbox" tabindex=
"-1" role=
"dialog" id=
"id_1">
209 <div
class=
"modal-dialog modal-lg" role=
"document">
210 <div
class=
"modal-content il-modal-lightbox-page">
211 <div
class=
"modal-header">
212 <button type=
"button" class=
"close" data-dismiss=
"modal" aria-label=
"Close"><span aria-hidden=
"true">×</span></button>
213 <h4
class=
"modal-title">title</h4>
215 <div
class=
"modal-body">
216 <div
id=
"id_1_carousel" class=
"carousel slide" data-ride=
"carousel" data-interval=
"false">
219 <ol
class=
"carousel-indicators">
221 <li
data-target=
"#id_1_carousel" data-slide-to=
"0" class=
"active"></li>
223 <li
data-target=
"#id_1_carousel" data-slide-to=
"1" class=
""></li>
228 <div
class=
"carousel-inner" role=
"listbox">
230 <div
class=
"item active text-only" data-title=
"title">
234 <div
class=
"item" data-title=
"title">
240 <img src=
"src/fake/image.jpg" class=
"img-responsive" alt=
"description" />
244 <div
class=
"carousel-caption">
252 <
a class=
"left carousel-control" href=
"#id_1_carousel" role=
"button" data-slide=
"prev">
253 <span
class=
"glyphicon glyphicon-chevron-left" aria-hidden=
"true"></span>
254 <span
class=
"sr-only">Previous</span>
256 <a
class=
"right carousel-control" href=
"#id_1_carousel" role=
"button" data-slide=
"next">
257 <span
class=
"glyphicon glyphicon-chevron-right" aria-hidden=
"true"></span>
258 <span
class=
"sr-only">Next</span>
269 $(
'#id_1').
on(
'shown.bs.modal',
function() {
270 $(
'.modal-backdrop.in').css(
'opacity',
'0.9');
272 $(
'#id_1').
on(
'show.bs.modal',
function (e) {
273 var elm = $(
this).find(
'.carousel-inner .item.active').first();
275 if (elm.hasClass(
'text-only')) {
276 elm.closest(
'.carousel').addClass(
'text-only');
278 elm.closest(
'.carousel').removeClass(
'text-only');
281 $(
'#id_1_carousel').
on(
'slide.bs.carousel',
function(e) {
282 var elm = $(e.relatedTarget);
284 if (elm.hasClass(
'text-only')) {
285 elm.closest(
'.carousel').addClass(
'text-only');
287 elm.closest(
'.carousel').removeClass(
'text-only');
290 $(
'#id_1_carousel').
on(
'slid.bs.carousel',
function() {
291 var title = $(
this).find(
'.carousel-inner .item.active').attr(
'data-title');
292 $(
'#id_1').find(
'.modal-title').text(title);
on($eventName, callable $callBack, $priority=100)
Subscribe to an event.
◆ getExpectedTextPageHTML()
LightboxTest::getExpectedTextPageHTML |
( |
| ) |
|
|
protected |
Definition at line 66 of file LightboxTest.php.
References data.
Referenced by test_simple_text_page_rendering().
69 <div
class=
"modal fade il-modal-lightbox" tabindex=
"-1" role=
"dialog" id=
"id_1">
70 <div
class=
"modal-dialog modal-lg" role=
"document">
71 <div
class=
"modal-content il-modal-lightbox-page">
72 <div
class=
"modal-header">
73 <button type=
"button" class=
"close" data-dismiss=
"modal" aria-label=
"Close"><span aria-hidden=
"true">×</span></button>
74 <h4
class=
"modal-title">title</h4>
76 <div
class=
"modal-body">
77 <div
id=
"id_1_carousel" class=
"carousel slide" data-ride=
"carousel" data-interval=
"false">
81 <div
class=
"carousel-inner" role=
"listbox">
83 <div
class=
"item active text-only" data-title=
"title">
98 $(
'#id_1').
on(
'shown.bs.modal',
function() {
99 $(
'.modal-backdrop.in').css(
'opacity',
'0.9');
101 $(
'#id_1').
on(
'show.bs.modal',
function (e) {
102 var elm = $(
this).find(
'.carousel-inner .item.active').first();
104 if (elm.hasClass(
'text-only')) {
105 elm.closest(
'.carousel').addClass(
'text-only');
107 elm.closest(
'.carousel').removeClass(
'text-only');
110 $(
'#id_1_carousel').
on(
'slide.bs.carousel',
function(e) {
111 var elm = $(e.relatedTarget);
113 if (elm.hasClass(
'text-only')) {
114 elm.closest(
'.carousel').addClass(
'text-only');
116 elm.closest(
'.carousel').removeClass(
'text-only');
119 $(
'#id_1_carousel').
on(
'slid.bs.carousel',
function() {
120 var title = $(
this).find(
'.carousel-inner .item.active').attr(
'data-title');
121 $(
'#id_1').find(
'.modal-title').text(title);
on($eventName, callable $callBack, $priority=100)
Subscribe to an event.
◆ getLightboxPage()
LightboxTest::getLightboxPage |
( |
| ) |
|
|
protected |
◆ test_different_page_type_rendering()
LightboxTest::test_different_page_type_rendering |
( |
| ) |
|
◆ test_get_multiple_page()
LightboxTest::test_get_multiple_page |
( |
| ) |
|
◆ test_get_single_page()
LightboxTest::test_get_single_page |
( |
| ) |
|
◆ test_simple_image_page_rendering()
LightboxTest::test_simple_image_page_rendering |
( |
| ) |
|
◆ test_simple_text_page_rendering()
LightboxTest::test_simple_text_page_rendering |
( |
| ) |
|
The documentation for this class was generated from the following file: