Skip to content

Commit

Permalink
[JENKINS-70602] Do not overwrite system font on examples page (#169)
Browse files Browse the repository at this point in the history
* Replace inline page modification

* Fix loading CSS
  • Loading branch information
NotMyFault authored Feb 12, 2023
1 parent 827e873 commit 1edb5e6
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 60 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Behaviour.register({
"INPUT.select-all" : function(e) {
e.onclick = function () {
e.focus();
e.select();
}
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,8 @@ l.layout(type: "one-column") {
l.main_panel {
h2(_("Embeddable Build Status Icon"))
p(raw(_("blurb")))
raw("""
<p>
</p>
<script>
Behaviour.register({
"INPUT.select-all" : function(e) {
e.onclick = function () {
e.focus();
e.select();
}
}
});
</script>
<style>
INPUT {
font-family: Console, "Courier New", Courier, monospace;
border: none;
font-size: -2;
}
INPUT.select-all {
width:100%;
}
IMG#badge {
margin-left:2em;
}
h3 {
border-bottom: 1px solid grey;
}
</style>
""")
st.adjunct(includes: "org.jenkinsci.plugins.badge.actions.JobBadgeAction.ClickHandler")
l.css(src: "/plugin/embeddable-build-status/css/design.css")

def fullJobName = URLEncoder.encode(my.project.fullName, "UTF-8");
def jobUrl = "${app.rootUrl}${my.project.url}";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,8 @@ l.layout(type: "one-column") {
l.main_panel {
h2(_("Embeddable Build Status Icon"))
p(raw(_("blurb")))
raw("""
<p>
</p>
<script>
Behaviour.register({
"INPUT.select-all" : function(e) {
e.onclick = function () {
e.focus();
e.select();
}
}
});
</script>
<style>
INPUT {
font-family: Console, "Courier New", Courier, monospace;
border: none;
font-size: -2;
}
INPUT.select-all {
width:100%;
}
IMG#badge {
margin-left:2em;
}
h3 {
border-bottom: 1px solid grey;
}
</style>
""")
st.adjunct(includes: "org.jenkinsci.plugins.badge.actions.JobBadgeAction.ClickHandler")
l.css(src: "/plugin/embeddable-build-status/css/design.css")

def fullJobName = URLEncoder.encode(my.project.fullName, "UTF-8");
def jobUrl = "${app.rootUrl}${my.project.url}${my.run.number}/";
Expand Down
14 changes: 14 additions & 0 deletions src/main/webapp/css/design.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
INPUT {
border: none;
font-size: -2;
}
INPUT.select-all {
width:100%;
font-family: Console, "Courier New", Courier, monospace;
}
IMG#badge {
margin-left:2em;
}
h3 {
border-bottom: 1px solid grey;
}

0 comments on commit 1edb5e6

Please sign in to comment.