Browse Source

Remove some rarely used HTML clutter

Recreate it on demand
spaghetti 8 years ago
parent
commit
69de846618
2 changed files with 10 additions and 9 deletions
  1. 0
    9
      design/privatefooter.php
  2. 10
    0
      static/functions/global.js

+ 0
- 9
design/privatefooter.php View File

54
 <? } ?>
54
 <? } ?>
55
 
55
 
56
 </div>
56
 </div>
57
-<div id="lightbox" class="lightbox hidden"></div>
58
-<div id="curtain" class="curtain hidden"></div>
59
 <?
57
 <?
60
 global $NotificationSpans;
58
 global $NotificationSpans;
61
 if (!empty($NotificationSpans)) {
59
 if (!empty($NotificationSpans)) {
64
   }
62
   }
65
 }
63
 }
66
 ?>
64
 ?>
67
-<!-- Extra divs, for stylesheet developers to add imagery -->
68
-<div id="extra1"><span></span></div>
69
-<div id="extra2"><span></span></div>
70
-<div id="extra3"><span></span></div>
71
-<div id="extra4"><span></span></div>
72
-<div id="extra5"><span></span></div>
73
-<div id="extra6"><span></span></div>
74
 </body>
65
 </body>
75
 </html>
66
 </html>

+ 10
- 0
static/functions/global.js View File

23
 
23
 
24
 var lightbox = {
24
 var lightbox = {
25
   init: function (image, size) {
25
   init: function (image, size) {
26
+    if ($('#lightbox').length == 0 || $('#curtain').length == 0) {
27
+      var lightboxEl = document.createElement('div')
28
+      lightboxEl.id = 'lightbox'
29
+      lightboxEl.className = 'lightbox hidden'
30
+      var curtainEl = document.createElement('div')
31
+      curtainEl.id = 'curtain'
32
+      curtainEl.className = 'curtain hidden'
33
+      $('#wrapper')[0].appendChild(lightboxEl)
34
+      $('#wrapper')[0].appendChild(curtainEl)
35
+    }
26
     if (typeof(image) == 'string') {
36
     if (typeof(image) == 'string') {
27
       $('#lightbox').gshow().listen('click', lightbox.unbox).raw().innerHTML =
37
       $('#lightbox').gshow().listen('click', lightbox.unbox).raw().innerHTML =
28
         '<p size="7" style="color: gray; font-size: 50px;">Loading...<p>';
38
         '<p size="7" style="color: gray; font-size: 50px;">Loading...<p>';

Loading…
Cancel
Save