I am using declarative syntax "Jenkinsfile" pipeline syntax and want to separate my parameters into groups. I found articles that show I can use the separator plugin with something like:
String sectionHeaderStyleCss = ' color: white; background: green; font-family: Roboto, sans-serif !important; padding: 5px; text-align: center; '
String separatorStyleCss = ' border: 0; border-bottom: 1px dashed #ccc; background: #999; '
pipeline
{
parameters
{
separator(
name: "Group_1",
sectionHeader: "Foo Params",
separatorStyle: separatorStyleCss,
sectionHeaderStyle: sectionHeaderStyleCss
)
string(
name: 'FooStuff',
defaultValue: 'Foo',
description: 'Foo Stuff',
)
separator(
name: "Group_2",
sectionHeader: "Bar Params",
separatorStyle: separatorStyleCss,
sectionHeaderStyle: sectionHeaderStyleCss
)
string(
name: 'BarStuff',
defaultValue: 'Bar',
description: 'Bar Stuff'
)
}
}
when I open 'Build with Parameters' in Jenkins the first time its fine I see the layout I expect with :
+----- Foo Params -----+
FooStuff: Foo
+----- Bar Params -----+
BarStuff: Bar
but if I open 'Build with Parameters again... it seems like the separators multiply like Mickey Mouse brooms and now I have:
+----- Foo Params -----+
FooStuff: Foo
+----- Bar Params -----+
BarStuff: Bar
+----- Foo Params -----+
+----- Bar Params -----+
Does anyone know why my parameters are multiplying each time I run?
Related
#/mapping/date.js
import { translationMacro as t } from "ember-i18n";
export default {
i18n: Ember.inject.service(),
DateFilter: {
today: "Today",
yesterday: "Yesterday",
thisWeek: "This Week",
lastWeek: "Last Week",
thisMonth: "This Month",
lastMonth: "Last Month",
none: "None"
}
I have tried using helper as {{t "Today"}}, macros as(t "Today") and service injection as this.get('i18n').t('Today').toString(), where 'Today' is a key, but none of them are working.
Also, how to translate strings in .scss file? For example 'Open file' in below code.
&::after{
position: absolute;
content: 'Open file';
font-size: 12px;
color: $secondary-button;
bottom: 16px;
left: 16px;
}
Unless you specify "Today" as one of the keys in your-locale/translation.js, this will not work.
I guess you might want to use the property instead of a hard-coded string in the {{t}} helper. Use {{t DateFilter.today}}. DateFilter.today is a controller property that will return the string 'today'
I want to add one icon to placeholder like this
$("#tag_list").select2({
allowClear: true,
placeholder: "<i class='icon-group'></i> inout your tags...",
tags: ['a', 'b', 'c'],
});
But it renders plain text in select2, so how to render html text for placeholder?
Select2 automatically escapes HTML markup.
$("#tag_list").select2({
allowClear: true,
placeholder: "<i class='icon-group'></i> inout your tags...",
tags: ['a', 'b', 'c'],
escapeMarkup : function(markup) { return markup; } // let our custom formatter work
});
By overriding the 'escapeMarkup' parameter you can force it to render plain HTML instead (by returning the unescaped HTML as is). This will affect both the placeholder AND the select data (select2 handles the placeholder as any data, thus escaping it).
For more information, check the AJAX data example:
Examples - Select2 | LoadingRemoteData
You can specify a placeholder object, rather than only the text. This will render the HTML.
So in your case, the placeholder might look something like this.
$("#tag_list").select2({
placeholder: {
id: "-1",
text: '<i class="icon-group"></i> input your tags...'
}
});
Im guessing your are trying to use font-awesome.
They have a cheatsheet with unicodes here: http://fortawesome.github.io/Font-Awesome/cheatsheet/
This can be placed in the placeholder in html:
<input name="username" placeholder="">
Remember to add the on the input element:
font-family: 'FontAwesome'
This is not supported by all browsers so you might want to do a fallbackhack with the :before element.
.wrapper:before {
font-family: 'FontAwesome';
color:red;
position:relative;
content: "\f042";
}
Last fallback is to actually use an image like this:
background-image: url(http://www.levenmetwater.nl/static/global/images/icon-search.png);
background-position: 10px center;
background-repeat: no-repeat;
If you want it to remove the icon on focus, add this:
input:focus {
background-position: -20px center;
text-indent: 0;
width: 50%;
}
function format(state){
if (!state.id) {
return state.text; // optgroup
} else {
return "<img class='flag' src='images/flags/" + state.id.toLowerCase() + ".png'/>" + state.text;
}
}
$("#tag_list").select2({
formatResult: format,
formatSelection: format,
escapeMarkup: function(m) { return m; }
});
http://ivaynberg.github.io/select2/
I am trying to use font replacement for my links, but have no idea how to do it.
My test site is http://www.internetlinked.com/test/ how do I setup sifr-config.js so that the links on the left have their fonts replaced. I go it to work using
sIFR.replace(decade, {
selector: 'li',
css: '.sIFR-root { background-color: #1A171B; }'
});
But then I lost all the hover affects and borders
using
sIFR.replace(decade, {
selector: 'a',
css: '.sIFR-root { background-color: #1A171B; }'
});
results in the replacement but the links don't work
I am using sIFR 3
Your first approach is correct. You can style the link by adding rules to the sIFR CSS:
sIFR.replace(decade, { selector: 'li', css: '.sIFR-root { background-color: #1A171B; } a { color: #FF9900; a:hover { color: #FF0000; }' });
Borders and such would be trickier, since Flash doesn't natively support these. Looking at your design, I would not recommend using sIFR for the links in the sidebar.
I have an H1 selector that I'm replacing with sIFR. Within some of the H1 selectors are < strong>< /strong> selectors; e.g.:
<h1>Hello world, <strong>this is some bold text</strong> and this is normal text</h1>
Everything outside of the < strong>< /strong> tags is replaced fine -- and the text within the tags does not display. I'd like to apply different styling to the < strong> text. Is this possible?
Here is my relevant sIFR code from sifr-config.js:
sIFR.replace(avenir_black, {
selector: 'h1',
css: '.sIFR-root { color: #000000; text-transform:uppercase; }',
wmode: 'transparent'
});
I tried adding this, but no luck:
sIFR.replace(avenir_black, {
selector: 'h1 strong',
css: '.sIFR-root { color: #cc0000; text-transform:uppercase; }',
wmode: 'transparent'
});
sIFR makes text inside <strong> tags bold. For the text to show up, the bold glyphs of the font need to have been exported. When creating the sIFR Flash movie, make sure to select a character and make it bold.
I tried many times and searched this board, but I can't do a simple thing like this:
http://xs.to/xs.php?h=xs139&d=09201&f=menu676.gif
I want to render a menu like this:
item 1 | item 2 | item 3 | .... etc...
"item 1" AND pipe character "|" = sIFR rendered text
HTML:
<div id="menu"> item 1 <span class="pipe"> | </span> item 2 <span class="pipe"> | </span> </div>
This part is within my HTML at the very bottom:
<script type="text/javascript">
var metaroman2 =
{ src: 'shared/sifr/metaroman2.swf' , ratios:[....7, 1.32....] };
sIFR.activate(metaroman2);
sIFR.replace(metaroman2, {
selector: '#menu', css: ['.sIFR-root { background-color: #F9F9F9; color: #1F2956; font-weight:bold;}'], wmode: "transparent" });
sIFR.replace(metaroman2, {
selector: '.pipe', css: ['.sIFR-root { background-color: #F9F9F9; color: #1F2956;}'], wmode: "transparent" });
</script>
CSS:
.sIFR-active .pipe {
visibility : hidden; line-height : 1em; margin-left : 5px; margin-right : 5 px;
}
.sIFR-active #menu {
visibility : hidden; line-height : 1em;
}
The problem is, that the "|" character is beeing put right at the end of the word with no spacing between (5px).
How i want it:
item 1 [5px space] | [5px space] item 2
What i get:
item 1|item 2
OTHER METHOD:
If I try it with an image, the image doesnt get displayed at all. ("sIFR.fitExactly = true" has been set in sifr-config)
What I mean with "image": in stead of the pipe sign, an image which represents the pipe sign.
html:
<div id="menu"> item 1 <img src=...> item 2 <img src=...> </div>
css:
.sIFR-active #menu {
visibility : hidden; line-height : 1em;
}
script:
This part is within my HTML at the very bottom:
<script type="text/javascript">
var metaroman2 =
{ src: 'shared/sifr/metaroman2.swf' , ratios:[....7, 1.32....] };
sIFR.activate(metaroman2);
sIFR.replace(metaroman2, {
selector: '#menu', css: ['.sIFR-root { background-color: #F9F9F9; color: #1F2956; font-weight:bold;}'], wmode: "transparent" });
</script>
I'm sorry for the messy code, but I hope you can make some sense of it.
(edit: have been using sIFR for a few days, simple heading replacing with ratio's work perfectly but the above is beating me up)
wrap every menu item into separate element, and replace that with sIFR selector, don't replace pipes. wrap them into span and style only with CSS.
those replaced items and spans should all be floating block elements.
html:
<div id="menu">Item 1<span>|<span>Item2...
css:
#menu a , #menu span {
display: block;
float: left;
}