[Vtigercrm-developers] Dashboard widget width size

Preexo preexo at googlemail.com
Fri Feb 26 03:53:55 GMT 2016


I am creating a custom widget for the dashboard through a custom extension.
So far so good, but I would like to have my widget go across the whole
width. According to the framework gridster which is being used for the
dashboard by vtiger, this should work by assigning width:auto to the widget.

I went through the vtiger code and thought I found the solution. So in my
custom widget module, in the process function I set the width to `auto`. But
my widget still get's only a width of 4. I thought setting the width with
`$widget->set("width", "auto");` before setting the widget in the viewer
object `$viewer->assign('WIDGET', $widget);` might work, but had no effect.
PleaseSee my code:

    public function process(Vtiger_Request $request){
        $currentUser = Users_Record_Model::getCurrentUserModel();
		$viewer = $this->getViewer($request);
		$moduleName = $request->getModule();
		$linkId = $request->get('linkid');
		$moduleModel = Vtiger_Module_Model::getInstance($moduleName);
		$data = "foobar100";

		$widget = Vtiger_Widget_Model::getInstance($linkId,
$currentUser->getId());
		$widget->set("width", "auto");
		
		$viewer->assign('WIDGET', $widget);
		$viewer->assign('MODULE_NAME', $moduleName);
		$viewer->assign('DATA', $data);
        
        $content = $request->get('content');
		if(!empty($content)) {
			$viewer->view('dashboards/MSAReportContents.tpl', $moduleName);
		} else {
			$viewer->view('dashboards/MSAReport.tpl', $moduleName);
		}
    }

How can I make a vtiger widget go 100% width?
Thanks for any help, best regards





--
View this message in context: http://vtiger-crm.2324883.n4.nabble.com/Dashboard-widget-width-size-tp18511.html
Sent from the vtigercrm-developers mailing list archive at Nabble.com.


More information about the vtigercrm-developers mailing list