Browse Source

User editable dashboards... implementation in progress

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2025 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 13 years ago
parent
commit
9f92379b5d
1 changed files with 7 additions and 1 deletions
  1. 7 1
      pages/ajax.render.php

+ 7 - 1
pages/ajax.render.php

@@ -681,7 +681,13 @@ try
 			}
 			
 			$oDashlet->FromParams($aCurrentValues);
-			$oDashlet->Update($aValues, $aUpdatedDecoded);
+			$sPrevClass = get_class($oDashlet);
+			$oDashlet = $oDashlet->Update($aValues, $aUpdatedDecoded);
+			$sNewClass = get_class($oDashlet);
+			if ($sNewClass != $sPrevClass)
+			{
+				$oPage->add_ready_script("$('#dashlet_$sDashletId').dashlet('option', {dashlet_class: '$sNewClass'});");
+			}
 			if ($oDashlet->IsRedrawNeeded())
 			{
 				$offset = $oPage->start_capture();