BUG 000 Fix bug with the home menu

This commit is contained in:
Julio Cesar Laura
2012-01-04 12:23:16 -04:00
parent c003597d1b
commit 6978f5f282

View File

@@ -88,6 +88,7 @@ class PMPluginRegistry {
private $_aToolbarFiles = array();
private $_aCaseSchedulerPlugin = array();
private $_aTaskExtendedProperties = array();
private $_aDashboardPages = array();
/**
* Registry a plugin javascript to include with js core at same runtime
@@ -244,33 +245,27 @@ class PMPluginRegistry {
if ( $detail->sNamespace == $sNamespace )
unset ( $this->_aFolders[ $key ] );
}
foreach ( $this->_aTriggers as $key=>$detail ) {
if ( $detail->sNamespace == $sNamespace )
unset ( $this->_aTriggers[ $key ] );
}
foreach ($this->_aDashlets as $key => $detail) {
if ($detail == $sNamespace) {
unset($this->_aDashlets[$key]);
}
}
foreach ( $this->_aReports as $key=>$detail ) {
if ( $detail == $sNamespace )
unset ( $this->_aReports[ $key ] );
}
foreach ( $this->_aPmFunctions as $key=>$detail ) {
if ( $detail == $sNamespace )
unset ( $this->_aPmFunctions[ $key ] );
}
foreach ( $this->_aRedirectLogin as $key=>$detail ) {
if ( $detail->sNamespace == $sNamespace )
unset ( $this->_aRedirectLogin[ $key ] );
}
foreach ( $this->_aSteps as $key=>$detail ) {
if ( $detail->sNamespace == $sNamespace )
unset ( $this->_aSteps[ $key ] );
@@ -291,6 +286,10 @@ class PMPluginRegistry {
if ( $detail->sNamespace == $sNamespace )
unset ( $this->_aTaskExtendedProperties[ $key ] );
}
foreach ( $this->_aDashboardPages as $key=>$detail ) {
if ( $detail->sNamespace == $sNamespace )
unset ( $this->_aDashboardPages[ $key ] );
}
//unregistering javascripts from this plugin
$this->unregisterJavascripts($sNamespace);
@@ -1141,6 +1140,36 @@ class PMPluginRegistry {
}
}
/**
* Register a dashboard page for cases in the singleton
* @param unknown_type $sNamespace
* @param unknown_type $sPage
* @param unknown_type $sName
* @param unknown_type $sIcon
*/
function registerDashboardPage($sNamespace, $sPage, $sName, $sIcon ) {
foreach ( $this->_aDashboardPages as $row=>$detail ) {
if ( $sPage == $detail->sPage && $sNamespace == $detail->sNamespace ){
$detail->sName=$sName;
$detail->sIcon=$sIcon;
$found = true;
}
}
if ( !$found ) {
$dashboardPage = new dashboardPage ($sNamespace, $sPage, $sName, $sIcon);
$this->_aDashboardPages[] = $dashboardPage;
}
}
/**
* return all dashboard pages
*
* @return array
*/
function getDashboardPages() {
return $this->_aDashboardPages;
}
/**
* return all tasl extended properties
*