Add property widgettype

This commit is contained in:
Laurent Destailleur 2021-03-10 17:02:39 +01:00
parent 8192349320
commit 82d5c7289d
13 changed files with 42 additions and 16 deletions

View File

@ -195,6 +195,7 @@ if ($conf->use_javascript_ajax) {
$SommeA = 0;
$SommeB = 0;
$SommeC = 0;
$SommeD = 0;
$total = 0;
@ -492,6 +493,8 @@ print '</tr>';
print "</table>\n";
print "</div>";
print '<br>';
print $resultboxes['boxlistb'];
print '</div>'."\n";

View File

@ -41,6 +41,8 @@ class box_graph_invoices_permonth extends ModeleBoxes
public $info_box_head = array();
public $info_box_contents = array();
public $widgettype = 'graph';
/**
* Constructor

View File

@ -41,6 +41,8 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
public $info_box_head = array();
public $info_box_contents = array();
public $widgettype = 'graph';
/**
* Constructor

View File

@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT."/core/boxes/modules_boxes.php";
/**
* Class to manage the box
*/
class box_nb_ticket_last_x_days extends ModeleBoxes
class box_graph_nb_ticket_last_x_days extends ModeleBoxes
{
public $boxcode = "box_nb_ticket_last_x_days";
@ -36,14 +36,12 @@ class box_nb_ticket_last_x_days extends ModeleBoxes
public $boxlabel;
public $depends = array("ticket");
/**
* @var DoliDB Database handler.
*/
public $param;
public $info_box_head = array();
public $info_box_contents = array();
public $widgettype = 'graph';
/**
* Constructor
* @param DoliDB $db Database handler

View File

@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT."/core/boxes/modules_boxes.php";
/**
* Class to manage the box
*/
class box_nb_tickets_type extends ModeleBoxes
class box_graph_nb_tickets_type extends ModeleBoxes
{
public $boxcode = "box_nb_tickets_type";
@ -36,14 +36,13 @@ class box_nb_tickets_type extends ModeleBoxes
public $boxlabel;
public $depends = array("ticket");
/**
* @var DoliDB Database handler.
*/
public $param;
public $info_box_head = array();
public $info_box_contents = array();
public $widgettype = 'graph';
/**
* Constructor
* @param DoliDB $db Database handler

View File

@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT."/core/boxes/modules_boxes.php";
/**
* Class to manage the box
*/
class box_new_vs_close_ticket extends ModeleBoxes
class box_graph_new_vs_close_ticket extends ModeleBoxes
{
public $boxcode = "box_nb_tickets_type";
@ -36,14 +36,13 @@ class box_new_vs_close_ticket extends ModeleBoxes
public $boxlabel;
public $depends = array("ticket");
/**
* @var DoliDB Database handler.
*/
public $param;
public $info_box_head = array();
public $info_box_contents = array();
public $widgettype = 'graph';
/**
* Constructor
* @param DoliDB $db Database handler

View File

@ -41,6 +41,8 @@ class box_graph_orders_permonth extends ModeleBoxes
public $info_box_head = array();
public $info_box_contents = array();
public $widgettype = 'graph';
/**
* Constructor

View File

@ -41,6 +41,8 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
public $info_box_head = array();
public $info_box_contents = array();
public $widgettype = 'graph';
/**
* Constructor

View File

@ -44,6 +44,8 @@ class box_graph_product_distribution extends ModeleBoxes
public $info_box_head = array();
public $info_box_contents = array();
public $widgettype = 'graph';
/**
* Constructor

View File

@ -41,6 +41,8 @@ class box_graph_propales_permonth extends ModeleBoxes
public $info_box_head = array();
public $info_box_contents = array();
public $widgettype = 'graph';
/**
* Constructor

View File

@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT."/core/boxes/modules_boxes.php";
/**
* Class to manage the box
*/
class box_ticket_by_severity extends ModeleBoxes
class box_graph_ticket_by_severity extends ModeleBoxes
{
public $boxcode = "box_ticket_by_severity";
@ -45,6 +45,9 @@ class box_ticket_by_severity extends ModeleBoxes
public $info_box_head = array();
public $info_box_contents = array();
public $widgettype = 'graph';
/**
* Constructor
* @param DoliDB $db Database handler

View File

@ -109,6 +109,12 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box
*/
public $note;
/**
* @var string Widget type ('graph' means the widget is a graph widget)
*/
public $widgettype = '';
/**
* Constructor
*

View File

@ -77,6 +77,12 @@ class mymodulewidget1 extends ModeleBoxes
*/
public $info_box_contents = array();
/**
* @var string Widget type ('graph' means the widget is a graph widget)
*/
public $widgettype = 'graph';
/**
* Constructor
*