瀏覽代碼

N.444 ... fixing regression introduced in [r4438]

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4441 a333f486-631f-4898-b8df-5754b55c2be0
romainq 8 年之前
父節點
當前提交
b104b586ae
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      application/ajaxwebpage.class.inc.php

+ 2 - 1
application/ajaxwebpage.class.inc.php

@@ -203,7 +203,8 @@ EOF
 		$this->s_content = $this->m_oTabs->RenderIntoContent($this->s_content, $this);
 		$this->s_content = $this->m_oTabs->RenderIntoContent($this->s_content, $this);
 		
 		
 		// Additional UI widgets to be activated inside the ajax fragment
 		// Additional UI widgets to be activated inside the ajax fragment
-    	if ($this->sContentType == 'text/html')
+		// Important: Testing the content type is not enough because some ajax handlers have not correctly positionned the flag (e.g json response corrupted by the script)
+		if (($this->sContentType == 'text/html') && (preg_match('/class="date-pick"/', $this->s_content) || preg_match('/class="datetime-pick"/', $this->s_content)) )
 		{
 		{
 			$this->add_ready_script(
 			$this->add_ready_script(
 <<<EOF
 <<<EOF