Note that there are some explanatory texts on larger screens.

plurals
  1. PODurandal:Move modal pop up to top of page
    primarykey
    data
    text
    <p>I am working with durandal and twitter-bootstrap, where I have a page and inside of it i have a modal popup. The code for the modal popup is something like:</p> <pre><code>&lt;div id="reportModal" class="messageBox messageBox-fixedSize"&gt; &lt;div class="modal-header"&gt; &lt;/div&gt; &lt;div class="modal-body" &gt; &lt;/div&gt; &lt;div class="modal-footer "&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>the <strong>RESULT</strong> of this in chrome is something like:</p> <pre><code>&lt;div id="reportModal" class="messageBox messageBox-fixedSize ui-draggable" data-view="views/Reports/reportWindow" style="position: relative; margin-top: -151.05555534362793px; margin-left: -395.55555534362793px;" data-active-view="true"&gt; &lt;div class="modal-header"&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;/div&gt; &lt;div class="modal-footer "&gt; &lt;/div&gt; </code></pre> <p></p> <p>The interesting thing on the result it's the style attribute what is changed for durandal from dialog.js( using compositionComplete method).</p> <pre><code>style="position: relative; margin-top: -151.05555534362793px; margin-left: -395.55555534362793px;" </code></pre> <p>If we go to compositionComplete, the comments about this method are: "This function is called after the modal is fully composed into the DOM, allowing your implementation to do any final modifications, such as positioning or animation. You can obtain the original dialog object by using <code>getDialog</code> on context.model."</p> <p>My question is how can I add a new position (to the top of the page) based on this method?.</p> <p>Any help is aprreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload