... | ... |
@@ -4,7 +4,7 @@ |
4 | 4 |
var signpost; |
5 | 5 |
|
6 | 6 |
signpost = new jBox('Modal', { |
7 |
- {{ (modal_configuration.modal_title) ? 'title: \'' ~ modal_configuration.modal_title ~ '\',' : '' }} |
|
7 |
+ {{ (modal_configuration.modal_title) ? ('title: \'' ~ modal_configuration.modal_title ~ '\',')|raw : '' }} |
|
8 | 8 |
content: $('#modal-content-{{ modal_configuration.id }}').html(), |
9 | 9 |
closeButton: '{{ (modal_configuration.modal_title) ? 'title' : 'box' }}', |
10 | 10 |
width: 650, |
... | ... |
@@ -4,11 +4,11 @@ |
4 | 4 |
var signpost; |
5 | 5 |
|
6 | 6 |
signpost = new jBox('Modal', { |
7 |
- title: '{{ (modal_configuration.modal_title) ?: '' }}', |
|
7 |
+ {{ (modal_configuration.modal_title) ? 'title: \'' ~ modal_configuration.modal_title ~ '\',' : '' }} |
|
8 | 8 |
content: $('#modal-content-{{ modal_configuration.id }}').html(), |
9 |
- closeButton: 'title', |
|
9 |
+ closeButton: '{{ (modal_configuration.modal_title) ? 'title' : 'box' }}', |
|
10 | 10 |
width: 650, |
11 |
- theme: 'DurbachLight'{% if not modal_configuration.show_once is empty %}, |
|
11 |
+ theme: '{{ (modal_configuration.borderless) ? 'Borderless' : '' }}'{% if not modal_configuration.show_once is empty %}, |
|
12 | 12 |
onClose: function() { |
13 | 13 |
localStorage.setItem('popState-{{ modal_configuration.id }}',Date.now()); |
14 | 14 |
sessionStorage.setItem('popState-{{ modal_configuration.id }}','shown'); |
... | ... |
@@ -0,0 +1,32 @@ |
1 |
+<script> |
|
2 |
+ (function($) { |
|
3 |
+ $(document).ready(function() { |
|
4 |
+ var signpost; |
|
5 |
+ |
|
6 |
+ signpost = new jBox('Modal', { |
|
7 |
+ title: '{{ (modal_configuration.modal_title) ?: '' }}', |
|
8 |
+ content: $('#modal-content-{{ modal_configuration.id }}').html(), |
|
9 |
+ closeButton: 'title', |
|
10 |
+ width: 650, |
|
11 |
+ theme: 'DurbachLight'{% if not modal_configuration.show_once is empty %}, |
|
12 |
+ onClose: function() { |
|
13 |
+ localStorage.setItem('popState-{{ modal_configuration.id }}',Date.now()); |
|
14 |
+ sessionStorage.setItem('popState-{{ modal_configuration.id }}','shown'); |
|
15 |
+ } |
|
16 |
+ {% endif %} |
|
17 |
+ |
|
18 |
+ }); |
|
19 |
+ |
|
20 |
+ {% if not modal_configuration.show_once is empty %}if((localStorage.getItem('popState-{{ modal_configuration.id }}') < Date.now()-3600 && sessionStorage.getItem('popState-{{ modal_configuration.id }}') != 'shown')){ |
|
21 |
+ {% endif %}setTimeout(function() { |
|
22 |
+ signpost.open(); |
|
23 |
+ },{{ modal_configuration.delay|number_format * 1000 }}); |
|
24 |
+ {% if not modal_configuration.show_once is empty %} } {% endif %} |
|
25 |
+ |
|
26 |
+ }); |
|
27 |
+ })(jQuery); |
|
28 |
+</script> |
|
29 |
+ |
|
30 |
+<div style="display: none" id="modal-content-{{ modal_configuration.id }}"> |
|
31 |
+{{ details|raw }} |
|
32 |
+</div> |