Explorar o código

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 %!s(int64=8) %!d(string=hai) anos
pai
achega
b104b586ae
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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);
 		
 		// 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(
 <<<EOF