0

I have a problem which I am unable to fix, maybe somebody can help?

I have a dijit.layout.ContentPane at the top of my page, this sits in a dijit.layout.BorderContainer. On page load the contents of the container shift right and down by about 15px. All other elements work fine.

I have isolated the issue to dijit.layout.ContentPane. In side the container I am running some php if statements and drawing some simple buttons:

<!-- Here are the common buttons above the tabs -->

<div id="toolPane" dojoType="dijit.layout.ContentPane" region="top" >

    <?php 
    if($this->restrict == 1){
        if($this->teammembers == 1 || $this->newleaders == 1 || $this->newadminleaders == 1){ 
            if ($this->mayUpdateSummary){
    ?><span style="white-space:nowrap;" ><?php echo $this->issueActionLink($issue, 'Create report', 'report', 'reportLink'); ?></span>
    <span style="white-space:nowrap;" ><a class="emailLink" href="mailto:?subject=Task%20%23<?php echo $issue->id; ?>&body=<?php echo urlencode($this->serverUrl(true)); ?>">Share link</a></span><?php
    }
    }
    }else if($this->restrict == 2){
        if ($this->mayUpdateSummary){
    ?><span style="white-space:nowrap;" ><?php echo $this->issueActionLink($issue, 'Create report', 'report', 'reportLink'); ?></span>
    <span style="white-space:nowrap;" ><a class="emailLink" href="mailto:?subject=Task%20%23<?php echo $issue->id; ?>&body=<?php echo urlencode($this->serverUrl(true)); ?>">Share link</a></span><?php
    }
    }
    ?>

<?php if ($this->mayUpdateSummary): ?>
<span style="white-space:nowrap;" ><?php echo $this->issueActionLink($issue,'Edit summary', 'progress-summary', 'editbutton'); ?></span> 
<?php endif; ?>
<?php if ($closeButton): ?>
<span style="white-space:nowrap;" ><?php echo $closeButton; ?></span>
<?php endif; ?>
<?php if ($reopenButton): ?>
<span style="white-space:nowrap;" ><?php echo $reopenButton; ?></span>
<?php endif; ?>

</div>
4

1 回答 1

0

好的,我们决定隐藏页面,直到加载 dijit 元素。为此,我们添加了这个在页面中淡入淡出的脚本,让它有时间在显示之前对其进行排序:

<script type="text/javascript">
    $(document).ready(function(){
        $(".content").hide();
     });

    $(window).load(function(){
        $(".content").fadeIn("fast");
     });
</script>

<div class="content">
[faded in content goes here]
</div>
于 2015-07-26T12:02:57.553 回答