OSDN Git Service

BugTrack/2420 AutoTicketLink: Move defs after body start tag
authorumorigu <umorigu@gmail.com>
Fri, 22 Sep 2017 15:22:59 +0000 (00:22 +0900)
committerumorigu <umorigu@gmail.com>
Fri, 22 Sep 2017 15:22:59 +0000 (00:22 +0900)
lib/html.php
skin/main.js
skin/pukiwiki.skin.php
skin/tdiary.skin.php

index 5ffcd20..46e1d97 100644 (file)
@@ -217,14 +217,16 @@ function get_html_scripting_data()
                }
                $site_info_json = htmlsc(json_encode($s, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));
                $text .= <<<EOS
-  <span class="pukiwiki-ticketlink-site" data-site="$site_info_json"></span>
+  <span class="ticketlink-site" data-site="$site_info_json"></span>
 EOS;
                $text .= "\n";
        }
        $data = <<<EOS
-<div class="pukiwiki-ticketlink-def" style="display:none;">
+<div id="pukiwiki-site-properties" style="display:none;">
+<div class="ticketlink-def">
 $text
 </div>
+</div>
 EOS;
        return $data;
 }
index 1a74567..1c9537a 100644 (file)
@@ -154,11 +154,11 @@ window.addEventListener && window.addEventListener('DOMContentLoaded', function(
     }
     function getSiteListFromBody() {
       var list = [];
-      var defRoot = document.querySelector('.pukiwiki-ticketlink-def');
+      var defRoot = document.querySelector('#pukiwiki-site-properties .ticketlink-def');
       if (!defRoot) {
         return [];
       }
-      var siteNodes = defRoot.querySelectorAll('.pukiwiki-ticketlink-site');
+      var siteNodes = defRoot.querySelectorAll('.ticketlink-site');
       Array.prototype.forEach.call(siteNodes, function (e) {
         var siteInfoText = e.dataset && e.dataset.site;
         if (!siteInfoText) return;
index 56020ab..53154bc 100644 (file)
@@ -73,7 +73,7 @@ header('Content-Type: text/html; charset=' . CONTENT_CHARSET);
 <?php echo $head_tag ?>
 </head>
 <body>
-
+<?php echo $html_scripting_data ?>
 <div id="header">
  <a href="<?php echo $link['top'] ?>"><img id="logo" src="<?php echo IMAGE_DIR . $image['logo'] ?>" width="80" height="80" alt="[PukiWiki]" title="[PukiWiki]" /></a>
 
@@ -264,11 +264,11 @@ function _toolbar($key, $x = 20, $y = 20){
 <?php } ?>
 
 <div id="footer">
- Site admin: <a href="<?php echo $modifierlink ?>"><?php echo $modifier ?></a><p />
+ Site admin: <a href="<?php echo $modifierlink ?>"><?php echo $modifier ?></a>
+ <p>
  <?php echo S_COPYRIGHT ?>.
  Powered by PHP <?php echo PHP_VERSION ?>. HTML convert time: <?php echo elapsedtime() ?> sec.
+ </p>
 </div>
-<?php echo $html_scripting_data ?>
-
 </body>
 </html>
index fffaca7..67c3298 100644 (file)
@@ -574,7 +574,9 @@ header('Content-Type: text/html; charset=' . CONTENT_CHARSET);
 
 <?php echo $head_tag ?>
 </head>
-<body><!-- Theme:<?php echo htmlsc($theme) . ' Sidebar:' . $sidebar ?> -->
+<body>
+<?php echo $html_scripting_data ?>
+<!-- Theme:<?php echo htmlsc($theme) . ' Sidebar:' . $sidebar ?> -->
 
 <?php if ($menu && $sidebar == 'strict') { ?>
 <!-- Sidebar top -->
@@ -891,11 +893,12 @@ function _toolbar($key, $x = 20, $y = 20){
 <?php } // PKWK_SKIN_SHOW_TOOLBAR ?>
 
 <!-- Copyright etc -->
- Site admin: <a href="<?php echo $modifierlink ?>"><?php echo $modifier ?></a><p />
+ Site admin: <a href="<?php echo $modifierlink ?>"><?php echo $modifier ?></a>
+ <p>
  <?php echo S_COPYRIGHT ?>.
  Powered by PHP <?php echo PHP_VERSION ?><br />
  HTML convert time: <?php echo elapsedtime() ?> sec.
-
+ </p>
 </div><!-- class="footer" -->
 
 <?php if ($menu && ($sidebar != 'top' && $sidebar != 'bottom')) { ?>
@@ -903,6 +906,5 @@ function _toolbar($key, $x = 20, $y = 20){
 </div><!-- class="pkwk_body" -->
 <?php } ?>
 
-
 </body>
 </html>