Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

how to put two macro on the same line ???

Michael Regelin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 5, 2012

it may be a stupid question, but how do I put two macro like (date-data) on the same line with "(" before and ")" after.

I the text-editor, it seems not possible ?

Here is the code:

<p>(</p>
                              <ac:macro ac:name="number-data">
                                <ac:parameter ac:name="width">30px</ac:parameter>
                                <ac:parameter ac:name="name">heuresuivi</ac:parameter>
                                <ac:parameter ac:name="minValue">1</ac:parameter>
                                <ac:parameter ac:name="format">00</ac:parameter>
                                <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
                                <ac:parameter ac:name="maxValue">24</ac:parameter>
                                <ac:plain-text-body><![CDATA[ ]]></ac:plain-text-body>
                              </ac:macro>
                              <p>h</p>
                              <ac:macro ac:name="number-data">
                                <ac:parameter ac:name="width">30px</ac:parameter>
                                <ac:parameter ac:name="name">minsuivi</ac:parameter>
                                <ac:parameter ac:name="minValue">0</ac:parameter>
                                <ac:parameter ac:name="format">00</ac:parameter>
                                <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
                                <ac:parameter ac:name="maxValue">59</ac:parameter>
                                <ac:plain-text-body><![CDATA[ ]]></ac:plain-text-body>
                              </ac:macro>
                              <p>)</p>

thanks a lot for any help.

sincerly,

Michael

3 answers

1 accepted

1 vote
Answer accepted
CharlesH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 5, 2012

Okay. If you were to click just once on one of your number-data elements, do you see a pop-up with two buttons (edit, remove) or 4 (edit, remove, new line, in line)? Hopefully you can see all 4 and choose the inline option.

It might be worth removing the hidden-data element, but keeping its contents, as perhaps it is having an effect on how the two date-data elements and the h are being displayed.

Alternatively, why don't you just use one date-data field to show the hours and the minutes (as well as the date). There's a display format parameter you can set to control how the date/time is displayed:

dd MMM yyyy (hh:mm)

Michael Regelin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 5, 2012

Okay,

I removed the hidden-data and it is working now. The inline act as it should :-).

The reason why I use two date-data is because i re-use the hour in another field for resuming...

Tanks a lot.

Michael

0 votes
CharlesH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 5, 2012

Your code already has the atlassian-macro-output-type embedded in the 2 date-data macros you used. If you were using the rich text editor, then some macros including the Scaffolding ones, give the option of saying whether they should be on a new line, or be "in-line". Looks like you've already found that and set the appropriate option.

How do things look in the new editor? If you could post a screen capture that may help get to the bottom of this.

Michael Regelin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 5, 2012

oK.

In yellow what needs to be put on a same line.

the text-editor semms not to act correctly ?

And here is the result after saving the page:

0 votes
CharlesH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 5, 2012

Hi Michael,

You have the key element already:

&lt;ac:parameter ac:name="atlassian-macro-output-type"&gt;INLINE&lt;/ac:parameter&gt;

It's the p tag containing the "h" that you need to eliminate. There are times when that's easier said than done, so we've ended up adding the following script to pages using scaffold fields where we saw an excess of white space:

&lt;script type="text/javascript"&gt;
jQuery(document).ready(function() {
  //Check each p tag to see if it's empty. Whitespace or non-breaking spaces constitute empty too.
  jQuery('p').each(function() {
    var $this = jQuery(this);
    if($this.html().replace(/\s|&amp;nbsp;|&lt;br&gt;|/g, '').length == 0)
        $this.remove();
  });
});
&lt;/script&gt;

We put this script into a wiki page of its own, then just include it on pages needing to trim white space.

You could go down the same route to eliminating your "<p>h</p>" element.

Hope this helps.

Charles

Michael Regelin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 5, 2012

Hi Charles,

thanks for your post.

Sorry, but I'm not familiar with "atlassian-macro-output-type".

My need is to display "(14h23)" on the same line, meaning "({date-data}h{date-data})".

What would be the code ?

Do I need to insert a wiki markup or can I do this with the new editor ?

Thanks

Michael

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events