Przeglądaj źródła

HTML bug fix on the blob page

That blob page sent *two* body tags. Now that we have bottom scripts,
we can fix that easily: don't try to set body.onload, but run the
prettyprinting through a bottom script on jQuery's document.ready.
tags/v1.7.0
Tom 9 lat temu
rodzic
commit
4dee2c5ee0

+ 2
- 3
src/main/java/com/gitblit/wicket/pages/BlobPage.html Wyświetl plik

@@ -40,9 +40,8 @@
</wicket:link>
</wicket:head>
<body>
<wicket:extend>
<!-- need to specify body.onload -->
<body onload="prettyPrint()">
<!-- blob nav links -->
<div class="page_nav2">
@@ -61,6 +60,6 @@
<!-- blob image -->
<img wicket:id="blobImage" style="padding-top:5px;"></img>
</body>
</wicket:extend>
</body>
</html>

+ 2
- 0
src/main/java/com/gitblit/wicket/pages/BlobPage.java Wyświetl plik

@@ -137,6 +137,7 @@ public class BlobPage extends RepositoryPage {
table = missingBlob(blobPath, commit);
} else {
table = generateSourceView(source, extension, type == 1);
addBottomScriptInline("jQuery(prettyPrint);");
}
add(new Label("blobText", table).setEscapeModelStrings(false));
add(new Image("blobImage").setVisible(false));
@@ -150,6 +151,7 @@ public class BlobPage extends RepositoryPage {
table = missingBlob(blobPath, commit);
} else {
table = generateSourceView(source, null, false);
addBottomScriptInline("jQuery(prettyPrint);");
}
add(new Label("blobText", table).setEscapeModelStrings(false));
add(new Image("blobImage").setVisible(false));

Ładowanie…
Anuluj
Zapisz