BUG 0000 "Problem in Dashboards" SOLVED
- Problem in Dashboards - Problem in deploying the dashlets, when the column is one - Solved problem, validation was added for deploy of columns - It was added that by default displays two columns * Available from version ProcessMaker-2.0.47 (2.5.1)
This commit is contained in:
@@ -28,7 +28,7 @@ class Dashboard extends Controller
|
||||
try {
|
||||
$dashletsExist = $this->getDashletsInstancesForCurrentUser();
|
||||
$dashletsHide = array();
|
||||
$dashletColumns = 3;
|
||||
$dashletColumns = 2;
|
||||
|
||||
G::LoadClass( 'configuration' );
|
||||
$oConfiguration = new Configurations();
|
||||
@@ -447,4 +447,3 @@ class Dashboard extends Controller
|
||||
|
||||
// Functions for the dasboards administration module - End
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ var reallocate = function (cols) {
|
||||
}
|
||||
}.defaults(3);
|
||||
|
||||
|
||||
Ext.onReady(function(){
|
||||
|
||||
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
|
||||
@@ -141,7 +142,6 @@ Ext.onReady(function(){
|
||||
}
|
||||
};
|
||||
*/
|
||||
|
||||
pd.items.items[0].columnWidth = 0.49;
|
||||
pd.items.items[1].columnWidth = 0.49;
|
||||
pd.items.items[2].columnWidth = 0.01;
|
||||
@@ -320,28 +320,47 @@ Ext.onReady(function(){
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pd.doLayout();
|
||||
|
||||
if (dashletsColumns == 2) {
|
||||
tbDashboard.items.items[0].setDisabled(false);
|
||||
tbDashboard.items.items[1].setDisabled(true);
|
||||
|
||||
var pd = Ext.getCmp('portalDashboard');
|
||||
|
||||
pd.items.items[0].columnWidth = 0.49;
|
||||
pd.items.items[1].columnWidth = 0.49;
|
||||
pd.items.items[2].columnWidth = 0.01;
|
||||
pd.doLayout();
|
||||
} else {
|
||||
var pd = Ext.getCmp('portalDashboard');
|
||||
|
||||
pd.items.items[0].columnWidth = 0.33;
|
||||
pd.items.items[1].columnWidth = 0.33;
|
||||
pd.items.items[2].columnWidth = 0.33;
|
||||
pd.doLayout();
|
||||
|
||||
tbDashboard.items.items[0].setDisabled(true);
|
||||
tbDashboard.items.items[1].setDisabled(false);
|
||||
}
|
||||
switch(dashletsColumns) {
|
||||
case 1:
|
||||
var pd = Ext.getCmp("portalDashboard");
|
||||
reallocate(1);
|
||||
|
||||
pd.items.items[0].columnWidth = 0.98;
|
||||
pd.items.items[1].columnWidth = 0.01;
|
||||
pd.items.items[2].columnWidth = 0.01;
|
||||
pd.doLayout();
|
||||
|
||||
tbDashboard.items.items[0].setDisabled(false);
|
||||
tbDashboard.items.items[1].setDisabled(false);
|
||||
tbDashboard.items.items[2].setDisabled(true);
|
||||
break;
|
||||
case 2:
|
||||
var pd = Ext.getCmp("portalDashboard");
|
||||
reallocate(2);
|
||||
|
||||
pd.items.items[0].columnWidth = 0.49;
|
||||
pd.items.items[1].columnWidth = 0.49;
|
||||
pd.items.items[2].columnWidth = 0.01;
|
||||
pd.doLayout();
|
||||
|
||||
tbDashboard.items.items[0].setDisabled(false);
|
||||
tbDashboard.items.items[1].setDisabled(true);
|
||||
tbDashboard.items.items[2].setDisabled(false);
|
||||
break;
|
||||
case 3:
|
||||
var pd = Ext.getCmp("portalDashboard");
|
||||
reallocate(3);
|
||||
|
||||
pd.items.items[0].columnWidth = 0.33;
|
||||
pd.items.items[1].columnWidth = 0.33;
|
||||
pd.items.items[2].columnWidth = 0.33;
|
||||
pd.doLayout();
|
||||
|
||||
tbDashboard.items.items[0].setDisabled(true);
|
||||
tbDashboard.items.items[1].setDisabled(false);
|
||||
tbDashboard.items.items[2].setDisabled(false);
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user