2015-07-12 78 views
0

我有我無法解決問題,也許有人可以幫忙嗎?dijit.layout.ContentPane向右移動在頁面加載

我有我的頁面的頂部dijit.layout.ContentPane,這個坐落在一個dijit.layout.BorderContainer。在頁面加載容器的內容右移和下移約15px。所有其他元素工作正常。

我已經分離出的問題dijit.layout.ContentPane。在一側的容器我正在if語句一些PHP和畫些簡單的按鈕:

<!-- 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> 
+1

你可以設置一個jsfiddle,我們可以看到問題嗎? – ben

+0

我認爲php部分不能在jsfiddle上工作,@ ccoles3能否請您創建jsfiddle但是使用靜態HTML? – GibboK

+0

好的,我會嘗試:-) – ccoles3

回答

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>