Navigation Menu

Skip to content

Commit

Permalink
[FIXED JENKINS-10167]Image is misplaced in background and long text s…
Browse files Browse the repository at this point in the history
…hift right column.
  • Loading branch information
ssogabe committed Mar 1, 2012
1 parent 382748d commit 714de30
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 22 deletions.
@@ -0,0 +1,48 @@
/*
* The MIT License
*
* Copyright (c) 2012, Seiji Sogabe
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package hudson.plugins.persona.selector;

import hudson.Extension;
import org.kohsuke.stapler.DataBoundConstructor;

/**
* Show persona on the right side.
*
* @author Seiji Sogabe
*/
public class RightSideSelector extends LocationSelector {

@DataBoundConstructor
public RightSideSelector() {
}

@Extension
public static class DescriptorImpl extends LocationSelectorDescriptor {

@Override
public String getDisplayName() {
return "Right-Side (Not background)";
}
}
}
@@ -1,7 +1,7 @@
<!--
The MIT License
Copyright (c) 2010, InfraDNA, Inc.
Copyright (c) 2012, Seiji Sogabe
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -23,7 +23,4 @@ THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt" xmlns:p="/lib/hudson/project">
<f:entry title="${%Persona}" field="personaId">
<f:select />
</f:entry>
</j:jelly>
@@ -1,7 +1,7 @@
<!--
The MIT License
Copyright (c) 2009 Cliffano Subagio
Copyright (c) 2012, Seiji Sogabe
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -24,17 +24,17 @@ THE SOFTWARE.
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt" xmlns:local="local">
<j:set var="img" value="${action.image}"/>

<img src="${rootURL}/${img.smallIconUrl}" width="48" height="48" /> ${action.quote}
<script>
Element.setStyle($('main-table'), {
'background-image': 'url(${rootURL}/${img.backgroundImageUrl})'
});
Element.setStyle($('main-panel'), {
'background-image': 'none',
'background-repeat': 'no-repeat',
'background-position': 'bottom right',
'padding-bottom': '270px'
});
</script>
</j:jelly>
<div style="max-width:400px;">
<table border="0">
<tr>
<td><img src="${rootURL}/${img.smallIconUrl}" width="48" height="48" /></td>
<td style="vertical-align: middle;">${action.quote}</td>
</tr>
</table>
</div>
<div style="text-align: right;">
<img src="${rootURL}/${img.backgroundImageUrl}" />
</div>

</j:jelly>
@@ -1,7 +1,7 @@
<!--
The MIT License
Copyright (c) 2009 Cliffano Subagio
Copyright (c) 2012, Seiji Sogabe
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -23,6 +23,16 @@ THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt" xmlns:local="local">
<j:set var="action" value="${it}"/>
<st:include page="floatingBox.jelly" />
<j:set var="img" value="${action.image}"/>

<div style="max-width:400px;">
<table border="0">
<tr>
<td><img src="${rootURL}/${img.smallIconUrl}" width="48" height="48" /></td>
<td style="vertical-align: middle;">${action.quote}</td>
</tr>
</table>
</div>
<img src="${rootURL}/${img.backgroundImageUrl}" />

</j:jelly>

0 comments on commit 714de30

Please sign in to comment.